From e0f6e61fe07134be2c86fcc5e87f26af68396feb Mon Sep 17 00:00:00 2001 From: Suchang Woo Date: Fri, 18 Dec 2015 13:33:17 +0900 Subject: [PATCH 1/1] Imported Upstream version 4.3.8 --- ABOUT-NLS | 996 + AUTHORS | 34 + COPYING | 340 + ChangeLog | 6425 ++++ INSTALL | 236 + Makefile.am | 56 + Makefile.in | 955 + NEWS | 1176 + README | 59 + README-alpha | 15 + THANKS | 29 + TODO | 53 + aclocal.m4 | 1029 + build-aux/Makefile.am | 1 + build-aux/Makefile.in | 614 + build-aux/check-testfiles.sh | 64 + build-aux/config.guess | 1516 + build-aux/config.rpath | 660 + build-aux/config.sub | 1626 + build-aux/depcomp | 589 + build-aux/install-sh | 519 + build-aux/man-lint.sh | 19 + build-aux/mdate-sh | 201 + build-aux/missing | 367 + build-aux/mkinstalldirs | 161 + build-aux/texinfo.tex | 7210 ++++ build-aux/ylwrap | 223 + config.h.in | 1125 + configure | 35954 +++++++++++++++++++ configure.in | 253 + doc/Makefile.am | 70 + doc/Makefile.in | 943 + doc/find.info | 6835 ++++ doc/find.texi | 5043 +++ doc/getdate.texi | 553 + doc/mdate-sh | 205 + doc/perm.texi | 592 + doc/regexprops.texi | 720 + doc/stamp-vti | 4 + doc/texinfo.tex | 8641 +++++ doc/version.texi | 4 + find/Makefile.am | 38 + find/Makefile.in | 984 + find/defs.h | 649 + find/find.1 | 1472 + find/find.c | 1514 + find/finddata.c | 40 + find/fstype.c | 318 + find/ftsfind.c | 756 + find/parser.c | 3382 ++ find/pred.c | 2368 ++ find/testsuite/Makefile.am | 224 + find/testsuite/Makefile.in | 873 + find/testsuite/config/unix.exp | 298 + find/testsuite/find.gnu/access.exp | 15 + find/testsuite/find.gnu/access.xo | 11 + find/testsuite/find.gnu/comma.exp | 1 + find/testsuite/find.gnu/comma.xo | 1 + find/testsuite/find.gnu/delete.exp | 7 + find/testsuite/find.gnu/delete.xo | 4 + find/testsuite/find.gnu/deletedir.exp | 9 + find/testsuite/find.gnu/deletedir.xo | 1 + find/testsuite/find.gnu/deletefile.exp | 9 + find/testsuite/find.gnu/deletefile.xo | 1 + find/testsuite/find.gnu/depth-d.exp | 8 + find/testsuite/find.gnu/depth-d.xo | 1 + find/testsuite/find.gnu/depth.exp | 8 + find/testsuite/find.gnu/depth.xo | 1 + find/testsuite/find.gnu/empty.exp | 7 + find/testsuite/find.gnu/empty.xo | 1 + find/testsuite/find.gnu/exec-many-rtn-failure.exp | 4 + find/testsuite/find.gnu/exec-many-rtn-failure.xo | 1 + find/testsuite/find.gnu/exec-many-rtn-success.exp | 4 + find/testsuite/find.gnu/exec-many-rtn-success.xo | 1 + find/testsuite/find.gnu/exec-one-rtn-fail.exp | 5 + find/testsuite/find.gnu/exec-one-rtn-fail.xo | 1 + find/testsuite/find.gnu/exec-one-rtn-success.exp | 3 + find/testsuite/find.gnu/exec-one-rtn-success.xo | 1 + find/testsuite/find.gnu/execdir-hier.exp | 8 + find/testsuite/find.gnu/execdir-hier.xo | 2 + find/testsuite/find.gnu/execdir-in-unreadable.exp | 11 + find/testsuite/find.gnu/execdir-one.exp | 7 + find/testsuite/find.gnu/execdir-one.xo | 1 + find/testsuite/find.gnu/execdir-pwd.exp | 20 + find/testsuite/find.gnu/execdir-root-only.exp | 21 + find/testsuite/find.gnu/execdir-root-only.xo | 1 + find/testsuite/find.gnu/false.exp | 5 + find/testsuite/find.gnu/false.xo | 3 + .../find.gnu/follow-arg-parent-symlink.exp | 6 + .../find.gnu/follow-arg-parent-symlink.xo | 1 + find/testsuite/find.gnu/follow-basic.exp | 10 + find/testsuite/find.gnu/follow-basic.xo | 5 + find/testsuite/find.gnu/fprint-unwritable.exp | 9 + find/testsuite/find.gnu/fprint0_stdout.exp | 5 + find/testsuite/find.gnu/fprint0_stdout.xo | Bin 0 -> 5 bytes find/testsuite/find.gnu/gnu-or.exp | 5 + find/testsuite/find.gnu/gnu-or.xo | 6 + find/testsuite/find.gnu/gnuand.exp | 5 + find/testsuite/find.gnu/gnuand.xo | 1 + find/testsuite/find.gnu/gnunot.exp | 5 + find/testsuite/find.gnu/gnunot.xo | 2 + find/testsuite/find.gnu/ilname.exp | 7 + find/testsuite/find.gnu/ilname.xo | 1 + find/testsuite/find.gnu/iname.exp | 5 + find/testsuite/find.gnu/iname.xo | 1 + find/testsuite/find.gnu/inum.exp | 7 + find/testsuite/find.gnu/inum.xo | 1 + find/testsuite/find.gnu/ipath.exp | 5 + find/testsuite/find.gnu/ipath.xo | 1 + find/testsuite/find.gnu/iregex1.exp | 5 + find/testsuite/find.gnu/iregex1.xo | 4 + find/testsuite/find.gnu/iwholename.exp | 5 + find/testsuite/find.gnu/iwholename.xo | 1 + find/testsuite/find.gnu/lname.exp | 7 + find/testsuite/find.gnu/lname.xo | 1 + find/testsuite/find.gnu/mindepth-arg.exp | 9 + find/testsuite/find.gnu/mindepth-arg.xo | 1 + find/testsuite/find.gnu/mindepth-badarg.exp | 12 + find/testsuite/find.gnu/name-opt.exp | 8 + find/testsuite/find.gnu/name-opt.xo | 0 find/testsuite/find.gnu/name-period.exp | 10 + find/testsuite/find.gnu/name-period.xo | 2 + find/testsuite/find.gnu/path.exp | 5 + find/testsuite/find.gnu/path.xo | 1 + find/testsuite/find.gnu/perm-slash.exp | 19 + find/testsuite/find.gnu/perm-slash.xo | 4 + find/testsuite/find.gnu/perm.exp | 7 + find/testsuite/find.gnu/perm.xo | 1 + find/testsuite/find.gnu/perm000.exp | 7 + find/testsuite/find.gnu/perm000.xo | 3 + find/testsuite/find.gnu/posix-dflt.exp | 10 + find/testsuite/find.gnu/posix-dflt.xo | 5 + find/testsuite/find.gnu/posix-h.exp | 13 + find/testsuite/find.gnu/posix-h.xo | 5 + find/testsuite/find.gnu/posix-l.exp | 10 + find/testsuite/find.gnu/posix-l.xo | 5 + find/testsuite/find.gnu/print0.exp | 5 + find/testsuite/find.gnu/print0.xo | Bin 0 -> 4 bytes find/testsuite/find.gnu/print_stdout.exp | 5 + find/testsuite/find.gnu/print_stdout.xo | 1 + find/testsuite/find.gnu/printf-h.exp | 5 + find/testsuite/find.gnu/printf-h.xo | 1 + find/testsuite/find.gnu/printf-symlink.exp | 6 + find/testsuite/find.gnu/printf-symlink.xo | 2 + find/testsuite/find.gnu/printf.exp | 6 + find/testsuite/find.gnu/printf.xo | 11 + find/testsuite/find.gnu/printfHdfl.exp | 2 + find/testsuite/find.gnu/printfHdfl.xo | 1 + find/testsuite/find.gnu/prune-default-print.exp | 5 + find/testsuite/find.gnu/prune-default-print.xo | 1 + find/testsuite/find.gnu/quit.exp | 5 + find/testsuite/find.gnu/quit.xo | 2 + find/testsuite/find.gnu/regex1.exp | 5 + find/testsuite/find.gnu/regex1.xo | 4 + find/testsuite/find.gnu/regex2.exp | 5 + find/testsuite/find.gnu/regex2.xo | 4 + find/testsuite/find.gnu/samefile-copy.exp | 8 + find/testsuite/find.gnu/samefile-copy.xo | 0 find/testsuite/find.gnu/samefile-link.exp | 9 + find/testsuite/find.gnu/samefile-link.xo | 1 + find/testsuite/find.gnu/samefile-missing.exp | 4 + find/testsuite/find.gnu/samefile-p-brokenlink.exp | 13 + find/testsuite/find.gnu/samefile-p-brokenlink.xo | 2 + find/testsuite/find.gnu/samefile-same.exp | 6 + find/testsuite/find.gnu/samefile-same.xo | 2 + find/testsuite/find.gnu/samefile-symlink.exp | 10 + find/testsuite/find.gnu/samefile-symlink.xo | 2 + find/testsuite/find.gnu/sv-bug-12230.exp | 14 + find/testsuite/find.gnu/sv-bug-17477.exp | 2 + find/testsuite/find.gnu/sv-bug-17490.exp | 5 + find/testsuite/find.gnu/sv-bug-17782.exp | 15 + find/testsuite/find.gnu/sv-bug-17782.xo | 1 + find/testsuite/find.gnu/sv-bug-18222.exp | 9 + find/testsuite/find.gnu/sv-bug-18222.xo | 2 + find/testsuite/find.gnu/true.exp | 5 + find/testsuite/find.gnu/true.xo | 6 + find/testsuite/find.gnu/used-invarg.exp | 2 + find/testsuite/find.gnu/used-missing.exp | 2 + find/testsuite/find.gnu/user-invalid.exp | 4 + find/testsuite/find.gnu/wholename.exp | 5 + find/testsuite/find.gnu/wholename.xo | 1 + find/testsuite/find.gnu/xtype-symlink.exp | 7 + find/testsuite/find.gnu/xtype-symlink.xo | 1 + find/testsuite/find.gnu/xtype.exp | 8 + find/testsuite/find.gnu/xtype.xo | 5 + find/testsuite/find.posix/and.exp | 5 + find/testsuite/find.posix/and.xo | 1 + find/testsuite/find.posix/bracket-depth.exp | 5 + find/testsuite/find.posix/depth1.exp | 7 + find/testsuite/find.posix/depth1.xo | 11 + find/testsuite/find.posix/empty-parens.exp | 3 + find/testsuite/find.posix/exec-one.exp | 5 + find/testsuite/find.posix/exec-one.xo | 1 + .../find.posix/files-not-expressions1.exp | 9 + .../testsuite/find.posix/files-not-expressions1.xo | 1 + .../find.posix/files-not-expressions2.exp | 9 + .../testsuite/find.posix/files-not-expressions2.xo | 1 + .../find.posix/files-not-expressions3.exp | 9 + .../testsuite/find.posix/files-not-expressions3.xo | 1 + find/testsuite/find.posix/group-empty.exp | 3 + find/testsuite/find.posix/group-missing.exp | 5 + find/testsuite/find.posix/grouping.exp | 5 + find/testsuite/find.posix/grouping.xo | 1 + find/testsuite/find.posix/links.exp | 25 + find/testsuite/find.posix/links.xo | 3 + find/testsuite/find.posix/name-missing.exp | 5 + find/testsuite/find.posix/name.exp | 5 + find/testsuite/find.posix/name.xo | 1 + find/testsuite/find.posix/perm-X.exp | 12 + find/testsuite/find.posix/perm-X.xo | 3 + find/testsuite/find.posix/perm-vanilla.exp | 18 + find/testsuite/find.posix/perm-vanilla.xo | 4 + find/testsuite/find.posix/posixnot.exp | 5 + find/testsuite/find.posix/posixnot.xo | 2 + find/testsuite/find.posix/prune.exp | 5 + find/testsuite/find.posix/prune.xo | 3 + find/testsuite/find.posix/size-invalid.exp | 7 + find/testsuite/find.posix/size-missing.exp | 5 + find/testsuite/find.posix/sizes.exp | 15 + find/testsuite/find.posix/sizes.xo | 10 + find/testsuite/find.posix/sizetype.exp | 6 + find/testsuite/find.posix/sizetype.xo | 1 + find/testsuite/find.posix/sv-bug-11175.exp | 10 + find/testsuite/find.posix/sv-bug-11175.xo | 1 + find/testsuite/find.posix/sv-bug-12181.exp | 6 + find/testsuite/find.posix/sv-bug-12181.xo | 1 + find/testsuite/find.posix/sv-bug-15235.exp | 6 + find/testsuite/find.posix/sv-bug-15235.xo | 8 + find/testsuite/find.posix/sv-bug-19605.exp | 7 + find/testsuite/find.posix/sv-bug-19613.exp | 14 + find/testsuite/find.posix/sv-bug-19613.xo | 1 + find/testsuite/find.posix/sv-bug-19617.exp | 7 + find/testsuite/find.posix/typearg.exp | 4 + find/testsuite/find.posix/typesize.exp | 6 + find/testsuite/find.posix/typesize.xo | 1 + find/testsuite/find.posix/user-empty.exp | 3 + find/testsuite/find.posix/user-missing.exp | 3 + find/tree.c | 1656 + find/util.c | 1033 + find/version.c | 3 + gnulib/Makefile.am | 11 + gnulib/Makefile.in | 782 + gnulib/lib/Makefile.am | 1414 + gnulib/lib/Makefile.in | 1344 + gnulib/lib/__fpending.c | 30 + gnulib/lib/__fpending.h | 34 + gnulib/lib/alloca.c | 489 + gnulib/lib/alloca_.h | 54 + gnulib/lib/allocsa.c | 137 + gnulib/lib/allocsa.h | 124 + gnulib/lib/allocsa.valgrind | 7 + gnulib/lib/argmatch.c | 278 + gnulib/lib/argmatch.h | 103 + gnulib/lib/at-func.c | 86 + gnulib/lib/basename.c | 129 + gnulib/lib/c-strstr.c | 214 + gnulib/lib/c-strstr.h | 45 + gnulib/lib/canonicalize-lgpl.c | 353 + gnulib/lib/canonicalize.c | 307 + gnulib/lib/canonicalize.h | 54 + gnulib/lib/chdir-long.c | 265 + gnulib/lib/chdir-long.h | 35 + gnulib/lib/chown.c | 104 + gnulib/lib/close-stream.c | 76 + gnulib/lib/close-stream.h | 2 + gnulib/lib/closeout.c | 86 + gnulib/lib/closeout.h | 33 + gnulib/lib/config.charset | 639 + gnulib/lib/creat-safer.c | 32 + gnulib/lib/cycle-check.c | 87 + gnulib/lib/cycle-check.h | 54 + gnulib/lib/dev-ino.h | 13 + gnulib/lib/dirent_.h | 45 + gnulib/lib/dirfd.c | 29 + gnulib/lib/dirfd.h | 29 + gnulib/lib/dirname.c | 85 + gnulib/lib/dirname.h | 70 + gnulib/lib/dup-safer.c | 45 + gnulib/lib/dup2.c | 58 + gnulib/lib/error.c | 338 + gnulib/lib/error.h | 66 + gnulib/lib/exitfail.c | 26 + gnulib/lib/exitfail.h | 20 + gnulib/lib/fchdir.c | 279 + gnulib/lib/fchmodat.c | 50 + gnulib/lib/fchown-stub.c | 16 + gnulib/lib/fchownat.c | 50 + gnulib/lib/fcntl--.h | 28 + gnulib/lib/fcntl-safer.h | 24 + gnulib/lib/fcntl_.h | 120 + gnulib/lib/fd-safer.c | 57 + gnulib/lib/fileblocks.c | 75 + gnulib/lib/filemode.c | 181 + gnulib/lib/filemode.h | 33 + gnulib/lib/filenamecat.c | 124 + gnulib/lib/filenamecat.h | 22 + gnulib/lib/fnmatch.c | 354 + gnulib/lib/fnmatch_.h | 65 + gnulib/lib/fnmatch_loop.c | 1210 + gnulib/lib/fopen-safer.c | 68 + gnulib/lib/fstatat.c | 57 + gnulib/lib/fts-cycle.c | 161 + gnulib/lib/fts.c | 1712 + gnulib/lib/fts_.h | 233 + gnulib/lib/getcwd.c | 428 + gnulib/lib/getdate.c | 3289 ++ gnulib/lib/getdate.h | 23 + gnulib/lib/getdate.y | 1520 + gnulib/lib/getdelim.c | 126 + gnulib/lib/getdelim.h | 28 + gnulib/lib/getline.c | 30 + gnulib/lib/getline.h | 28 + gnulib/lib/getopt.c | 1191 + gnulib/lib/getopt1.c | 171 + gnulib/lib/getopt_.h | 226 + gnulib/lib/getopt_int.h | 131 + gnulib/lib/gettext.h | 270 + gnulib/lib/gettime.c | 49 + gnulib/lib/gettimeofday.c | 142 + gnulib/lib/hash.c | 1048 + gnulib/lib/hash.h | 88 + gnulib/lib/human.c | 479 + gnulib/lib/human.h | 83 + gnulib/lib/i-ring.c | 69 + gnulib/lib/i-ring.h | 45 + gnulib/lib/idcache.c | 221 + gnulib/lib/intprops.h | 78 + gnulib/lib/inttypes_.h | 1099 + gnulib/lib/lchown.c | 47 + gnulib/lib/lchown.h | 42 + gnulib/lib/localcharset.c | 460 + gnulib/lib/localcharset.h | 41 + gnulib/lib/lstat.c | 76 + gnulib/lib/lstat.h | 24 + gnulib/lib/malloc.c | 35 + gnulib/lib/mbchar.c | 36 + gnulib/lib/mbchar.h | 353 + gnulib/lib/mbscasestr.c | 464 + gnulib/lib/mbslen.c | 47 + gnulib/lib/mbsstr.c | 433 + gnulib/lib/mbuiter.h | 222 + gnulib/lib/memchr.c | 201 + gnulib/lib/memcmp.c | 363 + gnulib/lib/mempcpy.c | 29 + gnulib/lib/memrchr.c | 190 + gnulib/lib/memset.c | 28 + gnulib/lib/mkdirat.c | 43 + gnulib/lib/mktime.c | 663 + gnulib/lib/modechange.c | 386 + gnulib/lib/modechange.h | 31 + gnulib/lib/mountlist.c | 885 + gnulib/lib/mountlist.h | 41 + gnulib/lib/open-safer.c | 50 + gnulib/lib/openat-die.c | 51 + gnulib/lib/openat-priv.h | 55 + gnulib/lib/openat-proc.c | 95 + gnulib/lib/openat.c | 270 + gnulib/lib/openat.h | 127 + gnulib/lib/pathmax.h | 47 + gnulib/lib/pipe-safer.c | 57 + gnulib/lib/progname.c | 50 + gnulib/lib/progname.h | 61 + gnulib/lib/quote.c | 41 + gnulib/lib/quote.h | 22 + gnulib/lib/quotearg.c | 697 + gnulib/lib/quotearg.h | 140 + gnulib/lib/readlink.c | 50 + gnulib/lib/realloc.c | 45 + gnulib/lib/ref-add.sin | 30 + gnulib/lib/ref-del.sin | 25 + gnulib/lib/regcomp.c | 3832 ++ gnulib/lib/regex.c | 71 + gnulib/lib/regex.h | 675 + gnulib/lib/regex_internal.c | 1741 + gnulib/lib/regex_internal.h | 857 + gnulib/lib/regexec.c | 4399 +++ gnulib/lib/rpmatch.c | 79 + gnulib/lib/same-inode.h | 26 + gnulib/lib/save-cwd.c | 103 + gnulib/lib/save-cwd.h | 34 + gnulib/lib/savedir.c | 137 + gnulib/lib/savedir.h | 27 + gnulib/lib/setenv.c | 332 + gnulib/lib/setenv.h | 54 + gnulib/lib/stat-macros.h | 3 + gnulib/lib/stat-time.h | 184 + gnulib/lib/stdbool_.h | 118 + gnulib/lib/stdint_.h | 508 + gnulib/lib/stdio--.h | 28 + gnulib/lib/stdio-safer.h | 24 + gnulib/lib/stdlib_.h | 138 + gnulib/lib/stpcpy.c | 49 + gnulib/lib/strdup.c | 55 + gnulib/lib/strftime.c | 1462 + gnulib/lib/strftime.h | 21 + gnulib/lib/string_.h | 544 + gnulib/lib/stripslash.c | 45 + gnulib/lib/strndup.c | 37 + gnulib/lib/strnlen.c | 31 + gnulib/lib/strnlen1.c | 36 + gnulib/lib/strnlen1.h | 40 + gnulib/lib/strtoimax.c | 76 + gnulib/lib/strtol.c | 436 + gnulib/lib/strtoll.c | 33 + gnulib/lib/strtoul.c | 20 + gnulib/lib/strtoull.c | 27 + gnulib/lib/strtoumax.c | 2 + gnulib/lib/sys_stat_.h | 280 + gnulib/lib/sys_time_.h | 48 + gnulib/lib/time_.h | 123 + gnulib/lib/time_r.c | 47 + gnulib/lib/timespec.h | 37 + gnulib/lib/unistd--.h | 28 + gnulib/lib/unistd-safer.h | 23 + gnulib/lib/unistd_.h | 239 + gnulib/lib/unsetenv.c | 92 + gnulib/lib/verify.h | 141 + gnulib/lib/wchar_.h | 49 + gnulib/lib/wctype_.h | 165 + gnulib/lib/wcwidth.h | 57 + gnulib/lib/xalloc-die.c | 42 + gnulib/lib/xalloc.h | 271 + gnulib/lib/xgetcwd.c | 41 + gnulib/lib/xgetcwd.h | 18 + gnulib/lib/xmalloc.c | 123 + gnulib/lib/xreadlink-with-size.c | 105 + gnulib/lib/xreadlink.h | 34 + gnulib/lib/xstrndup.c | 37 + gnulib/lib/xstrndup.h | 24 + gnulib/lib/xstrtod.c | 72 + gnulib/lib/xstrtod.h | 31 + gnulib/lib/xstrtol.c | 263 + gnulib/lib/xstrtol.h | 87 + gnulib/lib/xstrtoul.c | 6 + gnulib/lib/xstrtoumax.c | 6 + gnulib/lib/yesno.c | 64 + gnulib/lib/yesno.h | 26 + gnulib/m4/absolute-header.m4 | 44 + gnulib/m4/alloca.m4 | 50 + gnulib/m4/allocsa.m4 | 14 + gnulib/m4/argmatch.m4 | 10 + gnulib/m4/bison.m4 | 24 + gnulib/m4/canonicalize-lgpl.m4 | 35 + gnulib/m4/canonicalize.m4 | 17 + gnulib/m4/chdir-long.m4 | 38 + gnulib/m4/chown.m4 | 83 + gnulib/m4/clock_time.m4 | 30 + gnulib/m4/close-stream.m4 | 13 + gnulib/m4/closeout.m4 | 13 + gnulib/m4/codeset.m4 | 21 + gnulib/m4/cycle-check.m4 | 11 + gnulib/m4/d-ino.m4 | 41 + gnulib/m4/d-type.m4 | 35 + gnulib/m4/dirfd.m4 | 74 + gnulib/m4/dirname.m4 | 18 + gnulib/m4/dos.m4 | 71 + gnulib/m4/double-slash-root.m4 | 38 + gnulib/m4/dup2.m4 | 15 + gnulib/m4/eealloc.m4 | 32 + gnulib/m4/error.m4 | 22 + gnulib/m4/exitfail.m4 | 13 + gnulib/m4/extensions.m4 | 58 + gnulib/m4/fchdir.m4 | 28 + gnulib/m4/fcntl-safer.m4 | 11 + gnulib/m4/fcntl_h.m4 | 81 + gnulib/m4/fileblocks.m4 | 20 + gnulib/m4/filemode.m4 | 12 + gnulib/m4/filenamecat.m4 | 13 + gnulib/m4/flexmember.m4 | 41 + gnulib/m4/fnmatch.m4 | 127 + gnulib/m4/fpending.m4 | 78 + gnulib/m4/fstypename.m4 | 22 + gnulib/m4/fts.m4 | 28 + gnulib/m4/getcwd-abort-bug.m4 | 106 + gnulib/m4/getcwd-path-max.m4 | 190 + gnulib/m4/getcwd.m4 | 64 + gnulib/m4/getdate.m4 | 33 + gnulib/m4/getdelim.m4 | 29 + gnulib/m4/getline.m4 | 79 + gnulib/m4/getopt.m4 | 83 + gnulib/m4/gettext.m4 | 419 + gnulib/m4/gettime.m4 | 15 + gnulib/m4/gettimeofday.m4 | 101 + gnulib/m4/glibc21.m4 | 30 + gnulib/m4/gnulib-common.m4 | 22 + gnulib/m4/gnulib-comp.m4 | 603 + gnulib/m4/hash.m4 | 13 + gnulib/m4/human.m4 | 13 + gnulib/m4/i-ring.m4 | 10 + gnulib/m4/iconv.m4 | 179 + gnulib/m4/idcache.m4 | 10 + gnulib/m4/inline.m4 | 40 + gnulib/m4/inttypes-pri.m4 | 36 + gnulib/m4/inttypes.m4 | 223 + gnulib/m4/lchown.m4 | 19 + gnulib/m4/lib-ld.m4 | 110 + gnulib/m4/lib-link.m4 | 709 + gnulib/m4/lib-prefix.m4 | 185 + gnulib/m4/localcharset.m4 | 16 + gnulib/m4/locale-fr.m4 | 174 + gnulib/m4/locale-tr.m4 | 82 + gnulib/m4/locale-zh.m4 | 96 + gnulib/m4/longlong.m4 | 72 + gnulib/m4/ls-mntd-fs.m4 | 337 + gnulib/m4/lstat.m4 | 17 + gnulib/m4/mbchar.m4 | 13 + gnulib/m4/mbiter.m4 | 17 + gnulib/m4/mbrtowc.m4 | 31 + gnulib/m4/mbscasestr.m4 | 16 + gnulib/m4/mbslen.m4 | 16 + gnulib/m4/mbsstr.m4 | 16 + gnulib/m4/mbstate_t.m4 | 30 + gnulib/m4/memchr.m4 | 18 + gnulib/m4/memcmp.m4 | 19 + gnulib/m4/mempcpy.m4 | 26 + gnulib/m4/memrchr.m4 | 25 + gnulib/m4/memset.m4 | 18 + gnulib/m4/mktime.m4 | 227 + gnulib/m4/modechange.m4 | 10 + gnulib/m4/mountlist.m4 | 23 + gnulib/m4/nls.m4 | 31 + gnulib/m4/onceonly_2_57.m4 | 86 + gnulib/m4/openat.m4 | 90 + gnulib/m4/pathmax.m4 | 11 + gnulib/m4/po.m4 | 428 + gnulib/m4/progtest.m4 | 92 + gnulib/m4/quote.m4 | 13 + gnulib/m4/quotearg.m4 | 15 + gnulib/m4/readlink.m4 | 29 + gnulib/m4/regex.m4 | 211 + gnulib/m4/rpmatch.m4 | 16 + gnulib/m4/save-cwd.m4 | 12 + gnulib/m4/savedir.m4 | 10 + gnulib/m4/setenv.m4 | 82 + gnulib/m4/ssize_t.m4 | 21 + gnulib/m4/st_dm_mode.m4 | 22 + gnulib/m4/stat-time.m4 | 85 + gnulib/m4/stdbool.m4 | 115 + gnulib/m4/stdint.m4 | 369 + gnulib/m4/stdio-safer.m4 | 15 + gnulib/m4/stdlib_h.m4 | 31 + gnulib/m4/stpcpy.m4 | 26 + gnulib/m4/strdup.m4 | 22 + gnulib/m4/strftime.m4 | 33 + gnulib/m4/string_h.m4 | 78 + gnulib/m4/strndup.m4 | 53 + gnulib/m4/strnlen.m4 | 31 + gnulib/m4/strtoimax.m4 | 34 + gnulib/m4/strtol.m4 | 10 + gnulib/m4/strtoll.m4 | 23 + gnulib/m4/strtoul.m4 | 10 + gnulib/m4/strtoull.m4 | 23 + gnulib/m4/strtoumax.m4 | 34 + gnulib/m4/sys_stat_h.m4 | 50 + gnulib/m4/sys_time_h.m4 | 61 + gnulib/m4/time_h.m4 | 76 + gnulib/m4/time_r.m4 | 41 + gnulib/m4/timespec.m4 | 16 + gnulib/m4/tm_gmtoff.m4 | 14 + gnulib/m4/ulonglong.m4 | 48 + gnulib/m4/unistd-safer.m4 | 13 + gnulib/m4/unistd_h.m4 | 55 + gnulib/m4/wchar.m4 | 29 + gnulib/m4/wchar_t.m4 | 20 + gnulib/m4/wctype.m4 | 47 + gnulib/m4/wcwidth.m4 | 30 + gnulib/m4/wint_t.m4 | 28 + gnulib/m4/xalloc.m4 | 24 + gnulib/m4/xgetcwd.m4 | 12 + gnulib/m4/xstrndup.m4 | 15 + gnulib/m4/xstrtod.m4 | 17 + gnulib/m4/xstrtol.m4 | 11 + gnulib/m4/yesno.m4 | 13 + import-gnulib.config | 29 + import-gnulib.sh | 248 + lib/Makefile.am | 44 + lib/Makefile.in | 767 + lib/buildcmd.c | 552 + lib/buildcmd.h | 136 + lib/dircallback.c | 101 + lib/dircallback.h | 26 + lib/extendbuf.c | 105 + lib/extendbuf.h | 27 + lib/forcefindlib.c | 50 + lib/gnulib-version.c | 2 + lib/gnulib-version.h | 21 + lib/listfile.c | 441 + lib/listfile.h | 30 + lib/modetype.h | 144 + lib/nextelem.c | 110 + lib/nextelem.h | 28 + lib/printquoted.c | 90 + lib/printquoted.h | 35 + lib/qmark.c | 241 + lib/regexprops.c | 493 + lib/regextype.c | 158 + lib/regextype.h | 28 + lib/savedirinfo.c | 387 + lib/savedirinfo.h | 73 + lib/wait.h | 41 + lib/waitpid.c | 81 + locate/Makefile.am | 54 + locate/Makefile.in | 1131 + locate/bigram.c | 117 + locate/code.c | 290 + locate/frcode.c | 365 + locate/locate.1 | 218 + locate/locate.c | 1938 + locate/locatedb.5 | 153 + locate/locatedb.h | 82 + locate/testsuite/Makefile.am | 50 + locate/testsuite/Makefile.in | 701 + locate/testsuite/config/unix.exp | 353 + locate/testsuite/locate.gnu/bigendian.exp | 2 + locate/testsuite/locate.gnu/bigendian.xo | 8 + locate/testsuite/locate.gnu/bigprefix1.exp | 12 + locate/testsuite/locate.gnu/exceedshort.exp | 4 + locate/testsuite/locate.gnu/exists1.exp | 8 + locate/testsuite/locate.gnu/exists1.xo | 1 + locate/testsuite/locate.gnu/exists2.exp | 9 + locate/testsuite/locate.gnu/exists2.xo | 1 + locate/testsuite/locate.gnu/exists3.exp | 9 + locate/testsuite/locate.gnu/exists3.xo | 1 + locate/testsuite/locate.gnu/ignore_case1.exp | 8 + locate/testsuite/locate.gnu/ignore_case1.xo | 1 + locate/testsuite/locate.gnu/ignore_case2.exp | 8 + locate/testsuite/locate.gnu/ignore_case2.xo | 0 locate/testsuite/locate.gnu/ignore_case3.exp | 11 + locate/testsuite/locate.gnu/ignore_case3.xo | 1 + locate/testsuite/locate.gnu/littleendian.exp | 2 + locate/testsuite/locate.gnu/littleendian.xo | 8 + .../testsuite/locate.gnu/locateddb.old.powerpc.xi | Bin 0 -> 329 bytes locate/testsuite/locate.gnu/locateddb.old.x86.xi | Bin 0 -> 329 bytes locate/testsuite/locate.gnu/notexists1.exp | 10 + locate/testsuite/locate.gnu/notexists1.xo | 0 locate/testsuite/locate.gnu/notexists2.exp | 9 + locate/testsuite/locate.gnu/notexists2.xo | 1 + locate/testsuite/locate.gnu/notexists3.exp | 9 + locate/testsuite/locate.gnu/notexists3.xo | 1 + locate/testsuite/locate.gnu/old_prefix.exp | 13 + locate/testsuite/locate.gnu/old_prefix.xo | 5 + locate/testsuite/locate.gnu/regex1.exp | 9 + locate/testsuite/locate.gnu/space1st.exp | 2 + locate/testsuite/locate.gnu/sv-bug-14535.exp | 61 + locate/updatedb.1 | 144 + locate/updatedb.sh | 363 + locate/word_io.c | 177 + m4/Makefile.am | 3 + m4/Makefile.in | 612 + m4/findlib.m4 | 69 + m4/mkinstalldirs.m4 | 40 + m4/noreturn.m4 | 33 + m4/nullsort.m4 | 34 + m4/order-bad.bin | Bin 0 -> 8 bytes m4/order-good.bin | Bin 0 -> 8 bytes m4/withfts.m4 | 13 + po/ChangeLog | 338 + po/Makefile.in.in | 384 + po/Makevars | 41 + po/POTFILES.in | 26 + po/Rules-quot | 47 + po/be.gmo | Bin 0 -> 4142 bytes po/be.po | 1159 + po/bg.gmo | Bin 0 -> 23363 bytes po/bg.po | 1153 + po/boldquot.sed | 10 + po/ca.gmo | Bin 0 -> 15052 bytes po/ca.po | 1286 + po/da.gmo | Bin 0 -> 13032 bytes po/da.po | 1248 + po/de.gmo | Bin 0 -> 4225 bytes po/de.po | 1187 + po/el.gmo | Bin 0 -> 9618 bytes po/el.po | 1206 + po/en@boldquot.header | 25 + po/en@quot.header | 22 + po/eo.gmo | Bin 0 -> 3987 bytes po/eo.po | 1190 + po/es.gmo | Bin 0 -> 7745 bytes po/es.po | 1524 + po/et.gmo | Bin 0 -> 16776 bytes po/et.po | 1117 + po/fi.gmo | Bin 0 -> 3957 bytes po/fi.po | 1184 + po/findutils.pot | 1002 + po/fr.gmo | Bin 0 -> 15210 bytes po/fr.po | 1292 + po/ga.gmo | Bin 0 -> 19266 bytes po/ga.po | 1257 + po/gl.gmo | Bin 0 -> 3833 bytes po/gl.po | 1186 + po/hr.gmo | Bin 0 -> 3833 bytes po/hr.po | 1184 + po/hu.gmo | Bin 0 -> 15237 bytes po/hu.po | 1137 + po/id.gmo | Bin 0 -> 3939 bytes po/id.po | 1179 + po/insert-header.sin | 23 + po/it.gmo | Bin 0 -> 8124 bytes po/it.po | 1210 + po/ja.gmo | Bin 0 -> 3807 bytes po/ja.po | 1180 + po/ko.gmo | Bin 0 -> 2034 bytes po/ko.po | 1153 + po/lg.gmo | Bin 0 -> 4399 bytes po/lg.po | 1207 + po/ms.gmo | Bin 0 -> 2850 bytes po/ms.po | 1049 + po/nl.gmo | Bin 0 -> 17489 bytes po/nl.po | 1127 + po/pl.gmo | Bin 0 -> 27327 bytes po/pl.po | 1143 + po/pt.gmo | Bin 0 -> 18953 bytes po/pt.po | 1135 + po/pt_BR.gmo | Bin 0 -> 4073 bytes po/pt_BR.po | 1192 + po/quot.sed | 6 + po/remove-potcdate.sin | 19 + po/ro.gmo | Bin 0 -> 13543 bytes po/ro.po | 1241 + po/ru.gmo | Bin 0 -> 3879 bytes po/ru.po | 1182 + po/rw.gmo | Bin 0 -> 525 bytes po/rw.po | 1199 + po/sk.gmo | Bin 0 -> 13759 bytes po/sk.po | 1139 + po/sl.gmo | Bin 0 -> 14341 bytes po/sl.po | 1257 + po/sr.gmo | Bin 0 -> 9117 bytes po/sr.po | 1211 + po/stamp-po | 1 + po/sv.gmo | Bin 0 -> 14202 bytes po/sv.po | 1300 + po/tr.gmo | Bin 0 -> 28041 bytes po/tr.po | 1144 + po/uk.gmo | Bin 0 -> 23037 bytes po/uk.po | 1137 + po/vi.gmo | Bin 0 -> 32725 bytes po/vi.po | 1240 + po/zh_CN.gmo | Bin 0 -> 3411 bytes po/zh_CN.po | 1169 + po/zh_TW.gmo | Bin 0 -> 11747 bytes po/zh_TW.po | 1089 + stamp-h.in | 1 + tests/Makefile.am | 208 + tests/Makefile.in | 1203 + tests/test-alloca-opt.c | 65 + tests/test-allocsa.c | 62 + tests/test-argmatch.c | 107 + tests/test-c-strstr.c | 142 + tests/test-canonicalize-lgpl.c | 85 + tests/test-canonicalize-lgpl.sh | 28 + tests/test-dirname.c | 196 + tests/test-fcntl.c | 36 + tests/test-gettimeofday.c | 47 + tests/test-inttypes.c | 122 + tests/test-mbscasestr1.c | 144 + tests/test-mbscasestr2.c | 156 + tests/test-mbscasestr2.sh | 15 + tests/test-mbscasestr3.c | 96 + tests/test-mbscasestr3.sh | 15 + tests/test-mbscasestr4.c | 70 + tests/test-mbscasestr4.sh | 15 + tests/test-mbsstr1.c | 143 + tests/test-mbsstr2.c | 156 + tests/test-mbsstr2.sh | 15 + tests/test-mbsstr3.c | 95 + tests/test-mbsstr3.sh | 15 + tests/test-stat-time.c | 183 + tests/test-stdbool.c | 96 + tests/test-stdint.c | 359 + tests/test-stdlib.c | 38 + tests/test-string.c | 28 + tests/test-sys_stat.c | 261 + tests/test-sys_time.c | 30 + tests/test-time.c | 30 + tests/test-unistd.c | 31 + tests/test-wchar.c | 28 + tests/test-wctype.c | 44 + xargs/Makefile.am | 15 + xargs/Makefile.in | 926 + xargs/testsuite/Makefile.am | 258 + xargs/testsuite/Makefile.in | 901 + xargs/testsuite/config/unix.exp | 184 + xargs/testsuite/inputs/16383-ys.xi | 1 + xargs/testsuite/inputs/32767-ys.xi | 1 + xargs/testsuite/inputs/EOF.xi | 5 + xargs/testsuite/inputs/EOFb.xi | 5 + xargs/testsuite/inputs/EOFe.xi | 5 + xargs/testsuite/inputs/Pdata.xi | 3 + xargs/testsuite/inputs/blank.xi | 3 + xargs/testsuite/inputs/empty.xi | 3 + xargs/testsuite/inputs/eof1.xi | 5 + xargs/testsuite/inputs/eof_-0.xi | Bin 0 -> 20 bytes xargs/testsuite/inputs/eof_.xi | 5 + xargs/testsuite/inputs/eofstr.xi | 5 + xargs/testsuite/inputs/ett.xi | 3 + xargs/testsuite/inputs/files.xi | 22 + xargs/testsuite/inputs/files0.xi | Bin 0 -> 753 bytes xargs/testsuite/inputs/foobar.xi | 3 + xargs/testsuite/inputs/formfeeds.xi | 2 + xargs/testsuite/inputs/ftt.xi | 3 + xargs/testsuite/inputs/helloworld.xi | 1 + xargs/testsuite/inputs/items-0.xi | Bin 0 -> 63 bytes xargs/testsuite/inputs/items.xi | 8 + xargs/testsuite/inputs/ldata-0.xi | Bin 0 -> 108 bytes xargs/testsuite/inputs/ldata.xi | 9 + xargs/testsuite/inputs/ldatab-0.xi | Bin 0 -> 118 bytes xargs/testsuite/inputs/ldatab.xi | 10 + xargs/testsuite/inputs/lines.xi | 6 + xargs/testsuite/inputs/noeof-0.xi | Bin 0 -> 12 bytes xargs/testsuite/inputs/noeof.xi | 2 + xargs/testsuite/inputs/quotes.xi | 5 + xargs/testsuite/inputs/space.xi | 2 + xargs/testsuite/inputs/stairs-0.xi | Bin 0 -> 108 bytes xargs/testsuite/inputs/stairs.xi | 18 + xargs/testsuite/inputs/stairs2-0.xi | Bin 0 -> 108 bytes xargs/testsuite/inputs/stairs2.xi | 18 + xargs/testsuite/inputs/stt.xi | 3 + xargs/testsuite/inputs/unmatched.xi | 3 + xargs/testsuite/inputs/unmatched2.xi | 2 + xargs/testsuite/inputs/verticaltabs.xi | 1 + xargs/testsuite/xargs.gnu/0n3.exp | 1 + xargs/testsuite/xargs.gnu/0n3.xo | 8 + xargs/testsuite/xargs.gnu/E_-0.exp | 1 + xargs/testsuite/xargs.gnu/E_-0.xo | 1 + xargs/testsuite/xargs.gnu/L2-0.exp | 1 + xargs/testsuite/xargs.gnu/L2-0.xo | 5 + xargs/testsuite/xargs.gnu/L2_2-0.exp | 1 + xargs/testsuite/xargs.gnu/L2_2-0.xo | 5 + xargs/testsuite/xargs.gnu/L3-0.exp | 1 + xargs/testsuite/xargs.gnu/L3-0.xo | 3 + xargs/testsuite/xargs.gnu/P3-n1-IARG.exp | 1 + xargs/testsuite/xargs.gnu/P3-n1-IARG.xo | 3 + xargs/testsuite/xargs.gnu/delim-o.exp | 1 + xargs/testsuite/xargs.gnu/delim-o.xo | 3 + xargs/testsuite/xargs.gnu/empty-r.exp | 1 + xargs/testsuite/xargs.gnu/empty_def-r.exp | 1 + xargs/testsuite/xargs.gnu/idef-0.exp | 1 + xargs/testsuite/xargs.gnu/idef-0.xo | 20 + xargs/testsuite/xargs.gnu/idef-s26-0.exp | 1 + xargs/testsuite/xargs.gnu/idef-s26-0.xo | 1 + xargs/testsuite/xargs.gnu/l1-0.exp | 1 + xargs/testsuite/xargs.gnu/l1-0.xo | 9 + xargs/testsuite/xargs.gnu/l1_2-0.exp | 1 + xargs/testsuite/xargs.gnu/l1_2-0.xo | 10 + xargs/testsuite/xargs.gnu/n1-0.exp | 1 + xargs/testsuite/xargs.gnu/n1-0.xo | 18 + xargs/testsuite/xargs.gnu/n2-0.exp | 1 + xargs/testsuite/xargs.gnu/n2-0.xo | 9 + xargs/testsuite/xargs.gnu/n2-s26-0.exp | 1 + xargs/testsuite/xargs.gnu/n2-s26-0.xo | 11 + xargs/testsuite/xargs.gnu/n2-s26-x-0.exp | 1 + xargs/testsuite/xargs.gnu/n2-s26-x-0.xo | 3 + xargs/testsuite/xargs.gnu/n3-0.exp | 1 + xargs/testsuite/xargs.gnu/n3-0.xo | 6 + xargs/testsuite/xargs.gnu/n3-s36-0.exp | 1 + xargs/testsuite/xargs.gnu/n3-s36-0.xo | 7 + xargs/testsuite/xargs.gnu/noeof-0.exp | 1 + xargs/testsuite/xargs.gnu/noeof-0.xo | 1 + xargs/testsuite/xargs.gnu/nothing.exp | 1 + xargs/testsuite/xargs.gnu/nothing.xo | 1 + xargs/testsuite/xargs.gnu/r.exp | 1 + xargs/testsuite/xargs.gnu/r.xo | 0 xargs/testsuite/xargs.gnu/s118-0.exp | 1 + xargs/testsuite/xargs.gnu/s118-0.xo | 1 + xargs/testsuite/xargs.gnu/s19-0.exp | 1 + xargs/testsuite/xargs.gnu/s19-0.xo | 6 + xargs/testsuite/xargs.gnu/s19_2-0.exp | 1 + xargs/testsuite/xargs.gnu/s20-0.exp | 1 + xargs/testsuite/xargs.gnu/s20-0.xo | 14 + xargs/testsuite/xargs.gnu/s30-0.exp | 1 + xargs/testsuite/xargs.gnu/s30-0.xo | 6 + xargs/testsuite/xargs.gnu/space-0.exp | 1 + xargs/testsuite/xargs.gnu/space-0.xo | 3 + xargs/testsuite/xargs.gnu/space-r.exp | 1 + xargs/testsuite/xargs.gnu/space-t-0.exp | 1 + xargs/testsuite/xargs.gnu/space-t-0.xe | 3 + xargs/testsuite/xargs.gnu/space-t-0.xo | 3 + xargs/testsuite/xargs.posix/EEOF.exp | 1 + xargs/testsuite/xargs.posix/EEOF.xo | 1 + xargs/testsuite/xargs.posix/EEOFb.exp | 1 + xargs/testsuite/xargs.posix/EEOFb.xo | 1 + xargs/testsuite/xargs.posix/EEOFe.exp | 1 + xargs/testsuite/xargs.posix/EEOFe.xo | 1 + xargs/testsuite/xargs.posix/E_-IARG.exp | 1 + xargs/testsuite/xargs.posix/E_-IARG.xo | 2 + xargs/testsuite/xargs.posix/E_.exp | 1 + xargs/testsuite/xargs.posix/E_.xo | 1 + xargs/testsuite/xargs.posix/IARG-E_.exp | 1 + xargs/testsuite/xargs.posix/IARG-E_.xo | 5 + xargs/testsuite/xargs.posix/IARG-s15.exp | 1 + xargs/testsuite/xargs.posix/IARG-s15.xo | 18 + xargs/testsuite/xargs.posix/IARG.exp | 1 + xargs/testsuite/xargs.posix/IARG.xo | 6 + xargs/testsuite/xargs.posix/L2-n2.exp | 1 + xargs/testsuite/xargs.posix/L2-n2.xo | 9 + xargs/testsuite/xargs.posix/L2_2.exp | 1 + xargs/testsuite/xargs.posix/L2_2.xo | 3 + xargs/testsuite/xargs.posix/L3.exp | 1 + xargs/testsuite/xargs.posix/L3.xo | 3 + .../xargs.posix/arg_max_32bit_linux_bug.exp | 13 + .../xargs.posix/arg_max_64bit_linux_bug.exp | 13 + xargs/testsuite/xargs.posix/childfail.exp | 1 + xargs/testsuite/xargs.posix/empty.exp | 1 + xargs/testsuite/xargs.posix/empty.xo | 1 + xargs/testsuite/xargs.posix/empty_def.exp | 1 + xargs/testsuite/xargs.posix/empty_def.xo | 1 + xargs/testsuite/xargs.posix/hithere.exp | 1 + xargs/testsuite/xargs.posix/hithere.xo | 2 + xargs/testsuite/xargs.posix/n1.exp | 1 + xargs/testsuite/xargs.posix/n1.xo | 18 + xargs/testsuite/xargs.posix/n2-s26-x.exp | 1 + xargs/testsuite/xargs.posix/n2-s26-x.xo | 3 + xargs/testsuite/xargs.posix/n2-s26.exp | 1 + xargs/testsuite/xargs.posix/n2-s26.xo | 11 + xargs/testsuite/xargs.posix/n2.exp | 1 + xargs/testsuite/xargs.posix/n2.xo | 9 + xargs/testsuite/xargs.posix/n3-s36.exp | 1 + xargs/testsuite/xargs.posix/n3-s36.xo | 7 + xargs/testsuite/xargs.posix/n3.exp | 1 + xargs/testsuite/xargs.posix/n3.xo | 8 + xargs/testsuite/xargs.posix/noeof.exp | 1 + xargs/testsuite/xargs.posix/noeof.xo | 1 + xargs/testsuite/xargs.posix/quotes.exp | 1 + xargs/testsuite/xargs.posix/quotes.xo | 2 + xargs/testsuite/xargs.posix/rc-123.exp | 1 + xargs/testsuite/xargs.posix/rc-123.xo | 2 + xargs/testsuite/xargs.posix/rc-124.exp | 1 + xargs/testsuite/xargs.posix/rc-125.exp | 11 + xargs/testsuite/xargs.posix/rc-126.exp | 1 + xargs/testsuite/xargs.posix/rc-127.exp | 1 + xargs/testsuite/xargs.posix/s118.exp | 1 + xargs/testsuite/xargs.posix/s118.xo | 1 + xargs/testsuite/xargs.posix/s19.exp | 1 + xargs/testsuite/xargs.posix/s19.xo | 6 + xargs/testsuite/xargs.posix/s19_2.exp | 1 + xargs/testsuite/xargs.posix/s20.exp | 1 + xargs/testsuite/xargs.posix/s20.xo | 14 + xargs/testsuite/xargs.posix/s30.exp | 1 + xargs/testsuite/xargs.posix/s30.xo | 6 + xargs/testsuite/xargs.posix/s47.exp | 1 + xargs/testsuite/xargs.posix/s47.xo | 18 + xargs/testsuite/xargs.posix/s470.exp | 1 + xargs/testsuite/xargs.posix/s470.xo | 2 + xargs/testsuite/xargs.posix/s48.exp | 1 + xargs/testsuite/xargs.posix/s48.xo | 22 + xargs/testsuite/xargs.posix/s6.exp | 1 + xargs/testsuite/xargs.posix/savannah-11865.exp | 1 + xargs/testsuite/xargs.posix/savannah-11865.xo | 22 + xargs/testsuite/xargs.posix/space-I.exp | 1 + xargs/testsuite/xargs.posix/space.exp | 1 + xargs/testsuite/xargs.posix/space.xo | 1 + xargs/testsuite/xargs.posix/sv-bug-18714.exp | 10 + xargs/testsuite/xargs.posix/sv-bug-18714.xo | 2 + xargs/testsuite/xargs.posix/sv-bug-18714b.exp | 10 + xargs/testsuite/xargs.posix/sv-bug-18714b.xo | 2 + xargs/testsuite/xargs.posix/uc_L2.exp | 1 + xargs/testsuite/xargs.posix/uc_L2.xo | 5 + xargs/testsuite/xargs.posix/unmatched-n2-x.exp | 1 + xargs/testsuite/xargs.posix/unmatched.exp | 1 + xargs/testsuite/xargs.posix/unmatched.xo | 1 + xargs/testsuite/xargs.posix/unmatched2.exp | 1 + xargs/testsuite/xargs.posix/unmatched2.xo | 1 + xargs/testsuite/xargs.sysv/e.exp | 1 + xargs/testsuite/xargs.sysv/e.xo | 1 + xargs/testsuite/xargs.sysv/eEOF.exp | 1 + xargs/testsuite/xargs.sysv/eEOF.xo | 1 + xargs/testsuite/xargs.sysv/empty-t.exp | 1 + xargs/testsuite/xargs.sysv/empty-t.xe | 1 + xargs/testsuite/xargs.sysv/empty-t.xo | 1 + xargs/testsuite/xargs.sysv/empty_def-t.exp | 1 + xargs/testsuite/xargs.sysv/empty_def-t.xe | 1 + xargs/testsuite/xargs.sysv/empty_def-t.xo | 1 + xargs/testsuite/xargs.sysv/eof1.exp | 1 + xargs/testsuite/xargs.sysv/eof1.xo | 1 + xargs/testsuite/xargs.sysv/iARG.exp | 1 + xargs/testsuite/xargs.sysv/iARG.xo | 22 + xargs/testsuite/xargs.sysv/idef-s26.exp | 1 + xargs/testsuite/xargs.sysv/idef-s26.xo | 1 + xargs/testsuite/xargs.sysv/idef.exp | 1 + xargs/testsuite/xargs.sysv/idef.xo | 6 + xargs/testsuite/xargs.sysv/iquotes.exp | 1 + xargs/testsuite/xargs.sysv/iquotes.xo | 5 + xargs/testsuite/xargs.sysv/l1.exp | 1 + xargs/testsuite/xargs.sysv/l1.xo | 9 + xargs/testsuite/xargs.sysv/l1_2.exp | 1 + xargs/testsuite/xargs.sysv/l1_2.xo | 6 + xargs/testsuite/xargs.sysv/l1n4.exp | 1 + xargs/testsuite/xargs.sysv/l1n4.xo | 6 + xargs/testsuite/xargs.sysv/lc_l2.exp | 1 + xargs/testsuite/xargs.sysv/lc_l2.xo | 11 + xargs/testsuite/xargs.sysv/s30-t.exp | 1 + xargs/testsuite/xargs.sysv/s30-t.xe | 6 + xargs/testsuite/xargs.sysv/s30-t.xo | 6 + xargs/testsuite/xargs.sysv/space-t.exp | 1 + xargs/testsuite/xargs.sysv/space-t.xe | 1 + xargs/testsuite/xargs.sysv/space-t.xo | 1 + xargs/testsuite/xargs.sysv/sv-bug-18713.exp | 1 + xargs/testsuite/xargs.sysv/sv-bug-18713.xo | 7 + xargs/testsuite/xargs.sysv/trace.exp | 1 + xargs/testsuite/xargs.sysv/trace.xe | 2 + xargs/testsuite/xargs.sysv/trace.xo | 2 + xargs/xargs.1 | 296 + xargs/xargs.c | 1318 + 1005 files changed, 228115 insertions(+) create mode 100644 ABOUT-NLS create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 INSTALL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 README-alpha create mode 100644 THANKS create mode 100644 TODO create mode 100644 aclocal.m4 create mode 100644 build-aux/Makefile.am create mode 100644 build-aux/Makefile.in create mode 100755 build-aux/check-testfiles.sh create mode 100755 build-aux/config.guess create mode 100755 build-aux/config.rpath create mode 100755 build-aux/config.sub create mode 100755 build-aux/depcomp create mode 100755 build-aux/install-sh create mode 100755 build-aux/man-lint.sh create mode 100755 build-aux/mdate-sh create mode 100755 build-aux/missing create mode 100755 build-aux/mkinstalldirs create mode 100644 build-aux/texinfo.tex create mode 100755 build-aux/ylwrap create mode 100644 config.h.in create mode 100755 configure create mode 100644 configure.in create mode 100644 doc/Makefile.am create mode 100644 doc/Makefile.in create mode 100644 doc/find.info create mode 100644 doc/find.texi create mode 100644 doc/getdate.texi create mode 100755 doc/mdate-sh create mode 100644 doc/perm.texi create mode 100644 doc/regexprops.texi create mode 100644 doc/stamp-vti create mode 100644 doc/texinfo.tex create mode 100644 doc/version.texi create mode 100644 find/Makefile.am create mode 100644 find/Makefile.in create mode 100644 find/defs.h create mode 100644 find/find.1 create mode 100644 find/find.c create mode 100644 find/finddata.c create mode 100644 find/fstype.c create mode 100644 find/ftsfind.c create mode 100644 find/parser.c create mode 100644 find/pred.c create mode 100644 find/testsuite/Makefile.am create mode 100644 find/testsuite/Makefile.in create mode 100644 find/testsuite/config/unix.exp create mode 100644 find/testsuite/find.gnu/access.exp create mode 100644 find/testsuite/find.gnu/access.xo create mode 100644 find/testsuite/find.gnu/comma.exp create mode 100644 find/testsuite/find.gnu/comma.xo create mode 100644 find/testsuite/find.gnu/delete.exp create mode 100644 find/testsuite/find.gnu/delete.xo create mode 100644 find/testsuite/find.gnu/deletedir.exp create mode 100644 find/testsuite/find.gnu/deletedir.xo create mode 100644 find/testsuite/find.gnu/deletefile.exp create mode 100644 find/testsuite/find.gnu/deletefile.xo create mode 100644 find/testsuite/find.gnu/depth-d.exp create mode 100644 find/testsuite/find.gnu/depth-d.xo create mode 100644 find/testsuite/find.gnu/depth.exp create mode 100644 find/testsuite/find.gnu/depth.xo create mode 100644 find/testsuite/find.gnu/empty.exp create mode 100644 find/testsuite/find.gnu/empty.xo create mode 100644 find/testsuite/find.gnu/exec-many-rtn-failure.exp create mode 100644 find/testsuite/find.gnu/exec-many-rtn-failure.xo create mode 100644 find/testsuite/find.gnu/exec-many-rtn-success.exp create mode 100644 find/testsuite/find.gnu/exec-many-rtn-success.xo create mode 100644 find/testsuite/find.gnu/exec-one-rtn-fail.exp create mode 100644 find/testsuite/find.gnu/exec-one-rtn-fail.xo create mode 100644 find/testsuite/find.gnu/exec-one-rtn-success.exp create mode 100644 find/testsuite/find.gnu/exec-one-rtn-success.xo create mode 100644 find/testsuite/find.gnu/execdir-hier.exp create mode 100644 find/testsuite/find.gnu/execdir-hier.xo create mode 100644 find/testsuite/find.gnu/execdir-in-unreadable.exp create mode 100644 find/testsuite/find.gnu/execdir-one.exp create mode 100644 find/testsuite/find.gnu/execdir-one.xo create mode 100644 find/testsuite/find.gnu/execdir-pwd.exp create mode 100644 find/testsuite/find.gnu/execdir-root-only.exp create mode 100644 find/testsuite/find.gnu/execdir-root-only.xo create mode 100644 find/testsuite/find.gnu/false.exp create mode 100644 find/testsuite/find.gnu/false.xo create mode 100644 find/testsuite/find.gnu/follow-arg-parent-symlink.exp create mode 100644 find/testsuite/find.gnu/follow-arg-parent-symlink.xo create mode 100644 find/testsuite/find.gnu/follow-basic.exp create mode 100644 find/testsuite/find.gnu/follow-basic.xo create mode 100644 find/testsuite/find.gnu/fprint-unwritable.exp create mode 100644 find/testsuite/find.gnu/fprint0_stdout.exp create mode 100644 find/testsuite/find.gnu/fprint0_stdout.xo create mode 100644 find/testsuite/find.gnu/gnu-or.exp create mode 100644 find/testsuite/find.gnu/gnu-or.xo create mode 100644 find/testsuite/find.gnu/gnuand.exp create mode 100644 find/testsuite/find.gnu/gnuand.xo create mode 100644 find/testsuite/find.gnu/gnunot.exp create mode 100644 find/testsuite/find.gnu/gnunot.xo create mode 100644 find/testsuite/find.gnu/ilname.exp create mode 100644 find/testsuite/find.gnu/ilname.xo create mode 100644 find/testsuite/find.gnu/iname.exp create mode 100644 find/testsuite/find.gnu/iname.xo create mode 100644 find/testsuite/find.gnu/inum.exp create mode 100644 find/testsuite/find.gnu/inum.xo create mode 100644 find/testsuite/find.gnu/ipath.exp create mode 100644 find/testsuite/find.gnu/ipath.xo create mode 100644 find/testsuite/find.gnu/iregex1.exp create mode 100644 find/testsuite/find.gnu/iregex1.xo create mode 100644 find/testsuite/find.gnu/iwholename.exp create mode 100644 find/testsuite/find.gnu/iwholename.xo create mode 100644 find/testsuite/find.gnu/lname.exp create mode 100644 find/testsuite/find.gnu/lname.xo create mode 100644 find/testsuite/find.gnu/mindepth-arg.exp create mode 100644 find/testsuite/find.gnu/mindepth-arg.xo create mode 100644 find/testsuite/find.gnu/mindepth-badarg.exp create mode 100644 find/testsuite/find.gnu/name-opt.exp create mode 100644 find/testsuite/find.gnu/name-opt.xo create mode 100644 find/testsuite/find.gnu/name-period.exp create mode 100644 find/testsuite/find.gnu/name-period.xo create mode 100644 find/testsuite/find.gnu/path.exp create mode 100644 find/testsuite/find.gnu/path.xo create mode 100644 find/testsuite/find.gnu/perm-slash.exp create mode 100644 find/testsuite/find.gnu/perm-slash.xo create mode 100644 find/testsuite/find.gnu/perm.exp create mode 100644 find/testsuite/find.gnu/perm.xo create mode 100644 find/testsuite/find.gnu/perm000.exp create mode 100644 find/testsuite/find.gnu/perm000.xo create mode 100644 find/testsuite/find.gnu/posix-dflt.exp create mode 100644 find/testsuite/find.gnu/posix-dflt.xo create mode 100644 find/testsuite/find.gnu/posix-h.exp create mode 100644 find/testsuite/find.gnu/posix-h.xo create mode 100644 find/testsuite/find.gnu/posix-l.exp create mode 100644 find/testsuite/find.gnu/posix-l.xo create mode 100644 find/testsuite/find.gnu/print0.exp create mode 100644 find/testsuite/find.gnu/print0.xo create mode 100644 find/testsuite/find.gnu/print_stdout.exp create mode 100644 find/testsuite/find.gnu/print_stdout.xo create mode 100644 find/testsuite/find.gnu/printf-h.exp create mode 100644 find/testsuite/find.gnu/printf-h.xo create mode 100644 find/testsuite/find.gnu/printf-symlink.exp create mode 100644 find/testsuite/find.gnu/printf-symlink.xo create mode 100644 find/testsuite/find.gnu/printf.exp create mode 100644 find/testsuite/find.gnu/printf.xo create mode 100644 find/testsuite/find.gnu/printfHdfl.exp create mode 100644 find/testsuite/find.gnu/printfHdfl.xo create mode 100644 find/testsuite/find.gnu/prune-default-print.exp create mode 100644 find/testsuite/find.gnu/prune-default-print.xo create mode 100644 find/testsuite/find.gnu/quit.exp create mode 100644 find/testsuite/find.gnu/quit.xo create mode 100644 find/testsuite/find.gnu/regex1.exp create mode 100644 find/testsuite/find.gnu/regex1.xo create mode 100644 find/testsuite/find.gnu/regex2.exp create mode 100644 find/testsuite/find.gnu/regex2.xo create mode 100644 find/testsuite/find.gnu/samefile-copy.exp create mode 100644 find/testsuite/find.gnu/samefile-copy.xo create mode 100644 find/testsuite/find.gnu/samefile-link.exp create mode 100644 find/testsuite/find.gnu/samefile-link.xo create mode 100644 find/testsuite/find.gnu/samefile-missing.exp create mode 100644 find/testsuite/find.gnu/samefile-p-brokenlink.exp create mode 100644 find/testsuite/find.gnu/samefile-p-brokenlink.xo create mode 100644 find/testsuite/find.gnu/samefile-same.exp create mode 100644 find/testsuite/find.gnu/samefile-same.xo create mode 100644 find/testsuite/find.gnu/samefile-symlink.exp create mode 100644 find/testsuite/find.gnu/samefile-symlink.xo create mode 100644 find/testsuite/find.gnu/sv-bug-12230.exp create mode 100644 find/testsuite/find.gnu/sv-bug-17477.exp create mode 100644 find/testsuite/find.gnu/sv-bug-17490.exp create mode 100644 find/testsuite/find.gnu/sv-bug-17782.exp create mode 100644 find/testsuite/find.gnu/sv-bug-17782.xo create mode 100644 find/testsuite/find.gnu/sv-bug-18222.exp create mode 100644 find/testsuite/find.gnu/sv-bug-18222.xo create mode 100644 find/testsuite/find.gnu/true.exp create mode 100644 find/testsuite/find.gnu/true.xo create mode 100644 find/testsuite/find.gnu/used-invarg.exp create mode 100644 find/testsuite/find.gnu/used-missing.exp create mode 100644 find/testsuite/find.gnu/user-invalid.exp create mode 100644 find/testsuite/find.gnu/wholename.exp create mode 100644 find/testsuite/find.gnu/wholename.xo create mode 100644 find/testsuite/find.gnu/xtype-symlink.exp create mode 100644 find/testsuite/find.gnu/xtype-symlink.xo create mode 100644 find/testsuite/find.gnu/xtype.exp create mode 100644 find/testsuite/find.gnu/xtype.xo create mode 100644 find/testsuite/find.posix/and.exp create mode 100644 find/testsuite/find.posix/and.xo create mode 100644 find/testsuite/find.posix/bracket-depth.exp create mode 100644 find/testsuite/find.posix/depth1.exp create mode 100644 find/testsuite/find.posix/depth1.xo create mode 100644 find/testsuite/find.posix/empty-parens.exp create mode 100644 find/testsuite/find.posix/exec-one.exp create mode 100644 find/testsuite/find.posix/exec-one.xo create mode 100644 find/testsuite/find.posix/files-not-expressions1.exp create mode 100644 find/testsuite/find.posix/files-not-expressions1.xo create mode 100644 find/testsuite/find.posix/files-not-expressions2.exp create mode 100644 find/testsuite/find.posix/files-not-expressions2.xo create mode 100644 find/testsuite/find.posix/files-not-expressions3.exp create mode 100644 find/testsuite/find.posix/files-not-expressions3.xo create mode 100644 find/testsuite/find.posix/group-empty.exp create mode 100644 find/testsuite/find.posix/group-missing.exp create mode 100644 find/testsuite/find.posix/grouping.exp create mode 100644 find/testsuite/find.posix/grouping.xo create mode 100644 find/testsuite/find.posix/links.exp create mode 100644 find/testsuite/find.posix/links.xo create mode 100644 find/testsuite/find.posix/name-missing.exp create mode 100644 find/testsuite/find.posix/name.exp create mode 100644 find/testsuite/find.posix/name.xo create mode 100644 find/testsuite/find.posix/perm-X.exp create mode 100644 find/testsuite/find.posix/perm-X.xo create mode 100644 find/testsuite/find.posix/perm-vanilla.exp create mode 100644 find/testsuite/find.posix/perm-vanilla.xo create mode 100644 find/testsuite/find.posix/posixnot.exp create mode 100644 find/testsuite/find.posix/posixnot.xo create mode 100644 find/testsuite/find.posix/prune.exp create mode 100644 find/testsuite/find.posix/prune.xo create mode 100644 find/testsuite/find.posix/size-invalid.exp create mode 100644 find/testsuite/find.posix/size-missing.exp create mode 100644 find/testsuite/find.posix/sizes.exp create mode 100644 find/testsuite/find.posix/sizes.xo create mode 100644 find/testsuite/find.posix/sizetype.exp create mode 100644 find/testsuite/find.posix/sizetype.xo create mode 100644 find/testsuite/find.posix/sv-bug-11175.exp create mode 100644 find/testsuite/find.posix/sv-bug-11175.xo create mode 100644 find/testsuite/find.posix/sv-bug-12181.exp create mode 100644 find/testsuite/find.posix/sv-bug-12181.xo create mode 100644 find/testsuite/find.posix/sv-bug-15235.exp create mode 100644 find/testsuite/find.posix/sv-bug-15235.xo create mode 100644 find/testsuite/find.posix/sv-bug-19605.exp create mode 100644 find/testsuite/find.posix/sv-bug-19613.exp create mode 100644 find/testsuite/find.posix/sv-bug-19613.xo create mode 100644 find/testsuite/find.posix/sv-bug-19617.exp create mode 100644 find/testsuite/find.posix/typearg.exp create mode 100644 find/testsuite/find.posix/typesize.exp create mode 100644 find/testsuite/find.posix/typesize.xo create mode 100644 find/testsuite/find.posix/user-empty.exp create mode 100644 find/testsuite/find.posix/user-missing.exp create mode 100644 find/tree.c create mode 100644 find/util.c create mode 100644 find/version.c create mode 100644 gnulib/Makefile.am create mode 100644 gnulib/Makefile.in create mode 100644 gnulib/lib/Makefile.am create mode 100644 gnulib/lib/Makefile.in create mode 100644 gnulib/lib/__fpending.c create mode 100644 gnulib/lib/__fpending.h create mode 100644 gnulib/lib/alloca.c create mode 100644 gnulib/lib/alloca_.h create mode 100644 gnulib/lib/allocsa.c create mode 100644 gnulib/lib/allocsa.h create mode 100644 gnulib/lib/allocsa.valgrind create mode 100644 gnulib/lib/argmatch.c create mode 100644 gnulib/lib/argmatch.h create mode 100644 gnulib/lib/at-func.c create mode 100644 gnulib/lib/basename.c create mode 100644 gnulib/lib/c-strstr.c create mode 100644 gnulib/lib/c-strstr.h create mode 100644 gnulib/lib/canonicalize-lgpl.c create mode 100644 gnulib/lib/canonicalize.c create mode 100644 gnulib/lib/canonicalize.h create mode 100644 gnulib/lib/chdir-long.c create mode 100644 gnulib/lib/chdir-long.h create mode 100644 gnulib/lib/chown.c create mode 100644 gnulib/lib/close-stream.c create mode 100644 gnulib/lib/close-stream.h create mode 100644 gnulib/lib/closeout.c create mode 100644 gnulib/lib/closeout.h create mode 100755 gnulib/lib/config.charset create mode 100644 gnulib/lib/creat-safer.c create mode 100644 gnulib/lib/cycle-check.c create mode 100644 gnulib/lib/cycle-check.h create mode 100644 gnulib/lib/dev-ino.h create mode 100644 gnulib/lib/dirent_.h create mode 100644 gnulib/lib/dirfd.c create mode 100644 gnulib/lib/dirfd.h create mode 100644 gnulib/lib/dirname.c create mode 100644 gnulib/lib/dirname.h create mode 100644 gnulib/lib/dup-safer.c create mode 100644 gnulib/lib/dup2.c create mode 100644 gnulib/lib/error.c create mode 100644 gnulib/lib/error.h create mode 100644 gnulib/lib/exitfail.c create mode 100644 gnulib/lib/exitfail.h create mode 100644 gnulib/lib/fchdir.c create mode 100644 gnulib/lib/fchmodat.c create mode 100644 gnulib/lib/fchown-stub.c create mode 100644 gnulib/lib/fchownat.c create mode 100644 gnulib/lib/fcntl--.h create mode 100644 gnulib/lib/fcntl-safer.h create mode 100644 gnulib/lib/fcntl_.h create mode 100644 gnulib/lib/fd-safer.c create mode 100644 gnulib/lib/fileblocks.c create mode 100644 gnulib/lib/filemode.c create mode 100644 gnulib/lib/filemode.h create mode 100644 gnulib/lib/filenamecat.c create mode 100644 gnulib/lib/filenamecat.h create mode 100644 gnulib/lib/fnmatch.c create mode 100644 gnulib/lib/fnmatch_.h create mode 100644 gnulib/lib/fnmatch_loop.c create mode 100644 gnulib/lib/fopen-safer.c create mode 100644 gnulib/lib/fstatat.c create mode 100644 gnulib/lib/fts-cycle.c create mode 100644 gnulib/lib/fts.c create mode 100644 gnulib/lib/fts_.h create mode 100644 gnulib/lib/getcwd.c create mode 100644 gnulib/lib/getdate.c create mode 100644 gnulib/lib/getdate.h create mode 100644 gnulib/lib/getdate.y create mode 100644 gnulib/lib/getdelim.c create mode 100644 gnulib/lib/getdelim.h create mode 100644 gnulib/lib/getline.c create mode 100644 gnulib/lib/getline.h create mode 100644 gnulib/lib/getopt.c create mode 100644 gnulib/lib/getopt1.c create mode 100644 gnulib/lib/getopt_.h create mode 100644 gnulib/lib/getopt_int.h create mode 100644 gnulib/lib/gettext.h create mode 100644 gnulib/lib/gettime.c create mode 100644 gnulib/lib/gettimeofday.c create mode 100644 gnulib/lib/hash.c create mode 100644 gnulib/lib/hash.h create mode 100644 gnulib/lib/human.c create mode 100644 gnulib/lib/human.h create mode 100644 gnulib/lib/i-ring.c create mode 100644 gnulib/lib/i-ring.h create mode 100644 gnulib/lib/idcache.c create mode 100644 gnulib/lib/intprops.h create mode 100644 gnulib/lib/inttypes_.h create mode 100644 gnulib/lib/lchown.c create mode 100644 gnulib/lib/lchown.h create mode 100644 gnulib/lib/localcharset.c create mode 100644 gnulib/lib/localcharset.h create mode 100644 gnulib/lib/lstat.c create mode 100644 gnulib/lib/lstat.h create mode 100644 gnulib/lib/malloc.c create mode 100644 gnulib/lib/mbchar.c create mode 100644 gnulib/lib/mbchar.h create mode 100644 gnulib/lib/mbscasestr.c create mode 100644 gnulib/lib/mbslen.c create mode 100644 gnulib/lib/mbsstr.c create mode 100644 gnulib/lib/mbuiter.h create mode 100644 gnulib/lib/memchr.c create mode 100644 gnulib/lib/memcmp.c create mode 100644 gnulib/lib/mempcpy.c create mode 100644 gnulib/lib/memrchr.c create mode 100644 gnulib/lib/memset.c create mode 100644 gnulib/lib/mkdirat.c create mode 100644 gnulib/lib/mktime.c create mode 100644 gnulib/lib/modechange.c create mode 100644 gnulib/lib/modechange.h create mode 100644 gnulib/lib/mountlist.c create mode 100644 gnulib/lib/mountlist.h create mode 100644 gnulib/lib/open-safer.c create mode 100644 gnulib/lib/openat-die.c create mode 100644 gnulib/lib/openat-priv.h create mode 100644 gnulib/lib/openat-proc.c create mode 100644 gnulib/lib/openat.c create mode 100644 gnulib/lib/openat.h create mode 100644 gnulib/lib/pathmax.h create mode 100644 gnulib/lib/pipe-safer.c create mode 100644 gnulib/lib/progname.c create mode 100644 gnulib/lib/progname.h create mode 100644 gnulib/lib/quote.c create mode 100644 gnulib/lib/quote.h create mode 100644 gnulib/lib/quotearg.c create mode 100644 gnulib/lib/quotearg.h create mode 100644 gnulib/lib/readlink.c create mode 100644 gnulib/lib/realloc.c create mode 100644 gnulib/lib/ref-add.sin create mode 100644 gnulib/lib/ref-del.sin create mode 100644 gnulib/lib/regcomp.c create mode 100644 gnulib/lib/regex.c create mode 100644 gnulib/lib/regex.h create mode 100644 gnulib/lib/regex_internal.c create mode 100644 gnulib/lib/regex_internal.h create mode 100644 gnulib/lib/regexec.c create mode 100644 gnulib/lib/rpmatch.c create mode 100644 gnulib/lib/same-inode.h create mode 100644 gnulib/lib/save-cwd.c create mode 100644 gnulib/lib/save-cwd.h create mode 100644 gnulib/lib/savedir.c create mode 100644 gnulib/lib/savedir.h create mode 100644 gnulib/lib/setenv.c create mode 100644 gnulib/lib/setenv.h create mode 100644 gnulib/lib/stat-macros.h create mode 100644 gnulib/lib/stat-time.h create mode 100644 gnulib/lib/stdbool_.h create mode 100644 gnulib/lib/stdint_.h create mode 100644 gnulib/lib/stdio--.h create mode 100644 gnulib/lib/stdio-safer.h create mode 100644 gnulib/lib/stdlib_.h create mode 100644 gnulib/lib/stpcpy.c create mode 100644 gnulib/lib/strdup.c create mode 100644 gnulib/lib/strftime.c create mode 100644 gnulib/lib/strftime.h create mode 100644 gnulib/lib/string_.h create mode 100644 gnulib/lib/stripslash.c create mode 100644 gnulib/lib/strndup.c create mode 100644 gnulib/lib/strnlen.c create mode 100644 gnulib/lib/strnlen1.c create mode 100644 gnulib/lib/strnlen1.h create mode 100644 gnulib/lib/strtoimax.c create mode 100644 gnulib/lib/strtol.c create mode 100644 gnulib/lib/strtoll.c create mode 100644 gnulib/lib/strtoul.c create mode 100644 gnulib/lib/strtoull.c create mode 100644 gnulib/lib/strtoumax.c create mode 100644 gnulib/lib/sys_stat_.h create mode 100644 gnulib/lib/sys_time_.h create mode 100644 gnulib/lib/time_.h create mode 100644 gnulib/lib/time_r.c create mode 100644 gnulib/lib/timespec.h create mode 100644 gnulib/lib/unistd--.h create mode 100644 gnulib/lib/unistd-safer.h create mode 100644 gnulib/lib/unistd_.h create mode 100644 gnulib/lib/unsetenv.c create mode 100644 gnulib/lib/verify.h create mode 100644 gnulib/lib/wchar_.h create mode 100644 gnulib/lib/wctype_.h create mode 100644 gnulib/lib/wcwidth.h create mode 100644 gnulib/lib/xalloc-die.c create mode 100644 gnulib/lib/xalloc.h create mode 100644 gnulib/lib/xgetcwd.c create mode 100644 gnulib/lib/xgetcwd.h create mode 100644 gnulib/lib/xmalloc.c create mode 100644 gnulib/lib/xreadlink-with-size.c create mode 100644 gnulib/lib/xreadlink.h create mode 100644 gnulib/lib/xstrndup.c create mode 100644 gnulib/lib/xstrndup.h create mode 100644 gnulib/lib/xstrtod.c create mode 100644 gnulib/lib/xstrtod.h create mode 100644 gnulib/lib/xstrtol.c create mode 100644 gnulib/lib/xstrtol.h create mode 100644 gnulib/lib/xstrtoul.c create mode 100644 gnulib/lib/xstrtoumax.c create mode 100644 gnulib/lib/yesno.c create mode 100644 gnulib/lib/yesno.h create mode 100644 gnulib/m4/absolute-header.m4 create mode 100644 gnulib/m4/alloca.m4 create mode 100644 gnulib/m4/allocsa.m4 create mode 100644 gnulib/m4/argmatch.m4 create mode 100644 gnulib/m4/bison.m4 create mode 100755 gnulib/m4/canonicalize-lgpl.m4 create mode 100644 gnulib/m4/canonicalize.m4 create mode 100644 gnulib/m4/chdir-long.m4 create mode 100644 gnulib/m4/chown.m4 create mode 100644 gnulib/m4/clock_time.m4 create mode 100644 gnulib/m4/close-stream.m4 create mode 100644 gnulib/m4/closeout.m4 create mode 100644 gnulib/m4/codeset.m4 create mode 100644 gnulib/m4/cycle-check.m4 create mode 100644 gnulib/m4/d-ino.m4 create mode 100644 gnulib/m4/d-type.m4 create mode 100644 gnulib/m4/dirfd.m4 create mode 100644 gnulib/m4/dirname.m4 create mode 100644 gnulib/m4/dos.m4 create mode 100644 gnulib/m4/double-slash-root.m4 create mode 100644 gnulib/m4/dup2.m4 create mode 100644 gnulib/m4/eealloc.m4 create mode 100644 gnulib/m4/error.m4 create mode 100644 gnulib/m4/exitfail.m4 create mode 100644 gnulib/m4/extensions.m4 create mode 100644 gnulib/m4/fchdir.m4 create mode 100644 gnulib/m4/fcntl-safer.m4 create mode 100644 gnulib/m4/fcntl_h.m4 create mode 100644 gnulib/m4/fileblocks.m4 create mode 100644 gnulib/m4/filemode.m4 create mode 100644 gnulib/m4/filenamecat.m4 create mode 100644 gnulib/m4/flexmember.m4 create mode 100644 gnulib/m4/fnmatch.m4 create mode 100644 gnulib/m4/fpending.m4 create mode 100644 gnulib/m4/fstypename.m4 create mode 100644 gnulib/m4/fts.m4 create mode 100644 gnulib/m4/getcwd-abort-bug.m4 create mode 100644 gnulib/m4/getcwd-path-max.m4 create mode 100644 gnulib/m4/getcwd.m4 create mode 100644 gnulib/m4/getdate.m4 create mode 100644 gnulib/m4/getdelim.m4 create mode 100644 gnulib/m4/getline.m4 create mode 100644 gnulib/m4/getopt.m4 create mode 100644 gnulib/m4/gettext.m4 create mode 100644 gnulib/m4/gettime.m4 create mode 100644 gnulib/m4/gettimeofday.m4 create mode 100644 gnulib/m4/glibc21.m4 create mode 100644 gnulib/m4/gnulib-common.m4 create mode 100644 gnulib/m4/gnulib-comp.m4 create mode 100644 gnulib/m4/hash.m4 create mode 100644 gnulib/m4/human.m4 create mode 100644 gnulib/m4/i-ring.m4 create mode 100644 gnulib/m4/iconv.m4 create mode 100644 gnulib/m4/idcache.m4 create mode 100644 gnulib/m4/inline.m4 create mode 100644 gnulib/m4/inttypes-pri.m4 create mode 100644 gnulib/m4/inttypes.m4 create mode 100644 gnulib/m4/lchown.m4 create mode 100644 gnulib/m4/lib-ld.m4 create mode 100644 gnulib/m4/lib-link.m4 create mode 100644 gnulib/m4/lib-prefix.m4 create mode 100644 gnulib/m4/localcharset.m4 create mode 100644 gnulib/m4/locale-fr.m4 create mode 100644 gnulib/m4/locale-tr.m4 create mode 100644 gnulib/m4/locale-zh.m4 create mode 100644 gnulib/m4/longlong.m4 create mode 100644 gnulib/m4/ls-mntd-fs.m4 create mode 100644 gnulib/m4/lstat.m4 create mode 100644 gnulib/m4/mbchar.m4 create mode 100644 gnulib/m4/mbiter.m4 create mode 100644 gnulib/m4/mbrtowc.m4 create mode 100644 gnulib/m4/mbscasestr.m4 create mode 100644 gnulib/m4/mbslen.m4 create mode 100644 gnulib/m4/mbsstr.m4 create mode 100644 gnulib/m4/mbstate_t.m4 create mode 100644 gnulib/m4/memchr.m4 create mode 100644 gnulib/m4/memcmp.m4 create mode 100644 gnulib/m4/mempcpy.m4 create mode 100644 gnulib/m4/memrchr.m4 create mode 100644 gnulib/m4/memset.m4 create mode 100644 gnulib/m4/mktime.m4 create mode 100644 gnulib/m4/modechange.m4 create mode 100644 gnulib/m4/mountlist.m4 create mode 100644 gnulib/m4/nls.m4 create mode 100644 gnulib/m4/onceonly_2_57.m4 create mode 100644 gnulib/m4/openat.m4 create mode 100644 gnulib/m4/pathmax.m4 create mode 100644 gnulib/m4/po.m4 create mode 100644 gnulib/m4/progtest.m4 create mode 100644 gnulib/m4/quote.m4 create mode 100644 gnulib/m4/quotearg.m4 create mode 100644 gnulib/m4/readlink.m4 create mode 100644 gnulib/m4/regex.m4 create mode 100644 gnulib/m4/rpmatch.m4 create mode 100644 gnulib/m4/save-cwd.m4 create mode 100644 gnulib/m4/savedir.m4 create mode 100644 gnulib/m4/setenv.m4 create mode 100644 gnulib/m4/ssize_t.m4 create mode 100644 gnulib/m4/st_dm_mode.m4 create mode 100644 gnulib/m4/stat-time.m4 create mode 100644 gnulib/m4/stdbool.m4 create mode 100644 gnulib/m4/stdint.m4 create mode 100644 gnulib/m4/stdio-safer.m4 create mode 100644 gnulib/m4/stdlib_h.m4 create mode 100644 gnulib/m4/stpcpy.m4 create mode 100644 gnulib/m4/strdup.m4 create mode 100644 gnulib/m4/strftime.m4 create mode 100644 gnulib/m4/string_h.m4 create mode 100644 gnulib/m4/strndup.m4 create mode 100644 gnulib/m4/strnlen.m4 create mode 100644 gnulib/m4/strtoimax.m4 create mode 100644 gnulib/m4/strtol.m4 create mode 100644 gnulib/m4/strtoll.m4 create mode 100644 gnulib/m4/strtoul.m4 create mode 100644 gnulib/m4/strtoull.m4 create mode 100644 gnulib/m4/strtoumax.m4 create mode 100644 gnulib/m4/sys_stat_h.m4 create mode 100644 gnulib/m4/sys_time_h.m4 create mode 100644 gnulib/m4/time_h.m4 create mode 100644 gnulib/m4/time_r.m4 create mode 100644 gnulib/m4/timespec.m4 create mode 100644 gnulib/m4/tm_gmtoff.m4 create mode 100644 gnulib/m4/ulonglong.m4 create mode 100644 gnulib/m4/unistd-safer.m4 create mode 100644 gnulib/m4/unistd_h.m4 create mode 100644 gnulib/m4/wchar.m4 create mode 100644 gnulib/m4/wchar_t.m4 create mode 100644 gnulib/m4/wctype.m4 create mode 100644 gnulib/m4/wcwidth.m4 create mode 100644 gnulib/m4/wint_t.m4 create mode 100644 gnulib/m4/xalloc.m4 create mode 100644 gnulib/m4/xgetcwd.m4 create mode 100644 gnulib/m4/xstrndup.m4 create mode 100644 gnulib/m4/xstrtod.m4 create mode 100644 gnulib/m4/xstrtol.m4 create mode 100644 gnulib/m4/yesno.m4 create mode 100644 import-gnulib.config create mode 100644 import-gnulib.sh create mode 100644 lib/Makefile.am create mode 100644 lib/Makefile.in create mode 100644 lib/buildcmd.c create mode 100644 lib/buildcmd.h create mode 100644 lib/dircallback.c create mode 100644 lib/dircallback.h create mode 100644 lib/extendbuf.c create mode 100644 lib/extendbuf.h create mode 100644 lib/forcefindlib.c create mode 100644 lib/gnulib-version.c create mode 100644 lib/gnulib-version.h create mode 100644 lib/listfile.c create mode 100644 lib/listfile.h create mode 100644 lib/modetype.h create mode 100644 lib/nextelem.c create mode 100644 lib/nextelem.h create mode 100644 lib/printquoted.c create mode 100644 lib/printquoted.h create mode 100644 lib/qmark.c create mode 100644 lib/regexprops.c create mode 100644 lib/regextype.c create mode 100644 lib/regextype.h create mode 100644 lib/savedirinfo.c create mode 100644 lib/savedirinfo.h create mode 100644 lib/wait.h create mode 100644 lib/waitpid.c create mode 100644 locate/Makefile.am create mode 100644 locate/Makefile.in create mode 100644 locate/bigram.c create mode 100644 locate/code.c create mode 100644 locate/frcode.c create mode 100644 locate/locate.1 create mode 100644 locate/locate.c create mode 100644 locate/locatedb.5 create mode 100644 locate/locatedb.h create mode 100644 locate/testsuite/Makefile.am create mode 100644 locate/testsuite/Makefile.in create mode 100644 locate/testsuite/config/unix.exp create mode 100644 locate/testsuite/locate.gnu/bigendian.exp create mode 100644 locate/testsuite/locate.gnu/bigendian.xo create mode 100644 locate/testsuite/locate.gnu/bigprefix1.exp create mode 100644 locate/testsuite/locate.gnu/exceedshort.exp create mode 100644 locate/testsuite/locate.gnu/exists1.exp create mode 100644 locate/testsuite/locate.gnu/exists1.xo create mode 100644 locate/testsuite/locate.gnu/exists2.exp create mode 100644 locate/testsuite/locate.gnu/exists2.xo create mode 100644 locate/testsuite/locate.gnu/exists3.exp create mode 100644 locate/testsuite/locate.gnu/exists3.xo create mode 100644 locate/testsuite/locate.gnu/ignore_case1.exp create mode 100644 locate/testsuite/locate.gnu/ignore_case1.xo create mode 100644 locate/testsuite/locate.gnu/ignore_case2.exp create mode 100644 locate/testsuite/locate.gnu/ignore_case2.xo create mode 100644 locate/testsuite/locate.gnu/ignore_case3.exp create mode 100644 locate/testsuite/locate.gnu/ignore_case3.xo create mode 100644 locate/testsuite/locate.gnu/littleendian.exp create mode 100644 locate/testsuite/locate.gnu/littleendian.xo create mode 100644 locate/testsuite/locate.gnu/locateddb.old.powerpc.xi create mode 100644 locate/testsuite/locate.gnu/locateddb.old.x86.xi create mode 100644 locate/testsuite/locate.gnu/notexists1.exp create mode 100644 locate/testsuite/locate.gnu/notexists1.xo create mode 100644 locate/testsuite/locate.gnu/notexists2.exp create mode 100644 locate/testsuite/locate.gnu/notexists2.xo create mode 100644 locate/testsuite/locate.gnu/notexists3.exp create mode 100644 locate/testsuite/locate.gnu/notexists3.xo create mode 100644 locate/testsuite/locate.gnu/old_prefix.exp create mode 100644 locate/testsuite/locate.gnu/old_prefix.xo create mode 100644 locate/testsuite/locate.gnu/regex1.exp create mode 100644 locate/testsuite/locate.gnu/space1st.exp create mode 100644 locate/testsuite/locate.gnu/sv-bug-14535.exp create mode 100644 locate/updatedb.1 create mode 100644 locate/updatedb.sh create mode 100644 locate/word_io.c create mode 100644 m4/Makefile.am create mode 100644 m4/Makefile.in create mode 100644 m4/findlib.m4 create mode 100644 m4/mkinstalldirs.m4 create mode 100644 m4/noreturn.m4 create mode 100644 m4/nullsort.m4 create mode 100644 m4/order-bad.bin create mode 100644 m4/order-good.bin create mode 100644 m4/withfts.m4 create mode 100644 po/ChangeLog create mode 100644 po/Makefile.in.in create mode 100644 po/Makevars create mode 100644 po/POTFILES.in create mode 100644 po/Rules-quot create mode 100644 po/be.gmo create mode 100644 po/be.po create mode 100644 po/bg.gmo create mode 100644 po/bg.po create mode 100644 po/boldquot.sed create mode 100644 po/ca.gmo create mode 100644 po/ca.po create mode 100644 po/da.gmo create mode 100644 po/da.po create mode 100644 po/de.gmo create mode 100644 po/de.po create mode 100644 po/el.gmo create mode 100644 po/el.po create mode 100644 po/en@boldquot.header create mode 100644 po/en@quot.header create mode 100644 po/eo.gmo create mode 100644 po/eo.po create mode 100644 po/es.gmo create mode 100644 po/es.po create mode 100644 po/et.gmo create mode 100644 po/et.po create mode 100644 po/fi.gmo create mode 100644 po/fi.po create mode 100644 po/findutils.pot create mode 100644 po/fr.gmo create mode 100644 po/fr.po create mode 100644 po/ga.gmo create mode 100644 po/ga.po create mode 100644 po/gl.gmo create mode 100644 po/gl.po create mode 100644 po/hr.gmo create mode 100644 po/hr.po create mode 100644 po/hu.gmo create mode 100644 po/hu.po create mode 100644 po/id.gmo create mode 100644 po/id.po create mode 100644 po/insert-header.sin create mode 100644 po/it.gmo create mode 100644 po/it.po create mode 100644 po/ja.gmo create mode 100644 po/ja.po create mode 100644 po/ko.gmo create mode 100644 po/ko.po create mode 100644 po/lg.gmo create mode 100644 po/lg.po create mode 100644 po/ms.gmo create mode 100644 po/ms.po create mode 100644 po/nl.gmo create mode 100644 po/nl.po create mode 100644 po/pl.gmo create mode 100644 po/pl.po create mode 100644 po/pt.gmo create mode 100644 po/pt.po create mode 100644 po/pt_BR.gmo create mode 100644 po/pt_BR.po create mode 100644 po/quot.sed create mode 100644 po/remove-potcdate.sin create mode 100644 po/ro.gmo create mode 100644 po/ro.po create mode 100644 po/ru.gmo create mode 100644 po/ru.po create mode 100644 po/rw.gmo create mode 100644 po/rw.po create mode 100644 po/sk.gmo create mode 100644 po/sk.po create mode 100644 po/sl.gmo create mode 100644 po/sl.po create mode 100644 po/sr.gmo create mode 100644 po/sr.po create mode 100644 po/stamp-po create mode 100644 po/sv.gmo create mode 100644 po/sv.po create mode 100644 po/tr.gmo create mode 100644 po/tr.po create mode 100644 po/uk.gmo create mode 100644 po/uk.po create mode 100644 po/vi.gmo create mode 100644 po/vi.po create mode 100644 po/zh_CN.gmo create mode 100644 po/zh_CN.po create mode 100644 po/zh_TW.gmo create mode 100644 po/zh_TW.po create mode 100644 stamp-h.in create mode 100644 tests/Makefile.am create mode 100644 tests/Makefile.in create mode 100644 tests/test-alloca-opt.c create mode 100644 tests/test-allocsa.c create mode 100644 tests/test-argmatch.c create mode 100644 tests/test-c-strstr.c create mode 100644 tests/test-canonicalize-lgpl.c create mode 100755 tests/test-canonicalize-lgpl.sh create mode 100644 tests/test-dirname.c create mode 100644 tests/test-fcntl.c create mode 100644 tests/test-gettimeofday.c create mode 100644 tests/test-inttypes.c create mode 100644 tests/test-mbscasestr1.c create mode 100644 tests/test-mbscasestr2.c create mode 100755 tests/test-mbscasestr2.sh create mode 100644 tests/test-mbscasestr3.c create mode 100755 tests/test-mbscasestr3.sh create mode 100644 tests/test-mbscasestr4.c create mode 100755 tests/test-mbscasestr4.sh create mode 100644 tests/test-mbsstr1.c create mode 100644 tests/test-mbsstr2.c create mode 100755 tests/test-mbsstr2.sh create mode 100644 tests/test-mbsstr3.c create mode 100755 tests/test-mbsstr3.sh create mode 100644 tests/test-stat-time.c create mode 100644 tests/test-stdbool.c create mode 100644 tests/test-stdint.c create mode 100644 tests/test-stdlib.c create mode 100644 tests/test-string.c create mode 100644 tests/test-sys_stat.c create mode 100644 tests/test-sys_time.c create mode 100644 tests/test-time.c create mode 100644 tests/test-unistd.c create mode 100644 tests/test-wchar.c create mode 100644 tests/test-wctype.c create mode 100644 xargs/Makefile.am create mode 100644 xargs/Makefile.in create mode 100644 xargs/testsuite/Makefile.am create mode 100644 xargs/testsuite/Makefile.in create mode 100644 xargs/testsuite/config/unix.exp create mode 100644 xargs/testsuite/inputs/16383-ys.xi create mode 100644 xargs/testsuite/inputs/32767-ys.xi create mode 100644 xargs/testsuite/inputs/EOF.xi create mode 100644 xargs/testsuite/inputs/EOFb.xi create mode 100644 xargs/testsuite/inputs/EOFe.xi create mode 100644 xargs/testsuite/inputs/Pdata.xi create mode 100644 xargs/testsuite/inputs/blank.xi create mode 100644 xargs/testsuite/inputs/empty.xi create mode 100644 xargs/testsuite/inputs/eof1.xi create mode 100644 xargs/testsuite/inputs/eof_-0.xi create mode 100644 xargs/testsuite/inputs/eof_.xi create mode 100644 xargs/testsuite/inputs/eofstr.xi create mode 100644 xargs/testsuite/inputs/ett.xi create mode 100644 xargs/testsuite/inputs/files.xi create mode 100644 xargs/testsuite/inputs/files0.xi create mode 100644 xargs/testsuite/inputs/foobar.xi create mode 100644 xargs/testsuite/inputs/formfeeds.xi create mode 100644 xargs/testsuite/inputs/ftt.xi create mode 100644 xargs/testsuite/inputs/helloworld.xi create mode 100644 xargs/testsuite/inputs/items-0.xi create mode 100644 xargs/testsuite/inputs/items.xi create mode 100644 xargs/testsuite/inputs/ldata-0.xi create mode 100644 xargs/testsuite/inputs/ldata.xi create mode 100644 xargs/testsuite/inputs/ldatab-0.xi create mode 100644 xargs/testsuite/inputs/ldatab.xi create mode 100644 xargs/testsuite/inputs/lines.xi create mode 100644 xargs/testsuite/inputs/noeof-0.xi create mode 100644 xargs/testsuite/inputs/noeof.xi create mode 100644 xargs/testsuite/inputs/quotes.xi create mode 100644 xargs/testsuite/inputs/space.xi create mode 100644 xargs/testsuite/inputs/stairs-0.xi create mode 100644 xargs/testsuite/inputs/stairs.xi create mode 100644 xargs/testsuite/inputs/stairs2-0.xi create mode 100644 xargs/testsuite/inputs/stairs2.xi create mode 100644 xargs/testsuite/inputs/stt.xi create mode 100644 xargs/testsuite/inputs/unmatched.xi create mode 100644 xargs/testsuite/inputs/unmatched2.xi create mode 100644 xargs/testsuite/inputs/verticaltabs.xi create mode 100644 xargs/testsuite/xargs.gnu/0n3.exp create mode 100644 xargs/testsuite/xargs.gnu/0n3.xo create mode 100644 xargs/testsuite/xargs.gnu/E_-0.exp create mode 100644 xargs/testsuite/xargs.gnu/E_-0.xo create mode 100644 xargs/testsuite/xargs.gnu/L2-0.exp create mode 100644 xargs/testsuite/xargs.gnu/L2-0.xo create mode 100644 xargs/testsuite/xargs.gnu/L2_2-0.exp create mode 100644 xargs/testsuite/xargs.gnu/L2_2-0.xo create mode 100644 xargs/testsuite/xargs.gnu/L3-0.exp create mode 100644 xargs/testsuite/xargs.gnu/L3-0.xo create mode 100644 xargs/testsuite/xargs.gnu/P3-n1-IARG.exp create mode 100644 xargs/testsuite/xargs.gnu/P3-n1-IARG.xo create mode 100644 xargs/testsuite/xargs.gnu/delim-o.exp create mode 100644 xargs/testsuite/xargs.gnu/delim-o.xo create mode 100644 xargs/testsuite/xargs.gnu/empty-r.exp create mode 100644 xargs/testsuite/xargs.gnu/empty_def-r.exp create mode 100644 xargs/testsuite/xargs.gnu/idef-0.exp create mode 100644 xargs/testsuite/xargs.gnu/idef-0.xo create mode 100644 xargs/testsuite/xargs.gnu/idef-s26-0.exp create mode 100644 xargs/testsuite/xargs.gnu/idef-s26-0.xo create mode 100644 xargs/testsuite/xargs.gnu/l1-0.exp create mode 100644 xargs/testsuite/xargs.gnu/l1-0.xo create mode 100644 xargs/testsuite/xargs.gnu/l1_2-0.exp create mode 100644 xargs/testsuite/xargs.gnu/l1_2-0.xo create mode 100644 xargs/testsuite/xargs.gnu/n1-0.exp create mode 100644 xargs/testsuite/xargs.gnu/n1-0.xo create mode 100644 xargs/testsuite/xargs.gnu/n2-0.exp create mode 100644 xargs/testsuite/xargs.gnu/n2-0.xo create mode 100644 xargs/testsuite/xargs.gnu/n2-s26-0.exp create mode 100644 xargs/testsuite/xargs.gnu/n2-s26-0.xo create mode 100644 xargs/testsuite/xargs.gnu/n2-s26-x-0.exp create mode 100644 xargs/testsuite/xargs.gnu/n2-s26-x-0.xo create mode 100644 xargs/testsuite/xargs.gnu/n3-0.exp create mode 100644 xargs/testsuite/xargs.gnu/n3-0.xo create mode 100644 xargs/testsuite/xargs.gnu/n3-s36-0.exp create mode 100644 xargs/testsuite/xargs.gnu/n3-s36-0.xo create mode 100644 xargs/testsuite/xargs.gnu/noeof-0.exp create mode 100644 xargs/testsuite/xargs.gnu/noeof-0.xo create mode 100644 xargs/testsuite/xargs.gnu/nothing.exp create mode 100644 xargs/testsuite/xargs.gnu/nothing.xo create mode 100644 xargs/testsuite/xargs.gnu/r.exp create mode 100644 xargs/testsuite/xargs.gnu/r.xo create mode 100644 xargs/testsuite/xargs.gnu/s118-0.exp create mode 100644 xargs/testsuite/xargs.gnu/s118-0.xo create mode 100644 xargs/testsuite/xargs.gnu/s19-0.exp create mode 100644 xargs/testsuite/xargs.gnu/s19-0.xo create mode 100644 xargs/testsuite/xargs.gnu/s19_2-0.exp create mode 100644 xargs/testsuite/xargs.gnu/s20-0.exp create mode 100644 xargs/testsuite/xargs.gnu/s20-0.xo create mode 100644 xargs/testsuite/xargs.gnu/s30-0.exp create mode 100644 xargs/testsuite/xargs.gnu/s30-0.xo create mode 100644 xargs/testsuite/xargs.gnu/space-0.exp create mode 100644 xargs/testsuite/xargs.gnu/space-0.xo create mode 100644 xargs/testsuite/xargs.gnu/space-r.exp create mode 100644 xargs/testsuite/xargs.gnu/space-t-0.exp create mode 100644 xargs/testsuite/xargs.gnu/space-t-0.xe create mode 100644 xargs/testsuite/xargs.gnu/space-t-0.xo create mode 100644 xargs/testsuite/xargs.posix/EEOF.exp create mode 100644 xargs/testsuite/xargs.posix/EEOF.xo create mode 100644 xargs/testsuite/xargs.posix/EEOFb.exp create mode 100644 xargs/testsuite/xargs.posix/EEOFb.xo create mode 100644 xargs/testsuite/xargs.posix/EEOFe.exp create mode 100644 xargs/testsuite/xargs.posix/EEOFe.xo create mode 100644 xargs/testsuite/xargs.posix/E_-IARG.exp create mode 100644 xargs/testsuite/xargs.posix/E_-IARG.xo create mode 100644 xargs/testsuite/xargs.posix/E_.exp create mode 100644 xargs/testsuite/xargs.posix/E_.xo create mode 100644 xargs/testsuite/xargs.posix/IARG-E_.exp create mode 100644 xargs/testsuite/xargs.posix/IARG-E_.xo create mode 100644 xargs/testsuite/xargs.posix/IARG-s15.exp create mode 100644 xargs/testsuite/xargs.posix/IARG-s15.xo create mode 100644 xargs/testsuite/xargs.posix/IARG.exp create mode 100644 xargs/testsuite/xargs.posix/IARG.xo create mode 100644 xargs/testsuite/xargs.posix/L2-n2.exp create mode 100644 xargs/testsuite/xargs.posix/L2-n2.xo create mode 100644 xargs/testsuite/xargs.posix/L2_2.exp create mode 100644 xargs/testsuite/xargs.posix/L2_2.xo create mode 100644 xargs/testsuite/xargs.posix/L3.exp create mode 100644 xargs/testsuite/xargs.posix/L3.xo create mode 100644 xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp create mode 100644 xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp create mode 100644 xargs/testsuite/xargs.posix/childfail.exp create mode 100644 xargs/testsuite/xargs.posix/empty.exp create mode 100644 xargs/testsuite/xargs.posix/empty.xo create mode 100644 xargs/testsuite/xargs.posix/empty_def.exp create mode 100644 xargs/testsuite/xargs.posix/empty_def.xo create mode 100644 xargs/testsuite/xargs.posix/hithere.exp create mode 100644 xargs/testsuite/xargs.posix/hithere.xo create mode 100644 xargs/testsuite/xargs.posix/n1.exp create mode 100644 xargs/testsuite/xargs.posix/n1.xo create mode 100644 xargs/testsuite/xargs.posix/n2-s26-x.exp create mode 100644 xargs/testsuite/xargs.posix/n2-s26-x.xo create mode 100644 xargs/testsuite/xargs.posix/n2-s26.exp create mode 100644 xargs/testsuite/xargs.posix/n2-s26.xo create mode 100644 xargs/testsuite/xargs.posix/n2.exp create mode 100644 xargs/testsuite/xargs.posix/n2.xo create mode 100644 xargs/testsuite/xargs.posix/n3-s36.exp create mode 100644 xargs/testsuite/xargs.posix/n3-s36.xo create mode 100644 xargs/testsuite/xargs.posix/n3.exp create mode 100644 xargs/testsuite/xargs.posix/n3.xo create mode 100644 xargs/testsuite/xargs.posix/noeof.exp create mode 100644 xargs/testsuite/xargs.posix/noeof.xo create mode 100644 xargs/testsuite/xargs.posix/quotes.exp create mode 100644 xargs/testsuite/xargs.posix/quotes.xo create mode 100644 xargs/testsuite/xargs.posix/rc-123.exp create mode 100644 xargs/testsuite/xargs.posix/rc-123.xo create mode 100644 xargs/testsuite/xargs.posix/rc-124.exp create mode 100644 xargs/testsuite/xargs.posix/rc-125.exp create mode 100644 xargs/testsuite/xargs.posix/rc-126.exp create mode 100644 xargs/testsuite/xargs.posix/rc-127.exp create mode 100644 xargs/testsuite/xargs.posix/s118.exp create mode 100644 xargs/testsuite/xargs.posix/s118.xo create mode 100644 xargs/testsuite/xargs.posix/s19.exp create mode 100644 xargs/testsuite/xargs.posix/s19.xo create mode 100644 xargs/testsuite/xargs.posix/s19_2.exp create mode 100644 xargs/testsuite/xargs.posix/s20.exp create mode 100644 xargs/testsuite/xargs.posix/s20.xo create mode 100644 xargs/testsuite/xargs.posix/s30.exp create mode 100644 xargs/testsuite/xargs.posix/s30.xo create mode 100644 xargs/testsuite/xargs.posix/s47.exp create mode 100644 xargs/testsuite/xargs.posix/s47.xo create mode 100644 xargs/testsuite/xargs.posix/s470.exp create mode 100644 xargs/testsuite/xargs.posix/s470.xo create mode 100644 xargs/testsuite/xargs.posix/s48.exp create mode 100644 xargs/testsuite/xargs.posix/s48.xo create mode 100644 xargs/testsuite/xargs.posix/s6.exp create mode 100644 xargs/testsuite/xargs.posix/savannah-11865.exp create mode 100644 xargs/testsuite/xargs.posix/savannah-11865.xo create mode 100644 xargs/testsuite/xargs.posix/space-I.exp create mode 100644 xargs/testsuite/xargs.posix/space.exp create mode 100644 xargs/testsuite/xargs.posix/space.xo create mode 100644 xargs/testsuite/xargs.posix/sv-bug-18714.exp create mode 100644 xargs/testsuite/xargs.posix/sv-bug-18714.xo create mode 100644 xargs/testsuite/xargs.posix/sv-bug-18714b.exp create mode 100644 xargs/testsuite/xargs.posix/sv-bug-18714b.xo create mode 100644 xargs/testsuite/xargs.posix/uc_L2.exp create mode 100644 xargs/testsuite/xargs.posix/uc_L2.xo create mode 100644 xargs/testsuite/xargs.posix/unmatched-n2-x.exp create mode 100644 xargs/testsuite/xargs.posix/unmatched.exp create mode 100644 xargs/testsuite/xargs.posix/unmatched.xo create mode 100644 xargs/testsuite/xargs.posix/unmatched2.exp create mode 100644 xargs/testsuite/xargs.posix/unmatched2.xo create mode 100644 xargs/testsuite/xargs.sysv/e.exp create mode 100644 xargs/testsuite/xargs.sysv/e.xo create mode 100644 xargs/testsuite/xargs.sysv/eEOF.exp create mode 100644 xargs/testsuite/xargs.sysv/eEOF.xo create mode 100644 xargs/testsuite/xargs.sysv/empty-t.exp create mode 100644 xargs/testsuite/xargs.sysv/empty-t.xe create mode 100644 xargs/testsuite/xargs.sysv/empty-t.xo create mode 100644 xargs/testsuite/xargs.sysv/empty_def-t.exp create mode 100644 xargs/testsuite/xargs.sysv/empty_def-t.xe create mode 100644 xargs/testsuite/xargs.sysv/empty_def-t.xo create mode 100644 xargs/testsuite/xargs.sysv/eof1.exp create mode 100644 xargs/testsuite/xargs.sysv/eof1.xo create mode 100644 xargs/testsuite/xargs.sysv/iARG.exp create mode 100644 xargs/testsuite/xargs.sysv/iARG.xo create mode 100644 xargs/testsuite/xargs.sysv/idef-s26.exp create mode 100644 xargs/testsuite/xargs.sysv/idef-s26.xo create mode 100644 xargs/testsuite/xargs.sysv/idef.exp create mode 100644 xargs/testsuite/xargs.sysv/idef.xo create mode 100644 xargs/testsuite/xargs.sysv/iquotes.exp create mode 100644 xargs/testsuite/xargs.sysv/iquotes.xo create mode 100644 xargs/testsuite/xargs.sysv/l1.exp create mode 100644 xargs/testsuite/xargs.sysv/l1.xo create mode 100644 xargs/testsuite/xargs.sysv/l1_2.exp create mode 100644 xargs/testsuite/xargs.sysv/l1_2.xo create mode 100644 xargs/testsuite/xargs.sysv/l1n4.exp create mode 100644 xargs/testsuite/xargs.sysv/l1n4.xo create mode 100644 xargs/testsuite/xargs.sysv/lc_l2.exp create mode 100644 xargs/testsuite/xargs.sysv/lc_l2.xo create mode 100644 xargs/testsuite/xargs.sysv/s30-t.exp create mode 100644 xargs/testsuite/xargs.sysv/s30-t.xe create mode 100644 xargs/testsuite/xargs.sysv/s30-t.xo create mode 100644 xargs/testsuite/xargs.sysv/space-t.exp create mode 100644 xargs/testsuite/xargs.sysv/space-t.xe create mode 100644 xargs/testsuite/xargs.sysv/space-t.xo create mode 100644 xargs/testsuite/xargs.sysv/sv-bug-18713.exp create mode 100644 xargs/testsuite/xargs.sysv/sv-bug-18713.xo create mode 100644 xargs/testsuite/xargs.sysv/trace.exp create mode 100644 xargs/testsuite/xargs.sysv/trace.xe create mode 100644 xargs/testsuite/xargs.sysv/trace.xo create mode 100644 xargs/xargs.1 create mode 100644 xargs/xargs.c diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 0000000..e32d52d --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,996 @@ +1 Notes on the Free Translation Project +*************************************** + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that free software will gradually become able to speak many +languages. A few packages already provide translations for their +messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work on translations can contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +1.1 Quick configuration advice +============================== + +If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +1.2 INSTALL Matters +=================== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the included GNU +`gettext' library will be used. This library is wholly contained +within this package, usually in the `intl/' subdirectory, so prior +installation of the GNU `gettext' package is _not_ required. +Installers may use special options at configuration time for changing +the default behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will, respectively, bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might not be desirable. You should use +the more recent version of the GNU `gettext' library. I.e. if the file +`intl/VERSION' shows that the library which comes with this package is +more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages usually have many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +1.3 Using This Package +====================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +1.4 Translating Teams +===================== + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +1.5 Available Packages +====================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of May 2005. +The matrix shows, in regard of each package, for which languages PO +files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB + +-------------------------------------------------+ + GNUnet | | + a2ps | [] [] [] [] [] | + aegis | () | + ant-phone | () | + anubis | [] | + ap-utils | | + aspell | [] [] [] [] | + bash | [] [] | + batchelor | [] | + bfd | | + bibshelf | [] | + binutils | [] | + bison | [] [] | + bluez-pin | [] [] [] [] | + clisp | [] [] | + console-tools | [] [] | + coreutils | [] [] [] [] | + cpio | | + cpplib | [] [] [] | + darkstat | [] () [] | + dialog | [] [] [] [] [] [] | + diffutils | [] [] [] [] [] | + doodle | [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] | + fetchmail | [] [] () [] | + fileutils | [] [] | + findutils | [] [] [] | + flex | [] [] [] | + fslint | [] | + gas | | + gawk | [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] [] [] [] | + gip | | + gliv | [] | + glunarclock | | + gmult | [] [] | + gnubiff | () | + gnucash | [] () () [] | + gnucash-glossary | [] () | + gpe-aerial | [] [] | + gpe-beam | [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] | + gpe-conf | [] [] | + gpe-contacts | | + gpe-edit | [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] | + gpsdrive | () () | + gramadoir | [] [] | + grep | [] [] [] [] [] [] | + gretl | | + gsasl | [] | + gss | | + gst-plugins | [] [] [] [] [] [] | + gstreamer | [] [] [] [] [] | + gtick | [] () | + gtkspell | [] [] [] | + hello | [] [] [] [] | + id-utils | [] [] | + impost | | + indent | [] [] | + iso_3166 | | + iso_3166_1 | [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | | + iso_639 | | + jpilot | [] | + jtag | | + jwhois | | + kbd | [] [] [] [] | + latrine | () | + ld | [] | + libc | [] [] [] [] [] | + libextractor | | + libgpewidget | [] [] [] | + libgphoto2 | [] | + libgphoto2_port | [] | + libgsasl | | + libiconv | [] [] [] [] [] | + libidn | | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] | + make | [] [] | + man-db | [] () [] [] | + minicom | [] [] | + mysecretdiary | [] [] | + nano | [] () [] | + nano_1_0 | [] () [] [] | + opcodes | [] | + parted | [] [] [] [] | + psmisc | | + ptx | [] [] [] | + pwdutils | | + python | | + radius | [] | + recode | [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] [] [] | + sed | [] [] | + sh-utils | [] [] | + shared-mime-info | [] [] | + sharutils | [] [] [] [] [] | + silky | | + skencil | [] () | + sketch | [] () | + solfege | [] | + soundtracker | [] [] | + sp | [] | + stardict | [] | + tar | | + texinfo | [] [] | + textutils | [] [] [] | + tin | () () | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | | + xchat | [] [] [] [] [] | + xkeyboard-config | | + xpad | | + +-------------------------------------------------+ + af am ar az be bg bs ca cs cy da de el en en_GB + 10 0 0 2 7 5 0 40 43 2 51 91 19 1 14 + + eo es et eu fa fi fr ga gl he hi hr hu id is + +-----------------------------------------------+ + GNUnet | | + a2ps | [] [] [] | + aegis | | + ant-phone | [] | + anubis | [] | + ap-utils | [] | + aspell | [] [] | + bash | [] [] [] [] | + batchelor | [] [] | + bfd | [] | + bibshelf | [] [] | + binutils | [] [] | + bison | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] | + clisp | [] [] | + console-tools | | + coreutils | [] [] [] [] [] | + cpio | [] [] | + cpplib | [] [] | + darkstat | [] () [] [] [] | + dialog | [] [] [] [] [] [] [] | + diffutils | [] [] [] [] [] [] [] [] [] | + doodle | [] | + e2fsprogs | [] [] | + enscript | [] [] | + error | [] [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] | + flex | [] [] [] | + fslint | [] | + gas | [] [] | + gawk | [] [] [] [] | + gbiff | [] | + gcal | [] [] | + gcc | [] | + gettext-examples | [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] [] | + gip | [] [] [] | + gliv | () | + glunarclock | [] [] [] | + gmult | [] [] | + gnubiff | () | + gnucash | [] () | + gnucash-glossary | [] | + gpe-aerial | [] [] | + gpe-beam | [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] | + gpe-conf | [] | + gpe-contacts | [] | + gpe-edit | [] [] | + gpe-go | [] [] | + gpe-login | [] [] [] | + gpe-ownerinfo | [] [] [] [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] [] | + gpe-taskmanager | [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] | + gpsdrive | () () [] | + gramadoir | [] [] | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] [] | + gsasl | [] [] [] | + gss | [] | + gst-plugins | [] [] | + gstreamer | | + gtick | [] [] [] [] | + gtkspell | [] [] [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + impost | [] [] | + indent | [] [] [] [] [] [] [] [] [] [] | + iso_3166 | [] [] [] | + iso_3166_1 | [] [] [] [] [] [] [] | + iso_3166_2 | [] | + iso_3166_3 | [] | + iso_4217 | [] [] [] | + iso_639 | [] [] [] [] | + jpilot | [] [] | + jtag | [] | + jwhois | [] [] [] [] | + kbd | [] [] | + latrine | [] [] | + ld | [] [] | + libc | [] [] [] [] [] | + libextractor | | + libgpewidget | [] [] [] [] [] | + libgphoto2 | [] [] [] | + libgphoto2_port | [] | + libgsasl | [] [] | + libiconv | [] [] [] [] [] [] [] [] [] [] | + libidn | [] [] | + lifelines | () | + lilypond | | + lingoteach | [] [] | + lynx | [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] [] [] [] [] | + man-db | () | + minicom | [] [] [] [] | + mysecretdiary | [] [] [] | + nano | [] [] () [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] | + psmisc | [] | + ptx | [] [] [] [] [] [] [] [] [] | + pwdutils | | + python | | + radius | [] [] | + recode | [] [] [] [] [] [] [] | + rpm | [] | + screem | | + scrollkeeper | [] [] [] | + sed | [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] | + shared-mime-info | [] [] [] [] [] [] | + sharutils | [] [] [] [] [] [] | + silky | [] | + skencil | [] [] | + sketch | [] [] | + solfege | | + soundtracker | [] [] | + sp | [] | + stardict | [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] [] | + tin | [] () | + tp-robot | [] [] | + tuxpaint | [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] | + wastesedge | () | + wdiff | [] [] [] [] [] [] [] | + wget | [] [] [] [] | + xchat | [] [] [] [] [] | + xkeyboard-config | | + xpad | [] [] [] | + +-----------------------------------------------+ + eo es et eu fa fi fr ga gl he hi hr hu id is + 15 85 21 15 2 35 115 45 16 8 1 6 40 27 1 + + it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso + +--------------------------------------------------+ + GNUnet | | + a2ps | () () [] [] () | + aegis | () | + ant-phone | [] | + anubis | [] [] [] | + ap-utils | | + aspell | [] [] | + bash | [] | + batchelor | [] | + bfd | | + bibshelf | [] | + binutils | | + bison | [] [] [] [] | + bluez-pin | [] [] | + clisp | [] | + console-tools | | + coreutils | [] [] | + cpio | | + cpplib | [] | + darkstat | [] [] | + dialog | [] [] | + diffutils | [] [] [] [] | + doodle | [] | + e2fsprogs | [] | + enscript | [] | + error | [] | + fetchmail | [] [] | + fileutils | [] [] [] | + findutils | [] [] | + flex | [] [] | + fslint | [] | + gas | | + gawk | [] [] | + gbiff | [] | + gcal | | + gcc | | + gettext-examples | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] | + gip | [] | + gliv | [] | + glunarclock | [] [] | + gmult | [] [] | + gnubiff | () | + gnucash | [] () () [] | + gnucash-glossary | [] [] | + gpe-aerial | [] | + gpe-beam | [] | + gpe-calendar | [] | + gpe-clock | [] | + gpe-conf | [] | + gpe-contacts | | + gpe-edit | [] | + gpe-go | [] | + gpe-login | [] | + gpe-ownerinfo | [] | + gpe-sketchbook | [] | + gpe-su | [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] | + gpe-todo | [] | + gphoto2 | [] [] [] | + gprof | | + gpsdrive | () () () () | + gramadoir | () | + grep | [] [] [] [] | + gretl | [] | + gsasl | [] | + gss | | + gst-plugins | [] [] | + gstreamer | [] [] | + gtick | [] [] | + gtkspell | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] | + id-utils | [] [] | + impost | | + indent | [] [] [] | + iso_3166 | [] | + iso_3166_1 | [] [] | + iso_3166_2 | [] | + iso_3166_3 | [] | + iso_4217 | [] [] [] | + iso_639 | [] [] [] | + jpilot | () () () | + jtag | | + jwhois | [] [] | + kbd | [] | + latrine | [] [] | + ld | | + libc | [] [] [] [] [] | + libextractor | | + libgpewidget | [] | + libgphoto2 | [] [] | + libgphoto2_port | [] [] | + libgsasl | [] | + libiconv | [] [] | + libidn | [] | + lifelines | [] | + lilypond | | + lingoteach | [] [] | + lynx | [] [] [] | + m4 | [] [] | + mailutils | | + make | [] [] [] | + man-db | () | + minicom | [] | + mysecretdiary | [] | + nano | [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] | + parted | [] [] [] [] | + psmisc | [] [] [] | + ptx | [] [] [] | + pwdutils | | + python | | + radius | | + recode | [] [] | + rpm | [] [] | + screem | [] | + scrollkeeper | [] [] [] | + sed | [] [] | + sh-utils | [] [] [] | + shared-mime-info | [] [] [] [] | + sharutils | [] [] [] | + silky | [] | + skencil | | + sketch | | + solfege | [] [] [] | + soundtracker | [] | + sp | () | + stardict | [] [] | + tar | [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] | + tin | | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] | + vorbis-tools | [] | + wastesedge | [] | + wdiff | [] [] [] | + wget | [] | + xchat | [] [] [] [] [] | + xkeyboard-config | [] | + xpad | [] | + +--------------------------------------------------+ + it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso + 46 35 11 2 1 1 2 2 3 11 0 15 96 7 5 0 + + or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv + +----------------------------------------------+ + GNUnet | | + a2ps | () [] [] [] [] [] [] | + aegis | () () | + ant-phone | [] | + anubis | [] [] [] | + ap-utils | () | + aspell | [] [] | + bash | [] [] [] | + batchelor | [] | + bfd | | + bibshelf | | + binutils | [] [] | + bison | [] [] [] [] [] | + bluez-pin | [] [] [] [] [] [] [] [] | + clisp | [] | + console-tools | [] | + coreutils | [] [] [] [] | + cpio | [] [] | + cpplib | | + darkstat | [] [] [] [] [] [] | + dialog | [] [] [] [] [] [] [] | + diffutils | [] [] [] [] [] [] | + doodle | [] | + e2fsprogs | [] [] | + enscript | [] [] [] [] | + error | [] [] [] | + fetchmail | [] [] [] [] | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] [] | + fslint | [] [] [] | + gas | | + gawk | [] [] [] [] | + gbiff | [] | + gcal | [] | + gcc | | + gettext-examples | [] [] [] [] [] [] | + gettext-runtime | [] [] [] [] [] [] [] | + gettext-tools | [] [] [] [] [] [] [] | + gimp-print | [] [] | + gip | [] [] [] | + gliv | [] [] [] | + glunarclock | [] [] [] [] [] [] | + gmult | [] [] [] [] | + gnubiff | () [] | + gnucash | () [] [] [] [] | + gnucash-glossary | [] [] [] | + gpe-aerial | [] [] [] [] [] [] | + gpe-beam | [] [] [] [] [] [] | + gpe-calendar | [] [] [] [] [] [] [] | + gpe-clock | [] [] [] [] [] [] [] | + gpe-conf | [] [] [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] [] [] [] [] | + gpe-go | [] [] [] [] [] | + gpe-login | [] [] [] [] [] [] [] | + gpe-ownerinfo | [] [] [] [] [] [] [] | + gpe-sketchbook | [] [] [] [] [] [] [] | + gpe-su | [] [] [] [] [] [] [] | + gpe-taskmanager | [] [] [] [] [] [] [] | + gpe-timesheet | [] [] [] [] [] [] [] | + gpe-today | [] [] [] [] [] [] [] | + gpe-todo | [] [] [] [] [] [] [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] | + gpsdrive | [] [] | + gramadoir | [] | + grep | [] [] [] [] [] [] [] | + gretl | [] | + gsasl | [] [] [] [] [] | + gss | [] [] [] | + gst-plugins | [] [] [] [] | + gstreamer | [] [] [] [] | + gtick | [] [] [] | + gtkspell | [] [] [] [] [] [] | + hello | [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + impost | | + indent | [] [] [] [] [] [] | + iso_3166 | [] [] [] [] [] | + iso_3166_1 | [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | [] [] [] | + iso_4217 | [] [] | + iso_639 | [] [] [] | + jpilot | | + jtag | [] | + jwhois | [] [] [] () () | + kbd | [] [] [] | + latrine | [] [] | + ld | [] | + libc | [] [] [] [] [] | + libextractor | [] | + libgpewidget | [] [] [] [] [] [] | + libgphoto2 | [] [] | + libgphoto2_port | [] | + libgsasl | [] [] [] | + libiconv | [] [] [] [] [] [] [] [] [] [] | + libidn | [] () | + lifelines | [] [] | + lilypond | | + lingoteach | [] | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailutils | [] [] [] | + make | [] [] [] [] | + man-db | [] [] | + minicom | [] [] [] [] | + mysecretdiary | [] [] [] [] | + nano | [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + psmisc | [] [] | + ptx | [] [] [] [] [] [] | + pwdutils | [] | + python | | + radius | [] [] | + recode | [] [] [] [] [] [] | + rpm | [] [] [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] | + shared-mime-info | [] [] [] [] [] [] | + sharutils | [] [] [] | + silky | [] | + skencil | [] [] [] | + sketch | [] [] [] | + solfege | | + soundtracker | [] [] | + sp | | + stardict | [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] | + tin | | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] | + vorbis-tools | [] [] | + wastesedge | | + wdiff | [] [] [] [] [] [] | + wget | | + xchat | [] [] [] [] [] [] [] | + xkeyboard-config | | + xpad | | + +----------------------------------------------+ + or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv + 1 3 47 29 57 6 78 73 5 44 12 12 50 85 + + ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu + +-----------------------------------------------+ + GNUnet | | 0 + a2ps | [] [] [] | 19 + aegis | | 0 + ant-phone | [] [] | 5 + anubis | [] [] [] | 11 + ap-utils | () [] | 2 + aspell | [] [] [] | 13 + bash | [] | 11 + batchelor | [] [] | 7 + bfd | | 1 + bibshelf | [] | 5 + binutils | [] | 6 + bison | [] [] | 18 + bluez-pin | [] [] [] [] [] | 25 + clisp | | 7 + console-tools | [] [] | 5 + coreutils | [] [] | 17 + cpio | [] [] [] | 7 + cpplib | [] [] | 8 + darkstat | [] () () | 15 + dialog | [] [] [] | 25 + diffutils | [] [] [] [] | 28 + doodle | [] | 5 + e2fsprogs | [] | 8 + enscript | [] | 12 + error | [] [] [] | 16 + fetchmail | [] | 12 + fileutils | [] [] [] | 18 + findutils | [] [] | 17 + flex | [] [] | 15 + fslint | [] | 7 + gas | [] | 3 + gawk | [] | 14 + gbiff | [] | 5 + gcal | [] | 5 + gcc | [] [] | 4 + gettext-examples | [] [] [] [] [] | 21 + gettext-runtime | [] [] [] [] [] | 25 + gettext-tools | [] [] [] [] [] | 19 + gimp-print | [] | 11 + gip | [] | 8 + gliv | [] [] | 7 + glunarclock | [] [] | 13 + gmult | [] [] [] | 13 + gnubiff | [] | 3 + gnucash | () [] | 10 + gnucash-glossary | [] [] | 9 + gpe-aerial | [] [] | 13 + gpe-beam | [] [] | 13 + gpe-calendar | [] [] [] [] | 18 + gpe-clock | [] [] [] [] | 17 + gpe-conf | [] [] | 12 + gpe-contacts | [] [] | 7 + gpe-edit | [] [] [] [] | 15 + gpe-go | [] [] | 11 + gpe-login | [] [] [] [] [] | 18 + gpe-ownerinfo | [] [] [] [] | 19 + gpe-sketchbook | [] [] | 14 + gpe-su | [] [] [] | 16 + gpe-taskmanager | [] [] [] | 17 + gpe-timesheet | [] [] [] [] | 17 + gpe-today | [] [] [] [] [] | 19 + gpe-todo | [] [] [] | 17 + gphoto2 | [] [] [] | 18 + gprof | [] [] | 10 + gpsdrive | | 3 + gramadoir | [] | 6 + grep | [] [] [] [] | 32 + gretl | | 4 + gsasl | [] [] | 12 + gss | [] | 5 + gst-plugins | [] [] [] | 17 + gstreamer | [] [] [] [] | 15 + gtick | [] | 11 + gtkspell | [] [] [] [] | 21 + hello | [] [] [] [] | 37 + id-utils | [] [] | 13 + impost | [] | 3 + indent | [] [] [] [] | 25 + iso_3166 | [] [] [] | 12 + iso_3166_1 | [] [] | 20 + iso_3166_2 | | 2 + iso_3166_3 | [] [] | 8 + iso_4217 | [] [] | 10 + iso_639 | [] [] | 12 + jpilot | [] [] [] | 6 + jtag | | 2 + jwhois | [] [] [] | 12 + kbd | [] [] | 12 + latrine | [] [] | 8 + ld | [] | 5 + libc | [] [] | 22 + libextractor | | 1 + libgpewidget | [] [] | 17 + libgphoto2 | [] | 9 + libgphoto2_port | | 5 + libgsasl | [] | 7 + libiconv | [] [] [] [] [] | 32 + libidn | [] [] | 6 + lifelines | | 4 + lilypond | | 1 + lingoteach | [] | 6 + lynx | [] [] [] | 15 + m4 | [] [] | 17 + mailutils | [] | 7 + make | [] [] | 18 + man-db | | 5 + minicom | | 11 + mysecretdiary | [] [] | 12 + nano | [] [] | 13 + nano_1_0 | [] [] [] | 18 + opcodes | [] [] | 9 + parted | [] [] [] | 18 + psmisc | [] | 7 + ptx | [] [] | 23 + pwdutils | | 1 + python | | 0 + radius | [] | 6 + recode | [] [] | 22 + rpm | [] [] | 11 + screem | | 1 + scrollkeeper | [] [] [] | 24 + sed | [] [] [] | 21 + sh-utils | [] | 15 + shared-mime-info | [] [] [] | 21 + sharutils | [] [] [] | 20 + silky | | 3 + skencil | | 6 + sketch | | 6 + solfege | | 4 + soundtracker | [] | 8 + sp | [] | 3 + stardict | [] [] [] [] | 10 + tar | [] [] [] [] | 15 + texinfo | [] [] | 14 + textutils | [] [] [] | 17 + tin | | 1 + tp-robot | [] [] [] | 8 + tuxpaint | [] [] [] [] | 34 + unicode-han-tra... | | 0 + unicode-transla... | | 2 + util-linux | [] [] [] | 18 + vorbis-tools | [] | 10 + wastesedge | | 1 + wdiff | [] [] | 22 + wget | [] [] | 7 + xchat | [] [] [] [] | 26 + xkeyboard-config | [] | 2 + xpad | [] | 5 + +-----------------------------------------------+ + 73 teams ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu + 149 domains 0 0 0 1 77 30 0 92 16 0 42 32 0 1746 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If May 2005 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +1.6 Using `gettext' in new packages +=================================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..84f3cb1 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,34 @@ +AUTHORS of findutils + +I do not know the name of the original author of the findutils +package, but the authors of all the major components are known. Eric +B. Decker contributed GNU find and Michael Rendell contributed xargs. +James A. Woods contributed locate. + +Here are the names of some authors culled from ChangeLog and +miscellaneous other files. The main criterion for whether your name +ends up in this file or in THANKS is that the people with entries here +donated code or documentation which was significant enough to require +a copyright assignment. + +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 +Michael Rendell +David J. MacKenzie +Jim Meyering +Tim Wood +Kevin Dalley +Paul Eggert +James Youngman +Jay Plett +Paul Sheer +Dmitry V. Levin +Bas van Gompel + +The current maintainer of the findutils package is James Youngman. +Questions about findutils should be addressed to the mailing list, + which, contrary to the impression given by its +name, is used for general discussion of the findutils package. diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..623b625 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..839df2d --- /dev/null +++ b/ChangeLog @@ -0,0 +1,6425 @@ +2007-06-12 James Youngman + + * find/find.1 (HISTORY): Document when the find tests -readable, + -writable, -executable and the option -regextype were introduced. + +2007-06-12 Nix (trivial change) + + * locate/locate.c (drop_privs): Use groups[0] rather than + groups[1], since groups[] is a one-element array. This is a + buffer overrun affecting root only. In theory it could affect + setuid installations, but I (James Youngman) cannot find an explot + mechanism for it. This fixes Savannah bug#20157. + * NEWS: Mention this fix. + +2007-06-12 James Youngman + + Make the test suite work when run as root. + * find/testsuite/config/unix.exp (fs_superuser): Abstract out the + check which discovers if we have superuser privileges on the + filesystem (taken from access.exp). + * find/testsuite/find.gnu/access.exp: Call fs_superuser. + * find/testsuite/find.gnu/fprint-unwritable.exp: Use fs_superuser. + +2007-06-09 James Youngman + + Check that we can correctly read old-format databases which are + big-endian or little endian. + * locate/testsuite/config/unix.exp (locate_from_db): New function; + supports testing locate against a provided database. + * locate/testsuite/locate.gnu/bigendian.exp: New test; make sure + we can read an old-format big-endian database. + * locate/testsuite/locate.gnu/bigendian.xo: Expected output from + bigendian.exp test. + * locate/testsuite/locate.gnu/littleendian.exp: New test; make sure + we can read an old-format little-endian database. + * locate/testsuite/locate.gnu/locateddb.old.powerpc.xi: Old format + big endian database file, for supporting bigendian.exp. + * locate/testsuite/locate.gnu/littleendian.xo: Expected output from + littleendian.exp test. + * locate/testsuite/locate.gnu/locateddb.old.x86.xi: Old format + little endian database file, for supporting littleendian.exp. + * locate/testsuite/Makefile.am: Distribute littleendian.exp, + bigendian.exp and related .xi and .xo files. + + + * doc/find.texi (Size Directives): Compare %b with %s/512, not + %s/1024. This fixes (again) Savannah bug #19596. + * NEWS: mention the fix. + + Avoid using the non-portable function putw(). + * locate/locatedb.h: Declare putword(). + * locate/frcode.c: Include as locatedb.h now requires + it. + * locate/code.c (main): Use putword() rather than putw(), because + the latter was removed from SUSv3. This fixes Savannah bug #19980. + Also include as locatedb.h now requires this. + * locate/word_io.c (putword): Define the new function putword. + + Ensure that is included before any system header + * find/defs.h: Do not include from "defs.h". Instead + just complain if it was not already included, since it needs to + be included first of all, even before system headers (in case + gnulib had replaced a system header). Check + ALREADY_INCLUDED_CONFIG_H to determine this. + * configure.in: Always define ALREADY_INCLUDED_CONFIG_H in + config.h. + * find/find.c: Include config.h before defs.h. + * find/finddata.c: ditto. + * find/fstfind.c: ditto. + * find/parser.c: ditto. + * find/pred.c: ditto. + * find/util.c: ditto + * find/tree.c: ditto (fixing Savannah bug #20128). + + * m4/noreturn.m4 (jy_AC_ATTRIBUTE_NORETURN): Use AC_LANG_PROGRAM + inside AC_COMPILE_IFELSE. + + * doc/find.texi (Security Considerations for locate): Discuss in + detail the buffer overrun when reading old-format locate + databases. This is CVE reference CVE-2007-2452. + +2007-06-05 James Youngman + + Guess the byte-order of old-format locate databases. + * locate/word_io.c (getword): Make the endian_state_flag parameter + an enum rather than an int. If we are in the initial ("don't + know") byte-order guessing state and the swapped value is out of + range, use this as evidence that the byte order is native. + * locate/locatedb.h: Declare getword accordingly. + * locate/locate.c (struct process_data): Added endian_state + member, which remembers for us what the big/little endian order + guessing state is when we read an old-format database. + (visit_old_format): Use the procdata.endian_state rather than a + local variable, so that the information can persist across calls. + (i_am_little_endian): Locate figures out if we needed to byteswap + the words in an old-format database, but that is an implementation + detail. Therefore we figure out our own byte order so that we can + produce a more relevant message for --statistics. The + i_am_little_endian() returns nonzero if the current host has + little-endian byte order. + (search_one_database): Report the byte-order of old-format + databases. + +2007-06-04 James Youngman + + * locate/testsuite/Makefile.am (EXTRA_DIST_XO, EXTRA_DIST_EXP): + Added old_prefix.exp and old_prefix.xo, a new test case for long + shared rpefixes with the old database format. + + * locate/locate.c (visit_old_format): Use getword() from word_io.c + instead of getw(), because getw() is not in POSIX. + * locate/word_io.c: New file, providing replacement for getw(). + * locate/locatedb.h: Declare getword() + * locate/Makefile.am (locate_SOURCES): Added word_io.c + + * locate/testsuite/config/unix.exp (locate_start): Make the + failure messages slightly more explicit; indicate what went wrong + when a test fails. + +2007-06-03 James Youngman + + * locate/locate.c (visit_old_format, extend, toolong): Extend the + buffer used to build the current pathname when reading an + old-format database. The new function extend is called to do + this. The new function toolong is called to report a fatal error + when the buffer size would otherwise exceed SIZE_MAX. This fixes + Savannah bug #20014, which is a security-related problem with the + CVE identifier CVE-2007-2452. + + * configure.in: Determine if the setgroups function is available, + and set HAVE_SETGROUPS if so. + * locate/locate.c (drop_privs): Call setgroups() only if + HAVE_SETGROUPS indicates that it is available. This fixes + Savannah bug #19981. + +2007-05-31 James Youngman + + * find/parser.c (parse_time): Once we have determined the + comparison type, restore the original time argument since + get_relative_timestamp() also wants to see it. This fixes + Savannah bug #20005. + +2007-05-31 Jakub Bogusz (trivial change) + + * find/parser.c (parse_group): Correct typo in error message. + (check_path_safety): same + +2007-05-27 James Youngman + + * import-gnulib.config (modules): Import sys_stat. + (gnulib_version): Update to 2007-05-26. This fixes a compilation + error in stdlib.h with the DEC C compiler. This fixes Savannah + bug# 19983. + + * find/parser.c (safe_atoi): New function, like atoi, but which + calls error(1, ...) when the argument is invalid or out of range. + (parse_group): Use safe_atoi. + (insert_depthspec): Use safe_atoi + (parse_user): Use safe_atoi + + * configure.in: Check for fabs in libm (fixing a compilation error + on Solaris). + + * import-gnulib.config (modules): Import the wcwidth module to + provide it on those systems (such as BeOS) which lack it. + + * find/pred.c (file_sparseness): If st_blocks is not present in + struct stat, the file has a sparseness of 1.0. + + * doc/find.texi (Size Directives): Document the %S format + directive for -printf. + + * find/pred.c (mode_to_filetype): Don't use S_IFSOCK on systems + which lack that macro. POSIX systems are allowed to lack + sockets (it's an XSI extension). + (file_sparseness): If struct stat lacks st_blocks, assume all + files have a spearseness of 1.0. + + * import-gnulib.config (modules): Import fchdir inorder to fix an + undefined-symbol error for fchdir on BeOS. + +2007-05-26 James Youngman + + Code refactoring in locate. + * locate/locate.c (visit): New function, into which we factor out + the traversal of the inspector list. + (process_simple): Use visit(). + (process_or): Use visit(). + (process_and): Use visit(). + + Speed improvements in locate for unibyte locales. + * locate/locate.c (visit_substring_match_nocasefold_wide): Renamed + from visit_substring_match_nocasefold. + (visit_substring_match_casefold_wide): Renamed from + visit_substring_match_casefold. + (visit_substring_match_casefold_narrow): Special case of + visit_substring_match_casefold_wide which we use for unibyte + locales; we use strcasestr() rather than mbscasestr(). + (visit_substring_match_nocasefold_narrow): Ditto, using strstr() + instead of mbsstr(). + + * find/parser.c (parse_gid): Return an explicit boolean constant + rather than automatically converting from a pointer, because the + gnulib substitute for bool (or _Bool) in c89 environments lacking + bool does not support that conversion. One affected system is Sun + WorkShop Compilers 5.0 98/12/15 C 5.0 on Solaris 7. This is + Savannah bug #19970, reported by Nelson Beebe. + (parse_inum): Ditto. + (parse_links): Ditto. + (parse_uid): Ditto. + (check_path_safety): declarations need to go before code, not + interspersed. Move declaration of char* s. + + * xargs/testsuite/xargs.posix/rc-125.exp: Explain Savannah bug + #19969. This bug is not yet fixed. + + * find/defs.h: #include , for uintmax_t. This should + fix a compilation error on DEC C V5.9-005 on Digital UNIX V4.0F + (Rev. 1229). This is Savannah bug #19965, reported by Nelson + Beebe. + + * find/defs.h: Don't include , since it is not needed in + the header file itself. The "extern int errno;" declaration is + now obsolete. + * find/parser.c: Include + * find/pred.c: Dito + * find/util.c: Ditto + +2007-05-24 James Youngman + + * find/util.c (check_nofollow): If O_NOFOLLOW is defined but 0, + act as if it is undefined. This should prevent a runtime + assertion failure on IRIX 6.5. This fixes Savannah bug #19948, + reported by Nelson Beebe. + + * m4/noreturn.m4: New file, testing for support of __attribute__ + ((__noreturn__)). Defines jy_AC_ATTRIBUTE_NORETURN and sets + HAVE_ATTRIBUTE_NORETURN. + * configure.in: Call jy_AC_ATTRIBUTE_NORETURN. + * find/defs.h (ATTRIBUTE_NORETURN): Define to nothing if + HAVE_ATTRIBUTE_NORETURN is not set in config.h. This should fix a + compilation error with non-GCC compilers. This is Savannah bug + #19967, reported by Nelson Beebe. + + * configure.in (FINDLIBS): Update FINDLIBS to link against -lm for + modf. This fixed a link error on HP-UX. This fixes Savannah + bug #19966, reported by Nelson Beebe. + * find/Makefile.am (LDADD): Use @FINDLIBS@ + +2007-05-21 James Youngman + + * build-aux/Makefile.am (EXTRA_DIST): Added man-lint.sh. + + * locate/locate.c (drop_privs): pass the correct list of groups to + setgroups(). Previously, if root invoked locate, their group ID + would have been set to a random value. The same bug also caused + an array overrun past the end of the local array groups[]. The + variable which gets overwritten by the buffer overrun on x86 is + 'what'. The value of that variable is always changed before it is + used, and so I believe that this buffer overrun will not cause a + crash. The only effect of the bug therefore would be for locate + to change group to a random group ID since groups[0] is + uninitialised. On my test system this random group ID is 0 + anyway. The effect does not depend on any externally-controllable + information, so it is unlikely this is exploitable. This bug is + detailed as bug# 19923. + +2007-05-19 James Youngman + + * find/find.1: Spurious .R directives (.R is not a directive) + should be .B. This fixes Savannah bug #19871. + * build-aux/man-lint.sh: New file; verifies that the specified + manual pages do not provoke error messages from troff. This is + used to detect further occurrences of Savannah bug #19871. + * find/Makefile.am (dist-hook): Run findutils-check-manpages, + which invokes man-lint.sh. + * locate/Makefile.am (dist-hook): ditto + * xargs/Makefile.am (dist-hook): ditto + + * .cvsignore: Ignore ylwrap, which automake-1.10 wants us to have + a copy of for some reason + + * import-gnulib.sh (main): New option -a which just runs the + autotools without reimporting gnulib. + + * Makefile.am (jy-regex-fix): The previous explanatory comment + refers to the jy-regex-fix target, not to dist-hook, so it has + been moved. + +2007-05-08 James Youngman + + * find/defs.h (struct predicate.args): str is now const. + + * find/parser.c (get_comp_type): get_comp_type now takes a const + char* parameter. + (get_num): ditto + (get_relative_timestamp): ditto. Also use collect_arg(). + (collect_arg_stat_info): New function; collects a command-line + argument and returns its xstat information, in one go. + error(1,...) is called if the stat fails. + (parse_anewer): Use collect_arg(). + (parse_cnewer): ditto + (parse_fprint): ditto + (parse_fstype): ditto + (parse_group): ditto + (parse_ilname): ditto + (parse_iname): ditto + (parse_iwholename): ditto + (parse_lname): ditto + (insert_depthspec): ditto + (parse_name): ditto + (parse_newer): ditto + (parse_wholename): ditto + (parse_perm): ditto + (parse_regextype): ditto + (insert_regex): ditto + (parse_samefile): ditto + (parse_used): ditto + (parse_user): ditto + (insert_type): ditto + (parse_time): ditto + (parse_size): When the size argument is invalid but consists only + of a valid suffix char, avoid issuing an error message about a + blank argument. Append the suffix letter again. + (parse_xdev, parse_ignore_race, parse_noignore_race, parse_warn, + parse_xtype): Remove casts to void for some function parameters + that were, in fact, used. + + * find/testsuite/find.gnu/fprint-unwritable.exp: new test + * find/testsuite/find.gnu/fprint0_stdout.exp: new test + * find/testsuite/find.gnu/fprint0_stdout.xo: new test + * find/testsuite/find.gnu/mindepth-arg.exp: new test + * find/testsuite/find.gnu/mindepth-arg.xo: new test + * find/testsuite/find.gnu/mindepth-badarg.exp: new test + * find/testsuite/find.gnu/print_stdout.exp: new test + * find/testsuite/find.gnu/print_stdout.xo: new test + * find/testsuite/find.gnu/samefile-missing.exp: new test + * find/testsuite/find.gnu/samefile-p-brokenlink.exp: new test + * find/testsuite/find.gnu/samefile-p-brokenlink.xo: new test + * find/testsuite/find.gnu/used-invarg.exp: new test + * find/testsuite/find.gnu/used-missing.exp: new test + * find/testsuite/find.gnu/user-invalid.exp: new test + * find/testsuite/find.posix/group-empty.exp: new test + * find/testsuite/find.posix/group-missing.exp: new test + * find/testsuite/find.posix/name-missing.exp: new test + * find/testsuite/find.posix/size-invalid.exp: new test + * find/testsuite/find.posix/size-missing.exp: new test + * find/testsuite/find.posix/typearg.exp: new test + * find/testsuite/find.posix/user-empty.exp: new test + * find/testsuite/find.posix/user-missing.exp: new test + +2007-05-06 James Youngman + + * find/tree.c: (costlookup): Added pred_fls to the optimiser's + predicate cost lookup table. + + * lib/printquoted.c (print_quoted): Change return value from void + to int, to allow the caller to detect failures. + * lib/printquoted.h (print_quoted): Change declaration + accordingly. + + * find/defs.h (struct format_val): Incldue a 'filename' member so + that we can provide more useful error messages (e.g. when we fail + to flush or close an output file). + (nonfatal_file_error): declare new function. + + * find/util.c (traverse_tree): Utility function which calls a + callback on every node of the parse tree. + (flush_and_close_output_files): Flush all output streams. Close + all output files. Report any errors. + (cleanup): Use traverse_tree() to invoke + complete_pending_execdirs(). + (report_file_err): refactored error reporting function, extracted + from fatal_file_error. + (nonfatal_file_error): New function. + + * find/pred.c (checked_fprintf): New function, which performa an + fprinf(), and checkes the result. If the operation resulted in an + error, a nonfatal error message is issued. + (checked_print_quoted): Ditto, for print_quoted rather than + fprintf. + (checked_fwrite): Ditto for fwrite instead of fprintf. + (checked_fflush): Ditto for fflush + (do_fprintf): Use the checked_*() functions rather than their + direct counterparts, to ensure that I/O errors are detected. This + fixes Savannah bug #19416. + (pred_fls): Use args.printf_vec instead of args.stream, which has + now been removed. + (pred_ls): just call pred_fls. + (pred_fprint0): use args.printf_vec, instead of the now removed + args.stream. + (pred_print0): just call pred_fprint0 + + * find/parser.c: (insert_fprintf): Make the caller collect the + format argument from the argument list. + (open_output_file): Enhance to set up defaults in + our_pred->args.printf_vec as well as opening the output file. + Also record the filename for possible later use in an error + message. + (collect_arg): Convenience function for collecting an argument + from the argument list. + (insert_fls): Refactored the body of parse_fls out so that + parse_ls can use it. + (parse_fls): call insert_fls. + (parse_ls): ditto + (parse_fprint): Instead of setting up our_pred->args.printf_vec + manually, call open_output_file() to do it. + (parse_print): Same, but by calling open_stdout(). + (insert_fprint): Make the caller collect the filename argument, + and delegate the setup of our_pred->args.printf_vec to either + open_output_file() (for parse_fprint and parse_fprint0) or + open_stdout (parse_print0). + (parse_fprint0): Use collect_arg(). + (parse_print0): Use insert_fprint(), just like parse_fprint0. + (parse_printf): Use collect_arg(). + (parse_fprintf): Use collect_arg(). + +2007-05-05 James Youngman + + * find/parser.c (parse_samefile): Hold a file descriptor open on + the reference file in order to prevent pred_samefile getting + fooled by inode reuse. Pay attention to race conditions on + systems lacking O_NOFOLLOW when the -P option is in force. This + fixes Savannah bug #19806. + + * find/defs.h (struct samefile_file_id): New struct, like dir_id + but including a file descriptor on the reference file. + + * find/pred.c (pred_type): -type should return false if the file + has mode 00000, as opposed to having an assertion failure. This + fixes Savannah bug #16378. + + * find/ftsfind.c (consider_visiting): Issue a warning message if + none of the mode bits are set for a file (i.e. st_mode==00000). + * find/util.c (get_statinfo): ditto + * find/util.c (hook_fstatat): Introduced debug code (normally + disabled) for testing Savannah bug #16378. + +2007-05-01 James Youngman + + * find/find.c (wd_sanity_check): corrected the type of %ld fprintf + arguments in error messages. + * find/fstype.c: include "error.h" for the declaratio of error(). + * find/ftsfind.c: include "error.h" for the declaratio of + error(). Include dircallback.h for the correct declararion of + run_in_dir(). + * find/parser.c: include getdate.h (for declaration of getdate) + and error.h (for the declaration of error). + (find_parser): Removed unused variable p. + * find/pred.c (pred_timewindow): Removed unused variable delta. + (do_fprintf): Removed unused variable cc. + * find/tree.c: Include error.h (for the declaration of error()). + (build_expression_tree): removed sourious extra arguments in call + to error(). + * find/util.c: include error.h. + * lib/buildcmd.h (get_line_max): Comment out unused function. + * lib/listfile.c: Include dircallback.h. + * locate/code.c: Include errno.h, erorr.h, progname.h and + xlloc.h. + (inerr): New function for reporting read errors. + (outerr): New function for reporting output errors. + (main): Call inerror when fgets fails. Call outerr when fwrite + or putc or putw fails. + * locate/frcode.c (put_short): Return boolean value indicating + success. + (outerr): New function for reporting write errors. + (main): Call outerr if call to putc() or puts() or put_short() + fails. + * locate/locate.c (search_one_database): diagnose corruption if a + traditional-style database is too short to include a complete + bigram table. + +2007-04-30 James Youngman + + * find/defs.h: Change all predicate functions to take a const + char* argument as the pathname, not a char*. Modify the parser + table definition accordingly. + * find/parser.c: Ditto + * find/pred.c: Ditto + * find/pred.c (do_fprintf): copy the pathname string for the %H + and %h cases, since we can no longer modify the string in place. + * lib/listfile.c (print_name, list_file, + print_name_without_quoting, print_name_with_quoting): Use const + char * param for pathname. + * lib/listfile.h (list_file): Use const char * param for + pathname. + +2007-04-29 James Youngman + + * find/defs.h: Declare fatal_file_error(), a function for + reporting immediately-fatal file errors, which appropriately + quotes the file name. The function does not return. Also define + ATTRIBUTE_NORETURN. Record the currently-required quoting style + in struct options. + + * find/find.c, find/ftsfind.c, find/parser.c, find/pred.c, + find/util.c: Call fatal_file_error() for fatal file errors. Use + quotearg_n_style() to quote filenames which are used in error + message that aren't fatal. Use options.err_quoting_style as the + quoting style. This fixes Savannah bug #18203. + * locate/locate.c: ditto + * xargs/xargs.c: ditto + + * lib/listfile.c: To use alloca, just #include . Gnulib + handles the rest. Also these days, and can + just be included unconditionally. + * lib/qmark.c: Fixed comment on first line describing the module. + +2007-04-29 Michael Haubenwallner (Trivial Change) + + * find/defs.h (pred_open) Rename to pred_openparen to avoid + problems with the macrtos which build the parser tabnles on + platforms where 'open' is in fact a macro whcih expands to + open64. The problem was that token pasting put pred_open64 into + the parser table, but the function was still defined as + parse_open. This fixes Savannah bug #19371. + (pred_close): ditto + * find/parser.c (parse_open, parse_close): ditto. Also change + repferences to pred_open and pred_close similarly. + * find/parser.c (parse_openparen, parse_closeparen): ditto + +2007-04-28 James Youngman + + * find/testsuite/find.gnu/deletedir.exp, + find/testsuite/find.gnu/deletedir.xo: New test. + * find/testsuite/find.gnu/deletefile.exp, + find/testsuite/find.gnu/deletefile.xo: New test. + * find/testsuite/Makefile.am: Distribute the new tests + deletefile.exp and deletedir,exp, with their expected-output (.xo) + files too. + * find/testsuite/config/unix.exp (find_start): Add a new "setup" + parameter called just before each time find is invoked. This + allows last-minute tasks to be performed. This feature is + essential for find commands that modify the filesystem, since + otherwise we cannot use our strategy of invoking both binaries at + each optimisation level. + + * find/util.c (optionh_stat, optionp_stat, optionl_stat): Assert + that state.cwd_dir_fd is valid. + + * find/parser.c (parse_delete): Set need_stat to false, since we + don't need the stat information in pred_delete. + * find/pred.c (pred_delete): If unlinkat() with a zero flags + parameter fails with errno==EISDIR, just try again with + flags=AT_REMOVEDIR. That way we normally avoid the cost of a + stat. If we happen to have the stat information to hand anyway, + we make sure we get it right the first time. + + * lib/buildcmd.c (bc_init_controlinfo): Eliminate confusing extra + variable arg_max. Add return value + BC_INIT_CANNOT_ACCOMODATE_HEADROOM for the case where the + environment itself is not too large, but the required headroom + cannot also be accomodated. The caller now passes in the amount + of headroom required. + (bc_use_sensible_arg_max): Use the environment size consistently; + this is accounted for already in posix_arg_size_max, so there is + no need to re-measure the size of the environment. + * lib/buildcmd.h: Define BC_INIT_CANNOT_ACCOMODATE_HEADROOM and + add the headroom parameter to the prototype of bc_init_controlinfo(). + * xargs/xargs.c (main): Define XARGS_POSIX_HEADROOM as 2048 and + use that symbolic value. Pass XARGS_POSIX_HEADROOM to + bc_init_controlinfo(). Handle the case where + BC_INIT_CANNOT_ACCOMODATE_HEADROOM is returned by + bc_init_controlinfo(). + * find/parser.c (new_insert_exec_ok): Pass the required headroom to + bc_init_controlinfo() and handle the error return + BC_INIT_CANNOT_ACCOMODATE_HEADROOM. + + * xargs/xargs.1: Correct the description of the default value and + maximum value for the -s option of xargs. + + * xargs/xargs.c (main): Modify the assertions not to assume that + bc_ctl.arg_max is 2KiB less than ARG_MAX, since sysconfig() may + have returned a value for _SC_ARG_MAX which is greater. For + example, AIX 5.3 can do this. This should fix Savannah bug + #19391. + +2007-04-25 James Youngman + + * find/tree.c (predlist_dump, predlist_merge_nosort): These + functions were unused and commented out. Removed. + (mark_stat) No longer used. Removed. + (mark_type) No longer used. Removed. + + * find/parser.c (new_insert_exec_ok): When checking for {} in the + arguments to -exec..., use mbsstr() rather than strstr() in order + to cope bettwe with multibyte locales. + + * lib/buildcmd.c: Don't define mbsstr() locally. Instead, call + gnulib's mbsstr(). + +2007-04-24 James Youngman + + * lib/buildcmd.c: Added some comments outlining how we might + change the implementation to support figuring out the real ARG_MAX + limit. + +2007-04-23 James Youngman + + * find/defs.h (struct predicate_performance_info): New data + structure for holding perofmance statistics. + (struct predicate: include predicate_performance_info + (apply_predicate): change from macro to function + (pred_is): new macro, for predicate identity testing + (enum DebugOption): Added DebugSuccessRates + * find/find.1: Document option "-D rates" which turns on + DebugSuccessRates. + * doc/find.texi: ditto + * find.c (main): Call show_success_rates() before exiting. + (apply_predicate): remove the macro defintion, declare equivalent + function in defs.h. + * find/ftsfind.c (main): Call show_success_rates() before + exiting. Use apply_predicate(). + (show_outstanding_execdirs): use pred_is(). + + + +2007-04-22 Eric Blake + + * xargs/xargs.c (main): Don't assume LINE_MAX exists (i.e. is + #defined). + + * locate/updatedb.sh (PRUNEPATHS): Exclude /proc by default. + +2007-04-22 James Youngman + + * doc/Makefile.am: When cross-compiling, 'make clean' should not + delete doc/regexprops.texi, becaue we can't regenerate it. Fixes + Savannah bug #19658. + + * locate/Makefile.am (BUILT_SOURCES): Automatically generate + dblocation.texi, which records the default database location. + * doc/find.texi: Collect the default database location from + ../locate/dblocation.texi, and use LOCATE_DB in various places. + Document the fact that updatedb can generate slocate-compatible + databases. Document the --dbformat option of updatedb. + * locate/frcode.c (main): Implemented the -S option which allows the + generation of an slocate secure database. + * locate/updatedb.sh: New option --dbformat which selects which + database format to use. + * locate/updatedb.1 (--dbformat): Document the new option. + + + * find/testsuite/find.gnu/access.exp: fixed a typo which prevented + the test correctly being skipped when run as root. This re-fixes + Savannah bug# 18414, I hope. + +2007-04-21 James Youngman + + * find/locate/locatedb.5: Clarifications to the description of the + LOCATE02 format. Organised the material under a number of + headings. Documented the slocate database format. + +2007-04-21 James Youngman + + * find/testuite/Makefile.am (EXTRA_DIST_EXP): added + find/testsuite/find.posix/sv-bug-19617.exp + +2007-04-20 Maxim V. Dziumanenko + + * po/uk.po: New Ukranian translation. + * configure.in: Added "uk" for Ukranian. + +2007-04-19 Peter Breitenlohner (Trivial change) + + * locate/bigram.c (main): Set the initial pathname to the empty + string, to avoid decompression problems if the initial pathname + begins with a space. This fixes Savannah bug #19484. + * locate/code.c (main): ditto + +2007-04-19 James Youngman + + * locate/updatedb.1 (--help): Option name should be bold, not + italic. + + * find/testsuite/find.gnu/execdir-hier.exp: Avoid running + -execdir based tests if "." is on $PATH. Fixes Savannah bug + #19634. + * find/testsuite/find.gnu/execdir-in-unreadable.exp: ditto + + * find/testsuite/config/unix.exp (touch): New procedure touch, + replacing "exec touch" for greater efficiency. + * find/testsuite/find.posix/depth1.exp: Change "exec touch" to + "touch". + * find/testsuite/find.posix/files-not-expressions1.exp: ditto + * find/testsuite/find.posix/files-not-expressions2.exp: ditto + * find/testsuite/find.posix/files-not-expressions3.exp: ditto + * find/testsuite/find.posix/links.exp: ditto + * find/testsuite/find.posix/perm-vanilla.exp: ditto + * find/testsuite/find.posix/sv-bug-15235.exp: ditto + * /find/testsuite/find.posix/sv-bug-19613.exp: ditto + + * find/testsuite/find.gnu/access.exp: Fix savannah bug #18414 by + skipping the test if the user can read any file (e.g. is root or + is an Admin user under Cygwin). + +2007-04-17 James Youngman + + * import-gnulib.config (gnulib_version): Use the 2007-04-17 + version of gnulib to fix a compilation error on Cygwin. This + fixes Savannah bug #19619. + + * find/testsuite/find.posix/sv-bug-19605.exp: New test, for + Savannah bug #19605. + * find/testsuite/find.posix/sv-bug-19617.exp: New test, for + Savannah bug #19617. + * find/ftsfind.c (consider_visiting): if fts_read() returns + enf->fts_info==FTS_NS, check for and diagnose a symbolic link + loop. This fixes Savannah bugs #19605 and #19617. + + * find/find.c (process_path): collect the stat information for + directories even if we already have the mode information, because + we need to use the members st_nlink and st_rdev in for the leaf + optimisation and loop detection, respectively. This fixes + Savannah bug #19616. + + * find/ftsfind.c (is_fts_enabled): Return a copy of ftsoptions, + not a copy of the (uninitialised) input argument. This fixes + Savannah bug #19615. + + * find/ftsfind.c (consider_visiting): If fts_read() returned + FTS_NS, then remember that the stat information is not valid, and + therefore don't set state.have_type or state.have_stat. This + fixes Savannah bug #19613. + + * find/testsuite/find.posix/sv-bug-91613.exp, + * find/testsuite/find.posix/sv-bug-91613.xo: New test for Savannah + bug 19613 (assertion failure on symbolic link loop). + + * find/testsuite/config/unix.exp: Correctly diagnose a test case + which fails because find was expected to fail and instead + succeeded. + * find/testsuite/find.gnu/exec-many-rtn-failure.exp: The child + process in this test should return non-zero, not zero. Therefore + run "false" instead of "true". + +2007-04-15 James Youngman + + * find/find.1: "-printf %b": blocks are 512 bytes. Fixes + Savannah bug #19596. + + * doc/Makefile.am (regexprops.texi): Do not use $(RM) because many + versions od make do not set it, and so it expands to nothing. + This avoids suprious emission of the regexprops.texi file to stdout. + + * find/find.c (main, safely_chdir_lstat, safely_chdir_nofollow): + Only use O_LARGEFILE if it is #defined (NetBSD-3.1 does not define + it). + * find/ftsfind.c (main): ditto + * find/pred.c (pred_empty, prep_child_for_exec): ditto + + + * import-gnulib.config: Update to gnuliv 2007-04-14. + + * lib/Makefile.am, import-gnulib.sh: Create lib/gnulib-version.c + in import-gnulib.sh, not in lib/Makefile. + + * build-aux/Makefile.am: New file; distribute check-tstfiles.sh. + + * locate/Makefile.am: mkinstalldirs is now in build-aux. + + * doc/Makefile.am: We also need getdate.texi. + +2007-04-14 James Youngman + + * doc/.cvsignore: Ignore getdate.texi + + * find/defs.h: #include "buildcmd.h" near the top of the file, not + in the middle. + + * all: Pass O_LARGEFILE when opening directories. + + * all: Changes to allow us to use the FTS_CWDFD mode of fts(). + These are quite extensive changes, and are detailed below. + + * find/defs.h (struct exec_val): New member dirfd, the directory + in which the exec should take place. + (is_fts_enabled): Tell the caller which flags are passed to + fts_open(). + (get_start_dirfd): New function. Returns value of start_desc. + (get_current_dirfd): New function. Returns the fd of the + directory fts is currently traversing. If this is the current + directory, AT_FDCWD is returned. + (complete_pending_execdirs): takes a new argument, indicating + where the exec is to take place. Ugh. + (get_info): the file name is taken from state.rel_pathname, so + we don't need it as a function argument. + (enum DebugOption): Added DebugExec ("-D exec"). + (struct state): Added cwd_dir_fd, the directory we are examining + with fts(). If fts() is not in use, this is AT_FDCWD. Also added + execdirs_outstanding, which is a boolean which tells us if there + are any not-yet-execed -execdir or -okdir actions (with +). This + is not really used yet. + * find/ftsfind.c (set_close_on_exec): New function. + (get_current_dirfd): Return an fd open on the directory that fts() + is currently examining. + (left_dir): Signal that our previous ides of which dirctory fts is + searching is now out of date. + (inside_dir): Indicate which directory fts is now searching. + (complete_execdirs_cb): Callback for run_in_dir() to complete + pending execdirs in this directory. + (show_outstanding_execdirs): Supports "-D exec" + consider_visiting(): Do not allow building-up of pending execdirs, + as a workaround to Savannah bug #18466. + (ftsoptions): Make this a static module variable. + * find/parser.c (insert_exec_ok): New parameter describing which + directory the exec should occur in. + (parse_version): for FTS, add a list of options being used. + * find/pred.c (pred_and, pred_comma): No need to pass the relative + path name to get_info(), it can pull it from state.rel_pathname. + (pred_delete): use unlinkat(). + (pred_empty): use openat(). + (new_impl_pred_exec): Accept an fd parameter describing where the + exec is to take place. + (pred_executable, pred_writable, pred_readable): Use run_in_dir() + to ensure that access() is called in a working directory which is + suitable for the pathname we pass in. + (prep_child_for_exec): In the child process, change to the + appropriate directory becore the exec(). + * find/util.c (debugassoc): Support "-D exec". + (get_info): No longer need to pass the relative path to + get_statinfo(). + (do_complete_pending_execdirs): Refactored body of what used to be + complete_pending_execdirs(). + (complete_pending_execdirs): Pull body out into + do_complete_pending_execdirs() and call that only if there is work + to do. + (fallback_stat, optionh_stat, optionp_stat, optionl_stat): Use fstatat(). + (get_start_dirfd): New access function for starting_desc. + * find/testsuite/find.gnu/execdir-hier.exp: New test + * find/testsuite/find.gnu/execdir-hier.xo: Expected outut for new test + * lib/dircallback.c, lib/dircallback.h: New function, + run_in_dir(), which runs a callback function in a specified + directory. + * lib/listfile.c: Use run_in_dir() to call readlink() in the right + directory. + (get_link_name_at): Call get_link_name_cb via run_in_dir. + (get_link_name_cb): New callback function, wrappting + get_link_name(). + + * find/testsuite/find.gnu/execdir-pwd.exp: Since we have disabled + thebuilding-up of command lines for -execdir, Savannah bug #18466 + has been neutralised (but not fixed - we just don't allow the + problem circumstance to occur). + +2007-04-09 James Youngman + + * doc/find.texi: Change fully-specified @node directives to + single-argument @node directives in order to accomodate the + inclusion of getdate.texi. + + * doc/find.texi: Document -newerXY. + + * doc/find.texi (Security Considerations): updated to describe + differences in the fts-based implementation. + + * find/find.1: Indicate that testing the birth time where this is + not supported produces a negative result for files where the birth + time is not known (or a fatal error if the file of interest is a + reference file). + +2007-04-08 James Youngman + + * configure.in: Set @AUXDIR@ (to the location of the build-aux + directory). + * build-aux/check-testfiles.sh: New script, which checks that all + the DejaGnu test files have been included in the distribution and + (more helpfully) lists any that are missing. + * Makefile.am (findutils-check-testfiles): Use + build-aux/check-testfiles.sh. + * locate/testsuite/Makefile.am (EXTRA_DIST_EXP): distribute + locate/testsuite/locate.gnu/sv-bug-14535.exp. + + * config.rpath, depcomp, missing: Moved into build-aux/. + * configure.in(AC_CONFIG_AUX_DIR): Find aux files in $SRCDIR/build-aux, + not in $SRCDIR. + +2007-03-31 James Youngman + + * find/tree.c (build_expression_tree): Issue more specific error + messages; distinguish the case where the predicate is invalid from + the cases where a required argument is missing, and a supplied + argument is invalid. + + * import-gnulib.config (gnulib_version): Update to 2007-03-30 + version of gnulib. + +2007-03-28 James Youngman + + * find/defs.h (set_stat_placeholders): utility function for + initialising the sturct stat fields that NetBSD doesn't always set + (like st_birthtime where the file is on a filesystem not + supporting birthtime). + * find/util.c: set_stat_placeholders(): new function + (get_statinfo): Call set_stat_placeholders(). + (optionh_stat, optionl_stat, optionp_stat): ditto + * find/find.c (main, wd_sanity_check, safely_chdir_lstat, + process_dir): use set_stat_placeholders(). + * find/parser.c (parse_anewer, parse_cnewer, parse_newer, + parse_newerXY): ditto. + (get_stat_Ytime): Support birth time ('B'). + (parse_newerXY): Support st_birthtime. + * find/fstype.c (set_fstype_devno): Use set_stat_placeholders(). + * find/pred.c (pred_xtype): Use set_stat_placeholders(). + (pred_newerXY): Support birth time. + (pred_fprintf, format_date): ditto ("%Bx"). + +2007-03-25 James Youngman + + * xargs/xargs.c (main): For "xargs --show-limits" where stdin is a + terminal, warn the user that the program specified (or /bin/echo) + will be run at least once, if that is what will happen. + +2007-03-24 James Youngman + + * import-gnulib.sh: Added option -d, allowing the user to use a + local version of gnulib, perhaps because they have local changes. + +2007-03-13 James Youngman + + * find/parser.c (parse_quit): Estimated success rate of -quit is + 100%. + +2007-03-08 James Youngman + + * find/find.1 (TESTS): Document -newerXY, indicate that reference + files are only examined once. + (HISTORY): Indicate when various features were added + (BUGS): Indicate that -ok ignores LC_COLLATE. + +2007-03-07 James Youngman + + * import-gnulib.config: (gnulib_version): Use gnulib version + 2007-03-05 + (modules): Added getdate + + * find/Makefile.am (LDADD): Added @LIB_CLOCK_GETTIME@ for + clock_gettime(), if it is available. + + * find/defs.h: (enum xval): New enumeration, representing the + value of X used in the -newerXY test. It is stored in the reftime + member of 'union args'. + (struct predicate): reftime is also used by -newerXY. + (enum arg_type): Added ARG_SPECIAL_PARSE for -newerXY, because the + parsing function needs to look at the name of the test. + (struct options): start_time is now a struct timespec, not a + time_t. + + * find/parser.c: (parse_newerXY): New parsing function for + -newerXY, a feature copied from FreeBSD (also present other BSD + implementations too) + (get_stat_Ytime): New function; returns st_atime, st_mtime or + st_ctime from struct stat, as a timespec, as required according to + the value of Y in -newerXY. + (found_parser): Factored the tail out of find_parser. + (find_parser): Moved tail into found_parser. Add special handling + for -newerXY. + (do_parse_xmin): New argument xv, indicating the value to which + predicate->reftime.xval should be set. + (parse_amin): Pass XVAL_ATIME to do_parse_xmin. + (parse_cmin): Pass XVAL_CTIME to do_parse_xmin. + (parse_mmin): Pass XVAL_MTIME to do_parse_xmin. + (parse_newer): Set args.reftime.xval to XVAL_MTIME. + + * find/pred.c (pred_table): added pred_XY. + (pred_fls): options.start_time is now a struct timespec, so just + pass the tv_sec member to list_file. + (pred_ls): ditto + (pred_newerXY): New function, implementing -newerXY. + + * find/tree.c (costlookup): pred_newerXY needs stat information. + (build_expression_tree): For predicates of type ARG_SPECIAL_PARSE, + pass them in the name of the predicate (that is, don't advance + argc). + + * find/util.c (now): New function for setting options.start_time. + Use nanoseconds where it is available. + (set_option_defaults): Use now() rather than time(). + +2007-03-03 James Youngman + + * import-gnulib.sh: Pass --with-tests to gnulib-tool so that relevant + gnulib unit tests are built and are run for "make check". + + * configure.in (AC_CONFIG_FILES): Add tests/Makefile (the makefile + for the gnulib unit tests). + + * Makefile.am: Add 'tests' to SUBDIRS. + + * .cvsignore: Add 'tests'. + + * import-gnulib.config (modules): Also use Gnulib modules + mbscasestr and mbsstr in order to perform correct string searching + in multibyte strings, in order to fix Savannah bug #14535. + + * locate/testsuite/locate.gnu/sv-bug-14535.exp: new test case for + Savannah bug #14535. + + * locale/locate.c (visit_substring_match_nocasefold): Use mbsstr + rather than strstr, in order to correctly support multibyte + strings. + (visit_substring_match_casefold): Use mbscasestr rather than + strstr in order to correctly support case-folding in a multibyte + environment (e.g. with UTF-8 characters outside the normal ASCII + range). This fixes Savannah bug #14535. + (struct casefolder): No longer needed, removed + (visit_casefold): No longer needed, removed. + (lc_strcpy): No longer needed, removed. + (search_one_database): Removed redundant variable need_fold and + the code which used to set it. It had controlled the adding of + the visitor function visit_casefold, but that function itself is + no longer required. Also there is now no need to pass in a + lower-case argument to visit_substring_match_casefold, so don't + pass that in the context argument. + + * locate/locate.c (usage): Fixed typo. + +2007-03-01 James Youngman + + * doc/find.texi (Multiple Files): Document the construct + -exec sh -c 'cmd "$@" final-args' {} + - fixing Savannah bug + #18554. + +2007-02-28 James Youngman + + * import-gnulib.config: New file. Specifies which version of + Gnulib we need to check out and build from. + + * import-gnulib.sh: Use import-gnulib.config. + + * README-CVS: Describe the new method of building from CVS. + + * lib/gnulib-version.h, lib/gnulib-version.sh: New files; code for + reporting which version of Gnulib we built findutils from. + + * lib/Makefile.am: Build gnulib-version.c out of + ./gnulib-version.config by using lib/gnulib-version.sh. + + * Makefile.am: Ship import-gnulib.config and import-gnulib.sh. + + * .cvsignore: Ignore gnulib-cvs + + * lib/.cvsignore: Ignore gnulib-version.c + + * find/parser.c, locate/code.c, locate/locate.c, xargs/xargs.c: + Report which version of Gnulib we were built from. + +2007-02-25 James Youngman + + * find/find.c (process_dir): Removed duplicated (shadow) + declaration of did_stat. Assert that we did not use subdirs_left + if subdirs_unreliable is true. + + * find/parser.c (parse_size): Removed unused variable rate. + (parse_time): Removed unused variable num_days_approx. + (get_num): Removed unused variables ok and suffixes. + + * find/pred.c (do_fprintf): Indicate that the function needs a + return value (referring to Savannah bug #19146). + + * find/tree.c (predlist_dump): Commented out unused function + (predlist_merge_nosort): Commented out unused function + (getrate): Returns type is float, so return 1.0f not 1.0. + (calculate_derived_rates): Removed unused variable rate. Use a + switch statement rater than ifs. + + * find/util.c (usage): Removed unused variable i. + + * lib/buildcmd.c (bc_do_insert): Removed unused variable + need_prefix. + (bc_init_controlinfo): annotate a line (with #warning) which is + probably a bug. + + * locate/locate.c: #include for the benefit of the + setgroups() call in drop_privs. + (slocate_db_pathname): Commented out unused variable. + (set_max_db_age): error command has no format directive, so + remove the unused extra argument. + (looking_at_slocate_db): Removed unused variables magic and + lenwanted. Fix bug where result is indeterminate (due to falling + off the end of the function) if the first character is a nondigit. + (search_one_database): Eliminate (spurious) compiler warning + rlating to possible use before initialisation of slocate_seclevel. + + * xargs/xargs.c (get_char_oct_or_hex_escape): Eliminate spurious + compiler warning on variable p. + (main): Removed unused varible env_too_big + + +2007-02-24 James Youngman + + * find/parser.c (pred_sanity_check): define this function even for + _NDEBUG, but do nothing in that case. + (estimate_timestamp_success_rate): correct (invert) the sense of + the subtraction used to find the file's age. + + * import-gnulib.sh (findutils_modules): Import Gnulib modules + xstrtod and timespec. + + * find/parser.c (get_comp_type): Refactored out of get_num. + (get_num): call get_comp_type to find the comparison type. + (get_relative_timestamp): new function replacing get_num_days. + (get_num_days): Remove. + (do_parse_xmin): Support fractional arguments and + nanosecond timestamps. + (parse_used): ditto + (parse_time): ditto + + * xargs/xargs.c (read_line): Give a warning message if a NUL is + found in the input (this function is called only when -0 is not in + effect). + + * xargs/xargs.c (nullwarning_given): New variable indicating if + the NULL character warning had already been issued. + + * doc/find.texi (Multiple Files): Describe how trailing blanks are + handled when -L is in effect. + + * xargs/xargs.c (read_line): Use an enum rather than + preprocessor macro values for the lexer state. + + * lib/savedirinfo.c (free_dirinfo): Fixed memory leak (trivial + patch from Supriya Kannery) + +2007-01-22 James Youngman + + * .cvsignore (install-sh): Ignore, since the install-sh file is no + longer held in the findutils CVS repository. + + * find/testsuite/config/unix.exp (find_start): allow a test to be + skipped for either the old or the new find executable. + * find/testsuite/find.gnu/execdir-pwd.exp, + find/testsuite/Makefile.am: + New test, covering Savannah bug #18466. This test currently fails + for the ftsfind binary and passes for the oldfind binary. Due to + a limitation in the way that we perform the test, we can't tell + the test suite to expect a failure in the new binary but not the + old. Therefore we skip the test for the old binary. + + * lib/regeprops.c (describe_regex_syntax): fixed a typo in the text + * doc/find.texi (Multiple Files): fixed a typo + +2007-01-16 James Youngman + + (ctime_format): format the time manually (rather than using ctime) + in order to include the sub-second part of the time. + (weekdays, months): new static variables used by ctime_format. + (format_date): append a the sub-second part of the timestamp to + the seconds part of date/time output. + +2007-01-15 James Youngman + + * find/defs.h (time_val): define struct; use timespec to hold time + in the 'reftime' member. + (args): use struct timespec instead of time_t for predicates + -newer, -anewer, -cnewer. * find/parser.c (includes): include + stat-time.h. + (parse_anewer, parse_cnewer, parse_newer): use struct timespec to + hold timestamps. * find/pred.c (compare_ts): new function for + comparing timestamps in struct timespec. + (pred_anewer, pred_cnewer, pred_newer): use compare_ts() to + compare timestamps (hence takinng acoung of sub-second + granularity). + * find/ftsfind.c: Various improvements to comments. + (is_fts_enabled): Newline before function name to comply with GNU + coding standard. + +2007-01-13 James Youngman + + * lib/regexprops.c (describe_regex_syntax): fixed typo + + * xargs/xargs.c (read_line): Fixed Savannah bug# 18714; VT and FF + are not separators, according to POSIX (in the POSIX locale). + + * xargs/testsuite/Makefile.am, + xargs/testsuite/input/formfeeds.xi, + xargs/testsuite/input/verticaltabs.xi, + xargs/testsuite/xargs.posix/sv-bug-18714.exp, + xargs/testsuite/xargs.posix/sv-bug-18714.xo, + xargs/testsuite/xargs.posix/sv-bug-18714b.exp, + xargs/testsuite/xargs.posix/sv-bug-18714b.xo: Tests for Savannah + bug #18714. + + * xargs/xargs.c (usage): Removed suprious "[" in --help output + (fixes Savannah bug #18384). + + * locate/locate.c: Implement the option --max-database-age. + (main) Accept the option. + (set_max_db_age): Parse the argument. + + * locate/locate.c (dolocate): If the database is more than N days + old, indicate its actual age in the warning message we produce. + + * locate/locate.1, docs/find.texi: Document --max-database-age + + * THANKS: Thank Dean Gaudet for the idea of -sparse. + + * po/findutils.pot: Updated from Translation Project + + * po/ga.po, po/pl.po, po/nl.po, po/tr.po, po/hu.po: Updated from + the Translation Project + +2007-01-09 Ralf Wildenhues + + * doc/find.texi: Fix some typos. (trivial change) + +2007-01-07 James Youngman + + * find/parser.c (parse_perm), find/testsuite/find.gnu/perm000.exp, + find/testsuite/find.gnu/perm000.xo: -perm /000 is now quivalent + to -perm -000, as dscussed in Savannah bug #14748. The warning + message we issue when the user does this now explains that the + defintion changed as we promised it would in 2005. + + * xargs/xargs.c (read_line): Correctly handle quoted empty + arguments occurring first or last on a line (by adding an empty + argument to the output). Fixes Savannah bug #18713. + + * xargs/testsuite/xargs.sysv/sv-bug-18713.exp, + xargs/testsuite/xargs.sysv/sv-bug-18713.xo, + xargs/testsuite/input/empty.xi: Test case for Savannah bug #18713. + + +2006-12-29 James Youngman + + * find/testsuite/config/unix.exp: + Verify that find_start is invoked with wither a p (pass) or an f + (fail) argument. + + * lib/listfile.c, lib/listfile.h: + define find_blocksize() and provide a declaration for get_link_name() + + * find/testsuite/config/unix.exp: Updated copyright years. + + * find/testsuite/find.gnu/execdir-one.exp, find/testsuite/find.gnu/execdir-root-only.exp, find/testsuite/find.gnu/sv-bug-12230.exp, find/testsuite/find.gnu/sv-bug-17782.exp, find/testsuite/config/unix.exp: + Avoid tests using -execdir if $PATH contains a relative directory + + * find/parser.c: + Also flag $PATH values containing relative directories as being dangerous. + + * find/parser.c, find/defs.h, find/util.c: + Instead of selecting the old or new exec handling code with the NEW_EXEC macro, just use the new code all the time + + * locate/testsuite/config/unix.exp: + Fixed Savannah bug #13252, test suite failure caused by the fact that 'file normalize' is not available in Tcl 8.3 + + * NEWS, find/pred.c: + Fixed Savannah bug #18433, compilation failure with configure --enable-debug + +2006-12-28 James Youngman + + * NEWS: Document addition of %S. + + * find/defs.h, find/find.1, find/parser.c, find/pred.c: + Implemented %S (sparseness) printf format, and general refactoring and cleanup of printf predicate + +2006-12-01 James Youngman + + * NEWS, configure.in: Begin work on findutils 4.2.30 + + * find/find.c: + Fix compilation error for oldfind if --enable-debug was passed to configure + + * NEWS, configure.in: Prepare for work on findutils-4.3.3 + +2006-11-25 James Youngman + + * find/testsuite/Makefile.am: Added test case for Savannah bug #17782 + + * doc/textinfo.tex: Removed; we now use the version supplied + by automake. + + * m4/mkinstalldirs.m4: Added this file. It's an excerpt from an + old version of gnulib's m4/nls.po file. The current version of + gnulib does not expand MKINSTALLDIRS, but gettext-0.14.6's version + of po/Makefile.in.in expects it to be expanded. This m4 file + fills the gap. + +2006-11-20 James Youngman + + * po/et.po, po/bg.po, po/pl.po, po/nl.po, po/tr.po: Updated + translations for Bulgarian, Estonian, Dutch, Polish and Turkish. + +2006-11-08 James Youngman + + * find/testsuite/Makefile.am: + Oops, indicate the right directory for the new test files + + * ChangeLog, depcomp, doc/texinfo.tex, find/ftsfind.c, find/testsuite/Makefile.am, find/testsuite/find.gnu/sv-bug-18222.exp, find/testsuite/find.gnu/sv-bug-18222.xo, install-sh: + Savannah bug#18222 - test case + + * ChangeLog, lib/buildcmd.c: + Fixed Svannah bug #17782 ('./' prefix added at start of arg while it should be added at the start of the expansion of {}) + + * find/ftsfind.c (process_all_startpoints): Set + state.starting_path_length for every pathname argument. + This fixes Savannah bug #18222. + + * find/pred.c (pred_prune): -prune should have an effect only if we are + currently considering a directory (Savannah bug #15531). + +2006-10-15 James Youngman + + * lib/buildcmd.c: Fixed Savannah bug #17782, in which "find + -execdir echo "foo {}" runs 'echo ./foo filename' instead of the + correct command 'echo foo ./filename'. + + * po/hu.po, po/sl.po: Updated Hungarian and Slovenian po files + +2006-08-21 James Youngman + + * find/parser.c, find/testsuite/Makefile.am, find/testsuite/find.gnu/sv-bug-17490.exp: + Fixed Savannah bug #17490, which was a coiredump when -regex ZZZ was the final test on the command line + +2006-08-20 James Youngman + + * find/parser.c: Merged the fix for the trailing % in "find -printf". + +2006-08-20 Paul Eggert + + Port recent fixes for symbolic modes involving X from gnulib, + and clarify the documentation in this area. + * doc/find.texi: Use "file mode bits" when talking about + all the file mode bits (including setuid, setgid, and sticky), + and "permissions" when talking only about permissions bits + (read, write, execute/search). Use "execute/search" to + talk about the x bit, since it means both. You do not need + permission to the linked-to file to follow a symlink for + syscalls like "stat", but you do need search permission for + the directories you traverse. Clarify the explanation of + -perm. Use "that" instead of "which" when "which" isn't + quite correct English. + (Mode Bits): Renamed from Permissions. All uses changed. + * doc/perm.texi: Sync from coreutils 6.0. + * find/defs.h (struct perm_val.val): Now an array of two items, + one for non-directories, and one for directories. This is + to handle symbolic modes like +X correctly. + * find/parser.c (parse_perm): Likewise. Also, adjust to + latest gnulib interface for mode_adjust. + * find/pred.c (pred_perm): Likewise. + * find/testsuite/Makefile.am (EXTRA_DIST_XO): Add find.posix/perm-X.xo. + (EXTRA_DIST_EXP): Add find.posix/perm-X.exp. + * find/testsuite/find.posix/perm-X.exp: New file. + * find/testsuite/find.posix/perm-X.so: New file. + +12006-08-19 Paul Eggert + + Port to latest gnulib, and simplify the bootstrapping procedure. + * intl: Remove this directory and everything in it. + * depcomp, install-sh, missing, mkinstalldirs, doc/texinfo.tex: + Remove these files from CVS, as they are now gotten from gnulib. + * README-CVS: Don't recommend "autoreconf -i", as it doesn't work + for us. + * import-gnulib.sh (findutils_files): New var. Grab this stuff + from gnulib. + (findutils_modules): Add fopen-safer; remove stdio-safer. This + adjusts to latest gnulib. + (modules): Remove obsolete reference to intl_modules. + * .cvsignore: Remove stamp-h; add stamp-h1. + * doc/.cvsignore: Add regexprops.texi. + * find/.cvsignore: Add oldfind. + * lib/.cvsignore: Add .deps, regexprops. + * m4/.cvsignore: Add Makefile. + * po/.cvsignore: Add stamp-po. + +2006-08-19 James Youngman + + * locate/testsuite/config/unix.exp, locate/testsuite/locate.gnu/bigprefix1.exp: + Explicit checks for parefixes which are within range of a short, but outside the one-byte range + + * locate/testsuite/locate.gnu/bigprefix1.exp, locate/testsuite/locate.gnu/exceedshort.exp, locate/testsuite/locate.gnu/space1st.exp: + New file. + + * locate/testsuite/Makefile.am, locate/testsuite/locate.gnu/exceedshort.exp, locate/testsuite/locate.gnu/space1st.exp: + Patch from Tavis Ormandy; check frcode handles initial space end encodes paths with more than 2^16 characters in the common prefix (trivial change) + + * locate/frcode.c: Changes to avoid overflows + +2006-08-11 James Youngman + + * locate/frcode.c: + Avoid producing an invalid database if the first item begins with a space + +2006-08-10 James Youngman + + * find/pred.c, import-gnulib.sh, lib/listfile.c: + Updated callers of the gnnulib filemode module so that they work with the 2006-07-09 version of gnulib + + * config.rpath: Updated config.rpath from autotools + +2006-08-08 James Youngman + + * locate/locatedb.h: + Automatically verify (at compile time) that the frcode datastream + cannot get desynchronised. + + * find/ftsfind.c: + Fixed Savannah bug #10494 (-maxdepth does not yield the same stat savinf in ftsfind as oldfind) + + * find/ftsfind.c: display fts_level for find -D search + + * find/util.c: Support find -D search + + * locate/locate.c: + If the user specified -E but the database is an slocate database, do + not produce a list of files they cannot stat. Issue an error message + explaining the problem. + + * locate/locate.c: + Issue states messages in a way which indicates more clearly what's + happening when the numbers are reduced because not every filename + matched the pattern. + + * locate/locate.c: Better error checking in drop_privs(). + +2006-08-07 James Youngman + + * NEWS, locate/locate.c, locate/locatedb.h: + Added support for slocate database format + + * xargs/xargs.c: + Removed unused code (tivial patch from Miloslav Trmac). + + * xargs/xargs.c: Removed unused code. + + * doc/find.texi: + Clarify that the output format for locate -S differs from BSD's. + + * NEWS, find/find.1: + Savannah bug #15360: explain global vs. positional options more clearly in the manual page + + * NEWS: Typo in subsection header (* should be **). + + * NEWS, find/find.1: + Savannah bug #15360: explain global vs. positional options more clearly in the manual page + + * doc/find.texi: Fixed some clumsy phrasing + + * NEWS, configure.in: + Now diverging again from the released tarball, so change once more to -CVS version number suffixes + +2006-08-06 James Youngman + + * locate/locate.c: Fixed a typo in a comment. + + * NEWS, configure.in: Moving on towards 4.3.2... + + * find/testsuite/config/unix.exp: + Check that we can see the find.o file in the right position relative + to $base_dir to ensure that we are indeed testing the program we just built. + + * find/testsuite/config/unix.exp: + Be more paranoid about whether we're really checking the right version + of find. + + * NEWS, configure.in: Prepare for release of 4.3.1 + + * doc/find.texi: Document the -O and -D options + + * find/defs.h, find/find.1, find/util.c: + 'find -D help' now explains the available debugging options + + * po/be.po, po/bg.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po: + Make dist changed all the po files again + +2006-08-05 James Youngman + + * NEWS: Described more changes in 4.3.1. + + * locate/testsuite/config/unix.exp: + Set the environment variable so that updatedb knows where to find it; it's not in BINDIR yet during 'make check' + + * po/be.po, po/bg.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po: + Make dist changed all the po files again :) + + * po/et.po, po/vi.po: UPdated the Estonian and Vietnamese translations + + * NEWS, configure.in: Prepare for release of findutils-4.2.28 + + * po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po, po/be.po, po/bg.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po: + Make dist changed all the po files again :) + + * configure.in: Added Bulgarian translation. + + * po/bg.po: Include Bulgarian translation + + * configure.in: Added Bulgarian translation. + + * po/et.po, po/vi.po: Updated Estonian and Vietnamese translations + + * NEWS: Removed spurious comma. + + * NEWS: Listed the updated translations. + + * find/parser.c, lib/buildcmd.c, lib/buildcmd.h, xargs/xargs.c: + Fixed Savannah bug#16738, find does not subtract environment size in find .. -exec {} + + + * NEWS: Updated the list of bugfixes etc. + +2006-06-15 James Youngman + + * NEWS: Described recent changes + + * configure.in: fix to how we invoke the gnulib regex module + + * find/find.1: + Savannah bug #16269: avoid confusion over what type of quotes to use + in an example. + + * find/parser.c: Option -nowarn should not itself produce a warning + + * find/defs.h: Remoevd useless declaration of last_pred + +2006-06-14 James Youngman + + * po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po: + Updated translation files ga pl sv tr nl ca vi bg fr + + * locate/updatedb.sh: + Fixed Savannah bug #16579 (su false should be su -c false) + +2006-04-01 James Youngman + + * find/find.c: + Fixed Savannah bug #15800: "Hard link count is wrong" reports wrong + directory name. + +2006-03-31 James Youngman + + * po/hu.po: Updated Hungarian translation + +2006-01-04 James Youngman + + * find/testsuite/find.posix/sizetype.exp, find/testsuite/find.posix/sizetype.xo, find/testsuite/find.posix/typesize.exp, find/testsuite/find.posix/typesize.xo: + Additional tests for -type -size and -size -type + + * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/ftsfind.c, find/parser.c, find/pred.c, find/testsuite/Makefile.am, find/testsuite/config/unix.exp, find/testsuite/find.gnu/depth-d.exp, find/tree.c, find/util.c, po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po: + Initial implementation of a cost-based optimiser + +2005-12-23 James Youngman + + * find/parser.c: Refactor of parse_[acm]time + + * find/defs.h, find/find.c, find/finddata.c, find/ftsfind.c, find/tree.c, find/util.c: + last_pred can be a static in tree.c rather than a global variable + + * find/tree.c, find/finddata.c: + Moved some global data out of finddata.o and into static variables in tree.c + + * NEWS, find/find.c, find/fstype.c, find/ftsfind.c, find/parser.c, find/pred.c, lib/buildcmd.c, lib/buildcmd.h, lib/regexprops.c, lib/regextype.c, lib/regextype.h, lib/savedirinfo.c, locate/locate.c, xargs/xargs.c: + Fixed many compilation warnings + + * find/find.c, find/ftsfind.c, find/util.c: + Evaluating the predicates can change the contents of the data structure (for example to add another exec item) + + * find/defs.h, find/find.c, find/ftsfind.c, find/tree.c, find/util.c: + Re-factored a lot of common expression-handling code out of find.c and ftsfind.c, mainly into tree.c + + * find/find.c, find/ftsfind.c, find/tree.c: + Savannah bug #15271: more helpful error messages for cases where there is a missing expression + +2005-12-20 James Youngman + + * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/ftsfind.c, find/testsuite/Makefile.am, find/testsuite/find.posix/sv-bug-15235.exp, find/testsuite/find.posix/sv-bug-15235.xo, find/tree.c, find/util.c: + Savannah bug #15195: more helpful error messages for 'find . ( )' or 'find . \!' + + * ChangeLog: Added entries for recent changes. + + * find/defs.h, find/find.c, find/ftsfind.c, find/testsuite/find.posix/bracket-depth.exp, find/util.c: + Further fix to bug# 15235: a leading comma is a filename not an expression + + * find/defs.h, find/parser.c, find/testsuite/Makefile.am, find/testsuite/find.posix/empty-parens.exp, find/tree.c: + Accept 'find ( -depth )' but reject 'find ( )' + + * po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po, po/zh_TW.po: + did make dist + + * find/testsuite/find.gnu/delete.exp: + Use the new find program, and the new way of locating it (/ instead of ) + + * find/testsuite/Makefile.am: Added bracket-depth.exp. + + * NEWS, configure.in: We have moved on from 4.3.0 + + * find/defs.h, find/find.c, find/ftsfind.c, find/testsuite/Makefile.am, find/testsuite/find.gnu/delete.exp, find/testsuite/find.posix/files-not-expressions1.exp, find/testsuite/find.posix/files-not-expressions1.xo, find/testsuite/find.posix/files-not-expressions2.exp, find/testsuite/find.posix/files-not-expressions2.xo, find/testsuite/find.posix/files-not-expressions3.exp, find/testsuite/find.posix/files-not-expressions3.xo, find/util.c: + Avoid getting confused by filename arguments of which the first + character looks like a predicate, for example ',x' or '!x' or + '(x' (Savannah bug #15235). + +2005-12-20 James Youngman + + * find/defs.h, find/find.c, find/ftsfind.c, + find/testsuite/find.posix/bracket-depth.exp, find/util.c: Further + fix to bug# 15235: a leading comma is a filename not an expression + + * find/defs.h, find/parser.c, find/testsuite/Makefile.am, + find/testsuite/find.posix/empty-parens.exp, find/tree.c: Accept + 'find ( -depth )' but reject 'find ( )' + + * find/testsuite/find.gnu/delete.exp: Use the new find program, + and the new way of locating it ($OLDFIND/$FTSFIND instead of $FIND) + + * find/testsuite/Makefile.am: Added bracket-depth.exp. + + * NEWS, configure.in: We have moved on from 4.3.0 + + * find/defs.h, find/find.c, find/ftsfind.c, + find/testsuite/Makefile.am, find/testsuite/find.gnu/delete.exp, + find/testsuite/find.posix/files-not-expressions1.exp, + find/testsuite/find.posix/files-not-expressions1.xo, + find/testsuite/find.posix/files-not-expressions2.exp, + find/testsuite/find.posix/files-not-expressions2.xo, + find/testsuite/find.posix/files-not-expressions3.exp, + find/testsuite/find.posix/files-not-expressions3.xo, find/util.c: + Avoid getting confused by filename arguments of which the first + character looks like a predicate, for example ',x' or '!x' or '(x' + (Savannah bug #15235). + +2005-12-19 James Youngman + + * find/testsuite/config/unix.exp: + Run every test twice, once with the old (non-fts) binary and once with + the new (fts-enabled) binary. + +2005-12-19 Eric Blake + + * find/testsuite/Makefile.am, + find/testsuite/find.posix/sv-bug-15235.xo, + find/testsuite/find.posix/sv-bug-15235.exp: New tests for Savannah + bug 15235. + + * NEWS, find/find.1, doc/find.texi (Invoking find): Document bug + fix for Savannah bug 15235. + +2005-12-16 James Youngman + + * xargs/xargs.1, xargs/xargs.c: Fixed bug# 15211, that xargs + --show-limits is not documented in the manpage or in the usage + message + +2005-12-12 James Youngman + + * find/testsuite/find.gnu/access.exp: + Don't leave junk files lying around the place + + * README-CVS: Update the the instructions for getting gnulib; the + CVS arrangements at Savannah have changed. + + * ChangeLog, NEWS, doc/find.texi, doc/perm.texi, find/defs.h, find/parser.c: + Merged changes from 4.2.x branch again + + * NEWS, doc/find.texi, find/defs.h, find/find.c, find/ftsfind.c, + find/parser.c, find/pred.c, find/util.c, lib/listfile.c, + lib/listfile.h: Initial code to allow control over how -ls quote + (or does not quote) control characters; not enabled yet + +2005-12-11 James Youngman + + * ChangeLog, THANKS, xargs/xargs.c: + Fixed spelling errors in Bob Proulx's name. Sorry, Bob. + +2005-12-10 James Youngman + + * doc/perm.texi: + Aaron Hawley: Updated perm.texi from the coreutils distribution + + * find/parser.c: + Avoid using entries which have the same name as POSIX library + functions (fprintf, printf, exec) as the implementation is allowed to + #define these. That generates hard-to-grok compilation errors. + +2005-12-10 Andreas Metzler + + * ChangeLog, NEWS, configure.in, find/defs.h, find/parser.c: + Applied patch from Andreas Metzler fixing Savannah bug #15181: + implicit declaration of parse_openparen + +2005-12-08 James Youngman + + * doc/find.texi: Typo and spelling corrections from Aaron Hawley + +2005-12-05 James Youngman + + * Released findutils-4.2.27 + +2005-12-05 James Youngman + + * doc/find.texi, find/find.1, locate/locate.1, xargs/xargs.1: + Savannah patch #3775 from Aaron Hawley: reconciling man pages + differences; did not apply the patch, but resolved all the + remaining issues manually by updating the documentation (mostly + the Texinfo documentation, which was missing a number of specific + technical statements about the behaviour of various options) + +2005-12-04 James Youngman + + * doc/find.texi: Document --show-limits + + * xargs/xargs.c: + Correctly display the size of the argument buffer we really allocated. + + * doc/find.texi, find/find.1, find/parser.c, find/pred.c, NEWS: + Savannah bug #14748 (which this change does NOT fix): issue + warning of future changes in the behaviour of -perm /000 + +2005-11-30 James Youngman + + * xargs/xargs.c: + Typo correction from Benno Schulenberg + (trivial change) + +2005-11-29 James Youngman + + * xargs/xargs.c: + Typo "Ilegal"; change to "Invalid" since this is not really illegal! + Bug report by Primoz Peterlin. + + * lib/regexprops.c, xargs/xargs.c: + Prefer the word 'Invalid' or the phrase 'not allowed' over + 'Illegal', as per the GNU coding standards, and as per the + suggestion from Benno Schulenberg + +2005-11-24 James Youngman + + * NEWS, lib/buildcmd.c, lib/buildcmd.h: Merge to trunk from 4.2.x fixes + + * lib/buildcmd.h: + Deleted inaccurate comment about the default value of ctl->args_per_exec. + + * NEWS, lib/buildcmd.c, lib/buildcmd.h: + Be more conservative about the total number of arguments we will + allow (to avoid exec limits on Linux/PPC) + +2005-11-23 James Youngman + + * NEWS: Bug #14921 has been fixed. + + * find/fstype.c: + Savannah bug #14921: when a Linux bind filesystem is in use, find + would expand '-printf %F' to 'none' if a bind mount targetted the same + filesystem as the one containing the file to be described. + + * NEWS: Updated to describe recent changes + + * doc/find.texi, find/find.1: Documented find -printf %M + + * lib/buildcmd.c, xargs/testsuite/Makefile.am, + xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp, + xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.xo, + xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp, + xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.xo: + Ensure that the test suite still passes even if the current + system's value of ARG_MAX is different from the development/test + system + + * lib/buildcmd.c: reindent and untabify + + * configure.in: The CVS code is moving on from the previous release. + +2005-11-22 James Youngman + + * ChangeLog: Updated with recent changes. + +2005-11-21 James Youngman + + * locate/testsuite/config/unix.exp: + Even if we expect locate to return a nonzero status, the test should + still fail if updatedb fails! + + * locate/testsuite/locate.gnu/ignore_case2.exp: + Set the current directory for updatedb. This test case is supposed to + fail because the filename is not matched, not because updatedb fails! + + * locate/updatedb.sh: + Check the binaries actually exist in the place we expect. + +2005-11-20 James Youngman + + * locate/locate.1, xargs/xargs.1: Escape '-' as '\-' where appropriate. + + * find/find.1: + Escape '-' as '\-' where appropriate. Fixes last part of bug #14556. + +2005-11-19 James Youngman + + * doc/find.texi, find/find.1: + Applied edited form of Andreas Metzler's -perm /mode documentation + patch resolving Savannah bug #14619. + + * lib/extendbuf.c: + In the success case, extendbuf() should preserve the previous value of + errno. Fixes Savannah bug #14842. + + * xargs/testsuite/Makefile.am: Added new test files + + * find/find.1: + Correctly indicate the default regular expression syntax (fixes + Savannah bug #14836). + + * NEWS, configure.in: Released findutils-4.2.26 + + * ChangeLog, NEWS, lib/buildcmd.c, + xargs/testsuite/inputs/16383-ys.xi, + xargs/testsuite/inputs/32767-ys.xi, + xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp, + xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.xo, + xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp, + xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.xo: Applied + bugfix from Jim Meyering (tiny change), where many short arguments + would cause xargs (and probably find -exec .. {} +) to fail + because execve() returns E2BIG, which we should avoid + + * xargs/testsuite/inputs/16383-ys.xi, + xargs/testsuite/inputs/32767-ys.xi, + xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp, + xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.xo, + xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp, + xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.xo: New file. + +2005-11-18 Jim Meyering (tiny change) + + * lib/buildcmd.c (bc_push_arg): When exec'ing, don't exceed + Linux's limit on the maximum number of command line arguments. + +2005-11-11 James Youngman + + * NEWS, find/find.c, find/fstype.c: Savannah bug #14922: if we need the + list of mounted filesystems but it is not available, exit fatally + with a message. If it is not available but we don't need it, + there is no need for an error. + +2005-10-31 James Youngman + + * doc/find.texi: + Removed redundant additional description of "--regextype". + +2005-10-08 James Youngman + + * find/find.c, lib/regextype.c: Fixed Savannah bug #14616, which + was that c99 code had crept in and it didn't compile on c89 + compilers + + * doc/find.texi: Savannah patch #4371 from Andreas Metzler; the + argument of -I is mandatory + +2005-09-21 James Youngman + + * xargs/xargs.1, xargs/xargs.c: Clarified the -E option + +2005-09-20 James Youngman + + * NEWS, configure.in, doc/find.texi, xargs/xargs.1, xargs/xargs.c: + Documentation clarification: -L and -I take a mandatory argument; + -l and -i do not + +2005-09-17 James Youngman + + * xargs/xargs.c: + Fixed Savannah bug #14550 - if environment is too large to allow + exec() to work, we cannot even use "xargs --help". + + * find/find.1: + Avoid the use of -perm +mode, using -perm /mode instead. From comment + by Andreas Metzler (though I didn't read the patch). + + * ChangeLog, doc/find.texi, find/find.1, xargs/xargs.1: + Typo fix from A Costa (tiny change) + + * NEWS: Corrections for find manual page - symbolic permissions. + + * find/find.1: + Corrected an inaccuracy in the EXAMPLES section - in symbolic modes, + 'o' stands for 'others' and 'u' stands for 'user' (i.e. the owner). + +2005-09-17 A Costa (tiny change) + + docs/find.texi: Fixed typo + find/find.1: Fixed typo + xargs/xargs.1: Fixed typo + +2005-09-17 James Youngman + + * NEWS: Corrections for find manual page - symbolic permissions. + + * find/find.1: + Corrected an inaccuracy in the EXAMPLES section - in symbolic modes, + 'o' stands for 'others' and 'u' stands for 'user' (i.e. the owner). + +2005-09-06 James Youngman + + * xargs/xargs.c: Typo in "IEEE" in a comment. + +2005-09-04 James Youngman + + * find/defs.h, find/find.c, find/parser.c, find/pred.c, + Work around compilation failure with GCC 4 and AIX 5.1, in which + open is #defined to open64 + +2005-09-03 James Youngman + + * find/testsuite/find.gnu/quit.exp: Fixed Savannah bug#14390, by + avoiding an accidental assumption in quit.exp that directory + entries are returned by readir() in any particular order + + * NEWS, configure.in, doc/find.texi, xargs/testsuite/Makefile.am, + xargs/testsuite/inputs/helloworld.xi, + xargs/testsuite/xargs.gnu/delim-o.exp, + xargs/testsuite/xargs.gnu/delim-o.xo, xargs/xargs.1, + xargs/xargs.c: Added the --delimiter option to xargs, resolving + Savannah support request sr #102914 + + * ChangeLog, NEWS, configure.in: Released findutils-4.2.25 + + +2005-09-02 James Youngman + + * doc/find.texi, find/find.1: + Improved documentation in response to Savannah bug #14376 + +2005-09-01 James Youngman + + * po/ChangeLog, ChangeLog: Updated with recent changes. + + * locate/locate.c: Removed unused struct stringbuf.soffs. + + * doc/find.texi: Typo fix from Jim Meyering (trivial change) + +2005-09-01 Jim Meyering + + * locate/locate.c (struct stringbuf) [soffs]: Remove unused member. + (locate): Remove initialization, too. + +2005-09-01 James Youngman + + * doc/find.texi: Typo fix from Jim Meyering (trivial change) + +2005-08-30 James Youngman + + * find/defs.h, find/find.c, find/fstype.c, find/pred.c: + Attempted fix for compilation when AFS is #defined + +2005-08-13 James Youngman + + * find/find.1: Remind the user to quote the pattern argument to -iname. + +2005-08-12 James Youngman + + * NEWS: Corrected typo. + +2005-08-09 James Youngman + + * NEWS: Indicate that regexprops.texi is built on Cygin now that + Savannah bug #14025 has been fixed. + + * lib/Makefile.am, lib/regexprops.c: Fixed compilation failure on + Cygwin - Savannah Bug #14025 (tiny change, three lines), reported + and fixed by Eric Blake + + * find/testsuite/Makefile.am, + find/testsuite/find.posix/sv-bug-14070.exp, + find/testsuite/find.posix/sv-bug-14070.xo: Added new test case for + SourceForge bug #14070 + + * find/testsuite/find.posix/sv-bug-14070.exp, + find/testsuite/find.posix/sv-bug-14070.xo: New file. + + * find/defs.h, find/ftsfind.c, find/pred.c, find/util.c: + Ensure we can still build with --enable-debug + + * find/testsuite/config/unix.exp, + find/testsuite/find.gnu/execdir-one.exp, + find/testsuite/find.gnu/execdir-root-only.exp, + find/testsuite/find.gnu/sv-bug-12230.exp: If . is on $PATH, + indicate that the -execdir tests cannot be carried out, as opposed + to indicating that those tests fail + +2005-08-07 James Youngman + + * NEWS: Indicated that some test suite files have been renamed. + + * xargs/testsuite/Makefile.am, xargs/testsuite/inputs/eof.xi, + xargs/testsuite/inputs/eof1.xi, + xargs/testsuite/xargs.sysv/eof.exp, + xargs/testsuite/xargs.sysv/eof.xo, + xargs/testsuite/xargs.sysv/eof1.exp, + xargs/testsuite/xargs.sysv/eof1.xo, + xargs/testsuite/xargs.posix/lc_l2.exp, + xargs/testsuite/xargs.posix/lc_l2.xo, + xargs/testsuite/xargs.sysv/l2.exp, + xargs/testsuite/xargs.sysv/l2.xo, + xargs/testsuite/xargs.sysv/lc_l2.exp, + xargs/testsuite/xargs.sysv/lc_l2.xo, + xargs/testsuite/xargs.posix/L2.exp, + xargs/testsuite/xargs.posix/l2.exp, + xargs/testsuite/xargs.posix/L2.xo, + xargs/testsuite/xargs.posix/l2.xo, + xargs/testsuite/xargs.posix/uc_L2.exp, + xargs/testsuite/xargs.posix/uc_L2.xo: Work around problems with + CVS clients on case-insentitive operating systems + + * debian/Changelog: Removed Changelog file since changelog is the + one we should be using and having both files upsets Cygwin + systems which cannot tell the dirrerence between changelog and + Changelog + + * find/ftsfind.c: + If DEBUG is defined, show the symbolic names fro fts_info values. + + * find/ftsfind.c: Added additional diagnostics. + +2005-08-01 James Youngman + + * ABOUT-NLS, INSTALL, Makefile.am, configure.in, depcomp, + doc/texinfo.tex, install-sh, missing, mkinstalldirs: By adding the + missing AM_GNU_GETTEXT_VERSION call, allowed autopoint to update + those files of which it has updated copies. + + * po/Makevars.template, po/Makefile.in.in, po/findutils.pot: + Using AM_GNU_GETTEXT_VERSION, allowed gettext to update the infrastructure + + * po/Rules-quot, po/boldquot.sed, po/en@boldquot.header, po/en@quot.header, po/insert-header.sin, po/quot.sed: + Files added by autopoint now that we are using AM_GNU_GETTEXT_VERSION + + * find/testsuite/Makefile.am: Added find.gnu./perm-slash.{exp,xo}. + +2005-07-31 James Youngman + + * find/testsuite/excuses.txt: We now have tests for -perm. + + * NEWS, configure.in, find/parser.c, + find/testsuite/find.gnu/perm-slash.exp, + find/testsuite/find.gnu/perm-slash.xo: Fixed bug which caused find + -perm /440 to be treated the same as find -perm 440 + + * find/testsuite/Makefile.am: + Generic tests for -perm -NNN and -perm NNN + + * find/testsuite/excuses.txt: New file - list of test cases that + still need to be written, along with excuses why they haven't been + done yet + + * find/testsuite/find.posix/perm-vanilla.exp, + find/testsuite/find.posix/perm-vanilla.xo: Generic tests for -perm + -NNN and -perm NNN + + * find/testsuite/find.gnu/inum.exp: + Ensure that the test would fail if -inum just always returned true + + * find/testsuite/Makefile.am, find/testsuite/find.gnu/ilname.exp, + find/testsuite/find.gnu/ilname.xo, + find/testsuite/find.gnu/inum.exp, find/testsuite/find.gnu/inum.xo, + find/testsuite/find.gnu/lname.exp, + find/testsuite/find.gnu/lname.xo, + find/testsuite/find.gnu/xtype.exp, + find/testsuite/find.gnu/xtype.xo, + find/testsuite/find.posix/links.exp, + find/testsuite/find.posix/links.xo: New test cases for -ilname, + -inum, -lname, -xtype + + * find/testsuite/Makefile.am, find/testsuite/find.gnu/delete.exp, + find/testsuite/find.gnu/delete.xo, + find/testsuite/find.gnu/iregex1.exp, + find/testsuite/find.gnu/iregex1.xo, + find/testsuite/find.gnu/regex1.exp, + find/testsuite/find.gnu/regex1.xo, + find/testsuite/find.gnu/regex2.exp, + find/testsuite/find.gnu/regex2.xo, + find/testsuite/find.gnu/samefile-copy.exp, + find/testsuite/find.gnu/samefile-copy.xo, + find/testsuite/find.gnu/samefile-link.exp, + find/testsuite/find.gnu/samefile-link.xo, + find/testsuite/find.gnu/samefile-same.exp, + find/testsuite/find.gnu/samefile-same.xo, + find/testsuite/find.gnu/samefile-symlink.exp, + find/testsuite/find.gnu/samefile-symlink.xo: Further test cases + + * find/find.1: Indicate that -delete implies -depth (find.texi + already mentioned this). + + * find/testsuite/Makefile.am: + Brought the list of .exp and .xo files in Makefile.am into sync with + the actual contents of the CVS repository. + + * find/testsuite/Makefile.am, find/testsuite/find.gnu/depth-d.exp, + find/testsuite/find.gnu/depth-d.xo, + find/testsuite/find.gnu/empty.exp, + find/testsuite/find.gnu/empty.xo, + find/testsuite/find.gnu/execdir-one.exp, + find/testsuite/find.gnu/execdir-one.xo, + find/testsuite/find.gnu/false.exp, + find/testsuite/find.gnu/false.xo, + find/testsuite/find.gnu/follow-basic.exp, + find/testsuite/find.gnu/follow-basic.xo, + find/testsuite/find.gnu/gnu-or.exp, + find/testsuite/find.gnu/gnu-or.xo, + find/testsuite/find.gnu/gnuand.exp, + find/testsuite/find.gnu/gnuand.xo, + find/testsuite/find.gnu/gnunot.exp, + find/testsuite/find.gnu/gnunot.xo, + find/testsuite/find.gnu/iname.exp, + find/testsuite/find.gnu/iname.xo, + find/testsuite/find.gnu/ipath.exp, + find/testsuite/find.gnu/ipath.xo, + find/testsuite/find.gnu/iwholename.exp, + find/testsuite/find.gnu/iwholename.xo, + find/testsuite/find.gnu/path.exp, find/testsuite/find.gnu/path.xo, + find/testsuite/find.gnu/print0.exp, + find/testsuite/find.gnu/print0.xo, + find/testsuite/find.gnu/quit.exp, find/testsuite/find.gnu/quit.xo, + find/testsuite/find.gnu/true.exp, find/testsuite/find.gnu/true.xo, + find/testsuite/find.gnu/wholename.exp, + find/testsuite/find.gnu/wholename.xo, + find/testsuite/find.posix/and.exp, + find/testsuite/find.posix/and.xo, + find/testsuite/find.posix/exec-one.exp, + find/testsuite/find.posix/exec-one.xo, + find/testsuite/find.posix/grouping.exp, + find/testsuite/find.posix/grouping.xo, + find/testsuite/find.posix/name.exp, + find/testsuite/find.posix/name.xo, + find/testsuite/find.posix/posixnot.exp, + find/testsuite/find.posix/posixnot.xo, + find/testsuite/find.posix/prune.exp, + find/testsuite/find.posix/prune.xo: Added new test cases for many + of the actions and tests of find + + * find/find.c (default_prints): + not a static function, so do not declare it as one. + + * m4/withfts.m4: Fixed underquoted definition of FIND_WITH_FTS. + [this change is currently on a branch only] + +2005-07-30 James Youngman + + * find/finddata.c, find/ftsfind.c, find/parser.c, find/pred.c, + find/util.c, m4/Makefile.am, m4/withfts.m4: Initial attempt to + convert find to use gnulib's fts() + [this change is currently on a branch only] + + * find/finddata.c, find/ftsfind.c, m4/withfts.m4: New file. + [this change is currently on a branch only] + + * NEWS, configure.in, find/Makefile.am, find/defs.h, find/find.c, + import-gnulib.sh: Initial attempt to convert find to use gnulib's + fts() [this change is currently on a branch only] + +2005-07-29 James Youngman + + * NEWS, configure.in + Prepared for the release of findutils-4.2.24 + + * ChangeLog: Updated with recent changes. + + * NEWS, find/find.1, doc/find.texi: + Indicate that -ok and -okdir redirect stdin from /dev/null. + + * NEWS: Explain the directory link count change more throroughly. + + * NEWS: Fixed bug #13973. + + * find/pred.c (pred_fprintf): Fix Savannah bug #13973: Modify the + handling of -printf %Y so that it no longer modifies stat_buf + + * find/testsuite/find.gnu/printf-symlink.exp, + find/testsuite/find.gnu/printf-symlink.xo: Detect Savannah bug + #13973: pollution of stat_buf by the %Y directive (trivial change + from Andreas Metzler) + + * INSTALL, depcomp, doc/texinfo.tex, install-sh, missing, mkinstalldirs: + Updated auxilliary files from the automake-1.9 distribution + + * configure.in: + Introduce new Automake conditional, CROSS_COMPILING, true when we are corss compiling + + * find/find.c: + If we decline to follow a symbolic link due to the safety check, issue a more self-explanatory warning message + + * lib/Makefile.am: Don't build regexprops if we are cross compiling + + * doc/Makefile.am: + Depend on the regex.h file rather than the 'regexprops' binary, + because the header file will always exist even if we are doing "make + dist". Otherwise "make distcheck" fails because it tries to rebuild + find.info while the source-directory is read-only. + +2005-07-28 James Youngman + + * find/find.1: + Say "other users" rather than "rest of the world" when talking about + Unix permissions. Fixes Savannah bug #4246. + +2005-07-27 James Youngman + + * xargs/testsuite/Makefile.am: Added new test case 'childfail.exp'. + + * doc/find.texi: + Updated the description of the safe-dir-change operation to reflect + what find now does on systems that lack O_NOFOLLOW. + + * NEWS, find/parser.c: Indicate in the output of find --version if + the leaf optimisation is enabled or not + + * find/find.c: Fixed typo. + + * find/find.c: If the link count of a directory starts off less + than two, disable the leaf optimisation for this directory. + +2005-07-26 James Youngman + + * lib/regexprops.c: Further small corrections from Karl. + + * doc/find.texi: + Reordered the sections in the manual to put the "Common Tasks" and + "Worked Examples" chapters together. + + * configure.in, find/find.c: Allow the leaf optimisation to be + disabled by default with the configure option + --disable-leaf-optimisation + + * find/find.c: Removed old code for antuqie version of savedir(). + + * lib/regextype.c: Put the syntaxes in alphabetical order. + + * lib/regexprops.c: Karl made some more readability suggestions. + +2005-07-24 James Youngman + + * doc/Makefile.am: If the regexprops program has changed we should + re-run it, since it will probably now produce different output + + * lib/regextype.h: + Allow the caller to detect if one regex type is identical to another. + + * configure.in: + Define the preprocessor macro FINDUTILS for that code int he lib/ + directory can be slightly more reusable. + + * lib/regextype.c: + Allow the caller to detect if one regex type is identical to another. + + * lib/regexprops.c: + Made Texinfo style corrections suggested by Karl Berry. + +2005-07-22 James Youngman + + * xargs/testsuite/xargs.posix/childfail.exp, xargs/xargs.c: Fix + Savannah bug #13878, in which xargs deals incorrectly with child + failure, returning 0 when it should return 123 + +2005-07-17 James Youngman + + * find/find.1: (tiny change) Corrections by Greg Wooledge + +2005-07-16 James Youngman + + * doc/find.texi: Updates following comments by Dave Gilbert. + + * NEWS: Corrected a typo. + + * doc/find.texi: + Added in the example about updating an aggregate timestamp file. + +2005-07-15 James Youngman + + * po/da.po: Updated Danish translation from translation project + +2005-07-14 James Youngman + + * NEWS, doc/Makefile.am, doc/find.texi, lib/Makefile.am, + lib/regexprops.c, lib/regextype.c, lib/regextype.h: Added + --regextype and -regextype options to locate and find + respectively, and documented these + + * doc/find.texi: We use GNU Emacs regexps by default now. + + * doc/find.texi: + We require GNU sort in order for locate to handle newlines correctly, + not just GNU find. + +2005-07-10 James Youngman + + * doc/find.texi: + Applied several documentation improvement patches from Aaron Hawley + + * ChangeLog, NEWS: Updated with recent changes. + + * NEWS: Recent gnulib changed have fixed -iregex + + * doc/find.texi, xargs/xargs.1: + Tiny patch from Andreas Metzler: xargs -I is like xargs -i, but the latter is deprecated + +2005-07-06 James Youngman + + * find/defs.h, find/find.c, find/parser.c, find/pred.c: + Fixed Savannah bug #13650; programs run by -exec cannot read stdin + +2005-07-04 James Youngman + + * NEWS: *** empty log message *** + + * doc/find.texi: + Added a "Worked Examples" section. It currently only contains a + (long) example about deleting files. + + * .cvsignore: Some extra stuff to ignore. + +2005-07-03 James Youngman + + * find/Makefile.am: Don't need regexprops.c really... + + * lib/regextype.c, lib/regextype.h: + New files for selecting regex type based on a keyword + + * locate/locate.1: Documented the fact that we now use Emacs-style + regexps, not POSIX EREs, for compatibility with find -regex. + + * lib/Makefile.am, locate/locate.c, doc/find.texi, + find/Makefile.am, find/defs.h, find/find.1, find/find.c, + find/parser.c: Fixed Savannah bug #13495: find now uses + Emacs-style regexps by default + +2005-07-02 James Youngman + + * configure.in, find/defs.h, find/fstype.c, find/parser.c, + intl/dcigettext.c, lib/buildcmd.c, lib/listfile.c, + lib/savedirinfo.c, locate/locate.c, xargs/xargs.c: Assume unistd.h + is present - avoid using HAVE_UNISTD_H + +2005-07-01 Jim Meyering + + With `-fprint F' or `-fprintf F', don't write diagnostics + to F when stderr is closed. + + * find/parser.c: Include "stdio-safer.h". + (open_output_file): Use fopen_safer, not fopen. + * import-gnulib.sh (findutils_modules): Add stdio-safer. + +2005-07-01 James Youngman + + * doc/find.texi: + Aaron pointed out a potentially-confusing sentence. I fixed it. + + * find/defs.h, find/find.1, find/find.c, find/parser.c, + find/pred.c, find/util.c: Allow consistency-checking of the + predicates, checking for example that actions all have side + effects + +2005-06-29 James Youngman + + * doc/find.texi: Applied patch from Aaron Hawley (Savannah patch + #3751: Typos and small suggestions to find.texi) + +2005-06-27 James Youngman + + * ChangeLog, locate/locate.c: Applied patch from Bas Van Gompel to + move match counting into a (new) visitor function + + * NEWS, configure.in: No longer 4.2.23, as we're moving on now + +2005-06-24 Bas van Gompel + + * locate/locate.c (visit_count, visit_limit): New functions. + (locate): Use visit_limit or visit_count. Simplify main loop. + (main) Bail out early when limit is reached. + +2005-06-20 James Youngman + + * xargs/xargs.c: + Removed some code which had already been disabled via the preprocessor. + +2005-06-19 Dmitry V. Levin + + * lib/savedirinfo.c: Fix two compilation warnings (which would + prevent compilation if "-Wall -Werror" is in effect). + +2005-06-19 James Youngman + + * ChangeLog: Indicate that we made (are making) a release. + + * ChangeLog, NEWS, configure.in: Preparing to release 4.2.23 + + * doc/find.texi: Fixed Texinfo syntax error in previous change + + * doc/find.texi, xargs/xargs.1: + Document the fact that the -i and -L options are currently + incompatible (Savannah bug 13041). + + * locate/updatedb.1, locate/updatedb.sh: Fix Savannah bug 13411 - + reject trailing slashes in updatedb's --prunepaths, bacsue these + will never be matched + + * NEWS: Released findutils-4.2.23. + + * doc/find.texi, xargs/xargs.1: + Document the fact that the -i and -L options are currently + incompatible (Savannah bug 13041). + + * locate/updatedb.1, locate/updatedb.sh: Fix Savannah bug 13411 - + reject trailing slashes in updatedb's --prunepaths, because these + will never be matched. + +2005-06-18 Martin Buchholz (trivial patch applied by James Youngman) + + * find/defs.h, find/find.c, find/parser.c, doc/find.texi: Fix + typos/spelling errors (mostly in source code comments). + +2005-06-18 Dmitry V. Levin + + Additional documentation tweaks for -execdir/-okdir actions. + * find/parser.c (parse_help): Mention -execdir and -ordir options. + * doc/find.texi, find/find.1: Additionally document new options. + +2005-06-12 Bas van Gompel + + * locate/locate.c: Implement --all (-A). + + * NEWS, doc/find.texi, locate/locate.1: Document locate --all (-A) + +2005-06-12 James Youngman + + * find/find.c, NEWS: + Savannah bug #13381 (Debian bug 313081): if we have O_NOFOLLOW, + safely_chdir() does not need to call stat(). However, process_dir() + used to rely on using that stat information. To work around this + problem, there is now an output parameter in safely_chdir() which + indicates if the stat buffer is valid. + This bug has possible security implications. + + * find/find.1, doc/find.texi: + Applied patch from Andreas Metzler, improving the wording for the + documentation of the %k and %b format directives. This patch does + not require a copyright assignment as it consists of several + copies of the same small wording change. + +2005-06-11 James Youngman + + * find/find.1: Corrected spelling error 'writeable' to 'writable'. + + * find/find.1, locate/locate.1: + Fixed Savannah bug #13363, typos in manpages (trivial change) + +2005-06-10 James Youngman + + * find/find.c, lib/savedirinfo.c, lib/savedirinfo.h: Switch to a + new scheme for saving directory entry data which is extensible to + allow additional data to be saved. + +2005-06-09 James Youngman + + * locate/testsuite/config/unix.exp: + Use the new normalize_dir procedure throughout. + + * locate/testsuite/config/unix.exp: Move the normalisation into a + procedure. Don't rely on the "file normalize" command being + available (it's new in Tcl 8.4). + +2005-06-08 James Youngman + + * ChangeLog, NEWS, configure.in: Updated for recent changes + + * doc/find.texi: + Explain that you should put the argument of -name in quotes. + + * find/find.1: + Added a new "NON-BUGS" section pointing out things that look like bugs + but are caused by mistakes or misunderstandings. + + * doc/find.texi, locate/locate.1: Applied Bas van Gompel's patch + which allows the database to be read from stdin. + + * locate/locate.c: + Read the database in by using the "visitor" pattern. Modified file + header comment to indicate that we no longer use the efficient + algorith described in ;login:. Emit an error message if the + LOCATE_PATH variable implies that we should read stdin twice. + Most of this code is from Bas van Gompel. + + * AUTHORS: Credit Bas van Gompel for his work on locate. + + * lib/printquoted.h: Appled patch from Bas - fixing compiler warning. + +2005-06-07 James Youngman + + * ChangeLog, NEWS, configure.in: Updates prior to release + + * config.rpath: Added file required for 'make dist' + + * po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, + po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, + po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, + po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, + po/pt.po, po/pt_BR.po, po/ro.po, po/ru.po, po/rw.po, po/sk.po, + po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, po/zh_CN.po: + updated the po files for release + + * xargs/testsuite/Makefile.am: + Added in all the test files from Dmitry V. Levin. + +2005-06-08 Bas van Gompel + + * NEWS, locate/locate.1, doc/find.texi: Document usage of `-' + to refer to stdin in database-path for locate. + * locate/locate.c: Change prototype for visitors and processors + throughout. Move reading the database and generating base_name + into visitors. Allow `-' to refer to stdin in database-path. + + * lib/printquoted.h: Include stdio.h. + +2005-06-07 James Youngman + + * COPYING, debian/copyright, depcomp, doc/texinfo.tex, + find/defs.h, find/find.c, find/fstype.c, find/parser.c, + find/pred.c, find/testsuite/config/unix.exp, find/tree.c, + find/util.c, import-gnulib.sh, intl/Makefile.in, + intl/bindtextdom.c, intl/config.charset, intl/dcgettext.c, + intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c, + intl/dngettext.c, intl/explodename.c, intl/finddomain.c, + intl/gettext.c, intl/gettext.h, intl/gettextP.h, + intl/hash-string.h, intl/intl-compat.c, intl/l10nflist.c, + intl/libgettext.h, intl/libgnuintl.h, intl/loadinfo.h, + intl/loadmsgcat.c, intl/localcharset.c, intl/locale.alias, + intl/localealias.c, intl/ngettext.c, intl/plural.c, intl/plural.y, + intl/ref-add.sin, intl/ref-del.sin, intl/textdomain.c, + lib/buildcmd.c, lib/buildcmd.h, lib/extendbuf.c, lib/extendbuf.h, + lib/forcefindlib.c, lib/listfile.c, lib/listfile.h, + lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c, + lib/printquoted.h, lib/qmark.c, lib/savedirinfo.c, + lib/savedirinfo.h, lib/strspn.c, lib/wait.h, lib/waitpid.c, + locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, + locate/locatedb.h, locate/testsuite/config/unix.exp, + locate/updatedb.sh, missing, po/fetch-po-files, + xargs/testsuite/config/unix.exp, xargs/xargs.c: + Updated the FSF's postal address + + * ChangeLog: Corrected Bas's email address. + + * locate/locate.c: Updated copyright years. + +2005-06-07 Bas van Gompel + + * locate/locate.c: Fold case once, only when needed. + +2005-06-07 James Youngman + + * NEWS: Updated with recent changes. + + * mdate-sh: Use the mdate-sh from automake + + * find/parser.c, find/pred.c, find/tree.c, find/util.c, + lib/Makefile.am, lib/forcefindlib.c, lib/listfile.c, + lib/listfile.h, locate/code.c, locate/locate.c, find/defs.h, + find/find.c: Fix Savannah bug #13324: Fix compiler warnings for + GCC-3.4 + + * locate/locate.c: + Fixed Savannah bug #13325: Quoting of output filenames in locate + should match find. + + * find/parser.c: + Fixed Savannah bug #13319: C9X-ism in parser.c (declaration after + statements). + + * find/pred.c, lib/Makefile.am, lib/listfile.c, lib/nextelem.c, + lib/printquoted.c, lib/printquoted.h, lib/qmark.c, NEWS, + doc/find.texi, find/defs.h, find/find.1, find/parser.c: Fixed + Savannah bug #13303, find should filter out non-printable + characters if outputting to tty + +2005-05-30 James Youngman + + * locate/locate.c: rename new_locate() to locate() since + old_locate() has gone the way of the dodo. + +2005-05-29 Bas van Gompel + + Add a ``--print'' (``-p'') option. (to cancel side-effects of -c/-S) + Allow ``--statistics'' in combination with non-options. + * doc/find.texi: Add documentation for locate --print (-p), and the + use of non-options with --statistics. + * locate/locate.1: ditto. + * locate/locate.c: Read each database only once. + +2005-05-23 Paul Eggert + + Adjust to recent gnulib changes. + * import-gnulib.sh: Get config.rpath from gnulib/build-aux, + not gnulib/config. + * find/parser.c (parse_perm): Ignore umask when parsing + symbolic permissions. Adjust to new modechange API. + +2005-05-16 James Youngman + + * find/find.c, find/parser.c, find/pred.c, find/tree.c: + Trivial change: don't use i18n support for debug-only messages + + * ChangeLog: Added ChangeLog entry crediting Dmitry + +2005-05-09 James Youngman + + * find/parser.c: + The previous change fixed Savannah bug #12999. This change doesn't do + anything, it's only intended to be a place to record the Savannah bug + ID we've just fixed. + + * find/parser.c: + Oops. Initialise the variable which indicates which regex syntax to + use. We use POSIX basic regular expressions. + + * find/parser.c: + Suggestion by Ed Avis: point out that "-name foo/bar" will almost + always evaluate to false. Suggest to the user what alternatives they + might find useful. + +2005-05-02 James Youngman + + * AUTHORS: + Added Dimitry (his new test suite contribution required a copyright + assignment). + +2005-05-03 Dmitry V. Levin + + * Added xargs test suite tests by Dmitry V. Levin, together with + bugfixes which ensure that the tests pass. + +2005-04-18 James Youngman + + * Added test suite tests for Bas van Gompel's changes. + +2005-04-18 Bas van Gompel + + * doc/find.texi: Document locate --non-existing (-E). + * locate/locate.1: Ditto. + * locate/locate.c: Implement --non-existing (-E). + +2005-04-04 James Youngman + + * configure.in, import-gnulib.sh: + We no longer need gnulib/m4/Makefile.am + + * po/vi.po: Updated Vietnamese translation + + * locate/updatedb.sh: + Savannah bug #12491: Only use the "-s" option to "su" if it is + supported. + +2005-04-01 James Youngman + + * locate/locate.1, locate/updatedb.1, xargs/xargs.1: Trivial + change from A Costa , fixing typos in manual + pages for xargs, locate and updatedb; fixes Savannah bug #12500, + Debian bug #301934 + +2005-03-22 James Youngman + + * import-gnulib.sh: Include the new gnulib module stat-macros + + * configure.in: + CVS code is (will shortly be) no longer identical to the 4.2.20 release + +2005-03-17 James Youngman + + * configure.in: Preprare for release of 4.2.20. + + * NEWS: Updated prior to release of 4.2.20. + + * ChangeLog: Updated with recent changes. + + * THANKS: Thank Bas van Gompel, but only once. + + * THANKS: Thank Bas van Gompel and Aaron S. Hawley. + + * po/vi.po: Updated Vietnamese PO file + +2005-03-10 James Youngman + + * po/nl.po: Updated Dutch PO file + +2005-03-08 Bas van Gompel + + * import-gnulib.sh: Re-enable creation of gnulib/m4/Makefile.am. + +2005-03-07 James Youngman + + * Released findutils-4.2.19. + + * find/testsuite/find.posix/sizes.exp: + Use 2>/dev/null instead of 2>&1, because Tcl understands the former + but not the latter. + + * find/testsuite/Makefile.am: Also distribute sv-bug-12181.xo. + + * find/testsuite/Makefile.am: Distribute sv-bug-12181. + + * find/testsuite/Makefile.am: Distribute sv-bug-12230. + + * NEWS: Updated with new news. + + * ChangeLog: Brought up to date. + + * lib/buildcmd.c, find/testsuite/find.gnu/sv-bug-12230.exp: Fixed + Savannah bug #12230, in which '-exec echo == {} +' is always run, + even if there were no matched files. + +2005-03-06 James Youngman + + * ChangeLog: Added latest changes. + + * po/pt.po, configure.in: Added Portuguese translation + +2005-03-04 James Youngman + + * configure.in: Modernized the way we call AC_INIT and + AM_INIT_AUTOMAKE + + * locate/locate.c, find/pred.c, find/find.c: + Eliminated some compiler warnings + + * find/pred.c: Clarified the meaning of a comment. + + * find/testsuite/Makefile.am: Added sizes.exp, sizes.xo. + + * find/testsuite/find.posix/sizes.xo, + find/testsuite/find.posix/sizes.exp: Added tests for -size + predicate + +2005-03-03 James Youngman + + * find/find.c: + safely_chdir_lstat(): if we didn't end up in the right place, and then + fchdir() fails, we can't return to the directory we started in. + Therefore, issue a fatal error message and exit. + +2005-03-01 James Youngman + + * find/find.c, find/testsuite/find.posix/sv-bug-12181.exp, + find/testsuite/find.posix/sv-bug-12181.xo: Fixed SourceForge bug + 12181 (find -H symlink-to-dir reports 'Too many Symbolic links') + and bug 12044 (find still hangs on dead NFS filesystems on + Solaris) + +2005-02-28 James Youngman + + * doc/find.texi: Typo: O_NOFOLLOW, not O_FOLLOW + + * import-gnulib.sh: + Suggestion from Martin Buchholz; unset CDPATH to prevent "cd" echoing + the new directory. + +2005-02-27 James Youngman + + * README: Indicate how the reader can verify the release. + +2005-02-26 James Youngman + + * po/sk.po, po/sl.po, po/sr.po, po/sv.po, po/tr.po, po/vi.po, + po/zh_CN.po, po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, + po/eo.po, po/es.po, po/et.po, po/fi.po, po/findutils.pot, + po/fr.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, + po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, + po/pt_BR.po, po/ro.po, po/ru.po: Added new Vietnamese translation + + * configure.in: Added new Vietnamese translation. + +2005-02-25 James Youngman + + * po/ga.po: Updated Irish po file + +2005-02-23 James Youngman + + * Makefile.am: Fix Savannah bug #12064 - 'make distclean' deletes + regex.c but should not. + + * find/testsuite/Makefile.am, + find/testsuite/find.gnu/printf-h.exp, + find/testsuite/find.gnu/printf-h.xo: Added test case for Savannah + bug #12085 (-printf %h). + + * NEWS, doc/find.texi, find/find.1, find/pred.c: + %h now expands to '.' instead of nothing. + +2005-02-22 James Youngman + + * find/find.c: + Fixed Savannah bug #12099 (misinterpretation of system versions + leading to possible incorrect disabling of O_NOFOLLOW). Reported by + Dmitry V. Levin. + + * find/pred.c: + For the %h format, don't bail out early as the format might contain + something else too. + +2005-02-21 James Youngman + + * find/find.c: Fixed accidental C99 dependency. + +2005-02-20 James Youngman + + * po/be.po, po/ca.po, po/da.po, po/de.po, po/el.po, po/eo.po, + po/es.po, po/et.po, po/fi.po, po/findutils.pot, po/fr.po, + po/ga.po, po/gl.po, po/hr.po, po/hu.po, po/id.po, po/it.po, + po/ja.po, po/ko.po, po/lg.po, po/ms.po, po/nl.po, po/pl.po, + po/pt_BR.po, po/ro.po, po/ru.po, po/sk.po, po/sl.po, po/sr.po, + po/sv.po, po/tr.po, po/zh_CN.po: Updated italian translation + + * doc/find.texi: Corrected a typo. + + * find/find.c: + Read the mounted device list afer parsing the command line, so that + for example "find --version" still works (in response to Savannah bug + #12044). + + * configure.in: We've moved on from findutils-4.2.18. + +2005-02-19 James Youngman + + * NEWS: Corrected the summary of the "find -depth" bug. + +2005-02-16 James Youngman + + * NEWS, configure.in: Prepared for release of 4.2.18. + + * ChangeLog: Updated prior to release of 4.2.18. + + * find/testsuite/Makefile.am: + Distribute the test cases for the recent "find -depth" bug. + + * find/testsuite/find.posix/depth1.exp, find/testsuite/find.posix/depth1.xo: + Added test case for find -depth bug reported by Joseph S. Myers + + * find/find.c: + If -depth is in effect, processing of the subdirectories invalidates + the information in 'state'. Therefore once we get around to + processing the predicates, restore the information that we keep in + 'state' and in 'stat_buf'. + +2005-02-15 James Youngman + + * ChangeLog: Updated with recent changes + + * find/find.1: + Emphasise that -L causes find to recurse into subdirectories pointed + to by symbolic links. + + * find/find.1: + Patch to find.1 from Aaron Hawley : + + * Notes about -H actually apply to -L. + * Said paragraph is duplicated two paragraphs later. + * Typos: nno, ibmue, surrpounding + +2005-02-15 Aaron Hawley + + * find/find.1: Notes about -H actually apply to -L. Said + paragraph is duplicated two paragraphs later. Also typos: nno, + ibmue, surrpounding + +2005-02-13 James Youngman + + * find/find.1: Miscellaneous small clarifications and improvements. + + * doc/find.texi: Added Info nodes and menus under "Changing the + Current Working Directory" so that it doesn't generate such a huge + Info page. + + * find/find.c: Parenthesise #if defined(...). + +2005-02-13 Dmitry V. Levin + + * find/find.c: remove test code snippet (time(NULL) was used to + place a marker for spotting with strace(), but was not actually + needed). + + * find/find.c (safely_chdir_nofollow): must not fall back on + safely_chdir_lstat() because that will expose it to race condition + exploits, making it pointless. + + * find/find.c (safely_chdir_lstat): Move + complete_pending_execdirs() up into safely_chdir(), because we + need to do that in either case. + +2005-02-12 James Youngman + + * configure.in, doc/find.texi, find/defs.h, find/find.c, + find/parser.c: Fix for Savannah bug #11879, that + init_mounted_dev_list() causes find to hang on systems which are + clients to dead NFS servers + +2005-02-10 James Youngman + + * doc/find.texi: Talk about the problem where find will not work + if you have a filesystem mounted from an unresponsive NFS server. + +2005-02-09 James Youngman + + * find/find.1: Indicate that $TZ affects from printf-format + results, and add extra cross-references in the SEE ALSO section. + +2005-02-08 James Youngman + + * xargs/testsuite/Makefile.am: Distribute the .xe files also. + + * Makefile.am: Check that we have the right number of .xe files in + the distribution also. + + * ChangeLog, NEWS, configure.in + Preparing to release findutils-4.2.17 + +2005-02-07 James Youngman + + * find/testsuite/config/unix.exp: Re-sort the .xo file using the + calling user's locale, because our 'pre-sorted' .so output file + may not be sorted with the same collating order as 'sort' used to + order the output of "find. Bug spotted by Vin Shelton and Dimitry + V. Levin. + + * find/testsuite/Makefile.am: + New test, find/testsuite/find.gnu/follow-arg-parent-symlink.exp. + + * find/testsuite/find.gnu/follow-arg-parent-symlink.exp, + find/testsuite/find.gnu/follow-arg-parent-symlink.xo, find/find.c: + Fix for starting point /foo/bar/baz where bar is a symlink but baz + is not - we should chdir into bar there even if it is a symbolic + link + +2005-02-07 James Youngman + + * find/testsuite/Makefile.am: + New test, find/testsuite/find.gnu/follow-arg-parent-symlink.exp. + + * find/testsuite/find.gnu/follow-arg-parent-symlink.exp, + find/testsuite/find.gnu/follow-arg-parent-symlink.xo, find/find.c: + Fix for starting point /foo/bar/baz where bar is a symlink but baz + is not - we should chdir into bar there even if it is a symbolic + link + +2005-02-06 James Youngman + + * doc/find.texi: + -size: Clarification - -size gives a result consistent with 'wc -c' + for example. + + * Makefile.am, find/testsuite/Makefile.am, + find/testsuite/find.gnu/execdir-root-only.exp, + find/testsuite/find.gnu/execdir-root-only.xo, + locate/testsuite/Makefile.am, xargs/testsuite/Makefile.am: + dist-hook: Ensure that we distribute all the .po files and all the + testsuite files + + * po/pl.po: Updated Polish translation from TP website + +2005-02-05 Dmitry V. Levin + + * find/parser.c, find/pred.c: Additional tweaks for + -execdir/-okdir actions. + + * find/parser.c (new_insert_exec_ok): Disable ignore_readdir_race + for -execdir/-okdir. + + * find/pred.c (pred_execdir, pred_okdir): Use state.rel_pathname + instead of basename(pathname). Do not add "./" prefix for + absolute pathnames. + + * find/find.c (process_top_path): Treat "/" similarly to ".". + + * xargs/testsuite/xargs.posix/savannah-11865.exp, + xargs/testsuite/xargs.posix/savannah-11865.xo, xargs/xargs.c: + Fixed Savannah bug #11866 (not resetting number of used chars in + the command buffer) - reported by Dimitry V. Levin + +2005-02-05 James Youngman + + * THANKS: + Added thanks for Dimitry - has produced many patches, bugfixes and + suggestions. + + * find/pred.c: + Fixed Savannah bug #11866: typo in pred_okdir() renders it useless + + * find/pred.c: + Savannah bug #11861: undefined symbol 'basename' on IRIX 5.3 + + * NEWS, configure.in, po/be.po, po/ca.po, po/el.po, po/eo.po, + po/fi.po, po/ga.po, po/hr.po, po/hu.po, po/ja.po, po/lg.po, + po/ms.po, po/ro.po, po/sl.po, po/sr.po, po/zh_CN.po: Added new + translations + + * ChangeLog: Updated from CVS prior to release of 4.2.16. + + * po/ChangeLog: Updated from CVS. + + * NEWS, configure.in: Preparing to release 4.2.16 + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, + po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, + po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sl.po, po/sv.po, + po/tr.po: make update-po prior to 'make distcheck' + + * po/fetch-po-files: This is the first version we actually used. + + * find/find.c: process_top_path() fixed compilation warning. + + * find/find.c: process_top_path(): avoid processing this item if + we can't chdir to the basename of the named file. + + * lib/Makefile.am: Always build forcefindlib.c + + * locate/locate.c: Say 'base name' rather than 'basename' in comments + + * find/pred.c, find/find.c: process_top_path(): Proper bugfix for + correct handling of items at depth 0 (i.e. specified on the + command line) - do an extra chdir to ensure that we're in the + directory containing the item before calling process_path(). + Hnece also undo the previous 'quick fix' for the same problem + + * doc/find.texi: + -execdir no longer has to treat anything as special, even at depth 0. + +2005-02-03 James Youngman + + * doc/find.texi, find/pred.c: When state.curdepth is 0, our + working directory is not the directory containing the file we are + processing. + +2005-02-02 James Youngman + + * find/pred.c: + To allow compilation on cygwin, use base_name(), not basename(). + + +2005-02-01 James Youngman + + * ChangeLog: Updated from CVS log. + +2005-01-31 James Youngman + + * find/find.c, lib/nextelem.c, lib/nextelem.h, locate/code.c, + locate/frcode.c, locate/testsuite/config/unix.exp, + xargs/testsuite/config/unix.exp, xargs/xargs.c: Updated/corrected + the email address for David MacKenzie, one of the original authors + of findutils + + * doc/Makefile.am: The HTML version of the manual generated for + the GNU project website has each node in a separate file, not each + chapter in a separate file; adjust filenames accordingly + + * find/parser.c, find/pred.c, lib/savedirinfo.c: + Removed some unused variables (patch from Dmitry V. Levin) + + * find/find.c: + Patch from Dmitry V. Levin : Add subfs to the list + of filesystems which are likely to be automounted. + + * m4/findlib.m4: Corrected typo (pointed out by Dmitry V. Levin). + + * find/testsuite/config/unix.exp, + find/testsuite/find.gnu/name-period.xo, + find/testsuite/find.gnu/posix-dflt.xo, + find/testsuite/find.gnu/posix-h.xo, + find/testsuite/find.gnu/posix-l.xo, + find/testsuite/find.gnu/printf.exp, + find/testsuite/find.gnu/printf.xo: Systems differ in the order in + which filenames are returned by readdir. Hence sort the output of + 'find' before comparing against the expected-output file. We + therefore also have the lines in the .xo files ready-sorted. + +2005-01-30 James Youngman + + * doc/Makefile.am: + Added rules for extra targets that we buld to update the web site. + +2005-01-29 James Youngman + + * configure.in: No longer version 4.2.15 - we've changed the manual. + + * doc/find.texi: + Clarified the txt about adding extra tests with post-processing via + xargs, and recommend -execdir instead for security reasons. + + * doc/find.texi: Patch from Karl Berry: + - more entries for the dir file + - use @copying so the copyright ends up in the HTML etc. output. + (This is the only really important change.) + - put @contents after the title page, for conventional toc location. + - use @ifnottex to wrap the Top node instead of @ifinfo, for the sake of + HTML output, etc. + + * NEWS, configure.in, po/da.po, po/de.po, po/es.po, po/et.po, + po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, + po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, + po/sv.po, po/tr.po: Prepared to release findutils-4.2.15 + + * ChangeLog: Updated from CVS log. + +2005-01-28 James Youngman + + * configure.in: + Make --enable-d_type-optimization and --enable-d_type-optimisation + both work. + + * configure.in: Assume --enable-d_type-optimisation by default + + * find/parser.c: Indicate which features are enabled/disabled + + * locate/testsuite/config/unix.exp: + Clean up the files left behind by the locate_textonly test + +2005-01-27 James Youngman + + * doc/find.texi: Documented --regex. + + * NEWS, locate/locate.1, locate/locate.c, locate/testsuite/Makefile.am, locate/testsuite/config/unix.exp, locate/testsuite/locate.gnu/regex1.exp: + Implemented locate --regex - but needs documenting in Texinfo manual. + +2005-01-25 James Youngman + + * configure.in: Bumped version no. + + * doc/find.texi: + Document --mmap and --stdio as being synonyms of -m and -s. + + * locate/locate.1: + Document --mmap and --stdio as synonyms of -m and -s. + + * locate/locate.c: + Document -m and -s (both no-ops) in the usage message. + + * doc/find.texi, locate/locate.1: Document -m and -s as no-ops. + + * ChangeLog: Updated for release of findutils-4.2.14. + + * NEWS, configure.in, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + Preparing to release findutils-4.2.14 + +2005-01-25 James Youngman + + * NEWS, configure.in, po/da.po, po/de.po, po/es.po, po/et.po, + po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, + po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, + po/sv.po, po/tr.po: Preparing to release findutils-4.2.14 + +2005-01-24 James Youngman + + * Makefile.am: Work around the fact that automake-1.7 actually + works, and correctly distributes regex.c; hence dist-hook should + only copy gnulib/lib/regex.c if this has not already been done. + + * find/defs.h, find/find.c, find/pred.c, + find/testsuite/Makefile.am, + find/testsuite/find.gnu/printf-symlink.exp, + find/testsuite/find.gnu/printf-symlink.xo, + find/testsuite/find.gnu/xtype-symlink.exp, + find/testsuite/find.gnu/xtype-symlink.xo: Fixes for -xtype and + -printf %Y, which had been the wrong way around. + + * NEWS: Avoid including the find.gnu subdirectory in the + distributed file more than once + + * locate/locate.c: + Move the printing of the statistics into a new function, print_stats() + + * find/testsuite/Makefile.am: Avoid including the find.gnu + subdirectory in the distributed file more than once + + * import-gnulib.sh: + We need the regex module anyway, to allow compilation on Solaris + +2005-01-23 James Youngman + + * configure.in: + Invoke gl_INCLUDED_REGEX directly to ensure successful compilation on + systems like Solaris, which lacks those functions in libc (fixes GNU + Savannah bug #11710). + + * locate/locate.1: -S is a synonym for --statistics + + * doc/find.texi: Documented the new -H, -L and -P options. + + * locate/locate.1, locate/locate.c: Implement options -L + (default), -H and -P, which mean the same things as for find, + except for the fact that the default is -L rather than -P + + * find/find.1: Corrected definition of the exit status for -quit. + + * find/find.c, find/pred.c: If DEBUG_STAT is set, issue a debug + message when we call chdir() so that we can figure out what is + actually being stat()ed + + * locate/updatedb.sh: + Removed spurious newline from help message (bug report from Karl + Berry). + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, + po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, + po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, + Makefile.am, NEWS, configure.in, find/defs.h, find/find.c, + find/parser.c, find/pred.c, find/tree.c, find/util.c, + import-gnulib.sh, lib/savedirinfo.c: Merged the d_type + optimisation code; this is disabled by default, and can be enabled + with 'configure --enable-d_type-optimisation' + + * NEWS: + Updated optimisation NEWS item to indicate the effect on runtime. + +2005-01-22 James Youngman + + * NEWS, configure.in: Prepare for release of findutils-4.2.12 + + * ChangeLog: Brought up to date with recent changes. + + * Makefile.am, import-gnulib.sh, po/Makefile.in.in, po/Makevars, + po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, + po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, + po/pl.po, po/pt_BR.po, po/remove-potcdate.sin, po/ru.po, po/sk.po, + po/sv.po, po/tr.po: Switch to using the gnulib gettext module, to + ensure that 'make distcheck' works with current xgettext, + autoconf, etc. + + * find/testsuite/config/unix.exp: + Oops, we do need to clean up after all. + +2005-01-21 James Youngman + + * xargs/testsuite/Makefile.am: Added name of missing input file. + + * find/testsuite/Makefile.am: + Distribute a few files that we had forgotten about + + * xargs/testsuite/Makefile.am: Added some missing files. + + * lib/Makefile.am: Also need buildcmd.h. + + * xargs/testsuite/Makefile.am: Fixed a typo. + + * NEWS: Indicate the d_type performance improvement + +2005-01-18 James Youngman + + * lib/savedirinfo.h: Added on d_type_optimisation also + + * lib/savedirinfo.c: Added on branch d_type_optimisation also. + + * find/pred.c: Added assert that we actually know the file type by + the time pred_type() is called + + * find/find.c: Always initialise state.have_stat = false when + starting to work with a new file + +2005-01-17 James Youngman + + * ChangeLog: Brought up to date with recent changes. + + * NEWS: Documented the changes so far. + + * find/testsuite/find.gnu/exec-many-rtn-success.xo: + Expected output for exec-many-rtn-success.exp + + * find/find.1: + Indicate that -quit still ensures that pending commands are invoked + + * doc/find.texi: + Indicate that -quit still causes partial command lines to be invoked, + but there are some types of fatal error which leave such commands + uninvoked. + + * find/defs.h, find/find.c, find/pred.c, find/testsuite/Makefile.am, find/testsuite/config/unix.exp: + Fixed savannah bug #11625 Wrong return status for -exec ... \; when command fails; also execute any pending commands when doing -quit + + * find/testsuite/find.gnu/exec-many-rtn-failure.exp, find/testsuite/find.gnu/exec-many-rtn-failure.xo, find/testsuite/find.gnu/exec-many-rtn-success.exp, find/testsuite/find.gnu/exec-one-rtn-fail.exp, find/testsuite/find.gnu/exec-one-rtn-fail.xo, find/testsuite/find.gnu/exec-one-rtn-success.exp, find/testsuite/find.gnu/exec-one-rtn-success.xo: + Various test cases for succeeding and failing forms of -exec \; and -exec {} + + + * find/pred.c: "-exec ... {} +" always returns "true". + + * configure.in, find/defs.h, find/find.c, find/parser.c, find/pred.c, find/tree.c, find/util.c: + Implemented d_type optimisation but not working correctly, so currently disabled + + * lib/savedirinfo.h, lib/savedirinfo.c: + Initial implementation (temporarily disabled). + + * lib/Makefile.am: Resolved merge conflict. + + * lib/Makefile.am: + Make sure nextelem.h is included in the list of sources. + + * find/parser.c, lib/nextelem.c, lib/nextelem.h, locate/locate.c: + Use prototypes for next_element() to make sure it is called correctly. + +2005-01-16 James Youngman + + * find/find.c, find/pred.c: + When completing incomplete multiple execs, use 'eval_tree' not 'predicates' + + * lib/buildcmd.c: + Oops, initialise state->cmd_initial_argv_chars to zero. + + * find/find.1: + Document the way that -execdir and -okdir will refuse to wqork if ">" + is on $PATH. Also document -okdir in the manpage. + + * find/parser.c: + -execdir and -okdir are insecure if $PATH includes the current + directory, and so they refuse to work if the user has done that. + + * find/pred.c: + Oops; for -exec ... {} +, pass arguments to bc_push_arg() in the right + order. Problem spotted by Geoff Clare. + + * TODO: Removed items which have now been done. + + * lib/buildcmd.c: Tidied up formatting of arg list for bc_do_insert + +2005-01-15 James Youngman + + * find/testsuite/find.gnu/printf.exp, find/testsuite/find.gnu/printf.xo: + Added extra tests for more printf formats; patch by Andreas Metzler + + * locate/locate.c: + Ensure that the new long options have a relevang short option too. + Also bring usage message into line with the options actually + supported. Thanks to Bas van Gompel for noticing this defect. + + * locate/locate.1: + Escape "-" in SYNOPSIS. Thanks to Bas van Gompel for noticing this + defect. + + * ChangeLog: Fixed typos. + + * doc/find.texi: + Documented -execdir, and the "+" variants of -exec and -execdir. + + * find/find.1: Documented -execdir. + + * xargs/xargs.c: + Updated to bring into line with bc_*() interface changes + + * ChangeLog: Updated with recent changes. + + * find/defs.h, find/parser.c, find/pred.c, lib/buildcmd.c, lib/buildcmd.h: + Implemented -execdir and -okdir + + * find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, lib/buildcmd.c, lib/buildcmd.h, xargs/xargs.c: + First working version of -exec ...+ + +2005-01-09 James Youngman + + * find/defs.h, find/find.c, find/parser.c, find/pred.c, lib/buildcmd.c, lib/buildcmd.h, xargs/xargs.c: + Initial implementation of -exec ..{} +, but currently disabled since not yet working + +2005-01-08 James Youngman + + * find/find.c: Fixed typo in comment. + + * find/defs.h, find/find.c, find/parser.c, find/pred.c: + We now understand but do not implement -execdir (a *BSD invention, and a very useful security enhancement) and -okdir (the obvious companion to it) + + * locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, xargs/xargs.c: + The GNU coding standard requires a space between the function name and + its parenthesised argument list. + + * find/defs.h: + Understand the -exec ... {} \+ construction (for multiple + replacement). No support yet. + + * locate/locate.1: + Indicate that empty elements in the dbpath are treated as synonyms for + the default database. + + * locate/locate.c: + Support empty elements in the dbpath as synonyms for the default + database. These colons can be leading, trailing or in the middle of + the string. We no longer com,plain if the user does this. + + * lib/nextelem.c: + If curdir_ok is 0 and an element is empty, return "" instead of NULL + so that the caller knows to keep calling us. + + * find/find.c, find/pred.c, import-gnulib.sh, locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, xargs/xargs.c: + Savannah bug 11517: find, xargs, locate, etc. should not hide write failures; patch from Jim Meyering + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + changed .pot creation date + + * THANKS, AUTHORS: Take into account the FSF copyright-assignments list + + * doc/find.texi: + If -quit is used, the exit value can be nonzero if errors have occurred. + + * find/find.1: + Removed incorrect comment about -H, -P and -follow in HISTORY. + +2005-01-07 James Youngman + + * lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h, xargs/xargs.c: + Refactored xargs to use an external library function from the new file buildcmd.c + + * configure.in: no longer the same as the released 4.2.11 version + +2005-01-06 James Youngman + + * xargs/testsuite/inputs/lines.xi, xargs/testsuite/xargs.posix/l2.exp, xargs/testsuite/Makefile.am: + Tests for the -L option + + * xargs/testsuite/config/unix.exp: When a test fails, show the diffs + + * xargs/testsuite/xargs.posix/l2.exp, xargs/testsuite/xargs.posix/l2.xo: + tests for the -l option + + * xargs/testsuite/Makefile.am: Added extra test files + + * xargs/testsuite/xargs.sysv/trace.exp, xargs/testsuite/xargs.sysv/trace.xe, xargs/testsuite/xargs.sysv/trace.xo: + Added tests for the -t option + + * xargs/testsuite/config/unix.exp, xargs/testsuite/inputs/foobar.xi, xargs/testsuite/xargs.gnu/r.exp, xargs/testsuite/xargs.gnu/r.xo, xargs/xargs.1: + Use a blanks-only input file for cases where there is supposed to be no output + + * xargs/testsuite/inputs/blank.xi: Initial version. + + * xargs/xargs.1: + Corrected a typo; also indicate that it's impossible to use xargs + securely due to the race condition. + +2005-01-05 James Youngman + + * find/parser.c: + Fixed Savannah bug 11495: fallthrough from -printf format processing + from 'n' case to 'd' case. + +2005-01-03 James Youngman + + * doc/find.texi: + Oops. Had duplicated an entire section. Fortunately this was after + @bye, so there was no adverse effect. + + * NEWS: locate -b. + + * doc/find.texi, locate/locate.1: document locate -S + + * configure.in, doc/find.texi, locate/locate.1, locate/locate.c: + Support locate -b as a synonym for locate --basename + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + distcheck + + * find/testsuite/config/unix.exp: + Clean up (delete) find.out at at the end of the test. + + * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/parser.c, find/pred.c: + Implemented the -samefile test for find + +2005-01-02 James Youngman + + * ChangeLog: Updated with recent changes. + + * NEWS: + Bas van Gompel: two-line patch to locate.c to make locate's -i and -w + options work if -e is in use. + + * THANKS: Added Bas van Gompel. + + * locate/locate.c: + Bas van Gompel: (visit_exists) when testing for the existence of the + file, check the real filename [printname], not the case-converted + filename [testname]. Really these argument names are badly chosen. + + * find/find.1, doc/find.texi: + Improved the documentation for -perm, with plenty of examples, + following a comment by Dan Jacobson that the comment "Symbolic modes + use mode 0 as a point of departure" is baffling and unhelpful. + + * locate/locate.c: + Suggestion and patch from Bas van Gompel: (new_locate): Fix display of + negative compression ratios. + +2004-12-31 James Youngman + + * NEWS: Brought up to date with recent changes + + * doc/find.texi: + Don't need to nest the "race conditions with..." sections so deeply. + + * doc/find.texi: Corrected some spelling errors. + + * doc/find.texi: Added new "Security Considerations" chapter. + +2004-12-23 James Youngman + + * locate/locate.c: + Applied bugfixes from Bas van Gompel . + (lc_strcpy): Zero-terminate result. + (add_visitor): Update lastinspector. + (visit_substring_match_casefold): fix off-by-one error. + (new_locate): Move visit_exists down to improve performance. + (new_locate): Don't fold case when getting stats. + +2004-12-19 James Youngman + + * doc/find.texi: + Indicate that "cd /; find tmp -wholename /tmp" will never match anything. + + * doc/find.texi: Documented locate --statistics. + + * locate/locate.1: Documented the --statistics option. + + * locate/locate.c: Added support for the -S option. + +2004-12-12 James Youngman + + * NEWS: Added a summary of the changes so far. + + * find/tree.c: Made some of the error messages more self-explanatory + + * find/pred.c: Print pointers with %p, not %x. + + * find/find.c: Moved option data into struct options. + + * find/find.1: clarifications + + * find/testsuite/find.gnu/comma.exp: + Limit the amount of searching with maxdepth. + + * doc/find.texi: clearer description of how -prune works + + * ChangeLog: Removed duplicate entry. + + * configure.in, find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/tree.c, find/util.c: + Separated ariables representing current state from variable representing option information + +2004-12-11 James Youngman + + * find/parser.c: Readability improvement to the usage message. + + * find/find.c: Oops. Fixed unmatched #endif. + + * find/testsuite/find.gnu/printf.exp, find/testsuite/find.gnu/printf.xo, THANKS, configure.in, find/testsuite/Makefile.am, find/testsuite/config/unix.exp: + Fixed Savannah bug #11280 + + * find/find.c: + Remember to set path_length and curdepth in process_top_path(). + +2004-12-07 James Youngman + + * find/fstype.c: Use xstat() not stat() to examine things. + + * find/find.c: Explain why #ifdef EOVERFLOW. + + * find/find.c: EOVERFLOW is not defined on UNICOS. + + * NEWS: Corrected typo. + +2004-12-06 James Youngman + + * ChangeLog: Brought up to date. + + * NEWS, configure.in: releasing 4.2.10 + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + distcheck + + * ChangeLog: Updated prior to release of finsutils-4.2.10. + + * import-gnulib.sh, find/fstype.c: + Use gnulib's mountlist module instead of grokking it ourselves. + + * configure.in: + Removed all the out-of-date cruft for grokking getmntent(). + + * xargs/xargs.c: + Added the -I and -L options; also -E takes an argument which is not optional. + +2004-12-05 James Youngman + + * README, configure.in, find/defs.h, find/find.c, find/parser.c, find/pred.c, find/tree.c: + Allow debug output to be turned on or off by saying --enable-debug on the configure command line + + * README: + Removed disparaging (it is now, it probably wasn't then) comment about + the production-readiness of Automake. + + * README: Qualify remarks about POSIX compliance. + + * NEWS, configure.in: Preparation for release 4.2.9 + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + distcheck + + * ChangeLog: Brought up to date. + + * find/find.c: + Avoid duplicate error message when we cannot chdir() into a subdirectory. + + * THANKS: Added recent thankees. + + * NEWS: + Brought up to date with respect to the current set of fixed bugs. + + * NEWS, xargs/xargs.1, xargs/xargs.c: + Implemented POSIX options -L, -I and -E + +2004-12-03 James Youngman + + * find/parser.c: + -xdev is an option, not a test. Fixes Savannah bug 11192. + + * find/find.1, xargs/xargs.1: + Escape dashes with a backslash (for fix Savannah bug 11189). + +2004-11-27 James Youngman + + * find/find.c: + More use of safely_chdir(). Also bugfix: -L should imply -noleaf. Be more careful about when xstat should fall back on lstat() when stat() fails. + + * find/find.1: "necessary" only has one "C". + + * find/find.1: + If stat() fails with ELOOP, we issue a diagnostic message. + +2004-11-26 James Youngman + + * find/find.c: Removed some unused code. + + * Makefile.am: Don't do anything in the 'intl' subdirectory + + * find/find.c: + Enhanced safely_chdir() to the point where the test suite passes, and report infinite loops in the directory hierarchy + + * find/defs.h: + belt and braces; ensure that SYMLINK_NEVER_DEREF has value zero + + * find/find.1: + Describe our strategy for detecting and reporting infinite loops + +2004-11-24 James Youngman + + * doc/find.texi: + Updated the discussion of th error messages for findutils-4.2.8. + + * configure.in: Next version will be 4.2.9... + + * find/find.c: + Don't issue a warning if we notice the mounting of a filesystem that's + likely just to be an automounter. + + * doc/find.texi, find/find.1: + Explain how rounding is performed for -atime and friends. + + * xargs/xargs.c: + Once we collect enough arguments (for the value specified by the -n + option) to do an exec(), do it immediaely instead of waiting for the + next one to arrive. This fixes Savannah bug #7340. + + * ChangeLog, configure.in, NEWS: Prepare to release 4.2.8. + + * NEWS: Updates for 4.2.8. + + * configure.in: check for sys/types.h + + * find/find.c: + If wd_sanity_check() discovers that the mount table has changed, remember the updated device number and inode so that we also consider these to be valid on the way back up. + + * find/defs.h: + Declarations of xmalloc() and friends belong in xalloc.h, not in defs.h + + * find/parser.c: avoid signed/unsigned warning, and #include xalloc.h + + * find/fstype.c: + Changed to alloc get_mounted_devices() to compile on Solaris + + * README-CVS: + Automake requires GNU m4, so point out that the reader needs that. + + * find/defs.h, find/find.c, find/fstype.c: + When wd_sanity_check() fails, enumerate the mounted devices, rather than the mounted filesystem names + + * NEWS: prepare for 4.2.8 + + * configure.in: + Look for some Solaris headers which are used by get_mounted_devices() + + * lib/Makefile.am: don't build savedirtypes yet + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + updated po files + + * m4/nullsort.m4: + Avoid suprious output of the test data when the tests fail. + +2004-11-21 James Youngman + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + Messages changed again + + * ChangeLog, configure.in: Preparing to release 4.2.7. + + * NEWS: Updated for release of 4.2.7. + + * import-gnulib.sh: Also need canonicalize module. + + * find/find.c: + When checking to see if a filesystem has changed state, use an + absolute pathname. + + * configure.in: + No need to pause to allow James to view his handiwork, it (allegedly) + works now. + + * configure.in: + Oops. Check for setlocale() to re-enable the i18n support which was + accidentally disabled in 4.2.5. + + * find/find.c: + Check to see if the new directory is a transitioned mount point by + using its ABSOLUTE name, if we can figure it out. + + * doc/find.texi: + Added guidance on some of the error messages. Not the most common + ones, but the ones where the user might most benefit from some handy + hints or an explanation of what is going on. + + * find/pred.c: + Actually emit an error message if we fail to stat a symlink (for + reasons other than nonexistence of the link and infinite loop). + + * doc/texinfo.tex: Updated texinfo.tex + + * NEWS, configure.in, find/find.c, find/fstype.c: + Enable the 'Warning: filesystem XXX has recently been mounted' check on Solaris, which prevents it exiting fatally when traversing an automount mount point + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + messages changed again + + * NEWS: Implemented xargs --arg-file. + + * doc/find.texi, xargs/xargs.1, xargs/xargs.c, NEWS: + Implemented xargs --arg-file + + * find/find.c: + Where a filesystem was recently (un)mounted, try togive its full name + + * configure.in: + Try to avoid requesting -lsun if we don't seem to need it (e.g. on + UNICOS where it is not present and trying to link against it produces + a warning). + + * find/defs.h, lib/modetype.h: Guard against multiple inclusion + + * find/fstype.c: + We now need even if we are not using getmntent() to figure + out the type of a filesystem, because wd_sanity_check() needs to + enumerate the system mount points. + + * configure.in: Next release will be 4.2.7. + + * find/fstype.c: + get_mounted_filesystems() should use getmntent() if that function is + present, rather than just if configure didn't find anything better for + filesystem_type_uncached() to use than that. + + * find/parser.c: + If -delete is the only action on a file, don't assume the default + -print action too. + + * ChangeLog, configure.in, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + Preparation to release findutils-4.2.6. + + * find/Makefile.am, xargs/Makefile.am: + Enable checking of support for --version and --help + + * locate/Makefile.am: + Con't check command-line options for frcode, code or bigram + + * locate/code.c: Support --version and --help. + + * ChangeLog: *** empty log message *** + + * find/defs.h, find/find.c, find/fstype.c, lib/Makefile.am, lib/extendbuf.c, lib/extendbuf.h, NEWS: + Avoid fatal error if automount mounts a filesystem on a directory because we chdir()ed into it + + * configure.in: Next release will be 4.2.6. + + * find/find.1: + Indicate that the '-' flag does work for most fields. Also provide + an example of using the comma operator to traverse the filesystem just + once but search for more than one thing. + + * doc/find.texi: Indicate that the '-' flag does work for most fields. + +2004-11-19 James Youngman + + * configure.in: releaseing findutils-4.2.5 + + * find/testsuite/Makefile.am, locate/testsuite/Makefile.am, xargs/testsuite/Makefile.am: + If a directory has no Makefile.am, omit it from the parent's DIST_SUBDIRS - automake-1.9 requires this + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + updated by make distcheck + + * ChangeLog, NEWS: Updated for release 4.2.5. + + * find/find.1, doc/find.texi: + Tell the reader that format flags may not work as they expect. + + * configure.in: + Use the correct name for the macro gl_AC_TYPE_LONG_LONG (not + jm_AC_TYPE_LONG_LONG). + +2004-11-15 James Youngman + + * import-gnulib.sh: + Avoid test -e because not all systems are POSIX-compliant (bug + #11005). Also don't need regex module any more if we're not building + in intl. + + * Makefile.am, configure.in: + These days gnulib likes to include 'libintl.h' which our very old intl/ directory lacks. For the moment, disable use of the internal intl/ directory + + * doc/find.texi: + Use @ref not @xref for a reference at the beginning of a sentence. + + * intl/Makefile.in: + Make sure gnulib.lib is on the #include path (Savannah bug #11002) + + * locate/locate.c: + Use base_name instead of basename - fixes Savannah bug 11003. + + * configure.in, find/defs.h, find/find.c, find/parser.c, find/pred.c, locate/bigram.c, locate/locate.c: + Don't need banner to emphasise the location of the call to jy_SORTZ + +2004-11-12 James Youngman + + * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/parser.c, find/pred.c, find/testsuite/find.gnu/posix-dflt.exp, find/testsuite/find.gnu/posix-dflt.xo, find/testsuite/find.gnu/posix-h.exp, find/testsuite/find.gnu/posix-h.xo, find/testsuite/find.gnu/posix-l.exp, find/testsuite/find.gnu/posix-l.xo, find/util.c: + Implemented BSD option -P and also the correct default behaviour of find with respect to symlinks if neither -L nor -H is specified [i.e. same as -P] + +2004-11-11 James Youngman + + * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/parser.c: + Implemented -H and -L options. + + * find/util.c: Added in the -H and -L options on the usage message. + +2004-11-10 James Youngman + + * doc/find.texi, find/find.1, find/parser.c, find/pred.c: + Implemented %M and %A+ format specifiers + + * doc/find.texi, find/find.1, find/parser.c, find/pred.c: + Documented the fact that only %d and %m format specifiers honour the various formatting flags + + * xargs/xargs.c: + Get the right number of bytes in a Kilobyte (hint: it's not 1048; that + was a typo, honest :) + + * po/pl.po: Applied Polish translations + +2004-11-08 James Youngman + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po: + distcheck changed the po files again + + * locate/Makefile.am: + Make install-data-hook honour the setting of DESTDIR so that "make + DESTDIR=/tmp/foo install" works and puts localstater in the right + place. + + * configure.in: We're now working on findutils-4.2.5. + + * doc/find.texi, xargs/xargs.1: + Point out that xargs -i only splits input items at newlines + + * ChangeLog: Indicate that we released 4.2.4. + + * ChangeLog: Updated for release 4.2.4 + + * NEWS, configure.in: Prepare for release of 4.2.4. + + * NEWS: Brought up to date with latest changes. + + * NEWS, doc/find.texi, find/defs.h, find/find.1, find/find.c, find/parser.c, po/da.po, po/de.po, po/es.po, po/findutils.pot, po/gl.po, po/id.po, po/ko.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po: + Turn warning messages off by default if stdin is not a tty; allow these to be controlled explicitly by options -warn and -nowarn + + * po/et.po, po/it.po: Updated translation files + + * po/sk.po: New translation file + + * po/fr.po, po/nl.po, po/tr.po: Updated translation files + + * configure.in: Added Slovak (sk) language. + + * xargs/xargs.c: + Enforcing a lower limit on the value specified by -s makes the test + suite fail. Removed that lower limit. + + * locate/Makefile.am: Oops, multilocate doesn't exist yet. + + * NEWS: *** empty log message *** + + * doc/find.texi, locate/updatedb.1, locate/updatedb.sh: + Added option --findoptions to updatedb + + * locate/Makefile.am, locate/locatedb.5, locate/updatedb.1, xargs/xargs.1: + Fixed section numbers in manpage titles and cross-references + + * NEWS, doc/find.texi, xargs/xargs.1, xargs/xargs.c: + Increased the default argument length and improved POSIX compliance of the handling of out-of-range values for the -s option + +2004-11-07 James Youngman + + * m4/Makefile.am: + Added in the extra files we need to distribute, nullsort.m4 + order-bad.bin order-good.bin + + * doc/find.texi: Documented locate's --limit option + + * locate/locate.1, locate/locate.c: + Implmented --limit and corrected the implementation of the -i option. + +2004-11-06 James Youngman + + * NEWS, doc/find.texi, locate/locate.1: + Documented --wholename and --basename and updated the NEWS file + + * README-CVS: + Give the autogen commands in a form that you can usefully cut and paste into a shell + + * NEWS: Options --null and --count) for locate + + * lib/nextelem.c: + Don't return '.' for an empty path element, because the path we are splitting may not be intended to contain directories + + * configure.in: we're working on findutils-4.2.4 now + + * locate/Makefile.am: Substitute @SORT_SUPPORTS_Z@ + + * doc/find.texi: + Documented new locate option --null and newline handling + + * locate/locate.1, locate/locate.c: + New locate options --null, --wholename, --basename, --count + + * locate/frcode.c, locate/updatedb.1, locate/updatedb.sh: + correctly handle newlines in the file names + + * configure.in: Determine if sort -z works + + * m4/nullsort.m4, m4/order-bad.bin, m4/order-good.bin: + jy_SORTZ: a macro to determine if the system has a sort command with a working -z option + +2004-11-01 James Youngman + + * NEWS: Fixed "find -printf '%H\n'". + + * find/find.c: + Avoid segfault if -printf %H is used where the matched file was the default, unspecified starting point, the current directory + +2004-10-31 James Youngman + + * find/find.1, find/parser.c: NetBSD also supports -d. + + * find/find.1, doc/find.texi: + Documented the behaviour of -daystart and -follow in more detail + + * find/parser.c: Corrected the usage message. + + * find/parser.c: + When deciding whether to issue a warning about options following + non-options, ignore any options whose position affects the tests + (i.e. -daystart and -follow). + + * find/parser.c: -daystart is a positional option like -follow. + + * find/parser.c: + Issue a warning message if an option is specified after a test or an + action (because the user might have believed that the behaviour of the + option is in some way conditional on the preceding tests). + + * locate/updatedb.sh: + Oops; removed some test code that I shouldn't have checked in. + + * locate/updatedb.sh: + Indicate that the old locate database format will shortly be unsupported. + + * doc/find.texi: + Use @direntry instead of hard-coding START-INFO-DIR-ENTRY inside @ifinfo. + + * locate/updatedb.1: Updated default location of locatedb file. + + * README-alpha: + Updated to give correct FTP location and to not talk about "test" + versions of automake, which are no longer required. + + * locate/updatedb.sh: + Incorporated the default list of filesystems to avoid from the Debian + package. Also added /afs and /sfs to the default pruned paths. + + * configure.in: Released findutils 4.2.3 + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po: + did make distcheck, which updates these files + + * find/defs.h, find/fstype.c: + Use const qualifier in arguments to filesystem_type() to allow callers with const variables to use them + + * ChangeLog: Updated. + + * NEWS: Added new news. + + * find/find.c: + Extra diagnositcs for the case where we have the error "%s changed + during execution of %s" - that is when we chdir back to the parent + directory only to find that it has changed. + +2004-10-30 James Youngman + + * .cvsignore, NEWS, doc/find.texi, find/defs.h, find/find.1, find/parser.c, find/pred.c: + Implemented the -quit action + + * NEWS, doc/find.texi, find/find.1, find/parser.c, find/pred.c: + Refactored time handling routines in preparation for support of absolute timestamp comparison predicates + + * locate/locate.c: + Applied Savannah patch #2952 ("getline off-by-one bugfix"). + + * NEWS, doc/find.texi, find/defs.h, find/find.1, find/parser.c, find/pred.c: + Added -delete action (Savannah patch #3454 with additions) + + * locate/locate.c: + Applied Savannah patch #2692 (allowing get_short to process negative integers). + + * find/find.c: + If we are iossuing an error message because $FIND_BLOCK_SIZE is set, + ignore the setting of errno. + + * find/parser.c: More fixes for pedantic compiler warnings + + * NEWS, find/parser.c, find/tree.c: Eliminated some compiler warnings + + * find/find.c, find/parser.c, find/pred.c: + Various fixes for compiler warninga sbout unreachable code or unused function arguments + + * intl/plural.y: Silence compiler warning about unused argument. + + * locate/testsuite/Makefile.am: + Subdirectory "inputs" does not exist, so remove it from DIST_SUBDIRS. + + * locate/locate.c: + Corrected the explanation of why we have to use no parentheses around + the String argument to the N_ macro in its expansion. + + * configure.in: Nextr release is 4.2.3. + + * configure.in: IOndicate this is no longer the pristine release. + + * NEWS: + Oops, comments for release 4.2.0 should have said 20480 bytes, not 2480. + + * lib/listfile.c: + The -ls predicate should not truncate usernames. Fixes Savannah bug #10800. + + * find/fstype.c, locate/locate.c: + Fixes for Savannah bug #3727 (Intel icc compilation errors). + +2004-10-25 James Youngman + + * doc/find.texi, find/find.1, find/parser.c, find/pred.c: + Support -printf %D, which prints the device number of the containing filesystem + + * locate/updatedb.sh: + Avoid confusion between James Woods and James Youngman, by using the + disambiguating surname. + + * find/parser.c: Use RE_ICASE instead of re->translate. + + * configure.in, find/parser.c, find/pred.c, xargs/xargs.c: + No need to #define _GNU_SOURCE if we use gl_INIT. + +2004-10-24 James Youngman + + * ChangeLog: Prepared to release findutils-4.2.2. + + * ChangeLog, NEWS, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po: + Updates prior to release of 4.2.2 + + * NEWS: Updated with news for findutils-4.2.2. + + * find/testsuite/config/unix.exp, lib/forcefindlib.c, lib/listfile.c, lib/modetype.h, lib/nextelem.c, locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, locate/locatedb.h, locate/testsuite/config/unix.exp, locate/updatedb.sh, xargs/testsuite/config/unix.exp, xargs/xargs.c, NEWS, find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/tree.c, find/util.c, import-gnulib.sh: + Corrected typo in the address of the FSF office + + * lib/strspn.c: Updated FSF address. + + * m4/.cvsignore: 'cvs status' should ignore Makefile.in + + * m4/Makefile.am, Makefile.am, NEWS, README-CVS, configure.in, doc/texinfo.tex, find/defs.h, find/fstype.c, find/parser.c, find/pred.c, import-gnulib.sh, intl/bindtextdom.c, intl/dcgettext.c, intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c, intl/dngettext.c, intl/explodename.c, intl/finddomain.c, intl/gettext.c, intl/intl-compat.c, intl/l10nflist.c, intl/loadmsgcat.c, intl/localcharset.c, intl/localealias.c, intl/ngettext.c, intl/plural.y, intl/textdomain.c, lib/Makefile.am, lib/forcefindlib.c, lib/listfile.c, lib/nextelem.c, lib/strspn.c, lib/waitpid.c, locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, m4/findlib.m4, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po, xargs/xargs.c: + Use gnulib-tool --import to import the gnulib code, rather than the odd way we were doing it before + + * find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/tree.c, find/util.c, locate/code.c, locate/locate.c, xargs/xargs.c: + Work round an apparent compiler bug in HP-UX 11.23 for + ia64 + + * locate/locate.c: + Work around what appears to be a C compiler bug in HP-UX 11.23 for + ia64. + + * INSTALL, depcomp, install-sh, missing, mkinstalldirs: + Updated from automake + + * locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, xargs/xargs.c, find/find.c: + Avoid use of exit() within main, to silence warnings about unreachable code + +2004-10-22 James Youngman + + * doc/find.texi: Syntax corrections. + + * doc/find.texi: Indicate that "-exec {}+" is not yet supported. + + * find/find.1: Indicate that "{}+" is not yet supported. + + * find/testsuite/find.gnu/name-period.xo, find/testsuite/find.gnu/name-period.exp, find/find.1, doc/find.texi: + The -name predicate must allow '*' to match '.foo' as demanded by IEEE + Std 1003.2-1992 Interpretation #126. + + * find/pred.c: + Remove use of FNM_PERIOD for -name as demanded by IEEE Std 1003.2-1992 + Interpretation #126 + + * find/parser.c: Fix for compilation (on AIX 4.3) with GCC 2.x. + + * xargs/xargs.c: + Changed the erorr message issued when there is an unmatched quote to + point out that the user might have wanted to use the -0 option instead. + +2004-10-17 James Youngman + + * configure.in: + Define intmax_t if it is not already defined - allows parser.c to compile on AIX 4.3 + + * configure.in: + Adjust version number to indicate that this s/w has moved on since the + 4.2.1 release. + + * configure.in: preparing to release 4.2.1 + + * ChangeLog: updated with current changes + + * README-CVS: Updated to go with newer version of gnulib. + + * po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po: + preparation for release + + * NEWS: Mention the changes to "trap". + + * NEWS: Brought up to date. + + * import-gnulib.sh: + Use xalloc-die module from gnulib, since that has now been split out + + * find/parser.c: + Check fnmatch() when other predicates that rely on fnmatch() are used. + + * find/parser.c: bug #10701: find needs fnmatch sanitycheck on startup + +2004-10-16 James Youngman + + * import-gnulib.sh: + Switch to requirement for GNU fnmatch because it supports FNM_CASEFOLD. + + * locate/updatedb.sh: + Bug #9465: use of signal numbers for 'trap' is deprecated. Should use + names instead. See + http://www.opengroup.org/onlinepubs/009695399/utilities/trap.html, + which indicates that support for signal numbers is optional, while + support for signal names is mandatory. + + * configure.in: + Indicate that this is the CVS version (once again) now that findutils + 4.2.0 has been released. + + * ChangeLog, configure.in, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po: + findutils 4.1.20 check-in for tagging + +2004-10-02 James Youngman + + * po/Makefile.in.in: + Search in $(top_srcdir) for mkinstalldirs, since that's where we keep it. + + * NEWS: Brought up to date, organised more clearly, and tidied up. + + * NEWS: brought up to date with recent changes + + * locate/testsuite/config/unix.exp, locate/testsuite/locate.gnu/ignore_case1.exp, locate/testsuite/locate.gnu/ignore_case3.exp, locate/updatedb.sh: + Added new option --changecwd to updatedb so that the 'cd /' which it does can be compatible with the requirements of the test suite. Specifically, the test suite relies on being able to use relative pathnames + + * find/pred.c: + Fixed usage of human_readable() in '%k' format specifier to fix a bug + reported by Dmitry V. Levin (arguments to human_readable() were + specified in the wrong order, which resulted in a floating-point + error). + +2004-08-08 James Youngman + + * locate/updatedb.sh: + cd to / to avoid inability to examine the current directory if we're + invoked via cron (and hence in root's home directory for example). + + * doc/find.texi, find/find.1: + Deprecate -path and -ipath in favour of -wholename and -iwholename + + * find/parser.c: + As per RMS's suggestion, deprecate -path and -ipath in favour of + -wholename and -iwholename. + + * locate/locate.c: + Fixed Savannah bug #9923, in which get_short() returns large positive + ints when it should be returning negative shorts. + + * xargs/xargs.1: + Applied documentation improvements suggested by Dan Jacobson + . + + * xargs/xargs.c: + Don't check size_of_environment against arg_max since that causes the + test suite to fail. + + * xargs/xargs.1, xargs/xargs.c: Better documentation for the -i option + +2004-05-03 James Youngman + + * find/find.1: + document the various suffixes for -size and also the new + option -ignore_readdir_race + + * locate/locate.c: + Fixes Savannah bug #8623 (failure to check consistency of data + read from locate database) + + * locate/updatedb.sh: + Resolves Savannah bug 4380, that updatedb generates an empty + database if one of the commands fails + + * NEWS: Talk about -ignore_readdir_race + + * doc/find.texi: + Documented -ignore_readdir_race and -noignore_readdir_race + + * find/find.c: + -ignore_readdir_race should have no effect if the reason for the + failure of stat(2) was anything other than ENOENT. + + * find/defs.h, find/find.c, find/parser.c: + Fixed Savannah bug 4391 (readdir race condition leading to + spurious error messages) + +2004-04-24 James Youngman + + * README-CVS: Corrected the instructions for getting gnulib via CVS. + +2004-04-13 James Youngman + + * doc/find.texi: + Actioned Savannah bug #8558 (find complains when it tries to recurse + into directories that it had removed). + +2004-03-13 James Youngman + + * ChangeLog: Updated from checkin comments. + + * find/find.c: + Oops, there is no access to the predicate name table if DEBUG is + not #defined. + + * find/parser.c: + Detect arithmetic overflow (poorly) in insert_time(), which diagnoses + the failure to handle large arguments to -mtime. The existing code + does careful computation and then bungs the value into a time_t, which + ruins all our careful effort. The new code is not a great + improvement. We just check the result to detect overflow, rather than + actually avoiding the overflow. + + * find/find.c: + Fixed Debian bug #185202 by checking for any trailing predicates after + the top-level invocation of get_expr() has done its work. + + * locate/locate.1, xargs/xargs.1: + Fixed Debian bug 175372, inappropriate 'L' suffixes on manual + page section indicators + + * find/find.1: + Removed "L" suffixes from manual page section indicators, to fix + Debian bug 175372. + + * debian/updatedb.conf: + Updated with list of filesystems from current Debian release. This + includes devfs, for example. + + * xargs/xargs.1: + Modified documentation of "-s" option to take into account the fix for + Debian bug #176201. + + * xargs/xargs.c: + Fixed Debian bug #176201, "xargs enviroment size limited to 20k", by + reading a patch offered by Bob Proulx and implementing something + substantially similar myself. + +2004-01-03 James Youngman + + * xargs/xargs.c: + Indicate that prep_child_for_exec() fixes Savannah bug #3992. + + * xargs/xargs.c: + Attach the stdin of xargs' child process to /dev/null so that if it + tries to read from its stdin it doesn't consume any of the list of + files that xargs is trying to use. + + * find/find.1: + Documented that the -regex option follows Gnulib's re_match() + implementation. + + * NEWS, locate/locate.c: Applied Savannah patch 2108 + + * xargs/xargs.c: Applied Savannah patch 1500 + + * find/find.1, doc/find.texi: + Improved the documentation for the %k and %b format specifiers to + -printf (Savannah bug #5034). Also pointed out that this handling is + different to that used by the "b" and "k" suffixes with "-size". + + * find/find.1: Improved the documentation for %k (Savannah bug #5034). + + * find/find.1: + Improved the documentation for -print0 in the manpage, fixing Debian + bug 111143. + + * README-CVS, find/pred.c, lib/listfile.c: + Brought up-to-date with change in gnulib's human.c - we no longer + use human_readable_inexact(), because it is no longer provided. + +2003-08-08 James Youngman + + * find/find.1: + Documented the fact that -printf also supports the '\0' escape code. + Added "STANDARDS CONFORMANCE" section. + +2003-08-02 James Youngman + + * find/find.1: + Explain that braces are not special when performing filename matching + with -name. + + * find/find.1: + added example of the use of -exec to the EXAMPLES section + + * find/fstype.c, locate/locate.c: + Savannah bug #4295 - implicit declarations of ctype.h functions + + * locate/locate.c: + Savannah bug #4279 - missing newline on locate help message + + * find/find.1, xargs/xargs.1: + Improved discussion of the -print0 option of find and the -0 option of xargs + +2003-06-26 James Youngman + + * import-gnulib.sh: + Remove reference to nonexistent module "basename" ("dirname" exists + and we already use that). + +2003-06-21 James Youngman + + * doc/find.texi: + Indicate that xargs stops immediately if a command exits with status 255 + + * xargs/xargs.1: + Document the fact that xargs exits immediately with an error message + if the command it executes exits with a status of 255. + +2003-06-18 James Youngman + + * find/find.1: + Indicate that -fls and friends always create their output file + +2003-06-16 James Youngman + + * ChangeLog, find/find.1, locate/locate.1, locate/locatedb.5, locate/updatedb.1, xargs/xargs.1: + Added BUGS section to manual pages. This section includes information about known bugs and how to report new bugs. + + * AUTHORS: Identify the current maintainer. + + * TODO: Removed the TODO items which have now been done. + + * THANKS: Added Bruno Haible and Bob Proulx. + + * xargs/xargs.c: xargs/xargs.c (DO_MULTIBYTE): New macro. + (mbstrstr): New function. + (do_insert): Use it instead of strstr. + + * config.guess, config.sub: + Use config.guess and config.sub from automake + + * find/fstype.c: + Bruno Haible: (fstype_to_string) Don't define this function if + HAVE_F_FSTYPENAME_IN_STATFS is defined. + + * configure.in: + Bruno Haible: Prefer the 4.4BSD API (if present) to the 4.3BSD API, + because some 4.4BSD systems have but no /etc/mtab file. + + * doc/find.texi, find/find.1: + Applied patch 1498 (documenting the backslash escape sequence) + + * locate/updatedb.sh: Applied (my own version of) Savannah patch 1601. + + * doc/find.texi: + Applied Savannah patch #1547 (document the fact that printf + field-width specifiers are supported). + + * xargs/xargs.c: + Applied Savannah patch #1499 (adds final newline to usage message). + +2003-06-14 James Youngman + + * NEWS, configure.in: + Updated version number to 4.2.0-CVS [not ready for release yet] + + * configure.in, doc/.cvsignore, doc/Makefile.in, find/.cvsignore, find/Makefile.am, find/Makefile.in, find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/testsuite/.cvsignore, find/testsuite/Makefile.in, find/testsuite/config/unix.exp, find/tree.c, find/util.c, import-gnulib.sh, intl/bindtextdom.c, intl/dcgettext.c, intl/dcigettext.c, intl/dcngettext.c, intl/dgettext.c, intl/dngettext.c, intl/explodename.c, intl/finddomain.c, intl/gettext.c, intl/intl-compat.c, intl/l10nflist.c, intl/loadmsgcat.c, intl/localcharset.c, intl/localealias.c, intl/ngettext.c, intl/plural.y, intl/textdomain.c, lib/.cvsignore + also need stpcpy (e.g. for Solaris) + + * intl/dcigettext.c: + plural_lookup: don't use a variable called "index", because we may + have done "#define strchr index", in which case using a variable + called index will prevent us calling strchr(p, ch) in the same scope. + + * find/defs.h, find/find.c, find/fstype.c, find/parser.c, find/pred.c, find/testsuite/config/unix.exp, find/tree.c, find/util.c, import-gnulib.sh, lib/Makefile.am, lib/listfile.c, lib/modetype.h, lib/nextelem.c, locate/bigram.c, locate/code.c, locate/frcode.c, locate/locate.c, locate/locatedb.h, locate/testsuite/config/unix.exp, locate/updatedb.sh, xargs/testsuite/config/unix.exp, xargs/xargs.c: + Updated copyright years and the address of the FSF + + * aclocal.m4, config.h.in, configure: + Removed files that are generated from other files (e.g. configure) + + * NEWS: Updated NEWS file for 4.1.20. + + * configure.in, lib/Makefile.am, po/POTFILES.in, po/da.po, po/de.po, po/es.po, po/et.po, po/findutils.pot, po/fr.po, po/gl.po, po/id.po, po/it.po, po/ko.po, po/nl.po, po/pl.po, po/pt_BR.po, po/ru.po, po/sv.po, po/tr.po: + Updates to the i18n files to ensure that 'make dist' succeeds + + * lib/posix/.cvsignore, lib/posix/Makefile.am, + lib/posix/Makefile.in, lib/posix/regex.h, lib/strftime.c, + lib/strncasecmp.c, lib/strspn.c, lib/strstr.c, lib/strtol.c, + lib/strtoul.c, lib/strtoull.c, lib/strtoumax.c, lib/wait.h, + lib/waitpid.c, lib/xalloc.h, lib/xgetcwd.c, lib/xmalloc.c, + lib/xstat.in, lib/xstrdup.c, lib/xstrtol.c, lib/xstrtol.h, + lib/xstrtoul.c, lib/xstrtoul.h, lib/xstrtoumax.c, lib/yesno.c, + locate/Makefile.am, locate/Makefile.in, locate/locate.c, + locate/testsuite/Makefile.in, m4/.cvsignore, m4/ChangeLog, + m4/Makefile.am, m4/Makefile.am.in, m4/Makefile.in, m4/README, + m4/afs.m4, m4/assert.m4, m4/c-bs-a.m4, m4/check-decl.m4, + m4/codeset.m4, m4/d-ino.m4, m4/d-type.m4, m4/error.m4, + m4/fnmatch.m4, m4/fnmatchcase.m4, m4/fstypename.m4, m4/getline.m4, + m4/gettext.m4, m4/glibc.m4, m4/glibc21.m4, m4/iconv.m4, + m4/inttypes_h.m4, m4/isc-posix.m4, m4/jm-glibc-io.m4, + m4/jm-macros.m4, m4/jm-mktime.m4, m4/lcmessage.m4, m4/libintl.m4, + m4/link-follow.m4, m4/ls-mntd-fs.m4, m4/lstat-slash.m4, + m4/lstat.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/memcmp.m4, + m4/prereq.m4, m4/progtest.m4, m4/readdir.m4, m4/realloc.m4, + m4/regex.m4, m4/st_dm_mode.m4, m4/st_mtim.m4, m4/stat.m4, + m4/strerror_r.m4, m4/strftime.m4, m4/timespec.m4, m4/uintmax_t.m4, + m4/ulonglong.m4, m4/xstrtoumax.m4, xargs/Makefile.am, + xargs/Makefile.in, xargs/testsuite/Makefile.in, + find/testsuite/Makefile.in, lib/.cvsignore, lib/Makefile.am, + lib/Makefile.in, lib/alloca.c, lib/ansi2knr.1, lib/ansi2knr.c, + lib/argmatch.c, lib/argmatch.h, lib/basename.c, lib/basename.h, + lib/dirname.c, lib/dirname.h, lib/error.c, lib/error.h, + lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/fnmatch.c, + lib/fnmatch.h, lib/getline.c, lib/getline.h, lib/getopt.c, + lib/getopt.h, lib/getopt1.c, lib/human.c, lib/human.h, + lib/idcache.c, lib/malloc.c, lib/memcmp.c, lib/memcpy.c, + lib/memset.c, lib/mktime.c, lib/modechange.c, lib/modechange.h, + lib/pathmax.h, lib/quotearg.c, lib/quotearg.h, lib/realloc.c, + lib/regex.c, lib/regex.h, lib/rpmatch.c, lib/savedir.c, + lib/savedir.h, lib/stpcpy.c, lib/strcasecmp.c, lib/strdup.c, + find/Makefile.am, find/Makefile.in, find/find.c, find/pred.c: + Updated to work with current version of gnulib + + * import-gnulib.sh: New file. + + * config.h.in, configure, configure.in, doc/Makefile.in, import-gnulib.sh: + Updated to work with current version of gnulib + + * README-CVS: New file. + + * Makefile.am, Makefile.in, README-CVS, aclocal.m4: + Updated to work with current version of gnulib + +2001-06-09 Kevin Dalley + + * intl/plural.c: + Changes the location of bison.simple after running bison on local + machine + + * ChangeLog: *** empty log message *** + + * Makefile.in, aclocal.m4, config.h.in, configure, + doc/Makefile.in, find/Makefile.in, find/testsuite/Makefile.in, + lib/Makefile.in, lib/posix/Makefile.in, locate/Makefile.in, + locate/testsuite/Makefile.in, m4/Makefile.in, xargs/Makefile.in, + xargs/testsuite/Makefile.in: Updates mostly from gettext-0.10.38 + + * ABOUT-NLS: * ABOUT-NLS: updated from gettext-0.10.38. + + * configure.in: * configure.in: add tr to ALL_LINGUAS. + + * intl/config.charset, intl/dcigettext.c, intl/dcngettext.c, + intl/dngettext.c, intl/libgnuintl.h, intl/localcharset.c, + intl/locale.alias, intl/ngettext.c, intl/plural.y, + intl/ref-add.sin, intl/ref-del.sin: updated from gettext-0.10.38 + + * intl/cat-compat.c, intl/linux-msg.sed, intl/po2tbl.sed.in, + intl/xopen-msg.sed, m4/ChangeLog: *** empty log message *** + + * m4/jm-macros.m4: + * jm-macros.m4 (jm_MACROS): remove jm_ICONV, which is replaced by + AM_ICONV, which is imported from gettext-0.10.38. removed + jm_GLIBC21, which is required in AM_GNU_GETTEXT, which is + imported from gettext-0.10.38. + + * po/stamp-cat-id: * stamp-cat-id: Remove file. + + * po/Makefile.in.in: * Makefile.in.in: Upgrade to gettext-0.10.38. + + * po/ChangeLog: * cat-id-tbl.c: Remove file. + + * po/de.po, po/es.po, po/et.po, po/fr.po: + * fr.po, et.po, es.po, de.po: updated translations to + findutils-4.1.7. + + * po/tr.po: * tr.po: New Turkish translation. + + * m4/ChangeLog: *** empty log message *** + + * intl/dgettext.c, intl/explodename.c, intl/finddomain.c, + intl/gettext.c, intl/gettext.h, intl/gettextP.h, + intl/hash-string.h, intl/intl-compat.c, intl/l10nflist.c, + intl/libgettext.h, intl/loadinfo.h, intl/loadmsgcat.c, + intl/localealias.c, intl/plural.c, intl/textdomain.c, + intl/ChangeLog, intl/Makefile.in, intl/VERSION, + intl/bindtextdom.c, intl/dcgettext.c: Updated from gettext-0.10.38 + + * m4/Makefile.am: + reflects addition of codeset.m4 from gettext-0.10.38, automatically + generated. + + * m4/codeset.m4, m4/gettext.m4, m4/glibc21.m4, m4/iconv.m4, + m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4: * + progtest.m4, lcmessage.m4, isc-posix.m4, iconv.m4, + glibc21.m4, gettext.m4, codeset.m4: updated from + gettext-0.10.38. + + * ChangeLog: *** empty log message *** + + * THANKS: added "Gerrit P. Haase" + + * m4/ChangeLog, locate/testsuite/.cvsignore, + xargs/testsuite/.cvsignore, config.h.in, configure, aclocal.m4, + doc/.cvsignore: *** empty log message *** + + * m4/jm-macros.m4: * jm-macros.m4 (jm_MACROS): add jm_FSTYPENAME + + * doc/Makefile.in: *** empty log message *** + + * doc/Makefile.am: + * doc/Makefile.am (MOSTLYCLEANFILES): add find.cps, which is + created by dvips. This should be taken care of by automake, but + the code is commented out. + +2001-06-09 Kevin Dalley + + * ABOUT-NLS: updated from gettext-0.10.38. + + * configure.in: add tr to ALL_LINGUAS. + + * doc/Makefile.am (MOSTLYCLEANFILES): add find.cps, which is + created by dvips. This should be taken care of by automake, but + the code is commented out. + +2001-06-05 Kevin Dalley + + * locate/updatedb.sh: replace "whoami" with "id -u" when testing + for root. + +2001-06-04 Kevin Dalley + + * locate/testsuite/Makefile.am (DIST_SUBDIRS): remove second + instance of DIST_SUBDIRS. + + * locate/Makefile.am (install-data-hook): changed install target + to install-data-hook, which still installs other files. + + * doc/Makefile.am (MOSTLYCLEANFILES): added find.cps, which should + probably be handled by automake. + + * doc/mdate-sh: removed file in doc directory. It now exists only + in top_srcdir, but this changed required a patch to automake. + +2001-05-20 Kevin Dalley + + * Version 4.1.7 + + * lib/Makefile.am (EXTRA_DIST): add strcasecmp.c + + * find/testsuite/Makefile.am (EXTRA_DIST): new tests: + find.gnu/name-opt.exp find.gnu/perm.exp find.gnu/perm.xo + find.gnu/prune-default-print.exp find.gnu/prune-default-print.xo + + * configure.in: update to 4.1.7 + + * config.sub, config.guess: upgraded to recent versions of + config.sub and config.guess. + + * locate/updatedb.sh: Add space to "#! /bin/sh" + + * configure.in: Add id to ALL_LINGUAS + + * lib/Makefile.am (EXTRA_DIST): getline.[ch] added + (libfind_a_SOURCES): getline.[ch] removed since getline.c is not + always needed. + +2001-05-20 Lionel CONS + + * find/find.c: Fixed security holes. 1. There is a race + condition between the lstat() to detect a symbolic link and the + actual chdir(). 2. An attacker can move directories while find + is _inside_ so that chdir(..) goes out of the intended file tree. + + * lib/modetype.h: support for Solaris door files is added. + + * lib/filemode.c: S_ISDOOR is undef'ed if STAT_MACROS_BROKEN + + * find/pred.c (pred_type): -D option (for Solaris door files) is + added. + + * find/parser.c (insert_type): -D option (for Solaris door files) + is added. + + * find/find.1: -D option (for Solaris door files) is documented + + * doc/find.texi (Type): -D option (for Solaris door files) is + documented + +2001-05-02 Kevin Dalley + + * configure.in: Change AC_CHECK_MEMBERS to conform to new + autoconf. Add Danish. + +2001-01-20 Kevin Dalley + + * doc/find.texi (Adding Tests): Place space in "#! /bin/sh". + + * find/testsuite/find.gnu/prune-default-print.xo, + find/testsuite/find.gnu/prune-default-print.exp: test for "find + . -prune" which passes after changes. Also see name-opt.exp. + + * find/util.c (get_new_pred): + * find/tree.c (set_new_parent): + * find/parser.c (various parse functions): + * find/find.c (main): + (default_prints): new function + * find/defs.h (struct predicate): added no_default_print + side_effects are no separated from no_default_print. predicates + which cause side effects should not be reordered (optimized). + predicates which cause printing should have printing turned off. + Printing statements also cause side effects. + +2000-10-29 Bruno Haible + + * locate/code.c (main), doc/find.texi: improve handling of + non-ASCII characters used old format. + +2000-10-21 Paul Eggert + + If open + fchdir fails, fall back on xgetcwd + chdir. + The old code tested for this at compile-time, + but SunOS 4.1.4 fchdir can fail at run-time. + + * find/defs.h (fchdir): Define to -1 if not available. + * find/defs.h (starting_dir, starting_desc): + Always declare. starting_dir now points to const. + * find/find.c (starting_dir, starting_desc): Likewise. + * find/find.c (starting_dir): + Now "." if starting_desc is nonnegative, for benefit of diagnostics. + (main, process_top_path, process_dir): + If open + fchdir fails, fall back on xgetcwd + chdir. + * find/pred.c (launch): Likewise. + +2000-10-20 Kevin Dalley + + * xargs/xargs.c, locate/updatedb.sh, locate/locate.c (usage), + find/parser.c (parse_help): add bug reporting address to help + +2000-10-13 Kevin Dalley + + * depcomp, lib/depcomp: depcomp moved from lib to . + +2000-10-11 Kevin Dalley + + * Version 4.1.6 + + * locate/testsuite/config/unix.exp: set PRUNEFS to "" for the + testsuite. + +2000-10-10 Bruno Haible + + * lib/Makefile.am (libfind_a_SOURCES): added yesno.c + + * lib/yesno.c, lib/rpmatch.c: new files. + + * find/pred.c: use function yesno(). + +2000-10-10 Kevin Dalley + + * locate/testsuite/Makefile.am: Added missing \ at end of + EXTRA_DIST lines. + + * locate/testsuite/locate.gnu/ignore_case3.xo, + locate/testsuite/locate.gnu/ignore_case3.exp, + locate/testsuite/locate.gnu/ignore_case2.exp, + locate/testsuite/locate.gnu/ignore_case1.xo, + locate/testsuite/locate.gnu/ignore_case1.exp: place locatedb + inside tmp directory, add subdir directory under tmp. + + * locate/testsuite/config/unix.exp: clean up tmp after test is + finished. + +2000-10-10 Kevin Dalley + + * locate/testsuite/config/unix.exp (Repository): + +2000-10-09 Kevin Dalley + + * lib/fnmatch.c, lib/fnmatch.h: reverted to older version of + fnmatch which works with Solaris. + + * locate/testsuite/config/unix.exp: dejagnu unix.exp + + * xargs/testsuite/config/unix.exp: remove temporary file + + * xargs/xargs.c: spelling correction + + * m4/prereq.m4: updated and changed some macros + + * m4/jm-macros.m4: replaced jm_FUNC_FNMATCH with + kd_FUNC_FNMATCH_CASE_REPL + + * m4/timespec.m4, m4/strerror_r.m4, m4/mbstate_t.m4, + m4/largefile.m4, m4/gettext.m4, m4/fnmatchcase.m4, m4/d-type.m4, + m4/d-ino.m4, m4/c-bs-a.m4: new m4 macros. + + * m4/Makefile.am: add fnmatchcase.m4 and mbstate_t.m4 + + * locate/testsuite/locate.gnu/ignore_case3.xo, + locate/testsuite/locate.gnu/ignore_case3.exp, + locate/testsuite/locate.gnu/ignore_case2.xo, + locate/testsuite/locate.gnu/ignore_case2.exp, + locate/testsuite/locate.gnu/ignore_case1.xo, + locate/testsuite/locate.gnu/ignore_case1.exp, + locate/testsuite/config/unix.exp: tests related to "--ignore-case" + option. + + * locate/testsuite/locate.gnu: testsuite directory + + * locate/testsuite/Makefile.am (Repository): + + * locate/testsuite: add directory for locate testsuite + + * po/findutils.pot: updated file + + * po/sv.po, po/ru.po, po/pt_BR.po, po/pl.po, po/nl.po, po/ko.po, + po/it.po, po/gl.po, po/fr.po, po/et.po, po/es.po, po/de.po: + updated various po files. + + * locate/updatedb.sh: export TMPDIR, which is used by child + processes. + + * locate/locate.1, locate/locate.c: add "--ignore-case" option. + + * locate/Makefile.am: add testsuite subdirectory + + * find/testsuite/find.gnu/perm.xo, + find/testsuite/find.gnu/perm.exp, + find/testsuite/find.gnu/name-opt.xo, + find/testsuite/find.gnu/name-opt.exp: added test suites + + * configure.in: add locate/testsuite/Makefile + + * doc/find.info*: removed from repository + + * doc/find.texi: add documentation for "-i" option. + + * aclocal.m4: removed from repository, as it is generated. + + * find/pred.c: fixes problem with "find -perm -0100". + + * lib/lstat.c, lib/stat.c: removed from repository. These files + are generated from lib/xstat.in. + +2000-08-24 Kevin Dalley + + * doc/find.texi (Invoking xargs): changed @var{-s} to @samp{-s}. + +2000-05-13 Kevin Dalley + + * find/tree.c (opt_expr): move iname and ipath to the front of the + list of arguments. + + * doc/find.texi (Directories): changed wording for "-prune". + + * find/parser.c (parse_prune): set side_effects to true, to + prevent prune from being moved in opt_expr. + +2000-04-12 Kevin Dalley + + * doc/find.texi, doc/permi.texi: fix spellings, add LocalWords. + + * lib/Makefile.am: put getline.c back into libfind_a_SOURCES, + since getstr is needed. + + * Version 4.1.5 + + * po/POTFILES.in: updated list of files, updated po files. + + +2000-04-02 Paul Eggert + + Add support for large files, and port to Solaris 8 and earlier + versions. + + * lib/human.c (getenv): Depend on NEED_GETENV_DECL, not + HAVE_DECL_GETENV. + + * lib/strftime.c (my_strftime): Make sure we call the system + strftime, not ourselves, when invoking the underlying strftime. + + * m4/check-decl.m4 (jm_CHECK_DECLS): Remove memchr, nanosleep. + + * m4/jm-macros.m4 (jm_MACROS): Don't check for utime.h. Do not + require jm_BISON, jm_CHECK_TYPE_STRUCT_UTIMBUF, jm_FUNC_LCHOWN, + jm_FUNC_CHOWN, jm_FUNC_NANOSLEEP, jm_FUNC_GROUP_MEMBER, + jm_FUNC_PUTENV, jm_FUNC_GETGROUPS, AM_FUNC_GETLOADAVG, + jm_SYS_PROC_UPTIME, jm_FUNC_FTRUNCATE, jm_FUNC_UTIME. Do not + replace strcasecmp, dup2, gethostname, getusershell, stime, + strcspn, strpbrk, euidaccess, mkdir, rmdir, rpmatch, strndup, + strverscmp, memchr, memmove. Do not check for declaration of + lchown. Remove invocations of AM_FUNC_OBSTACK, AM_FUNC_STRTOD, + POW_LIBM, jm_LANGINFO_CODESET, jm_ICONV. Remove df tests. + (jm_CHECK_ALL_TYPES): Include when checking for + struct stat.st_blksize. + + * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set environment variable + in shell rather than using putenv, which isn't portable. + + * COPYING, lib/alloca.c, lib/dirname.c, lib/error.c, + lib/savedir.c, lib/strstr.c, m4/check-decl.m4, m4/d-ino.m4, + m4/d-type.m4, m4/getline.m4, m4/jm-glibc-io.m4, m4/jm-macros.m4, + m4/jm-mktime.m4, m4/ls-mntd-fs.m4, m4/memcmp.m4, m4/prereq.m4, + m4/readdir.m4, m4/regex.m4, m4/strftime.m4, m4/uintmax_t.m4: Sync + to latest version from sh-utils-2.0g. + + * config.guess, config.sub, lib/argmatch.c, lib/argmatch.h, + lib/human.c, lib/human.h, lib/memcpy.c, lib/quotearg.c, + lib/quotearg.h, lib/strtoull.c, lib/strtoumax.c, + lib/xstrtoumax.c, m4/c-bs-a.m4, m4/gettext.m4, + m4/largefile.m4, m4/lcmessage.m4, m4/link-follow.m4, + m4/progtest.m4, m4/strerror_r.m4, m4/timespec.m4, + m4/xstrtoumax.m4: New files, taken from sh-utils-2.0g. + + * lib/ansi2knr.1, lib/ansi2knr.c, lib/basename.c, lib/getopt.h, + lib/fnmatch.c, lib/fnmatch.h, lib/modechange.c: Sync to latest + unreleased version of GNU tar (between 1.13.17 and 1.13.18). + + * lib/basename.h, lib/waitpid.c: New files, taken from same + version of GNU tar. + + * lib/regex.c, lib/regex.h: Sync to GNU grep 2.4.2. + + * lib/posix/Makefile.am, lib/posix/regex.h: New files, taken from + GNU grep 2.4.2. + + * lib/strftime.c: Sync to textutils 2.0e. + + * acconfig.h, depcomp, lib/strcasecmp.c, m4/check-type.m4, + m4/const.m4, m4/decl.m4, m4/lfs.m4, m4/mktime.m4, m4/perl.m4, + m4/putenv.m4, m4/uptime.m4, m4/utimbuf.m4, m4/utime.m4, + m4/utimes.m4: Remove these files; no longer needed. + + * configure.in (AC_CANONICAL_HOST, AC_SYS_LARGEFILE, + jm_AC_TYPE_UINTMAX_T): Add. + (CACHE_IDS, FSTYPE_STATVFS, FSTYPE_USG_STATFS, FSTYPE_AIX_STATFS, + FSTYPE_MNTENT, FSTYPE_STATFS, FSTYPE_GETMNT): Add comment, so that + we don't need acconfig.h. + (AC_CHECK_TYPE): Add ssize_t. + (AC_REPLACE_FUNCS): Add waitpid. + (AC_CHECK_FUNCS): Remove basename. + (AC_FUNC_MKTIME): Remove. + (LIBOBJS): Add no-ops to work around automake 1.4 bug. + (AC_OUTPUT): Add lib/posix/Makefile. + + * find/defs.h: Include , , , + , , . All includers changed to not + include these files, and to include "defs.h" first (since config.h + must be included first). + (CHAR_BIT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR, + S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, MOD_WXUSR, + MODE_R, MODE_RW, MODE_RWX, MODE_ALL): New macros. + (enum permissions_type): New enum. + (struct long_val.negative): New member. + (struct long_val.l_val): Now uintmax_t, not unsigned long. + (struct size_val.size): Likewise. + (struct perm_val): New type. + (struct predicate.perm): Now struct perm_val, not unsigned long. + (struct predicate.type): Now mode_t, not unsigned long. + (list_file): New parameters current_time, output_block_size. + All callers changed. + (savedir, basename): Remove decls. + (output_block_size, start_time): New extern vars. + + * find/find.c: Include , . + (output_block_size, start_time): New vars. + (main): Initialize them. No need to check for negative st_size, + since savedir now does it for us. + + * find/fstype.c: Include "dirname.h". + (xatoi): Remove. + (filesystem_type_uncached): Use xstrtoumax instead of xatoi. + + * find/parser.c: Include "xstrtol.h". + (get_num_days, get_num, parse_amin, parse_cmin, parse_mmin, + parse_size, parse_used, insert_time, insert_num): Compute using + uintmax_t, not unsigned long. + (parse_amin, parse_cmin, parse_mmin, parse_used, insert_time): + Keep track of whether time was negative before converting it to an + unsigned type. + (parse_daystart): Don't assume that localtime succeeds; e.g. it + can fail with 64-bit time_t and 32-bit tm_year. + (parse_perm, insert_type): Compute using mode_t, not unsigned + long. + (insert_type): Use symbolic constants like MODE_ALL instead of + traditional ones like 07777. Set new kind member to indicate + permissions type, instead of using unportable magic numbers. + (make_segment): We will use human_readable to convert most numeric + values, so simplify the cases. + (get_num_days): Write in terms of get_num, to avoid duplicated + code. + (insert_time, insert_num): When debugging, convert large values to + uintmax_t and output with %ju. + (get_num): Use xstrtoumax to do the real work. + + * find/pred.c: Include "basename.h", "human.h". + (DEV_BSIZE, ST_BLKSIZE, ST_NBLOCKSIZE): New macros, taken from + fileutils. + (ST_NBLOCKS): Replace with fileutils defn. + (MAX): New macro. + (ctime_format): New function. + (pred_fprintf, format_date): Use human_readable to output large + numbers portably. + (pred_fprintf): Use ctime_format to output ctime-style dates. Use + base_name to compute the base name of a path. With %m, output the + mode portably using traditional numbers, even if the host uses + some other numbering scheme. + (pred_iname, pred_name): basename -> base_name. + (pred_perm): Use new kind member to deduce permissions type, + instead of relying on magic numbers. + (pred_size): Compute using uintmax_t, not unsigned long. Avoid + overflow if file size is near the maximum. + (pred_type): Compute using mode_t, not unsigned long. + (launch): Use waitpid, not wait. Check for EINTR. + (format_date): Don't assume that localtime succeeds. + + * find/util.c (basename): Remove; we now use base_name. + + * lib/Makefile.am (SUBDIRS): New macro. + (libfind_a_SOURCES): Add argmatch.h, argmatch.c, basename.h, + basename.c, human.c, human.h, quotearg.c, quotearg.h, xstrtoumax.c. + Remove error.h, error.c, getline.c. + (EXTRA_DIST): Add mktime.c, regex.c. + + * lib/listfile.c: Include "human.h". + (alloca): Declare, or include appropriate files to declare. + (DEV_BSIZE, ST_NBLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE): New macros. + (convert_blocks): Remove. + (list_file): New current_time and output_block_size args. + Revamp quite a bit, to handle large numbers correctly + and to match GNU ls behavior more closely. + + * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4, gettext.m4, + largefile.m4, lcmessage.m4, link-follow.m4, progtest.m4, + strerror_r.m4, xstrtoumax.m4. Remove check-type.m4, const.m4, + decl.m4, lfs.m4, mktime.m4, perl.m4, putenv.m4, timespec.m4, + uptime.m4, utimbuf.m4, utime.m4, utimes.m4. + + * xargs/xargs.c (wait_for_proc): Retry wait if it fails with + errno == EINTR. + +2000-04-05 Kevin Dalley + + * xargs/Makefile.am: add ansi2knr + + * xargs/xargs.c: add macros PARAMS rather than P_. Add + prototypes. + + * po/POTFILES: new file listing all POFILES. + + * m4/gl.po, m4/et.po: new files + + * m4/Makefile.am.in: updated file + + * m4: update directory + + * locate/Makefile.am: create updatedb from updatedb.sh + + * locate/updatedb.sh, locate/updatedb.in: removed file. Replaced + by updatedb.sh + + * locate/frcode.c, locate/code.c, locate/bigram.c: add macros + PARAMS rather than P_. Add prototypes. + + * lib/xstat.in: new file + + * lib/Makefile.am: update to latest versions of library files. + + * find/testsuite/Makefile.am: add CLEANFILES + + * find/util.c: remove definition of basename + + * find/util.c, find/tree.c, find/pred.c, find/parser.c, + find/fstype.c, find/find.c, find/defs.h: add macros PARAMS rather + than P_, for consistency, change to prototypes + + * find/Makefile.am: Add prototypes and ansi2knr + + * configure.in: add Galition and Estonian languages. + Miscellaneous other fixes. + + +2000-03-11 Kevin Dalley + + * lib/basename.c: Add file from libit. + * lib/Makefile.am (libfind_a_SOURCES): add basename.c since it is + no longer replaceable. + + * find/util.c: Remove definition of basename, which is now in + lib/basename.c (as base_name). + * find/pred.c: Use base_name, not basename. + * find/defs.h: Likewise. + + * configure.in : Don't replace basename. Now we use only + base_name. + +2000-02-26 Kevin Dalley + + * Version 4.1.4 + + * lib/strtoul.c: added to distribution + + * configure.in: added strtoul to AC_REPLACE_FUNCS + + * configure.in: added jm_CHECK_ALL_TYPE + +2000-02-23 Kevin Dalley + + * po/ChangeLog: removed, merged with top-level ChangeLog. + + * po/de.po: new version of German file. + + * po/gl.po, po/et.po: new languages, Estonian and Galician. + + * locate/updatedb.sh (PRUNEFS): enclose paths in quotes + +2000-02-17 Kevin Dalley + + * po/it.po: new version of Italian file. + + * locate/updatedb.sh (prunefs_exp): have sed statement use '*' + rather than the often unsupported '+'. + +2000-02-13 Kevin Dalley + + * configure.in: removed AC_ARG_PROGRAM, which is already in + AM_INIT_AUTOMAKE. + + * locate/Makefile.am (updatedb), locate/updatedb.sh: add + transforms of find, frcode, bigram, and code back into + updatedb.sh, which were accidentally removed. + +2000-02-12 Kevin Dalley + + * lib/wait.h: updated address. + +2000-01-26 Kevin Dalley + + * Version 4.1.3 + + * acconfig.h: added internationalization. + + * intl/*: copied from tar-1.13.17. + + * locate/Makefile.am, locate/locate.c, locate/code.c: + internationalized file. + + * locate/frcode.c, locate/bigram.c: include headers from ../lib + directory. + + * xargs/Makefile.am, xargs/xargs.c: internationalized directory. + +2000-01-26 Kevin Dalley + + * POTFILES.in: added list of files with translatable strings. + + * de.po, es.po, fr.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, + ru.po, sv.po: New, slightly out of date, files imported from the + Translation Project: http://www.iro.umontreal.ca/contrib/po/HTML/, + German, Spanish, French, Italian, Korean, Dutch, Polish, Brazilian + Portuguese. + + +2000-01-24 Kevin Dalley + + * lib/xmalloc.c, lib/regex.c, lib/getopt.c: internationalization + works with current version of gettext. + + * lib/getline.h : added declaration of getstr. + * lib/Makefile.am (libfind_a_SOURCES): added getline.[ch] to + standard compilation. Added internationalization. + * find/Makefile.am (INCLUDES): corrected -I options for building + in other directories. + (LDADD): changes for internationalization. + + * configure.in (ALL_LINGUAS): added internationalization. + getline.c is always compiled and linked, because of getstr. + AM_GNU_GETTEXT + + * Makefile.am: + (DISTCLEANFILES): added intl/libintl.h + (AUTOMAKE_OPTIONS): added gnits to AUTOMAKE_OPTIONS + (SUBDIRS): added intl and po + + * acconfig.h: added internationalization values + + * THANKS: added thanks file for gnits compatibility. + +2000-01-22 Kevin Dalley + + * added intl directory. + + * Added internationalization, only with slightly out of date po + files for many locales. + +2000-01-18 Kevin Dalley + + * Version 4.1.2 + + * locate/Makefile.am: remove creation of updatedb, since it is now + made by configure + + * configure.in: updatedb is now created by configure. + + * xargs/Makefile.am: added testsuite to xargs directory + + * locate/updatedb.in: updatedb is now created by configure + + * locate/frcode.c, locate/code.c, locate/bigram.c: change return + from main to int. Replace getstr with getline, where possible. + + * locate/Makefile.am: place frcode, code, bigram in + libexec_PROGRAMS + + * lib/xstrdup.c, lib/xmalloc.c, lib/xgetcwd.c, lib/xalloc.h, + lib/strtol.c, lib/strstr.c, lib/strftime.c, lib/strdup.c, + lib/stpcpy.c, lib/stat.c, lib/savedir.h, lib/savedir.c, + lib/regex.h, lib/regex.c, lib/realloc.c, lib/pathmax.h, + lib/modechange.h, lib/modechange.c, lib/mktime.c, lib/memset.c, + lib/memcmp.c, lib/malloc.c, lib/lstat.c, lib/idcache.c, + lib/getopt1.c, lib/getopt.c, lib/getopt.h, lib/getline.c, + lib/getline.h, lib/fnmatch.c, lib/fnmatch.h, lib/filemode.c, + lib/filemode.h, lib/fileblocks.c, lib/error.c, lib/error.h, + lib/dirname.c, lib/alloca.c: updated to newer version of file from + fileutils. + + * find/version.c: version number is now automatically generated by + configure. + + * find/fstype.c (filesystem_type_uncached): fixes bug described as + follows: When 'find' looks for a fstype, it parses the /etc/mtab + until it finds the good line. But, if there is, before the good + line, a line whose mountpoint is unreachable, it fails. + + * doc/texinfo.tex: updated to newer version + + * doc/find.texi: added version.texi, fixed a few documentation bugs. + + * configure.in: new m4 features. + + * Makefile.am: moved testsuite to below corresponding directories + find and xargs. + + * acconfig.h: updated to match new m4 files. + + * m4: added m4 directory, largely borrowed from Jim Meyering's + fileutils. + +2000-01-17 Kevin Dalley + + * doc/find.texi (Multiple Files): placed missing xargs in examples + + * find/testsuite/find.gnu/depth.exp: added find tests to test + "-depth" bug. + + * doc/find.texi: include version.texi for automatic determination + of version number, update bug report email address to + bug-findutils@gnu.org. + (Combining Primaries With Operators): add indices for " ,", "()", + "-a", "-o", etc. + +2000-01-17 Andreas Schwab + + * find/tree.c (opt_expr): Never rearrange the arguments of the + comma operator, since it is not commutative. Remove useless + assignment.2 + +2000-01-17 Jonathan R. Ferro + + * find/find.c (process_path): fix problem with "-depth" which is + tested in depth.exp test. + +1999-08-15 Kevin Dalley > + + * find/fstype.c (filesystem_type_uncached): a stat failure with + EACCESS will ignore this file system keep on looking. Patch + suggested by Vincent Danjean . + +1999-08-15 Mark Kettenis + + * xargs/xargs.c (LONG_MAX): Define if necessary. + (main): If ARG_MAX is -1 (that is sysconf + (_SC_ARG_MAX) returns -1) the system does not impose a limit. In + that case, use LONG_MAX as the limit. + +1999-08-15 Kevin Dalley + + * find/version.c: version string is now set by config.h + +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. + + * locate/Makefile.am: Move updatedb from LIBSCRIPTS to SCRIPTS. + + * Makefile.am (distname): Change distribution name from find to + findutils. + + * testsuite/config/unix.exp: Don't abuse xfail; simulate it correctly. + + * locate/Makefile.am (CLEANFILES): Fix typo. + +Wed Nov 2 15:11:52 1994 David J. MacKenzie + + * The big 4 0. + + * lib/listfile.c find/defs.h (list_file): Take a stream arg. + * find/pred.c (pred_ls): pass it. + * find/parser.c pred.c defs.h (parse_fls, pred_fls): New functions. + +Tue Oct 25 16:09:04 1994 David J. MacKenzie + + * find/pred.c (pred_fprintf): Flush output after \c. From Chapman + Flack. + + * find/parser.c (insert_fprintf): Warn about unrecognized \ and % + sequences. + +Tue Oct 18 00:03:10 1994 David J. MacKenzie + + * find/defs.h parser.c pred.c tree.c util.c: Globally change + "victim" to "primary". + + * find/parser.c (insert_fprintf): For 'c' format, don't lose the + need_stat information. From Chapman Flack. + + * doc/find.texi perm.texi: New files. + * configure.in: Configure the doc directory. + + * find/pred.c (pred_regex): Check that the regex matched the whole + file name. + +Wed Oct 12 17:13:47 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) + + * find/find.c (main): Tell what the invalid arg is. + From Kaveh Ghazi. + +Fri Oct 7 12:33:24 1994 David MacKenzie + + * find/parser.c: Add -mount as an alias for -xdev. + From Klaus.Steinberger@physik.uni-muenchen.de (Klaus Steinberger). + + * lib/modechange.c: Make umask_value unsigned short. + + * xargs/xargs.c: Use symbolic constants in longopts. + From Chapman Flack. + +Wed Oct 5 11:23:09 1994 David MacKenzie + + * xargs/xargs.c (main, read_line, read_string, do_exec): Pass + along the lengths of the args. + (main): Calculate length of replace_pat. + (push_arg, do_insert): Use those lengths instead of calculating + them. + +Tue Oct 4 10:02:05 1994 David MacKenzie + + * locate/updatedb.sh Makefile.in: Add substitutions to get + the transformed program names. + + * xargs/xargs.c: Put back the global variables for now. + Rename some variables. Increase default args_per_exec. + Use boolean where applicable. + (main): Reduce default arg_max by 2048 for POSIX.2. + (read_string): Don't check EOF string. + (read_line, read_string): Take initial args size into account. + +Sat Oct 1 17:43:13 1994 David MacKenzie + + * find/pred.c (launch): Use pid_t. + + * xargs/xargs.c (EOF_STR): Define and use. + [__STDC__]: Declare xrealloc and xmalloc using void *. + * find/defs.h: Likewise. + + * find/defs.h: Only declare stpcpy if !HAVE_STPCPY. + + * xargs/xargs.c: Replace most global variables with structure + pointers passed as arguments. Use pid_t. + * lib/wait.h: Include sys/wait.h if HAVE_SYS_WAIT_H. + * configure.in: Call AC_TYPE_MODE_T and AC_HEADER_SYS_WAIT. + + * xargs/xargs.c: Improve paging performance and memory + fragmentation by building command arguments in a pre-allocated + buffer and re-implementing the child pid list as an expandable + array. From tsi@gpu.srv.ualberta.ca (Marc Aurele La France). + +Thu Sep 29 11:38:07 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * xargs/xargs.c [__STDC__]: Prototype declarations. + +Wed Sep 28 11:25:53 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) + + * find/fstype.c [AFS, __STDC__]: Fix definition of _VICEIOCTL. + +Tue Sep 27 08:14:27 1994 David MacKenzie + + * find/fstype.c (fstype_to_string): Add more cases. Use + INITMOUNTNAMES if defined. + * find/defs.h: Change boolean typedef from char to int. + * configure.in: Check for mktime. + +Tue Sep 27 01:20:28 1994 Kaveh R. Ghazi (ghazi@noc.rutgers.edu) + + * configure.in: Add AC_HEADER_STAT. + * lib/listfile.c, lib/modetype.h: Add STAT_MACROS_BROKEN. + + * find/pred.c: Move the inclusion of defs.h ahead of the first + test of _POSIX_VERSION. + + * lib/xgetcwd.c: Remove _POSIX_VERSION, rely only on HAVE_GETCWD. + +Mon Sep 26 16:43:01 1994 David MacKenzie + + * configure.in: Add AC_CONFIG_HEADER. + * find/*.c locate/*.c xargs/*.c: Include config.h. + * locate/updatedb.sh: Add --version; --old -> --old-format. + +Sun Sep 25 23:43:37 1994 David MacKenzie + + * find/* [__STDC__]: Prototype declarations. + + * locate/updatedb.sh: Account for renaming code and frcode. + + * find/find.c (process_path): Store dev and ino of directories in + current branch to avoid symlink loops. From DJ Delorie + . + (process_dir): If following symlinks, don't cd to ..; instead, + cd to the starting directory and then to the parent directory. + (main) [HAVE_FCHDIR]: Save the dev, ino of the starting directory. + (process_top_path) [HAVE_FCHDIR]: Use it. + * find/pred.c (launch) [HAVE_FCHDIR]: Likewise. + * defs.h [HAVE_FCHDIR]: Declare starting_desc instead of starting_dir. + * configure.in: Check for dev_t, ino_t, fchdir, fcntl.h. + +Fri Sep 23 11:55:38 1994 David MacKenzie + + * lib/listfile.c: Change #ifdef S_IFLNK to #ifdef S_ISLNK. + From Andreas Luik . + +Thu Sep 22 11:42:40 1994 David MacKenzie + + * locate/locate.c (last_literal_end): Dynamically allocate enough + memory for the subpattern. + +Wed Sep 21 06:12:56 1994 David MacKenzie + + * locate/locate.c (locate): Warn if database is >8 days old. + From Ian Lance Taylor. + + * xargs/xargs.c (do_exec), find/pred.c (launch): Set SIGCHLD to + default. From tsi@gpu.srv.ualberta.ca (Marc Aurele La France). + * find/find.c pred.c util.c lib/listfile.c: Remove fflush(stdout) + calls before error. error does it, and doesn't trash errno. + From tsi@gpu.srv.ualberta.ca (Marc Aurele La France). + + * find/fstype.c (filesystem_type_uncached): Don't trust mtab dev + number on HPUX. From Andreas Luik . + (filesystem_type_uncached): Don't cache unknown file system + types. From casper@fwi.uva.nl (Casper Dik). + + * locate/updatedb.sh: Collect results in temp file and rename it + atomically. From Andreas Luik . + + * xargs/xargs.c (parse_num): Print a long using %ld. From Jim + Meyering. + + * find/defs.h find.c parser.c pred.c util.c, lib/nextelem.c: + Emulate strchr and strrchr with index and rindex, not vice versa. + + Remove man directory; move man pages to the directories of the + programs they document. + + * locate/frcode.c: Renamed from code.c. + * locate/frcode.c (put_short): Renamed from puthalfword. + * locate/locate.c (get_short): Renamed from gethalfword. + (last_literal_end): Renamed from patprep. + (locate): Recognize old-format databases too. + * locate/locatedb.h: Add defines for old-format databases. + * locate/bigram.c locate/code.c: Put back programs to create + old-format databases. + * locate/updatedb.sh: Take --old option to use them. + +Tue Sep 20 15:41:11 1994 David MacKenzie + + * configure.in: Update for Autoconf v2. + * find/pred.c lib/savedir.c: Use new symbols for dir header. + * locate/updatedb.sh: Add --help option. + +Sun Feb 13 11:21:58 1994 Jim Meyering (meyering@comco.com) + + * man/Makefile.in [man1ext, man5ext]: Set man5ext (not man1ext) to 5. + +Sun Aug 1 22:30:55 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * bigram.c: File removed. + * getline.c, memcmp.c, locatedb.h, updatedb.1, locatedb.5: New files. + * updatedb.sh: Take command line options. + Don't do bigram compression. + * code.c, locate.c: Don't do bigram compression. + Write and read counts in network byte order. + Handle arbitrarily long paths. + Use a magic number at the start of the databases. + +Thu Jul 29 20:44:53 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * Makefile.in (config.status): Run config.status --recheck, not + configure, to get the right args passed. + +Thu Jul 22 12:53:12 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * listfile.c (list_file): Print inode as a long. + +Wed Jul 14 14:14:45 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * fstype.c [STDC_HEADERS]: Include stdlib.h. + + * Move unistd.h include from parser.c and pred.c to defs.h. + +Wed Jun 30 14:14:47 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * updatedb.sh: Construct PRUNEREGEX from PRUNEPATHS with sed. + Prune /afs. Change NFSUSER to NETUSER and NFSPATHS to NETPATHS. + +Tue Jun 29 12:19:58 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * pred.c (pred_fprintf): Abort in switch if `c' is not A, C, or T. + +Mon Jun 28 00:18:52 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * fstype.c (in_afs) [AFS]: New function, derived from code by + Sanjay Ramamurthy . + (filesystem_type_uncached) [AFS]: Call it if the fs type is + otherwise unknown. + + * parser.c (parse_size): Recognize b and w suffixes for dd + compatibility. + + * code.c (puthalfword): New function. + (main): Call it. + * locate.c (gethalfword): New function. + (locate): Call it. + From ifado!wb@germany.eu.net (Wilhelm B. Kloke). + + * listfile.c: Include pathmax.h. + (get_link_name): Always allocate PATH_MAX + 1 bytes for + readlink buffers. + * pred.c (pred_fprintf, insert_lname): Call get_link_name. + + * fstype.c (filesystem_type, filesystem_type_uncached), + listfile.c (list_file): Take an arg for the path to access. + * pred.c (pred_ls, pred_fstype, pred_fprintf): Pass it. + + * find.c (process_dir): Renamed from scan_directory. + + Changes from jrs@world.std.com (Rick Sladkey) to chdir into + subdirectories instead of using string concatenation, for speed: + * find.c (process_top_path): New function. + (main): Call it, and xgetcwd. + (process_path, scan_directory): Take new arg, the pathname + relative to ".". Use it and pass it on. + * pred.c (pred_and, pred_comma, pred_negate, pred_or, + pred_xtype, pred_fprintf, pred_empty, insert_lname): + access rel_pathname instead of pathname. + (launch): chdir to starting_dir. + * defs.h: Declare rel_pathname and starting_dir. + * find.c: Define them. + + * xgetcwd.c: New file. + + * updatedb.sh: Recognize -fstype NFS as well as nfs. + * locate.c (patprep): Skip trailing character classes correctly. + From luik@pharao.stgt.sub.org (Andreas Luik). + + * parser.c (parse_group): Make gid a gid_t, not short or int. + (parse_nogroup): Cast gid to unsigned when using it as an array index. + (parse_user, parse_nouser): Similar changes for uid. + * defs.h: Use uid_t and gid_t. + + * parser.c (parse_help): New function. + (parse_table): Add --version, -help, and --help options. + Rename struct parser_table_t to struct parser_table. + (parse_version): Exit after printing message, on + stdout not stderr. + + * xargs.c, locate.c (main, usage): Add --version and --help + options. + +Wed Mar 31 22:39:57 1993 Jim Meyering (meyering@comco.com) + + * parser.c: Define isascii macro to be 1 also if STDC_HEADERS. + * xargs.c: Ditto. + +Wed Mar 31 16:04:07 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * pred.c (pred_fprintf): If curdepth is 0, don't nuke + segment->text; nuke cp. + +Mon Mar 29 15:57:20 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * Version 3.8. + +Fri Mar 26 16:36:59 1993 David J. MacKenzie (djm@hal.gnu.ai.mit.edu) + + * pred.c (pred_ilname, pred_iname, pred_ipath): New functions. + (pred_table): Add them. + (insert_lname): New function. + (pred_lname): Call it. + * parser.c (parse_ilname, parse_iname, parse_ipath, + parse_iregex): New functions. + (parse_table): Add them. + (insert_regex): New function. + (parse_regex): Call it. + + * fstype.c (filesystem_type): Cache previous result. + (filesystem_type_uncached): New function. + pred.c (pred_fstype, pred_fprintf): Adjust callers to not cache. + + * parser.c: Don't define const. + + * fstype.c [FSTYPE_STATFS] (fstype_to_string): #ifdef + MOUNT_PC for 386bsd. + +Thu Mar 25 18:32:24 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * parser.c (parse_regex): If ignore_case, set up a translate + table for the regex. + + * defs.h: Include string.h or strings.h. + * find.c fstype.c parser.c pred.c util.c: Don't. + + * nextelem.c [index]: Don't redefine. + +Wed Mar 24 17:47:10 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * xargs.c (wait_for_proc): Exit with a nonrunnable command's exit + status, not the wait status value. From + Andreas Schwab . + + * parser.c (make_segment, insert_fprintf), pred.c + (pred_fprintf): Add '%F' to print filesystem type. + + * parser.c (parse_fprintf): Check if second arg is missing. + +Tue Mar 23 13:18:08 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * pred.c (pred_fprintf): For %P, don't move past an assumed + slash if the ARGV element ends with one, because in that case + we didn't add one. + + * parser.c (parse_printf): Check for missing arg. + From smj@cats.com (Steve James). + + * parser.c: Add #ifdef around atol decl for Linux. + +Fri Dec 11 08:17:07 1992 Jim Meyering (meyering@comco.com) + + * defs.h: Remove dcl of process_path. + * find.c: Put dcl of p + + * pred.c (pred_fprintf): Don't print "\n" unless it's in the + format string. + +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 + doesn't mention it. + +Sat Oct 5 16:11:05 1991 Jim Meyering (meyering at churchy.gnu.ai.mit.edu) + + * parser.c (parse_perm): Parse new `-perm +mode' notation. + * pred.c (pred_perm): Interpret same. + +Fri Sep 13 14:58:27 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) + + * xargs.c [POSIX]: Always use sysconf to get ARG_MAX. + +Thu Sep 5 23:57:06 1991 David J. MacKenzie (djm at apple-gunkies) + + * bigram.c, code.c (main): Make path_max int, not unsigned. + * locate.c (main): Check for pathconf failure. + +Thu Sep 5 11:54:44 1991 Jim Meyering (meyering at churchy.gnu.ai.mit.edu) + + * parser.c (insert_fprintf): Add `\\' escape and fixed `%%' + interpretation. + * pred.c (pred_fprintf): fixed off-by-one indexing problem + when handling [gGuU] printf formats. + +Wed Aug 28 20:53:57 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * Version 3.2. + +Mon Aug 26 18:57:32 1991 David J. MacKenzie (djm at pogo.gnu.ai.mit.edu) + + * bigram.c, code.c: Fix handling of PATH_MAX. + Check for anomalous input line lengths. + From Bruce Evans. + +Fri Aug 23 11:00:18 1991 David J. MacKenzie (djm at apple-gunkies) + + * pred.c (pred_fprintf): Round block number up to get K. + +Thu Aug 22 10:46:30 1991 David J. MacKenzie (djm at apple-gunkies) + + * pred.c (pred_fprintf, pred_lname) [_AIX]: Allocate PATH_MAX + byte for link object since st_size is wrong. + + * listfile.c (list_file): Don't convert blocks to kilobytes if + env. var POSIX_ME_HARDER is defined. + + * fstype.c [FS_AIX_STATFS]: New case. + + * configure: Make sure the sys/mount.h is the 4.4BSD version + with grep instead of just testing whether it exists. + + * listfile.c (list_file): Add 1 to number of 512-byte blocks + before dividing to get 1K blocks (so we round up, not down). + +Wed Aug 21 13:02:46 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * Version 3.1. + + * parser.c (parse_fprintf), pred.c (pred_fprintf): Add %k + conversion to print 1K blocks. + + * listfile.c: Print counts of 1K blocks, for consistency with + new fileutils release. Bad timing, there. + + * Version 3.0. + + * pred.c [VOID_CLOSEDIR]: Fake a return value for closedir, + which returns void on some systems, like Sequents. + * configure: Check sys/dir.h for 'void closedir'. + +Thu Aug 15 16:07:46 1991 David J. MacKenzie (djm at frob) + + * modetype.h: Define POSIX.1 stat stuff if missing. + * pred.c, parser.c, find.c, fstype.c: Don't define it. + * updatedb.sh: Use a variable substitution method like configure's. + * Makefile.in: Add datadir variable to separate programs from + data file. + + * parser.c, pred.c: Rename -fulldays to -daystart. + + * defs.h, find.c, parser.c, pred.c: Add many new predicates + from Jay Plett (jay@princeton.edu). + +Wed Aug 14 14:37:06 1991 David J. MacKenzie (djm at bleen) + + * parser.c (parse_size), pred.c (pred_size), defs.h (struct + size_t): Allow `k' to follow number to measure size in Kbytes. + * parser.c (parse_size, get_num, insert_num), defs.h (struct + size_t): Use enum comparison_type instead of short. + +Fri Aug 9 00:49:32 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * xargs.c (read_line): Use isblank, to support POSIX locales. + + * fstype [FS_STATVFS]: New code for SVR4, from slootman@dri.nl + (Paul Slootman). + * configure: Figure out when to use it. + + * configure: Check for st_blocks in struct stat. + * listfile.c (ST_NBLOCKS): New macro. + (list_file): Print file's block count. + Use S_ISLNK instead of S_IFLNK. + * fileblocks.c: New file, from fileutils. + +Thu Aug 8 17:20:19 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * parser.c, pred.c [CACHE_IDS]: Optional code to turn uid and + gid lookups into table lookups. + +Wed Aug 7 00:22:29 1991 David J. MacKenzie (djm at wheat-chex) + + * configure, Makefile.in's: Support +srcdir option via VPATH. + Clean up clean targets. + +Sat Jul 20 01:11:51 1991 David J. MacKenzie (djm at apple-gunkies) + + * configure: Filter /etc and /usr/etc from path. + + * xargs.c (wait_for_proc): Fix handling of child exit status. + (main): Exit with a nonzero status if any child did. + + * pred.c (launch): Flush stdout and stderr before forking. + + * fstype.c (filesystem_type) [FS_MNTENT]: Skip entries of + type "ignore". + +Fri Jul 19 22:53:42 1991 David J. MacKenzie (djm at bleen) + + * pred.c, locate.c: Use fnmatch instead of glob_match. + * fnmatch.c, fnmatch.h: New files. + + * Many files: Use string.h if STDC_HEADERS, as well as if USG. + + * locate.c, code.c, bigram.c: Possibly use pathconf to get + PATH_MAX. Use malloc to allocate path arrays. + + * xargs.c: Possibly use sysconf to get ARG_MAX. + (env_size): Make definition unconditional. + (main): Do arg_max adjustment that can't be done with + preprocessor now that ARG_MAX might be a function call. + (do_exec): Exit with status 126 or 127 after failed exec, for + POSIX.2 draft 11.1. + + * xargs.c, pred.c, listfile.c: Use POSIX, not UNISTD_MISSING. + * wait.h: Use POSIX, not WAIT_MACROS_MISSING. + + * COPYING: Use version 2. Update all files. + + * Replace Makefile and lib/Makefile with Makefile.in, + lib/Makefile.in and configure. Update README. + +Fri Apr 5 12:49:09 1991 David J. MacKenzie (djm at apple-gunkies) + + * Version 2.2. + +Fri Mar 15 20:44:45 1991 David J. MacKenzie (djm at geech.ai.mit.edu) + + * xargs.c (main): Always run the command if some args are left over. + Rename some variables. + +Fri Jan 18 03:35:57 1991 David J. MacKenzie (djm at geech.ai.mit.edu) + + * bigram.c, code.c, locate.c: Use LIMITS_MISSING, not + _POSIX_SOURCE, to decide whether to include limits.h. + + * parser.c, pred.c, listfile.c: Use POSIX, not _POSIX_SOURCE, + to decide whether to declare getpwuid and getgrgid. + + * xargs.c: Use POSIX, not _POSIX_SOURCE, to determine whether + to include memory.h. + +Sat Jan 12 04:12:34 1991 David J. MacKenzie (djm at wookumz.ai.mit.edu) + + * defs.h, find.c, parser.c, pred.c: Remove -permmask option. + +Thu Jan 10 04:32:52 1991 David J. MacKenzie (djm at albert.ai.mit.edu) + + * wait.h: Include sys/types.h to get pid_t. + + * xargs.c [USG && !STDC_HEADERS]: Only include memory.h if not + _POSIX_SOURCE. + +Tue Jan 1 23:53:32 1991 David J. MacKenzie (djm at albert.ai.mit.edu) + + * Version 2.1. + +Wed Dec 26 03:25:51 1990 David J. MacKenzie (djm at apple-gunkies) + + * locate.c, bigram.c, code.c: Attempt to get max. path length + on more kinds of systems, incl. POSIX. + + * pred.c, listfile.c, xargs.c: Get some decls from unistd.h, + if available. + + * find.c, defs.h: Make `cur_day_start' a time_t, not long. + +Fri Dec 21 01:49:12 1990 David J. MacKenzie (djm at egypt) + + * defs.h, parser.c: Remove unused field from `struct exec_t'. + + * xargs.c: Add +no-run-if-empty option to cause the command to + not be run if the input is empty. + + * defs.h (struct exec_t): Change the array of offsets into an + array of `struct path_arg'. + * parser.c (insert_exec_ok): Fill in new fields, to allow "{}" + to be substituted (multiple times) anywhere in an arg to -exec + or -ok. + * pred.c (pred_exec): Add code to substitute "{}" within args. + (pred_ok): After prompting, just run pred_exec. + +Thu Dec 20 02:32:09 1990 David J. MacKenzie (djm at egypt) + + * fstype.c (filesystem_type) [FS_MNTENT]: Allow for optional + "0x" at front of "dev=" mount option, which amd puts there but + Sun automounter doesn't. + +Sat Dec 15 19:01:12 1990 David J. MacKenzie (djm at egypt) + + * find.c (main), util.c (usage): Make directory args optional, + defaulting to ".". + +Sat Dec 15 18:36:29 1990 David J. MacKenzie (djm at apple-gunkies) + + * listfile.c: Define major and minor if not defined (as in POSIX). + +Mon Dec 3 01:04:35 1990 David J. MacKenzie (djm at alborz) + + * find.c, fstype.c, parser.c, pred.c, util.c: Flush stdout before + writing to stderr, in case they have been redirected to the + same file descriptor. + + * pred.c (launch): Use POSIX wait macros from wait.h. + + * xargs.c (print_xargs): Read from tty_stream, not stdin. + +Tue Nov 20 16:48:24 1990 David J. MacKenzie (djm at apple-gunkies) + + * Version 2.0. + + * fstype.c [FS_USG_STATFS]: New code. + [FS_STATFS]: For symlinks, statfs the directory the link is in + instead of the link. + * Various files: Conditionalize some declarations on + STDC_HEADERS or _POSIX_SOURCE. + +Fri Nov 16 12:24:43 1990 David J. MacKenzie (djm at egypt) + + * modetype.h: New file. + parser.c, pred.c: Use it. + +Thu Nov 15 18:05:54 1990 David J. MacKenzie (djm at apple-gunkies) + + * xmalloc.c: New file from fileutils. + + * fstype.c (fstype_to_string): Add case for MFS. + (filesystem_type): Take a pathname as a second arg. + [FS_STATFS] return "unknown" instead of exiting if statfs + fails because of ENOENT. + * pred.c (pred_fstype): Pass the pathname. Set current_dev. + * find.c (process_path): Make root_dev local again. + +Mon Nov 12 02:54:00 1990 David J. MacKenzie (djm at apple-gunkies) + + * pred.c (pred_fstype): Free old fs type. + + * fstype.c, pred.c (pred_fstype), parser.c (parse_fstype): + Reread the file system type info. every time a filesystem + mount point is crossed, to allow for automounting. + + * xstrdup.c: New file from fileutils. + + * find.c (process_path): Rename root_dev to current_dev and + make it global, for -fstype. + + * wait.h: New file taken from xargs.c. + + * xargs.c: Make limits.h vs. sys/param.h conditional on + LIMITS_MISSING instead of USG, to accomodate SVR2. + +Thu Nov 8 11:52:22 1990 David J. MacKenzie (djm at apple-gunkies) + + * parser.c, pred.c, listfile.c: If not _POSIX_SOURCE, declare + getpwuid and getgrgid. Use them. + + * listfile.c: If not _POSIX_SOURCE, define S_ISDIR and + S_ISBLK. Use them. + + * find.c: Use S_ISDIR instead of S_IFDIR, and define if not + _POSIX_SOURCE. + + * Makefile: Define AR and RANLIB and pass to child makes. + lib/Makefile: Use them. + + * xargs.c (WIFSIGNALED): Redefine so it works. + +Mon Nov 5 00:02:01 1990 David J. MacKenzie (djm at apple-gunkies) + + * find.c (process_path): For -xdev, process filesystem + mountpoints (but don't descend them), instead of skipping them + entirely. + + * find.c, parser.c, defs.h: Add -follow predicate. + + * xargs.c: Change ifdefs to support STDC POSIX systems. + +Sat Nov 3 20:18:05 1990 David J. MacKenzie (djm at apple-gunkies) + + * xargs.c (do_exec): Child process exits with status 255, not + 127, if command can't be run. + +Fri Nov 2 02:11:42 1990 David J. MacKenzie (djm at apple-gunkies) + + * xargs.c: Exit with status 127 if running commmand fails, as + required by POSIX. + + * fstype.c: Support -fstype for Ultrix (-DFS_GETMNT). + Sun/BSD code is now -DFS_MNTENT. + +Thu Nov 1 13:06:01 1990 David J. MacKenzie (djm at egypt) + + * Reorganize into subdirectories and add xargs. Rewrite Makefiles. + + * find.c (process_path, main): Allow a maxdepth of 0, meaning + only process command line args. + + * parser.c, pred.c: Add -print0 predicate. + + * xargs.c: Add -0 option and long options. Move standard + library functions into separate files. Use error instead of + fatal and fprintf/perror. Use POSIX macros for examining exit + status from wait. + (read_string): New function. + +Fri Sep 21 10:21:09 1990 David J. MacKenzie (djm at apple-gunkies) + + * find.c (process_path): Take DEPTH as an arg instead of ROOT, + and change callers. + +Thu Sep 20 23:58:47 1990 David J. MacKenzie (djm at apple-gunkies) + + * parser.c (parse_maxdepth): New function. + * find.c (process_path): If -maxdepth was given, don't go + more than that many levels deep. + * defs.h: Declare maxdepth. + +Wed Sep 12 02:12:31 1990 David J. MacKenzie (djm at apple-gunkies) + + * parser.c: Add -not as synonym for !. + +Sun Aug 26 06:16:08 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * Makefile (TAGS): New target. + +Sun Aug 12 00:32:01 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * xargs.c (main): Tell getopt to not permute. + +Sat Aug 4 21:43:45 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * parser.c (parse_perm), pred.c (pred_perm): Always compare + bits 07777. + + * locate.c, Makefile: Rename 'fastfind' program to 'locate', + following comment in POSIX.2 draft 10 rationale for find. + +Wed Jul 25 18:45:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * listfile.c (getuser, getgroup): Make uid and gid unsigned + short, not int. + +Mon Jul 16 13:40:13 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * defs.h: Don't declare fprintf and printf, in case they have + prototypes in stdio.h (important for functions that use stdarg). + +Sun Jul 15 23:39:39 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * parser.c (parse_and): New function, for compatibility. + +Wed Jul 4 00:17:57 1990 David J. MacKenzie (djm at apple-gunkies) + + * find.c (main): Only enclose expressions that produce no side + effects within `( ... )'. + +Tue Jul 3 01:59:39 1990 David J. MacKenzie (djm at apple-gunkies) + + * parser.c (strspn): Stop when end of string reached. + + * Version 1.2. + + * Move version number from Makefile to new file version.c. + * parser.c: Recognize new -version predicate. + + * find.c (main): If no predicates that produce output are + given, default to -print if the entire expression is true, not + just the last part of an alternation. + * Print the names of predicates with invalid arguments. + +Mon Jul 2 23:48:17 1990 David J. MacKenzie (djm at apple-gunkies) + + * pred.c: Don't check for invalid comparison types in numeric + predicate functions. + +Thu Jun 28 00:34:57 1990 David J. MacKenzie (djm at apple-gunkies) + + * parser.c (parse_regex): Set fastmap and translate before + compiling regex. + +Mon Jun 25 18:08:59 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * fastfind.c (fastfind): Initialize count to 0. + + * lib/updatedb.sh: Only do regex comparison on directories, + for speed. + + * listfile.c (list_file): Truncate user and group name to 8 chars. + +Sun Jun 24 13:51:27 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * Version 1.1. + + * Makefile [DISTFILES]: Add COPYING. + +Fri Jun 22 03:54:27 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * Version 1.0. + +Tue Jun 19 03:55:28 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * lib/updatedb.sh: Prune entries that match PRUNEREGEX. + Split up finding files from computing bigrams. + Use redirection instead of nonportable grep -s to detect sort + failure. Optionally search network filesystems as well as + local ones. + + * pred.c (pred_regex): Match against full pathname instead of + just last element. + * util.c (basename): Return "/", not "", if given "/". + + * find.c (process_path): Fix error in handling "/" directory. + +Mon Jun 18 01:49:16 1990 David J. MacKenzie (djm at apple-gunkies) + + * parser.c [STRSPN_MISSING] (strspn): New function. + +Sun Jun 17 13:54:09 1990 David J. MacKenzie (djm at apple-gunkies) + + * listfile.c: New file. + * parser.c (parse_ls): New function. + * pred.c (pred_ls): New function. + + * find.c (main): Remove interface to fastfind, to prevent + conflict with POSIX syntax. + * util.c (usage): Remove fastfind syntax from message. + * fastfind.c (main): New function. + * Makefile: Make fastfind a separate program. + + * find.c (main): Print correct message if a predicate arg is + missing. + + * parser.c (insert_exec_ok): Make args that start with a ';' but + contain other characters not terminate the command. + +Fri Jun 15 00:33:45 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * fstype.c: If MOUNTED isn't defined but MNT_MNTTAB is, use it + instead. True for HP/UX, at least. + +Thu Jun 14 10:10:25 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * savedir.c: New file; now find won't run out of file + descriptors in deep trees. + * find.c (process_path): Use savedir. + +Sat Jun 9 03:15:21 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * parser.c (parse_permmask): Allow symbolic mode masks. + (parse_perm): Free 'struct change' when done with it. + (get_oct): Function removed. + + * find.c (process_path): Allow arbitrarily-long filenames. + More efficient string copying. Initialize perm_mask to 07777 + instead of -1. + +Thu Jun 7 04:22:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * Makefile, find.c: Use DIRENT to control whether + is used. + +Thu May 31 04:46:11 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * parser.c (parse_regex): New function. + * pred.c (pred_regex): New function. + + * fstype.c (read_mtab): If mtab entry has a "dev=" option + (like in SunOS 4.1), use it, so there is no need to stat the + special file later on. + (xatoi, strstr): New functions. + +Mon May 21 01:04:42 1990 David J. MacKenzie (djm at abyss) + + * lib/updatedb.sh: Put BINDIR in PATH. + + * fstype.c: Do nothing if MNTENT_MISSING is defined. + + * fstype.c: New file. + * parser.c (parse_fstype): New function. + * pred.c (pred_fstype): New function. + + * parser.c (parse_newer): Failure to stat -newer file is a + fatal error. + + * pred.c (pred_ok): Flush output before reading. Use getchar + instead of scanf. + + * pred.c (pred_prune): Return false if -depth given. + * find.c: Apply the predicates to the dir when -depth and + -prune are given. + +Sun May 20 19:55:30 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * pred.c (pred_prune): Set new global var `stop_at_current_level'. + * find.c (process_path): Test and reset it. + +Fri May 18 01:56:17 1990 David J. MacKenzie (djm at abyss) + + * modechange.c, modechange.h: New files. + * parser.c (parse_perm): Use mode_compile and mode_adjust to + parse arg, to allow symbolic mode for POSIX. + +Thu May 17 02:07:44 1990 David J. MacKenzie (djm at abyss) + + * parser.c (get_oct): Don't consider an empty string a valid number. + + * parser.c (parse_perm): If arg starts with '-', set flag bit + for special comparison (POSIX). + * pred.c (pred_perm): If flag bit set, compare s[ug]id & + sticky bits as well, and return true if the given perms are + set, ignoring other bits. + + * find.c: New global var `exit_status'. Use it. (POSIX) + * parser.c: Set `exit_status' if lstat on -newer file fails. + + * fastfind.c: New file. + * find.c (main): Call fastfind if given only 1 arg. + * util.c (usage): Update message. + * lib/{Makefile,updatedb.sh,bigram.c,code.c}: New files. + * Makefile: Add 'all' and 'install' targets. + +Wed May 16 23:23:35 1990 David J. MacKenzie (djm at abyss) + + * parser.c (parse_nogroup, parse_nouser): Implement. + * pred.c (pred_nogroup, pred_nouser): Implement. + +Mon May 14 00:09:35 1990 David J. MacKenzie (djm at abyss) + + * find.c: Add variable `stay_on_filesystem' for -xdev. + (process_path): Take an arg determining whether this call is + the root of a tree. Use lstat instead of stat. If + stay_on_filesystem, don't process a dir on a different + filesystem. + + * parser.c (parse_newer): Use lstat instead of stat. Is this right? + (parse_xdev): Set stay_on_filesystem. + + * parser.c: Add dummy parse_nogroup, parse_nouser, + parse_prune, and parse_xdev; to be written later. + * pred.c: Add dummy pred_nogroup, pred_nouser, pred_prune. + + * find.c: Support System V directory library/headers. + + * find.c (process_path): Don't continue with a file that stat + fails on. + + * defs.h, parser.c, pred.c: Change 'u_long' and 'u_short' to + 'unsigned long' and 'unsigned short'. + * find.c, defs.h: Remove 'convert_glob' variable. + * parser.c (parse_fullregex): Function removed. + (parse_name): Remove regular expression code. + (parse_type): Recognize sockets. + Add code to check for missing arguments to many parse_* functions. + * pred.c (pred_name): Use glob_match instead of regex. + +Sun May 13 17:45:09 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * Replace fprintf, simple_error, and mem_error with error and + usage. + + * Fix string header includes for USG. + +Tue Mar 27 12:40:29 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * defs.h: Change some #defines to enums. + +Sun Mar 25 22:08:58 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * find.c (main): Don't take basename of argv[0]. + + * util.c (xmalloc): New function. + * find.c, parser.c, utils.c: Use xmalloc instead of malloc. + + * pred.c: Remove emulation of regex for BSD and use GNU + library version in regcmp.c instead. + * parser.c: Remove emulation of regcmp for BSD and use GNU + library version in regcmp.c instead. + * Makefile: Link with regex.o and regcmp.o. + Add a DISTFILES macro and dist target. + + * Indent source code. Move RCS logs to this file. + +Wed Mar 21 09:30:18 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * xargs.c: Indent. Comment and rename some global variables. + (main): Use getopt to parse options. Open new global var + `tty_stream' to /dev/tty if querying requested. + (print_args): Read response from tty_stream, not stdin. + (xmalloc): New function. + Global: Use xmalloc instead of malloc. + (usage): Revise message. + +87/02/22 20:01:20 20:01:20 cire (Eric B. Decker) + + * pred.c: added guts to pred_size + +87/02/22 00:59:42 00:59:42 cire (Eric B. Decker) + + * pred.c: added guts to perm and permmask. + +87/02/21 23:02:21 23:02:21 cire (Eric B. Decker) + + * pred.c: made pred_name only look at the last component of + the path. + +87/02/21 22:26:47 22:26:47 cire (Eric B. Decker) + + * pred.c: added guts to name. useds regex and regcmp to do + regular expression handling. + +87/02/21 00:17:21 00:17:21 cire (Eric B. Decker) + + * pred.c: added predicate newer + +87/02/20 11:40:07 11:40:07 cire (Eric B. Decker) + + * pred.c: added guts to pred_ok + +87/02/19 23:52:37 23:52:37 cire (Eric B. Decker) + + * pred.c: finished exec. + +87/02/22 20:01:09 20:01:09 cire (Eric B. Decker) + + * parser.c: added guts to parse_size + +87/02/22 00:59:16 00:59:16 cire (Eric B. Decker) + + * parser.c: added guts of perm and permmask. added getoct + routine for perm and permmask + +87/02/21 23:32:50 23:32:50 cire (Eric B. Decker) + + * parser.c: added -fre, -fullregex predicate to turn off + globbing conversion + +87/02/21 23:01:01 23:01:01 cire (Eric B. Decker) + + * parser.c: reworked name so the regexpr pattern includes $ at + the end to force globbing to work correctly. End of the + pattern refers to the end of the filename. + +87/02/21 22:25:34 22:25:34 cire (Eric B. Decker) + + * parser.c: added guts to name. uses a conversion from + globbing to regexp format. uses regex and regcmp to actually + to the comparison. + +87/02/21 00:17:11 00:17:11 cire (Eric B. Decker) + + * parser.c: added predicate newer + +87/02/20 11:39:35 11:39:35 cire (Eric B. Decker) + + * parser.c: added ok guts. consolidated exec and ok to using + insert_exec_ok + +87/02/19 00:20:54 00:20:54 cire (Eric B. Decker) + + * parser.c: minor bug in -fulldays predicate parser. It + should have set the flag full_days to true. + +87/02/22 00:58:32 00:58:32 cire (Eric B. Decker) + + * find.c: changed where we are setting perm_mask to -1. need + to make sure that this happens before every apply_predicate. + +87/02/21 23:32:11 23:32:11 cire (Eric B. Decker) + + * find.c: added error checking for no paths. better error + message if illegal ordering. + +87/02/21 22:19:58 22:19:58 cire (Eric B. Decker) + + * find.c: added global convert_glob + +87/02/22 20:00:12 20:00:12 cire (Eric B. Decker) + + * defs.h: added definition of BLKSIZE for size + +87/02/21 22:19:25 22:19:25 cire (Eric B. Decker) + + * defs.h: added global convert_glob for name diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..23e5f25 --- /dev/null +++ b/INSTALL @@ -0,0 +1,236 @@ +Installation 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. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..0f5bf88 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,56 @@ +AUTOMAKE_OPTIONS=gnits +# readme-alpha + +EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \ + THANKS import-gnulib.sh import-gnulib.config +# "tests" is the gnulib unit test dir. +SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4 + +ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4 + +TESTFILE_SUFFIXES = .exp .xo .xe .xi + +# CONFIG_CLEAN_FILES = gnulib/lib/regex.c + + +# DISTCLEANFILES = intl/libintl.h + +dist-hook: jy-regex-fix findutils-check-pofiles findutils-check-testfiles + + +## +## regex.c seems to get left out if I use automake-1.9 but not +## if I use automake-1.7. Hence dist-hook has to be able to +## copy regex.c into the relevant (read-only) directory if it +## is not already there, but needs to avoid doing so if the +## file is already in place. Ugh. +## -- James Youngman +## +jy-regex-fix: + if test -f $(distdir)/gnulib/lib/regex.c ; then \ + echo regex.c is already in place. Great. ; \ + else \ + echo Making $(distdir)/gnulib/lib writable ... ; \ + chmod +w $(distdir)/gnulib/lib ; \ + echo Copying $(srcdir)/gnulib/lib/regex.c to $(distdir)/gnulib/lib ; \ + cp $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib/regex.c ; \ + fi +# ls -ld $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib + +## Check that we actually shipped all the .po files. If this rule fails, +## check ALL_LINGUAS in configure.in against the po files in the source +## directory (their names, not their contents) +findutils-check-pofiles: + @echo ; echo Checking to see if we distributed the full set of .po files + distcount=`ls $(distdir)/po/*.po | wc -l` ; srccount=`ls $(srcdir)/po/*.po | wc -l` ; test $$distcount -eq $$srccount || ( echo FAILED: Please check the value of ALL_LINGUAS in configure.in against the actual set of ".po" files >&2 ; false ) + @echo All .po files distributed OK. + +## Check that we actually shipped all the test files that exist in the source. +## runtest will run all the .exp files it finds, and so if we don't ship all +## of them, there will be some tests which people using the CVS code will be +## running, but people using the source distribution will not. +findutils-check-testfiles: + @echo + $(AUXDIR)/check-testfiles.sh "$(distdir)" "$(srcdir)" $(TESTFILE_SUFFIXES) + + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..f95365f --- /dev/null +++ b/Makefile.in @@ -0,0 +1,955 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ + INSTALL NEWS README-alpha THANKS TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = gnits +# readme-alpha +EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \ + THANKS import-gnulib.sh import-gnulib.config + +# "tests" is the gnulib unit test dir. +SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4 +ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4 +TESTFILE_SUFFIXES = .exp .xo .xe .xi +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnits '; \ + cd $(srcdir) && $(AUTOMAKE) --gnits \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits 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: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) 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: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) 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) + @case `sed 15q $(srcdir)/NEWS` in \ + *"$(VERSION)"*) : ;; \ + *) \ + echo "NEWS not updated; not releasing" 1>&2; \ + exit 1;; \ + esac + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(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 $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile 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: + +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: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am + + +# CONFIG_CLEAN_FILES = gnulib/lib/regex.c + +# DISTCLEANFILES = intl/libintl.h + +dist-hook: jy-regex-fix findutils-check-pofiles findutils-check-testfiles + +jy-regex-fix: + if test -f $(distdir)/gnulib/lib/regex.c ; then \ + echo regex.c is already in place. Great. ; \ + else \ + echo Making $(distdir)/gnulib/lib writable ... ; \ + chmod +w $(distdir)/gnulib/lib ; \ + echo Copying $(srcdir)/gnulib/lib/regex.c to $(distdir)/gnulib/lib ; \ + cp $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib/regex.c ; \ + fi +# ls -ld $(srcdir)/gnulib/lib/regex.c $(distdir)/gnulib/lib + +findutils-check-pofiles: + @echo ; echo Checking to see if we distributed the full set of .po files + distcount=`ls $(distdir)/po/*.po | wc -l` ; srccount=`ls $(srcdir)/po/*.po | wc -l` ; test $$distcount -eq $$srccount || ( echo FAILED: Please check the value of ALL_LINGUAS in configure.in against the actual set of ".po" files >&2 ; false ) + @echo All .po files distributed OK. + +findutils-check-testfiles: + @echo + $(AUXDIR)/check-testfiles.sh "$(distdir)" "$(srcdir)" $(TESTFILE_SUFFIXES) +# 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/NEWS b/NEWS new file mode 100644 index 0000000..10d7c16 --- /dev/null +++ b/NEWS @@ -0,0 +1,1176 @@ +GNU findutils NEWS - User visible changes. -*- outline -*- (allout) +* Major changes in release 4.3.8 + +** Bug Fixes + +#20157: Avoid segfault in locate when run as root. This is caused by +a buffer overrun, but at this time no explot mechanism is known. + +* Major changes in release 4.3.7 + +** Functional changes + +Locate can now read old-format locate databases generated on machines +with a different byte order. It does this by guessing the byte order, +so the result is not completely reliable. If you need to share +databases between machines of different architectures, you should use +the LOCATE02 format (which has other advantages, as explained in the +documentation). + +** Security Fixes + +#20014: Findutils-4.3.7 includes a patch for a potential security +problem in locate. When locate read an old-format database, it read +file names into a fixed-length buffer allocated on the heap without +checking for overflow. Although overflowing a heap buffer is often +somewhat safer than overflowing a buffer on the stack, this bug still +has potential security implications. + +This bug also affected the following previous findutils releases: + + - All releases prior to 4.2.31 + - Findutils 4.3.0 to 4.3.6. + +This bug has been assigned CVE number CVE-2007-2452. + +** Bug Fixes + +#20128: Fix compilation error of find/tree.c on AIX with GCC. + +#20005: Tests -mtime -n and -mtime +n incorrectly treated like -mtime n. + +#19983: include_next causes compilation failure in findutils 4.3.6 on +non-GCC compilers + +#19981: Don't call setgroups if the function isn't available. This +fixes Savannah bug# 19981. + +#19980: Don't use the functions putw() or getw() since these are not +in current POSIX. Use the gnulib version of wcwidth() where the +system does not provide it. + +#19979: Compilation errors on BeOS + +#19970: Cannot cast from pointer to bool using gnulib's + +#19967: Use of __attribute((__noreturn__)) makes compilation fail with +some non-GCC compilers + +#19966: find should link against -lm for modf() and fabs() + +#19965: Compilation failure on OSF/1 4.0; non-declaration of uintmax_t + +#19948: Assertion failure O_NOFOLLOW != 0 on IRIX 6.5 + +#19871: Typos in find.1 + +#19596: Fixed this bug again, this time in the Texinfo manual (the +discussion should compare %b with %s/512, not %s/1024). + +#19416: _FORTIFY_SOURCE warn_unused_result warnings + +* Major changes in release 4.3.6 + +** Bug Fixes + +#19948: Fixed an assertion failure on IRIX 6.5 (O_NOFOLLOW is defined +to 0 there). + +#19923: Fixed an array overrun in groups[] array of 'locate' when run by +or as root. This bug appears not to be exploitable. If locate is not +installed setuid, the bug is not exploitable. For setuid +installations, it is concievable that there could be an information +leak if the user uses the -d option or the -e option, though the +maintainer has been unable to provoke this on an x86 system. + +#19871: Spurious .R directives in manpage produced error messages from +GNU troff. This is now fixed (they are corrected to .B). + +#19416: The result of I/O operations in print-related actions is now +checked, and failures are reported. Any failure will cause find's +exit status to be nonzero. The predicate itself will continue to +return true. + +** Compilation Fixes + +A variety of changes were made to allow compilation to succeed on +non-GNU systems. + +#19983: Now compiles on DEC C V5.9-005 on Digital UNIX V4.0 (or at +least, should). + +#19970: Compile correctly on C89 systems where the "_Bool" type is not +provided, taking into account the limitations of the gnulib +replacement for stdbool.h. + +#19967: Build successfully with C compilers that don't support the GCC + construct __attribute__((__noreturn__)). + +#19966: Findutils should now build on systems which have the modf() +and fabs() functions in the maths library, -lm. This includes some +versions of HP-UX and Solaris. + +#19965: Fixed a compilation failure on OSF/1 4.0 (no definition of the +type uintmax_t). + + +* Major changes in release 4.3.5 + +** Functional changes + +Updatedb can now support he generation of file name databases which +are compatible with slocate. For some time, GNU locate has been able +to read these. + +The /proc filesystem is excluded from the locate database (by +default; change PRUNEPATHS to modify this behaviour). + +** Bug Fixes + +#19806: The -samefile predicate might get fooled by inode reuse. We +now hold open a file descriptor on the reference file to prevent this. + +#19768: Better detection of corrupted old-style locate databases +(e.g. if the database is too short to include a complete bigram +table). + +#19766: The frcode and code programs now detect write errors more +reliably. + +#19371: Fix compilation failure on systems which #define open to +open64 (and similarly with the close system call). This fixes +Savannah bug #19371, affecting AIX 5.3. + +#19658: When cross-compiling, "make clean" no longer deletes the +generated file doc/regexprops.texi, because there is no way to +regenerate it. + +#19391: When xargs knows that the system's actual exec limit is larger +than the compiled-in ARG_MAX, use the system's limit without +generating an assertion failure. + +#18203: A duplicate report of bug #17478. + +#17478: Error messages from find can garble the console. + +#16378: Assertion failure if stat() returns 00000 as the mode +of a file. This apparently can happen occasionally with broken NFS +servers. + +#11668: FreeBSD extensions for time specification are now +implemented. In fact, these were included in findutils-4.3.3. The +change was listed as a functional change (whcih it is) and this bug +report was not mentioned. + +** Documentation Fixes + +The locatedb.5 manpage now documents the (default) LOCATE02 format +more clearly, and also documents the slocate database format. + +The maximum and default values applying to the -s option of xargs are +now documented more clearly in the manual page. + +* Major changes in release 4.3.4 + +** Bug Fixes + +#19634: Test suite now passes (again) if "." is on your $PATH. + +#19619: Findutils builds once again on Cygwin. + +#19617: Nonexistent start points are (once again) diagnosed in +ftsfind. This bug affected only findutils-4.3.3. + +#19616: Fix leaf optimisation and loop detection (which were +unreliable in findutils 4.3.3). This bug affected only +findutils-4.3.3. + +#19615: find --version no longer claims to be using FTS_CWDFD when it +isn't. This bug affected only findutils-4.3.3. + +#19613: "find -L . -type f" no longer causes an assertion failure when +it encounters a symbolic link loop. This bug affected only +findutils-4.3.3. + +#19605: Issue an error message (and later return nonzero exit status) + if a symbolic link loop was encountered during directory traversal. + +#19484: bigram.c and code.c fail if the first pathname recorded begins +with a space + +#19483: Inconsistent option highlighting in updatedb manpage + +#18414: Tests for "find -readable" are skipped for the superuser, as + on some systems (e.g. Cygwin with an Administrative user) users can + read mode-000 files. + +** Translations + +Findutils 4.3.4 includes a translation for the Ukranian language. + + +* Major changes in release 4.3.3 + +Fiundutils-4.3.3 was released on 2007-04-15. + +** Bug Fixes + +#19596: Correct the comparison in the find manpage between %b and %s +(the divisor is 512 not 1024). + +#18714: In the POSIX locale, vertical tabs and form feeds are not +field separators. + +#18713: Quoted but empty arguments which occur last on an xargs input +line are no longer ignored, but instead produce an empty argument. + +#18554: Documented the construct -exec sh -c 'foo "$@" bar' {} + + +#18466: we now avoid this bug by limiting "-execdir ...+" +to just one argument for the time being. There is a performance +penalty for doing this. We hope to make a better fix in a later +release. + +#18384: excess bracket in xargs --help + +#18320: Zero bytes in input should give warning + +#17437: Corrected the handling of X in symbolic permissions (such +as-u+w,a+X). This change actually occurred in findutils-4.3.2, but +the NEWS file for that release didn't mention it. + +#17396: find -mtime -atime -ctime does not support fractional part +(see "Functional changes" below) + +#14748: find -perm /zzz gives wrong result when zzz evaluates to an + all-zero mask + +#14535: correctly support case-folding in locate (that is, "locate +-i") for multibyte character environments such as UTF-8. Previously, +if your search string contained a character which was outside the +single-byte-encoding range for UTF-8 for example, then the +case-folding behaviour failed to work and only exact matches would be +returned. + + + +** Functional changes + +The -printf action (and similar related actions) now support %S, +which is a measurement of the sparseness of a file. + +The test "-perm /000" now matches all files instead of no files. For +over a year find has been issuing warning messages indicating that +this change will happen. We now issue a warning indicating that the +change has already happened (in 4.3.x only, there is no plan to make +this change in the 4.2.x series). + +The tests -newer, -anewer, -cnewer, -mtime, -atime, -ctime, -amin, +-cmin, -mmin and -used now support sub-second timestamps, including +the ability to specify times with non-integer arguments. + +The -printf format specifiers also support sub-second timestamps: + atime ctime mtime + %a %c %t + %AS %CS %TS + %AT %CT %TT + %A+ %C+ %T+ + %AX %CX %TX + + +The new test -newerXY supports comparison between status times for +files. One of the status times for a file being considered (denoted +X) is checked against a reference time (denoted Y) for the file whose +name id the argument. X and Y can be: + + a Access time + B Birth time (st_birthtime, currently unsupported) + c Change time + m Modification time + t Valid only for the reference time; instead of comparison + against a file status time, the argument is a time string. + Not yet supported. + +For example, -newermm is equivalent to -newer, and -neweram is true if +the file being considered was accessed more recently than the +reference file was modified. The -newerXY test supports subsecond +timestamps where these are available. The X=B variant is not yet +implemented. + +If you configure the sourec code and then run the tests with "make +check", the test suite fails rather than defaulting to testing the +system binaries. + + +* Major changes in release 4.3.2 + +** Bug Fixes + +#18222: find -printf '%H %P' once again prints the right result if +more than one start point was given on the command line. + +#17782: find -execdir now correctly puts the prefix "./" before the +expansion of "{}" rather than at the start of the argument it appears +in. Please note that if you use the -exec or -execdir actions with a +shell, then you may be vulnerable to shell code injection attacks, so +don't do that. It's not a security defect in find - you should not be +passing untrusted data (such as file names chosen by other people) to +the shell. + +#17490: find -regex generated a segfault in findutils-4.3.1, but this + is fixed in findutils-4.3.2. + +#17477: find -printf '%' (that is, where the format has a trailing %) +now generates an error message. + +#17372: The fts-based find executable (the default configuration uses +fts) is now much faster when -maxdepth is used on filesystems with +high fanouts. + +#15531: The -prune action now behaves correctly when applied to a file. + +** Functional changes + +The slocate database format is now supported. Preliminary changes +intended to eventually allow setuid operation of locate have also been +made. For the moment, please don't install GNU locate as a +set-user-ID program (except for testing purposes; if you do so, please +make sure that untrusted users cannot execute the set-user-ID locate +program). + +Use of an slocate database which was built with a nonzero security +mode (at the moment, GNU updatedb will not do this) forces locate's +"-e" option to be turned on, which has an effect on the "-S" option +which is probably surprising for most users. + + +** Documentation Fixes + +The global effect of options (other than -daystart and -follow) is now +explained more clearly in the manual page. Savannah bug #15360. + + +* Major changes in release 4.3.1 + +** Bug Fixes + +Find now follows POSIX rules for determining where directories end and +expressions start. This means that "find \(1 \!2 \, \)" now searches +in the four named directories, rather than trying to parse an +expression. (Savannah bug #15235). + +You now get a more helpful error message when you use command lines +which have missing expressions, such as + find . ( ) + find . ! + find . -a + find . \( -not \) + find . \( -true -a + +Savannah bug #15800: If find finds more subdirectories within a parent +directory than it previously expected to based on the link count of +the parent, the resulting error message now gives the correct +directory name (previously an error message was issued but it +specified the wrong directory). + +Savannah bug #16738: "find .... -exec ... {} +" now works if you have +a large environment and many files must be passed to the -exec +action. The same problem affected the -execdir action, though since +the number of files in a given directory will normally be smaller, the +problem was worse for -exec. + +Savannah bug #16579: Updatedb now works if it is running as a user +whose login shell is not actually a shell. + +There have also been a number of documentation improvements (includng +Savannah bug #16269). + +** Functional changes + +For find, debug output can now be enabled at runtime with the -D +option. This causes the printing of various sorts of information +about find's internal state and progress. + +The find option -nowarn cannot itself produce a warning (this used to +happen with commands like "find . -name quux -nowarn -print"). + +** Performance Enhancements + +Find now has a rudimentary cost-based optimiser. It has an idea of +the basic cost of each test (i.e. that -name is very cheap while -size +is more expensive). It re-orders tests bearing in mind the cost of +each test and its likely success. Predicates with side effects (for +example -delete or -exec) are not reordered. The optimiser is not +yet enabled by default, but the new option -O controls the query +optimisation level. To see this in action, try + find -D opt -O3 . -type f -o -type c -o -size 555 -name Z +and compare the optimised query with: + find -D opt -O3 . -size 555 -o -type c -o -type f -name Z +and + find -D opt . -size 555 -o -type c -o -type f -name Z + +Over time, as optimisations are proven to be robust and correct, they +will be moved to lower optimisation levels. Some optimisations have +always been performed by find (for example -name is always done early +if possible). + +** Translations + +Findutils 4.3.1 includes updated translations for the following +languages: + Vietnamese, Belarusian, Catalan, Danish, German, Greek, Esperanto, + Spanish, Estonian, Finnish, French, Irish, Galician, Croatian, Hungarian, + Indonesian, Italian, Japanese, Korean, Luganda, Malay, Dutch, Polish, + Portuguese, Brazilian Portuguese, Romanian, Russian, Kinyarwanda, + Slovak, Slovenian, Serbian, Swedish, Turkish, Chinese (simplified), + Chinese (traditional), Bulgarian + +* Major changes in release 4.3.0 + +The 4.3.x release series are currently 'development' releases. Please +test it, but think carefully before installing it in a production +system. New features in findutils-4.3.x are under development; they +may change or go away. + +All changes up to and including findutils-4.2.27 are included in this +release. In addition the following changes are new in this release: + +** Functional Changes + +By default, find now uses the fts() function to search the file +system. The use of fts greatly increases find's ability to search +extremely deep directory hierarchites. + +You can tell that the version of find you are using uses FTS, because +the output of "find --version" will include the word "FTS". + +Currently two binaries for 'find' are built. The configure option +--without-fts can be used to select whether 'find' uses fts: + + With fts Without fts +default configuration find oldfind +configure --with-fts find oldfind +configure --without-fts ftsfind find + +New tests, -readable, -writable, -executable. These check that a file +can be read, written or executed respectively. + +* Major changes in release 4.2.27 + +** Warnings of Future Changes + +The test -perm /000 currently matches no files, but for greater +consistency with -perm -000, this will be changed to match all files; +this change will probably be made in early 2006. Meanwhile, a warning +message is given if you do this. + +** Bug Fixes + +If xargs is invoked with many short arguments on PPC systems running +the Linux kernel, we no longer get an "argument list too long" error +from the operating system. + +Fixed a bug in the test suite which caused it to spuriously fail on +systems where ARG_MAX is different to the value used by the Linux +kernel on 32-bit x86-architecture systems. + +On systems running the Linux kernel, "find -printf %F" no longer +produces the wrong answer for files on filesystems that have been +remounted elsewhere using "mount --bind". (Savannah bug #14921). + +** Documentation Changes + +Following some extensive and detailed review comments from Aaron +Hawley, the material in the manual pages and the Texinfo manual are +now synchronised. + +The %M format specifier of "find -printf" is now documented, although +it has existed since release 4.2.5. + +The 'find' manual page now correctly documents the fact that -regex +defaults to using Emacs-style regular expressions (though this can be +changed). + +* Major changes in release 4.2.26 + +** Public Service Announcements + +I'd like to point out a second time that the interpretation of '-perm ++mode' has changed to be more POSIX-compliant. If you want the old +behaviour of the GNU extension you should use '-perm /mode'. See the +NEWS entry for findutils version 4.2.21 for details. + +** Functional Changes + +The xargs command now supports a new option (--delimiter) which allows +input items to be separated by characters other than null and +whitespace. This resolves Savannah support request sr #102914. + +Sometimes find needs to read the /etc/mtab file (or perform the +equivalent operation on systems not using /etc/mtab). If this +information is needed but not available, find now exits with an error +message non-zero status. If the information is not needed, find will +not spuriously fail. + +A new xargs option --delimiter allows the input delimiter to be +changed (previously \0 was the only choice unless you use the -L +option, which changes other semantics too). + +** Bug Fixes + +If the environment size is too large to allow xargs to operate +normally, 'xargs --help' still works (now). + +If the input to xargs is a large number of very short options (for +example, one character each), earlier versions of xargs would fail +with 'Argument list too long'. However, since this is precisely the +problem that xargs was invented to solve, this is a bug. Hence on +those systems we now correctly use a shorter command line. This +problem particularly affected 64-bit Linux systems because of the +larger size of pointers, although 32-bit Linux systems were also +affected (albeit for longer command lines). In theory the same +problem could affect 'find -exec {} +', but that's much less likely +(even so, the bug is fixed there too). + +Bugfix for an unusual failure mode (Savannah bug #14842) where an +attempt to allocate more space for directory contents succeeds but is +incorrectly diagnosed as a failure. The likelihood of you +experiencing this depends on your architecture, operating system and +resource limits. This failure has been observed in a directory +containing 35396 entries. + +** Documentation Changes + +The EXAMPLES section of the find manual page now correctly describes +the symbolic and octal modes for the -perm test. + +The documentation and "--help" usage information for the -L, -l, -I +and -i options have been clarified (but the behaviour has not changed). + +The documentation now explains more clearly what happens when you use +"-L -type l". + +* Major changes in release 4.2.25 + +** Bug Fixes + +find -perm /440 (which should succeed if a file is readable by its +owner or group) now works. Previously there was a bug which caused +this to be treated as "find -perm 440". + +Some files in the xargs test suite have been renamed to avoid problems +on operating systems whoch cannot distinguish filenames on the basis +of upper/lower case distinctions. + +The software now builds on Cygwin, including the generated file +regexprops.texi. + +Findutils should now build once again on systems supporting AFS, but +this support has not recently been fully tested. Findutils should +also (once again) build on Cygwin. + +** Other Changes + +The test suite for find is now much more extensive. + +* Major changes in release 4.2.24 + +** Documentation Changes + +The manual now includes a "Worked Examples" section which talks about +the various ways in which findutils can be used to perform common +tasks, and why some of these alternatives are better than others. + +The -I option of xargs (which is required by the POSIX standard) is +now documented. + +We now document the fact that find ensures that commands run by -ok +and -okdir don't steal find's input. Find does this by redirecting +the command's standard input from stdin. + +Many documentation readability enhancements and proofreading fixes +were contributed by Aaron Hawley. + +** Functional Changes + +*** Functional changes in locate + +The "--regex" option of locate now assumes the regular expression to +be in the same syntax as is used in GNU Emacs, though this can be +changed with the new option --regextype. This is a change from the +existing behaviour (which was to use POSIX Basic Regular Expressions). +Since this feature is releatively new anyway, I though it was more +useful to have compatibility between regular expression handling in +find and locate than to maintain the short-lived previous behaviour of +locate. + +The locate program now also supports a "--regextype" long option which +controls which regular expression syntax is understood by locate. +This is a long option and has no single-letter 'short option' +equivalent. + +*** Functional changes in find + +The regular expression syntax understood by "find" can be changed with +the -regextype option; this option is positional, meaning that you can +have several tests, each using a distinct syntax (this is not +recommended practice however). + +The default regular expression syntax is substantially the same as +that recognised by GNU Emacs, except for the fact that "." will match +a newline. + +The leaf optimisation can be disabled with the configure option +"--disable-leaf-optimisation", which is equivalent to specifying +"-noleaf" on all find command lines. This is useful for systems +having filesystems which do not provide traditional Unix behaviour for +the link count on directories (for example Cygwin and the Solaris 9 +HSFS implementation). + +** Bug Fixes + +*** Bug Fixes for find + +The -iregex test now works once again on systems that lack +re_search() (that is, systems on which findutils needs to use the +gnulib version of this function). + +find -regex now once again uses GNU Emacs-compatible regular +expressions. + +If invoked with stderr closed, the -fprint and -fprintf actions now no +longer cause error messages to be sent into the output file. + +If the link count of a directory is less that two, the leaf +optimisation is now disabled for that directory. This should allow +searching of non-Unix filesystems to be more reliable on systems that +don't take the trouble to make their filesystems look like traditional +Unix filesystems. Some filesystems don't even take the trouble to +have a link count of less than two and for these, -noleaf is still +required unless --disable-leaf-optimisation was used at configure time. + +The "%Y" directive for the -printf action now no longer changes find's +idea of the mode of the file, so this means among other things that +"-printf %Y %y" now works properly. This is Savannah bug #13973. + +* Major changes in release 4.2.23 + +** Documentation Changes + +The -L and -I options of xargs are currently incompatible (but should +not be). + +Improved the documentation for -execdir and -okdir. + +** Functional Changes to updatedb + +File names ending in "/" which are specified as an argument to +--prunepaths (or in $PRUNEPATHS) don't work, so we now issue an error +message if the user tries to do that. The obvious exception of course +is "/" which does work and is not rejected. + + +* Major changes in release 4.2.22 + +** Security Fixes + +If a directory entry searched with "find -L" is a symbolic link to +".", we no longer loop indefinitely. This problem affected find +versions 4.2.19, 4.2.20 and 4.2.21. This problem allows users to make +"find" loop indefinitely. This is in effect a denial of service and +could be used to prevent updates to the locate database or to defeat +file security checks based on find. However, it should be noted that +you should not use "find -L" in security-sensitive scenarios. + +** Other Bug Fixes + +None in this release. + +** Functional Changes to locate + +A locate database can now be supplied on stdin, using '-' as a element +of the database-path. If more than one database-path element is '-', +later instances are ignored. + +A new option to locate, '--all' ('-A') causes matches to be limited to +entries which match all given patterns, not entries which match +one or more patterns. + +** Documentation Changes + +Some typos in the manual pages have been fixed. Various parts of the +manual now point out that it is good practice to quote the argument of +"-name". The manpage now has a "NON-BUGS" section which explains some +symptoms that look like bugs but aren't. The explanations of the "%k" +and "%b" directives to "find -printf" have been imrpoved. + + +* Major changes in release 4.2.21 +** Functional Changes to find + +The GNU extension "find ... -perm +MODE" has been withdrawn because it +is incompatible with POSIX in obscure cases like "find ... -perm ++r". +Use the new syntax "find ... -perm /MODE" instead. Old usages will +still continue to work, so long as they don't conflict with POSIX. + +If the output is going to a terminal, the -print, -fprint, -printf and +-fprintf actions now quote "unusual" characters to prevent unwanted +effects on the terminal. See "Unusual Characters in File Names" for +further details. There is no change to the behaviour when the output +is not going to a terminal. The locate program does the same thing, +unless the -0 option is in effect (in which case the filenames are +printed as-is). + +** Functional Changes to locate + +The locate command will now read each locate database at most once. +This means that if you are using multiple databases and are searching +for more than one name, the results will now be printed in a different +order (and if you specified a small limit with --limit, you may get a +different set of results). + +A new option '--print' for locate causes it to print the matching +results even if the '--count' or '--statistics' option is in effect. + +** Bug Fixes +find /blah/blah/blah -depth -empty now works once again. + +The -regex and -iregex tests of find now correctly accept POSIX Basic +Regular Expressions. (Savannah bug #12999) + +The updatedb program now works on systems where "su" does not support +the "-s" option, for example Solaris. + +* Major changes in release 4.2.20 +** Internationalization and Localization +Updated Vietnamese and Dutch translations. + +** Bug Fixes +Minor bugfix affecting only those who compile from the CVS repository, +as opposed to those who compile from the source releases. + +* Major changes in release 4.2.19 +** Bug Fixes + +find should now no longer hang on systems which lack the O_NOFOLLOW +flag to open(2) and which are clients of an unresponsive NFS server +(Savannah bug #12044). + +We now avoid inappropriately failing for "find -L foo" or "find -H +foo" if foo is a symbolic link (Savannah bug #12181). Previously we +used to fail with the error message "Too many levels of symbolic +links". + +"find . -false -exec foo {} +" no longer runs an extra instance of foo +when find exits (Savannah bug #12230). + +If the chdir() safety check fails but we can no longer get back to +where we started, exit with an explanatory (fatal) error message. +This does not happen on GNU/Linux and FreeBSD because the safety check +is not needed (the security problem the safety check protects against +is prevented in a cleaner way on those systems). + +"make distclean" no longer deletes regex.c (which "make all" needs). + +** Functionality Changes +"find -printf "%h\n" will now print "." for files in the current directory. +Previously it printed nothing (but there was a bug in the %h +implementation anyway). This fixes Savannah bug #12085. + +Should now build (again) on non-C99-compliant systems. + +** Documentation enhancements +Fixed some typos and clarified wording in "Working with automounters". + +** Internationalization and Localization +New Vietnamese message translation. + +* Major changes in release 4.2.18 +** Bug Fixes +*** "find -depth" was missing out non-leaf directories when they contain + non-directories. This affected findutils releases 4.2.15, + 4.2.16 and 4.2.17, but the bug is now fixed. +*** Find no longer hangs on systems which are clients of unresponsive + NFS servers. +** Documentation improvements +*** Improvements and corrections to the find.1 manpage, including corrections to the descriptions of -H and -L. + +* Major changes in release 4.2.17 +** Bug Fixes +*** bug #11861 undefined symbol "basename" on IRIX 5.3 +*** bug #11865 xargs -i regression (as compared to findutils-4.2.12) +*** bug #11866 Typo in pred_okdir renders it useless (affecting 4.2.16 only) +*** patch #3723 fix recent process_top_path change (for -execdir on /) +*** Fixing bug #11866 and applying patch #3723 made -execdir work much better. +*** find bar/baz/ugh now works again if baz is a symbolic link (broken + in 4.2.15). + +* Major changes in release 4.2.16 +** Functionality Changes +*** Updated the message catalogues for the translated messages. +*** The subfs filesystem is now treated the same as the autofs + filesystem is. +*** New translations: Belarusian, Catalan, Greek, Esperanto, + Finnish, Irish, Croatian, Hungarian, Japanese, Luganda, + Malay, Romanian, Slovenian, Serbian, Chinese (simplified). + +** Bug Fixes +*** The -execdir action now works correctly for files named on the + command line. + +* Major changes in release 4.2.15 +** Functionality Changes +*** locate now supports matching regular expression (--regex). +*** --enable-d_type-optimization (introduced in findutils 4.2.13) is now turned on by default. + +* Major changes in release 4.2.14 +** Functionality Changes +*** New options -L, -P, -H for locate. The work in the same was as the same options for find. +** Bug Fixes +*** Don't include the "findutils/find/testsuite/find.gnu" subdirectory in the + distributed tar file more than once. +*** Should now build on Solaris once again. +*** -xtype and -printf %Y now work correctly for symbolic links once again +** Documentation improvements +*** All options for "locate" are now documented + +* Major changes in release 4.2.13 +** Performance Enhancements +*** On Linux and some other systems, a large performance improvement, + because we can eliminate many of the calls to lstat() (in extreme + cases, 99% of them). Limited testing shows a 2x speedup on NFS + filesystems. Other systems which can make use of this enhancement + include Mac OS X and *BSD. + +* Major changes in release 4.2.12 +** Functionality Changes +*** find is now POSIX-compliant, as far as I know. +*** -exec ... {} + now works. +*** New actions -execdir and -okdir which are like -exec and -ok but more secure. +*** "locate -w" is now a synonym for "locate --wholepath". +*** An empty path entry in the locate database path (for example "::" in + $LOCATE_PATH or in the argument to "locate -d") is taken to mean + the default database, whose name is hard-coded in locate. +** Bug Fixes +*** If find or xargs cannot write to stdout, for example because + output is redirected to a file and the disk is full, the + relevant program will return a non-zero exit status. + +* Major changes in release 4.2.11 +** Bug Fixes +*** Compilation fix for systems without EOVERFLOW. +*** More helpful error message if you make a mistake with (, ), -o or -a. +** Functionality Changes +*** If you have unclosed parentheses on the find command line, + or any of a number of similar problems, find will now produce + a more helpful error message. +*** locate -b is now a synonym for locate --basename +*** locate now supports a --statistics (or -S) option, which prints some + statistics about the locate databases. +*** Implemented the -samefile option. +** Documentation improvements +*** New chapter in the manual, "Security Considerations". +*** Better documentation for -prune (Mainly thanks to Stepan Kasal) +** Bug Fixes +*** locate's options -i and -w now work with the -e option (previously a bug + prevented this). + +* Major changes in release 4.2.10 +** Bug Fixes +*** Portability fix for fstype.c: should now compile on UNICOS, and possibly + also produce useful results on BeOS and Dolphin, perhaps other + systems too. + +* Major changes in release 4.2.9 +** Functionality Changes +*** xargs no longer treats a line containing only an underscore as a logical end-of-file. To obtain the behaviour that was previously the default, use "-E_". +*** xargs now supports the POSIX options -E, -I and -L. These are synonyms + for the existing options -e, -i and -l, but the latter three are + now deprecated. +** Bug Fixes +*** xargs -n NUM now invokes a command as soon as it has NUM arguments. + Previously, it waited until NUM+1 items had been read, and then + invoked the command with NUM arguments, saving the remaining one + for next time. +*** If "find -L" discovers a symbolic link loop, an error message is issued. +*** If you specify a directory on the find command line, but -prune + is applied to it, find will no longer chdir() into it anyway. +** Documentation improvements +*** The precise interpretation of the arguments to the -atime, -ctime + and similar tests in find has been documented more clearly. + +* Major changes in release 4.2.8 +*** Bugfix to the findutils 4.2.7 automount handling on Solaris. This + worked to some extent in findutils-4.2.7, but is much improved in + findutils-4.2.8. + +* Major changes in release 4.2.7 +** Functionality Changes +*** xargs can now read a list of arguments from a named file, allowing + the invoked program to use the same stdin as xargs started with + (for example ``xargs --arg-file=todo emacs''). +** Documentation improvements +*** The Texinfo manual now has an extra chapter, "Error Messages". Most + error messages are self-explanatory, but some of the ones which + are not are explained in this chapter. +** Bug Fixes +*** Avoid trying to link against -lsun on UNICOS, which doesn't need it or + have it. +*** Bugfix to the findutils 4.2.6 automount handling (which hadn't been enabled + on Solaris). +*** Reenabled internationalisation support (which had been accidentally + disabled in findutils-4.2.5). + +* Major changes in release 4.2.6 +** Bug Fixes +*** find now copes rather better when a directory appears to change just as + it is about to start examining it, which happens with automount. + This is because automount mounts filesystems as you change + directory into them. This should resolve Savannah bugs #3998, + #9043. + +* Major changes in release 4.2.5 +** Functionality Changes +*** The POSIX options -H and -L are supported. These control whether or not + find will follow symbolic links. +*** The BSD option -P is also now supported (though in any case + it is the default). +** Documentation improvements +*** Better documentation for "xargs -i". +** Bug Fixes +*** "make install" now respects DESTDIR when generating localstatedir. + (this is only relevant if you are installing to some location + other than the one that you indictaed when you ran "configure"). +*** Compatible with automake versions 1.8 and 1.9. +*** Build problems on UNICOS now fixed, though the linker will still generate + warnings because we try to link with the nonexistent library + "-lsun". Edit $(LIBS) to work around this problem. + +* Major changes in release 4.2.4 +** Functionality Changes +*** If your system sort command has a working "-z" option, updatedb will + now correctly handle newline characters in filenames (as will + locate). +*** xargs now uses 128Kb of command line by default (less if the system + doesn't support that much). +*** If you specify a 'find' option after non-option, a warning message + is now issued. Options should be specified immediately after the + list of paths to search. These warnings are enabled if you + specify the -warn option, or if stdin is a tty. They are diabled + by the use of the -nowarn option. +*** Like find, the locate program now supports an option --null (short form -0) + which changes the result separator from newline to NULL. +*** Locate supports the option -c (long form --count) which suppresses normal + output but prints on stdout the number of results produced (like + grep -c). +*** Locate supports the option -l (long form --limit) which limits the + number of results. This is useful if you only want to find out if + there are copies of a certain file on the system, but don't want + to wait for the entire locate database to be searched. +*** Locate now has an option --basename which forces the specified pattern to + be matched against the basename of the entries in the locate + database, rather than the whole name. The default behaviour + (matching against the whole name of the file including all the + parent directory names) corresponds to the option --wholename. +*** updatedb has a new option, --findoptions, that can be used to + pass extra options through to the find command that it uses. +** Bug Fixes +*** "find -printf '%H\n'" now works (rather than segfaulting) on + systems that have non-writable string constants. +*** Better POSIX compliance for the -s option to xargs (out of range + values should just result in bounding to the correct range, not an + error, so now we just print a warning message and adjust the + value). +*** Corrected section numbers of manual page cross-references + +* Major changes in release 4.2.3 +** Functionality Changes +*** Added new action -delete which deletes things that find matches. +*** Added new action -quit which causes find to exit immediately. +*** A new format directive '%D' for "find -printf" prints the device number. +*** The -ls predicate no longer truncates user or group names. +*** Added new option "-d" which is a synonym for "-depth" for compatibility + with Mac OS, OpenBSD and FreeBSD. This option is already + deprecated since the POSIX standard specifies "-depth". +*** Added two new format specifiers to the -printf action; these are + %y and %Y. They indicate the type of the file as a single letter; + these are the same latters as are used by the "-type" test. +*** If a parent directory changes during the execution of find, + the error message we issue identifies the nature of the change + (for example the previous and current inode numbers of the + directory we've just returned out of). +** Other Changes +*** Non-functional code changes to silence compiler warnings. + +* Major changes in release 4.2.2 +** Documentation improvements +*** "find ... -exec {}+" is not yet supported. +** Bug Fixes +*** Fixed compilation problems on Solaris, RedHat EL AS 2.1, Irix, AIX +*** Work around possible compiler bug on HP-UX 11.23 for ia64 +*** The built-in internationalisation support now works again. +** Other Changes +*** We now import the gnulib source in the way it is intended to be used, + which means among other things that we only have one config.h file + now. +*** Functions which findutils requires but which are not present in + gnulib are now defined in "libfind.a". This is in the lib + directory, while gnulib is in the gnulib subdirectory. +*** Fixed a typo in the address of the FSF in many of the file headers. + +* Major changes in release 4.2.1 +** Bug Fixes +*** 'find -name \*bar now matches .foobar, because the POSIX standard + requires it, as explained at + http://standards.ieee.org/reading/ieee/interp/1003-2-92_int/pasc-1003.2-126.html + +* Major changes in release 4.2.1 +** Bug Fixes +*** find -iname now works correctly on systems that have an fnmatch() function + that does not support FNM_CASEFOLD +*** updatedb now uses signal names for "trap" instead of numbers, + as per bug #9465 (see http://www.opengroup.org/onlinepubs/009695399/utilities/trap.html) +*** Better support for systems lacking intmax_t +** Other Changes +**** findutils now uses a newer version of gnulib (dated 2004-10-17). + +* Major changes in release 4.2.0 +** Functionality Changes +*** xargs now works better when the environment variables are very extensive. + The xargs command used to run into difficulties if the environment + data contained more than 20480 bytes. +*** New options -wholename and -iwholename + As per the GNU Projecvt coding standard, These are preferred over + the -path and -ipath options. Using -ipath now generates a warning, + though -path does not (since HPUX also offers -path). +*** The environment variable FIND_BLOCK_SIZE is now ignored. +*** New option "-ignore_readdir_race" + silences an error messages which would otherwise occur if a file is removed + after find has read it from the directory using readdir(), but before + find stats the file. There is also an option + -noignore_readdir_race which has the opposite effect. +** Documentation improvements +*** The -size option of find is now documented in more detail +*** POSIX compliance and GNU extensions + The find manual page also now includes a section + which describes the relationship between the features of GNU + find and the POSIX standard. Some other small improvements + to the find and xargs manual pages have been made. +*** The argument to the -fprintf directive is now better documented. + The escape code '\0' for the `-printf' predicate of find is now + documented, and the documentation for the %k and %b specifiers + has been improved. +*** xargs -i is now more clearly documented. +** Bug Fixes +*** locate 'pa*d' will now find /etc/passwd (if it exists, of course) +*** xargs standard input is not inherited by child processes + If the command invoked by xargs reads from its standard input, + it now gets nothing, as opposed to stealing data from the + list of files that xargs is trying to read. +*** Better support for 64-bit systems. +*** The command "xargs -i -n1" now works as one might expect, + I think this is a strange thing to want to do. +*** Arguments to find -mtime that are too large are now diagnosed + Previously, this just used to cause find just to do the wrong thing. +*** updatedb is now somewhat more robust + The updatedb shell script now does not generate an empty + database if it fails. +*** Sanity-check on some data read from locatedb + Locate now detects some types of file corruption in the + locate database. +*** The %k format specifier for -fprintf now works + This was broken in 4.1.20. + +* Major changes in release 4.1.20: +** New maintainer, James Youngman +** As far as I know, this is the first release after 4.1.7, but I've left + a gap just in case. +** We now use an "imported" version of gnulib, rather than including + a copy of the gnulib code in our CVS repository. There are no + differences in the build instructions, though (unless you are + building directly from CVS, in which case please read the file + README-CVS). +** There are no (deliberate) functional changes in version 4.1.20. + +* Major changes in release 4.1.7: +fix problem so that default "-print" is added when "-prune" is used. +security fixes related to directories changing while find is executing. + +* Major changes in release 4.1.6: +correct bug in prune. +added --ignore-case option for locate + +* Major changes in release 4.1.5: +Add support for large files + +* Major changes in release 4.1.4: +bug fixes, more up-to-date languages. + +* Major changes in release 4.1.3: +added internationalization and localization. + +* 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. +** updatedb is now a user command, installed in $exec_prefix/bin + instead of $exec_prefix/libexec. +** A few problems in Makefiles and testsuite corrected. + +* Major changes in release 4.0: + +** Documentation: +*** Texinfo manual. +*** Man page for updatedb. +*** Man page for the locate database formats. + +** find: +*** Takes less CPU time on long paths, because it uses chdir to descend + trees, so it does fewer inode lookups. +*** Does not get trapped in symbolic link loops when -follow is given. +*** Supports "-fstype afs" if you have /afs and /usr/afsws/include + and you configure using the --with-afs option. +*** New action -fls FILE; like -ls but writes to FILE. + +** locate: +*** Supports a new database format, which is 8-bit clean and + allows machines with different byte orderings and integer sizes to + share the databases. The new locate can also detect and read the + old database format automatically. The new databases are typically + 30% or more larger than the old ones (due to allowing all 8 bits in + file names). Search times are approximately the same, or faster on + some systems. +*** Warns if a file name database is more than 8 days old. + +** updatedb: +*** Takes command-line options. + +** xargs: +*** Performance improved 10-20%. +*** The EOF string is not used when -0 is given. +*** Now has a test suite. Some minor bugs fixed as a result. + +* Major changes in release 3.8: + +** case insensitive versions of -lname, -name, -path, -regex: + -ilname, -iname, -ipath, -iregex +** %F directive for -printf, -fprintf to print file system type + +* Major changes in release 3.7: + +** locate can search multiple databases +** locate has an option to specify the database path +** updatedb no longer goes into an infinite loop with some versions of tail + + --//-- +This is used by Emacs' spell checker ispell.el: + +LocalWords: ansi knr strftime xargs updatedb sh fnmatch hin strcpy +LocalWords: lib getstr getline frcode bigram texi depcomp automake +LocalWords: strncasecmp strcasecmp LIBOBJS FUNC prunefs allout libexec +LocalWords: testsuite Texinfo chdir inode fstype afs fls ls EOF lname +LocalWords: regex ilname iname ipath iregex printf fprintf + diff --git a/README b/README new file mode 100644 index 0000000..be967a2 --- /dev/null +++ b/README @@ -0,0 +1,59 @@ +This package contains the GNU find, xargs, and locate programs. find +and xargs comply with POSIX 1003.2, as far as I know (with the +exception of the "+" modifier for the "-exec" action, which isn't +implemented yet). They also support a large number of additional +options, some borrowed from Unix and some unique to GNU. + +See the file NEWS for a list of major changes in the current release. + +See the file INSTALL for compilation and installation instructions. + +To verify the GPG signature of the release, you will need the public +key of the findutils maintainer. You can download this from +ftp://ftp.gnu.org/gnu/gnu-keyring.gpg. Alternatively, you could query +a PGP keyserver, but you will need to use one that can cope with +subkeys containing photos. Many older key servers cannot do this. I +use subkeys.pgp.net. I think that one works. See also the +"Downloading" section of http://www.gnu.org/software/findutils/. + +Special configure options: + +--with-afs + Make find support "-fstype afs". Requires /afs, /usr/afsws/lib, and +/usr/afsws/include. configure doesn't add AFS support +automatically because it adds considerably to find's size, and the +AFS libraries need -lucb on Solaris, which breaks find. + +--enable-id-cache + Make tables of used UIDs and GIDs at startup instead of using +getpwuid or getgrgid when needed. Speeds up -nouser and -nogroup +unless you are running NIS or Hesiod, which make password and group +calls very expensive. + +--enable-debug + Produce output on the standard error output indicating what find is +doing. This information includes details about how the command line +has been parsed and what files have been stat()ed. This output is +normally interesting only to the maintainer, and so is off by default. + + +To gain speed, GNU find avoids statting files whenever possible. +It does this by: +1. Checking the number of links to directories and not statting files +that it knows aren't directories until it encounters a test or action +that needs the stat info. +2. Rearranging the command line, where possible, so that it can do tests +that don't require a stat before tests that do, in hopes that the +latter will be skipped because of an OR or AND. (But it only does +this where it will leave the output unchanged.) + +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. Because POSIX.2 requires `find +foo' to have the same effect as `find foo -print', the fast-find +searching has been moved to a separate program, `locate'; the same +thing has been done in 4.4BSD. If you use locate, you should run the +included `updatedb' script from cron periodically (typically nightly). + +Mail suggestions and bug reports for these programs to +bug-findutils@gnu.org. diff --git a/README-alpha b/README-alpha new file mode 100644 index 0000000..38967f7 --- /dev/null +++ b/README-alpha @@ -0,0 +1,15 @@ +This is a test release of GNU findutils. + +The latest test release (if any) is available at +ftp://alpha.gnu.org/gnu/findutils + +The latest full release is available at +ftp://ftp.gnu.org/gnu/findutils. + + +Bug reports, suggested patches and enhancement requests for findutils +should be logged at http://savannah.gnu.org/bugs/?group=findutils. + +Discussion of findutils and ways to improve the package takes place on +the "bug-findutils" mailing list, which you can join by sending mail +to bug-findutils-request@gnu.org. diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..340c4df --- /dev/null +++ b/THANKS @@ -0,0 +1,29 @@ +Thanks to the following people for support, code, patches, etc: + +Andreas Schwab +Jonathan R. Ferro +Mark Kettenis +Jesus Bravo Alvarez +John David Anglin +Paul Slootman +Lionel CONS +"Gerrit P. Haase" +Bruno Haible +Bob Proulx +Martin Buchholz +Steve Revilak +Solar Designer +John Levon +Geoff Clare +Andreas Metzler +Bas van Gompel +Jim Meyering +Dmitry V. Levin +Aaron S. Hawley + +Suggestion for locate's ignore-case code: +Matt Mueller +"Stephane Barizien" + +Suggestion for the -sparse predicate: +dean gaudet diff --git a/TODO b/TODO new file mode 100644 index 0000000..9dd5468 --- /dev/null +++ b/TODO @@ -0,0 +1,53 @@ +-*-outline-*- +* -fstype core dumps on sparc-sun-sunos4.1.3_U1 with gcc-2.95.2 +This is on foxtrot.rahul.net. dbx does not work on compiled find. +Perhaps gcc is installed incorrectly. "find / -fstype ufs" core dumps +quickly. cc works correctly. + +* Speed of locate without "-i" option needs to be increased. + +* Internationalization +** updatedb.sh should be internationalized + +* Eliminate unnecessary strcpy calls in xargs. + +* man pages for frcode, bigram, and code +Perhaps a better description in texi pages as well. + +* Add option for find to sort output in lexical order for use for updatedb +olarsac@airfrance.fr (Olivier) made the following suggestion: + +As I was running thru the code looking for the bug I wondered why the updatedb +has to use sort... +why not add an option to find that sorts the output in lexical order? +my point is: +- sort on a big list is costly (here we do locate on big big file system) +- find may (in theory) sort incrementally very easily by sorting only the current +directory entries before recursion + + +* large file problems +depcomp gets added by automake + +* investigate _LIBC when used with TOLOWER and TOUPPER +_LIBC is used to determine whether TOLOWER should check isupper first. +Is there something better to check? Alternatively, can tolower be +checked at run time to determine whether isupper should be called first. + +* BeOS problems with multibyte +Bruno Haible reported problems with BeOS. + +* Include example of use of updatedb in documentation. +Use something close to the Debian daily cron job. + +* Supply example for time range commands for find. + + --//-- +This is used by Emacs' spell checker ispell.el: + +LocalWords: strftime xargs updatedb sh strcpy +LocalWords: lib frcode bigram texi depcomp automake +LocalWords: LIBOBJS FUNC findutils +LocalWords: LIBC TOLOWER TOUPPER tolower isupper +LocalWords: Debian cron +LocalWords: Haible BeOS diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..85f363a --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1029 @@ +# generated automatically by aclocal 1.10 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.60])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +AC_DEFUN([AM_C_PROTOTYPES], +[AC_REQUIRE([AC_C_PROTOTYPES]) +if test "$ac_cv_prog_cc_stdc" != no; then + U= ANSI2KNR= +else + U=_ ANSI2KNR=./ansi2knr +fi +# Ensure some checks needed by ansi2knr itself. +AC_REQUIRE([AC_HEADER_STDC]) +AC_CHECK_HEADERS([string.h]) +AC_SUBST([U])dnl +AC_SUBST([ANSI2KNR])dnl +_AM_SUBST_NOTMAKE([ANSI2KNR])dnl +]) + +AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/findlib.m4]) +m4_include([m4/mkinstalldirs.m4]) +m4_include([m4/noreturn.m4]) +m4_include([m4/nullsort.m4]) +m4_include([m4/withfts.m4]) +m4_include([gnulib/m4/absolute-header.m4]) +m4_include([gnulib/m4/alloca.m4]) +m4_include([gnulib/m4/allocsa.m4]) +m4_include([gnulib/m4/argmatch.m4]) +m4_include([gnulib/m4/bison.m4]) +m4_include([gnulib/m4/canonicalize-lgpl.m4]) +m4_include([gnulib/m4/canonicalize.m4]) +m4_include([gnulib/m4/chdir-long.m4]) +m4_include([gnulib/m4/chown.m4]) +m4_include([gnulib/m4/clock_time.m4]) +m4_include([gnulib/m4/close-stream.m4]) +m4_include([gnulib/m4/closeout.m4]) +m4_include([gnulib/m4/codeset.m4]) +m4_include([gnulib/m4/cycle-check.m4]) +m4_include([gnulib/m4/d-ino.m4]) +m4_include([gnulib/m4/d-type.m4]) +m4_include([gnulib/m4/dirfd.m4]) +m4_include([gnulib/m4/dirname.m4]) +m4_include([gnulib/m4/dos.m4]) +m4_include([gnulib/m4/double-slash-root.m4]) +m4_include([gnulib/m4/dup2.m4]) +m4_include([gnulib/m4/eealloc.m4]) +m4_include([gnulib/m4/error.m4]) +m4_include([gnulib/m4/exitfail.m4]) +m4_include([gnulib/m4/extensions.m4]) +m4_include([gnulib/m4/fchdir.m4]) +m4_include([gnulib/m4/fcntl-safer.m4]) +m4_include([gnulib/m4/fcntl_h.m4]) +m4_include([gnulib/m4/fileblocks.m4]) +m4_include([gnulib/m4/filemode.m4]) +m4_include([gnulib/m4/filenamecat.m4]) +m4_include([gnulib/m4/flexmember.m4]) +m4_include([gnulib/m4/fnmatch.m4]) +m4_include([gnulib/m4/fpending.m4]) +m4_include([gnulib/m4/fstypename.m4]) +m4_include([gnulib/m4/fts.m4]) +m4_include([gnulib/m4/getcwd-abort-bug.m4]) +m4_include([gnulib/m4/getcwd-path-max.m4]) +m4_include([gnulib/m4/getcwd.m4]) +m4_include([gnulib/m4/getdate.m4]) +m4_include([gnulib/m4/getdelim.m4]) +m4_include([gnulib/m4/getline.m4]) +m4_include([gnulib/m4/getopt.m4]) +m4_include([gnulib/m4/gettext.m4]) +m4_include([gnulib/m4/gettime.m4]) +m4_include([gnulib/m4/gettimeofday.m4]) +m4_include([gnulib/m4/glibc21.m4]) +m4_include([gnulib/m4/gnulib-common.m4]) +m4_include([gnulib/m4/gnulib-comp.m4]) +m4_include([gnulib/m4/hash.m4]) +m4_include([gnulib/m4/human.m4]) +m4_include([gnulib/m4/i-ring.m4]) +m4_include([gnulib/m4/iconv.m4]) +m4_include([gnulib/m4/idcache.m4]) +m4_include([gnulib/m4/inline.m4]) +m4_include([gnulib/m4/inttypes-pri.m4]) +m4_include([gnulib/m4/inttypes.m4]) +m4_include([gnulib/m4/lchown.m4]) +m4_include([gnulib/m4/lib-ld.m4]) +m4_include([gnulib/m4/lib-link.m4]) +m4_include([gnulib/m4/lib-prefix.m4]) +m4_include([gnulib/m4/localcharset.m4]) +m4_include([gnulib/m4/locale-fr.m4]) +m4_include([gnulib/m4/locale-tr.m4]) +m4_include([gnulib/m4/locale-zh.m4]) +m4_include([gnulib/m4/longlong.m4]) +m4_include([gnulib/m4/ls-mntd-fs.m4]) +m4_include([gnulib/m4/lstat.m4]) +m4_include([gnulib/m4/mbchar.m4]) +m4_include([gnulib/m4/mbiter.m4]) +m4_include([gnulib/m4/mbrtowc.m4]) +m4_include([gnulib/m4/mbscasestr.m4]) +m4_include([gnulib/m4/mbslen.m4]) +m4_include([gnulib/m4/mbsstr.m4]) +m4_include([gnulib/m4/mbstate_t.m4]) +m4_include([gnulib/m4/memchr.m4]) +m4_include([gnulib/m4/memcmp.m4]) +m4_include([gnulib/m4/mempcpy.m4]) +m4_include([gnulib/m4/memrchr.m4]) +m4_include([gnulib/m4/memset.m4]) +m4_include([gnulib/m4/mktime.m4]) +m4_include([gnulib/m4/modechange.m4]) +m4_include([gnulib/m4/mountlist.m4]) +m4_include([gnulib/m4/nls.m4]) +m4_include([gnulib/m4/onceonly_2_57.m4]) +m4_include([gnulib/m4/openat.m4]) +m4_include([gnulib/m4/pathmax.m4]) +m4_include([gnulib/m4/po.m4]) +m4_include([gnulib/m4/progtest.m4]) +m4_include([gnulib/m4/quote.m4]) +m4_include([gnulib/m4/quotearg.m4]) +m4_include([gnulib/m4/readlink.m4]) +m4_include([gnulib/m4/regex.m4]) +m4_include([gnulib/m4/rpmatch.m4]) +m4_include([gnulib/m4/save-cwd.m4]) +m4_include([gnulib/m4/savedir.m4]) +m4_include([gnulib/m4/setenv.m4]) +m4_include([gnulib/m4/ssize_t.m4]) +m4_include([gnulib/m4/st_dm_mode.m4]) +m4_include([gnulib/m4/stat-time.m4]) +m4_include([gnulib/m4/stdbool.m4]) +m4_include([gnulib/m4/stdint.m4]) +m4_include([gnulib/m4/stdio-safer.m4]) +m4_include([gnulib/m4/stdlib_h.m4]) +m4_include([gnulib/m4/stpcpy.m4]) +m4_include([gnulib/m4/strdup.m4]) +m4_include([gnulib/m4/strftime.m4]) +m4_include([gnulib/m4/string_h.m4]) +m4_include([gnulib/m4/strndup.m4]) +m4_include([gnulib/m4/strnlen.m4]) +m4_include([gnulib/m4/strtoimax.m4]) +m4_include([gnulib/m4/strtol.m4]) +m4_include([gnulib/m4/strtoll.m4]) +m4_include([gnulib/m4/strtoul.m4]) +m4_include([gnulib/m4/strtoull.m4]) +m4_include([gnulib/m4/strtoumax.m4]) +m4_include([gnulib/m4/sys_stat_h.m4]) +m4_include([gnulib/m4/sys_time_h.m4]) +m4_include([gnulib/m4/time_h.m4]) +m4_include([gnulib/m4/time_r.m4]) +m4_include([gnulib/m4/timespec.m4]) +m4_include([gnulib/m4/tm_gmtoff.m4]) +m4_include([gnulib/m4/ulonglong.m4]) +m4_include([gnulib/m4/unistd-safer.m4]) +m4_include([gnulib/m4/unistd_h.m4]) +m4_include([gnulib/m4/wchar.m4]) +m4_include([gnulib/m4/wchar_t.m4]) +m4_include([gnulib/m4/wctype.m4]) +m4_include([gnulib/m4/wcwidth.m4]) +m4_include([gnulib/m4/wint_t.m4]) +m4_include([gnulib/m4/xalloc.m4]) +m4_include([gnulib/m4/xgetcwd.m4]) +m4_include([gnulib/m4/xstrndup.m4]) +m4_include([gnulib/m4/xstrtod.m4]) +m4_include([gnulib/m4/xstrtol.m4]) +m4_include([gnulib/m4/yesno.m4]) diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am new file mode 100644 index 0000000..d87b138 --- /dev/null +++ b/build-aux/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = check-testfiles.sh man-lint.sh diff --git a/build-aux/Makefile.in b/build-aux/Makefile.in new file mode 100644 index 0000000..195f427 --- /dev/null +++ b/build-aux/Makefile.in @@ -0,0 +1,614 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = build-aux +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in config.guess \ + config.rpath config.sub depcomp install-sh mdate-sh missing \ + mkinstalldirs texinfo.tex ylwrap +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = check-testfiles.sh man-lint.sh +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(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 build-aux/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits build-aux/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +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-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + +# 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/build-aux/check-testfiles.sh b/build-aux/check-testfiles.sh new file mode 100755 index 0000000..bd35448 --- /dev/null +++ b/build-aux/check-testfiles.sh @@ -0,0 +1,64 @@ +#! /bin/sh +# check-testfiles.sh -- Check we distributed all the test files we need +# Copyright (C) 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 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. + +rv=0 + + +makelist () { + ls "${1}"/*/testsuite/*/*"${2}" | sed -e 's/.*\///' | sort +} + +diagnose () { + makelist "${distdir}" "$1" > dist"${1}".txt && + makelist "${srcdir}" "$1" > src"${1}".txt && + diff src"${1}".txt dist"${1}".txt + rm -f src"${1}".txt dist"${1}".txt + echo +} + + +check_shipfiles () { + distcount=`ls ${distdir}/*/testsuite/*/*${suffix} | wc -l` + srccount=`ls ${srcdir}/*/testsuite/*/*${suffix} | wc -l` + if test $distcount -eq $srccount ; then + echo "All $srccount of the $suffix files are accounted for" + else + echo "ERROR: Missing $suffix files: source $srccount distributed $distcount" >&2 + rv=1 + diagnose "${suffix}" + fi +} + + +main () { + distdir="$1" + srcdir="$2" + shift 2 + if test "$#" -gt 0 ; then + for suffix ; do + check_shipfiles "$suffix" + done + exit $rv + else + echo "You did not specify any test file suffixes." >&2 + exit 1 + fi +} + +main "$@" diff --git a/build-aux/config.guess b/build-aux/config.guess new file mode 100755 index 0000000..951383e --- /dev/null +++ b/build-aux/config.guess @@ -0,0 +1,1516 @@ +#! /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 Free Software Foundation, +# Inc. + +timestamp='2007-05-17' + +# 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 +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.*:* | ix86xen: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:*:[45]) + 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 ;; + 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:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + 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 xtensa-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: diff --git a/build-aux/config.rpath b/build-aux/config.rpath new file mode 100755 index 0000000..e082db6 --- /dev/null +++ b/build-aux/config.rpath @@ -0,0 +1,660 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2006 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# 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. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux*) + case $cc_basename in + icc* | ecc*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + sco3.2v5*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we cannot use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix3*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix4* | aix5*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + kfreebsd*-gnu) + library_names_spec='$libname$shrext' + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix3*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux*) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. 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 +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 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 + ;; + 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 + ;; + cr16c) + basic_machine=cr16c-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 + ;; + 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 + ;; + 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 + ;; + 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: diff --git a/build-aux/depcomp b/build-aux/depcomp new file mode 100755 index 0000000..e5f9736 --- /dev/null +++ b/build-aux/depcomp @@ -0,0 +1,589 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2007-03-29.01 + +# Copyright (C) 1999, 2000, 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 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/build-aux/install-sh b/build-aux/install-sh new file mode 100755 index 0000000..a5897de --- /dev/null +++ b/build-aux/install-sh @@ -0,0 +1,519 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +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: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -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. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # 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: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/build-aux/man-lint.sh b/build-aux/man-lint.sh new file mode 100755 index 0000000..813df1b --- /dev/null +++ b/build-aux/man-lint.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +rv=0 +srcdir="$1" ; shift + +for manpage +do + what="lint check on manpage $manpage" + echo -n "$what: " + messages="$( troff -t -man ${srcdir}/${manpage} 2>&1 >/dev/null )" + if test -z "$messages" ; then + echo "passed" + else + echo "FAILED:" >&2 + echo "$messages" >&2 + rv=1 + fi +done +exit $rv diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh new file mode 100755 index 0000000..cd916c0 --- /dev/null +++ b/build-aux/mdate-sh @@ -0,0 +1,201 @@ +#!/bin/sh +# Get modification time of a file or directory and pretty-print it. + +scriptversion=2005-06-29.22 + +# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software +# Foundation, Inc. +# written by Ulrich Drepper , June 1995 +# +# 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 file. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: mdate-sh [--help] [--version] FILE + +Pretty-print the modification time of FILE. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "mdate-sh $scriptversion" + exit $? + ;; +esac + +# Prevent date giving response in another language. +LANG=C +export LANG +LC_ALL=C +export LC_ALL +LC_TIME=C +export LC_TIME + +# GNU ls changes its time format in response to the TIME_STYLE +# variable. Since we cannot assume `unset' works, revert this +# variable to its documented default. +if test "${TIME_STYLE+set}" = set; then + TIME_STYLE=posix-long-iso + export TIME_STYLE +fi + +save_arg1=$1 + +# Find out how to get the extended ls output of a file or directory. +if ls -L /dev/null 1>/dev/null 2>&1; then + ls_command='ls -L -l -d' +else + ls_command='ls -l -d' +fi + +# A `ls -l' line looks as follows on OS/2. +# drwxrwx--- 0 Aug 11 2001 foo +# This differs from Unix, which adds ownership information. +# drwxrwx--- 2 root root 4096 Aug 11 2001 foo +# +# To find the date, we split the line on spaces and iterate on words +# until we find a month. This cannot work with files whose owner is a +# user named `Jan', or `Feb', etc. However, it's unlikely that `/' +# will be owned by a user whose name is a month. So we first look at +# the extended ls output of the root directory to decide how many +# words should be skipped to get the date. + +# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. +set x`ls -l -d /` + +# Find which argument is the month. +month= +command= +until test $month +do + shift + # Add another shift to the command. + command="$command shift;" + case $1 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; + esac +done + +# Get the extended ls output of the file or directory. +set dummy x`eval "$ls_command \"\$save_arg1\""` + +# Remove all preceding arguments +eval $command + +# Because of the dummy argument above, month is in $2. +# +# On a POSIX system, we should have +# +# $# = 5 +# $1 = file size +# $2 = month +# $3 = day +# $4 = year or time +# $5 = filename +# +# On Darwin 7.7.0 and 7.6.0, we have +# +# $# = 4 +# $1 = day +# $2 = month +# $3 = year or time +# $4 = filename + +# Get the month. +case $2 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; +esac + +case $3 in + ???*) day=$1;; + *) day=$3; shift;; +esac + +# Here we have to deal with the problem that the ls output gives either +# the time of day or the year. +case $3 in + *:*) set `date`; eval year=\$$# + case $2 in + Jan) nummonthtod=1;; + Feb) nummonthtod=2;; + Mar) nummonthtod=3;; + Apr) nummonthtod=4;; + May) nummonthtod=5;; + Jun) nummonthtod=6;; + Jul) nummonthtod=7;; + Aug) nummonthtod=8;; + Sep) nummonthtod=9;; + Oct) nummonthtod=10;; + Nov) nummonthtod=11;; + Dec) nummonthtod=12;; + esac + # For the first six month of the year the time notation can also + # be used for files modified in the last year. + if (expr $nummonth \> $nummonthtod) > /dev/null; + then + year=`expr $year - 1` + fi;; + *) year=$3;; +esac + +# The result. +echo $day $month $year + +# 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: diff --git a/build-aux/missing b/build-aux/missing new file mode 100755 index 0000000..1c8ff70 --- /dev/null +++ b/build-aux/missing @@ -0,0 +1,367 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2006-05-10.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case $1 in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $1 in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/build-aux/mkinstalldirs b/build-aux/mkinstalldirs new file mode 100755 index 0000000..ef7e16f --- /dev/null +++ b/build-aux/mkinstalldirs @@ -0,0 +1,161 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2006-05-11.19 + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' +IFS=" "" $nl" +errstatus=0 +dirmode= + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit $? + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit $? + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + echo "mkdir -p -- $*" + exec 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. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + case $file in + /*) pathcomp=/ ;; + *) pathcomp= ;; + esac + oIFS=$IFS + IFS=/ + set fnord $file + shift + IFS=$oIFS + + for d + do + test "x$d" = x && continue + + pathcomp=$pathcomp$d + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr= + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp=$pathcomp/ + done +done + +exit $errstatus + +# 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: diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex new file mode 100644 index 0000000..ff2c406 --- /dev/null +++ b/build-aux/texinfo.tex @@ -0,0 +1,7210 @@ +% 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 diff --git a/build-aux/ylwrap b/build-aux/ylwrap new file mode 100755 index 0000000..102bd89 --- /dev/null +++ b/build-aux/ylwrap @@ -0,0 +1,223 @@ +#! /bin/sh +# ylwrap - wrapper for lex/yacc invocations. + +scriptversion=2005-05-14.22 + +# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 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 files given. Try \`$0 --help' for more information." 1>&2 + exit 1 + ;; + --basedir) + basedir=$2 + shift 2 + ;; + -h|--h*) + cat <<\EOF +Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... + +Wrapper for lex/yacc invocations, renaming files as desired. + + INPUT is the input file + OUTPUT is one file PROG generates + DESIRED is the file we actually want instead of OUTPUT + PROGRAM is program to run + ARGS are passed to PROG + +Any number of OUTPUT,DESIRED pairs may be used. + +Report bugs to . +EOF + exit $? + ;; + -v|--v*) + echo "ylwrap $scriptversion" + exit $? + ;; +esac + + +# The input. +input="$1" +shift +case "$input" in + [\\/]* | ?:[\\/]*) + # Absolute path; do nothing. + ;; + *) + # Relative path. Make it absolute. + input="`pwd`/$input" + ;; +esac + +pairlist= +while test "$#" -ne 0; do + if test "$1" = "--"; then + shift + break + fi + pairlist="$pairlist $1" + shift +done + +# The program to run. +prog="$1" +shift +# Make any relative path in $prog absolute. +case "$prog" in + [\\/]* | ?:[\\/]*) ;; + *[\\/]*) prog="`pwd`/$prog" ;; +esac + +# FIXME: add hostname here for parallel makes that run commands on +# other machines. But that might take us over the 14-char limit. +dirname=ylwrap$$ +trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 +mkdir $dirname || exit 1 + +cd $dirname + +case $# in + 0) $prog "$input" ;; + *) $prog "$@" "$input" ;; +esac +ret=$? + +if test $ret -eq 0; then + set X $pairlist + shift + first=yes + # Since DOS filename conventions don't allow two dots, + # the DOS version of Bison writes out y_tab.c instead of y.tab.c + # and y_tab.h instead of y.tab.h. Test to see if this is the case. + y_tab_nodot="no" + if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot="yes" + fi + + # The directory holding the input. + input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` + # Quote $INPUT_DIR so we can use it in a regexp. + # FIXME: really we should care about more than `.' and `\'. + input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` + + while test "$#" -ne 0; do + from="$1" + # Handle y_tab.c and y_tab.h output by DOS + if test $y_tab_nodot = "yes"; then + if test $from = "y.tab.c"; then + from="y_tab.c" + else + if test $from = "y.tab.h"; then + from="y_tab.h" + fi + fi + fi + if test -f "$from"; then + # If $2 is an absolute path name, then just use that, + # otherwise prepend `../'. + case "$2" in + [\\/]* | ?:[\\/]*) target="$2";; + *) target="../$2";; + esac + + # We do not want to overwrite a header file if it hasn't + # changed. This avoid useless recompilations. However the + # parser itself (the first file) should always be updated, + # because it is the destination of the .y.c rule in the + # Makefile. Divert the output of all other files to a temporary + # file so we can compare them to existing versions. + if test $first = no; then + realtarget="$target" + target="tmp-`echo $target | sed s/.*[\\/]//g`" + fi + # Edit out `#line' or `#' directives. + # + # We don't want the resulting debug information to point at + # an absolute srcdir; it is better for it to just mention the + # .y file with no path. + # + # We want to use the real output file name, not yy.lex.c for + # instance. + # + # We want the include guards to be adjusted too. + FROM=`echo "$from" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` + TARGET=`echo "$2" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` + + sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ + -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? + + # Check whether header files must be updated. + if test $first = no; then + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$2" is unchanged + rm -f "$target" + else + echo updating "$2" + mv -f "$target" "$realtarget" + fi + fi + else + # A missing file is only an error for the first file. This + # is a blatant hack to let us support using "yacc -d". If -d + # is not specified, we don't want an error when the header + # file is "missing". + if test $first = yes; then + ret=1 + fi + fi + shift + shift + first=no + done +else + ret=$? +fi + +# Remove the directory. +cd .. +rm -rf $dirname + +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: diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..7816a6b --- /dev/null +++ b/config.h.in @@ -0,0 +1,1125 @@ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_DIRENT_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_FCNTL_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_INTTYPES_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_STDINT_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_STDLIB_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_STRING_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_SYS_STAT_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_SYS_TIME_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_TIME_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_UNISTD_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_WCHAR_H + +/* Define this to an absolute name of . */ +#undef ABSOLUTE_WCTYPE_H + +/* Define so that source code can verify that config.h was already included */ +#undef ALREADY_INCLUDED_CONFIG_H + +/* 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 want find -nouser and -nogroup to make tables of used UIDs + and GIDs at startup instead of using getpwuid or getgrgid when needed. + Speeds up -nouser and -nogroup unless you are running NIS or Hesiod, which + make password and group calls very expensive. */ +#undef CACHE_IDS + +/* Define if chown is not POSIX compliant regarding IDs of -1. */ +#undef CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE + +/* Define if chown modifies symlinks. */ +#undef CHOWN_MODIFIES_SYMLINK + +/* Define to 1 if the `closedir' function returns void instead of `int'. */ +#undef CLOSEDIR_VOID + +/* 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 if you want to see find's innards */ +#undef DEBUG + +/* Define if you want to see a message every time find calls the stat() system + call */ +#undef DEBUG_STAT + +/* the name of the file descriptor member of DIR */ +#undef DIR_FD_MEMBER_NAME + +#ifdef DIR_FD_MEMBER_NAME +# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) +#else +# define DIR_TO_FD(Dir_p) -1 +#endif + + +/* Define to 1 if // is a file system root distinct from /. */ +#undef DOUBLE_SLASH_IS_DISTINCT_ROOT + +/* Define if struct dirent has a member d_ino that actually works. */ +#undef D_INO_IN_DIRENT + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define if gnulib's fchdir() replacement is used. */ +#undef FCHDIR_REPLACEMENT + +/* 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 if we are compiling GNU findutils */ +#undef FINDUTILS + +/* 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 1 when using the gnulib module canonicalize. */ +#undef GNULIB_CANONICALIZE + +/* Define to 1 when using the gnulib module close-stream. */ +#undef GNULIB_CLOSE_STREAM + +/* Define to 1 when using the gnulib module fcntl-safer. */ +#undef GNULIB_FCNTL_SAFER + +/* Define to 1 when using the gnulib module fopen-safer. */ +#undef GNULIB_FOPEN_SAFER + +/* Define to 1 when using the gnulib module fts. */ +#undef GNULIB_FTS + +/* Define to 1 if you have the `alarm' function. */ +#undef HAVE_ALARM + +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ +#undef HAVE_ALLOCA + +/* Define HAVE_ALLOCA_H for backward compatibility with older code that + includes only if HAVE_ALLOCA_H is defined. */ +#undef HAVE_ALLOCA_H + +/* Define to 1 if the compiler supports __attribute__ ((__noreturn__)) */ +#undef HAVE_ATTRIBUTE_NORETURN + +/* Define to 1 if you have the header file. */ +#undef HAVE_BP_SYM_H + +/* Define to 1 if you have the `btowc' function. */ +#undef HAVE_BTOWC + +/* Define to 1 if you have the `canonicalize_file_name' function. */ +#undef HAVE_CANONICALIZE_FILE_NAME + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYCURRENT + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#undef HAVE_CFPREFERENCESCOPYAPPVALUE + +/* Define to 1 if your system has a working `chown' function. */ +#undef HAVE_CHOWN + +/* 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 if you have compound literals. */ +#undef HAVE_COMPOUND_LITERALS + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#undef HAVE_DCGETTEXT + +/* Define to 1 if you have the declaration of `canonicalize_file_name', and to + 0 if you don't. */ +#undef HAVE_DECL_CANONICALIZE_FILE_NAME + +/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. + */ +#undef HAVE_DECL_DIRFD + +/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't. + */ +#undef HAVE_DECL_GETCWD + +/* 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 `getdelim', and to 0 if you + don't. */ +#undef HAVE_DECL_GETDELIM + +/* 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 `getline', and to 0 if you + don't. */ +#undef HAVE_DECL_GETLINE + +/* 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 `lchown', and to 0 if you don't. + */ +#undef HAVE_DECL_LCHOWN + +/* Define to 1 if you have the declaration of `memrchr', and to 0 if you + don't. */ +#undef HAVE_DECL_MEMRCHR + +/* Define to 1 if you have the declaration of `mkdir', and to 0 if you don't. + */ +#undef HAVE_DECL_MKDIR + +/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. + */ +#undef HAVE_DECL_STRDUP + +/* 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 `strmode', and to 0 if you + don't. */ +#undef HAVE_DECL_STRMODE + +/* 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 `tzname', and to 0 if you don't. + */ +#undef HAVE_DECL_TZNAME + +/* 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 declaration of `__fpending', and to 0 if you + don't. */ +#undef HAVE_DECL___FPENDING + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the `dirfd' function. */ +#undef HAVE_DIRFD + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Define to 1 if you have the `dup2' function. */ +#undef HAVE_DUP2 + +/* Define to 1 if you have the `endgrent' function. */ +#undef HAVE_ENDGRENT + +/* Define to 1 if you have the `endmntent' function. */ +#undef HAVE_ENDMNTENT + +/* Define to 1 if you have the `endpwent' function. */ +#undef HAVE_ENDPWENT + +/* Define if you have the declaration of environ. */ +#undef HAVE_ENVIRON_DECL + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* fabs is defined in -lm */ +#undef HAVE_FABS_IN_LIBM + +/* Define to 1 if you have the `fchdir' function. */ +#undef HAVE_FCHDIR + +/* Define to 1 if you have the `fchmodat' function. */ +#undef HAVE_FCHMODAT + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fdopendir' function. */ +#undef HAVE_FDOPENDIR + +/* Define to 1 if you have the `flockfile' function. */ +#undef HAVE_FLOCKFILE + +/* Define to 1 if you have the `forcefindlib' function. */ +#undef HAVE_FORCEFINDLIB + +/* Define to 1 if you have the header file. */ +#undef HAVE_FS_INFO_H + +/* Define to 1 if you have the `fs_stat_dev' function. */ +#undef HAVE_FS_STAT_DEV + +/* Define to 1 if you have the `funlockfile' function. */ +#undef HAVE_FUNLOCKFILE + +/* Define to 1 if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define to 1 if you have the `getdelim' function. */ +#undef HAVE_GETDELIM + +/* Define to 1 if you have the `getmntent' function. */ +#undef HAVE_GETMNTENT + +/* Define to 1 if you have the `getmntinfo' function. */ +#undef HAVE_GETMNTINFO + +/* 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 `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the `hasmntopt' function. */ +#undef HAVE_HASMNTOPT + +/* Define if you have the iconv() function and it works. */ +#undef HAVE_ICONV + +/* 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 if you have the 'intmax_t' type in or . */ +#undef HAVE_INTMAX_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_IO_H + +/* 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 `lchmod' function. */ +#undef HAVE_LCHMOD + +/* Define to 1 if you have the `lchown' function. */ +#undef HAVE_LCHOWN + +/* Define to 1 if you have the `sun' library (-lsun). */ +#undef HAVE_LIBSUN + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if you have the `listmntent' function. */ +#undef HAVE_LISTMNTENT + +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the 'long long' type. */ +#undef HAVE_LONG_LONG + +/* 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 to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the `mblen' function. */ +#undef HAVE_MBLEN + +/* Define to 1 if you have the `mbrlen' function. */ +#undef HAVE_MBRLEN + +/* Define to 1 if you have the `mbrtowc' function. */ +#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 `memchr' function. */ +#undef HAVE_MEMCHR + +/* Define to 1 if you have the `memcmp' function. */ +#undef HAVE_MEMCMP + +/* 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 `memrchr' function. */ +#undef HAVE_MEMRCHR + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the `mkdirat' function. */ +#undef HAVE_MKDIRAT + +/* Define to 1 if you have the header file. */ +#undef HAVE_MNTENT_H + +/* modf is defined in -lm */ +#undef HAVE_MODF_IN_LIBM + +/* 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 to 1 if you have the `next_dev' function. */ +#undef HAVE_NEXT_DEV + +/* Define to 1 if you have the `openat' function. */ +#undef HAVE_OPENAT + +/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't, + setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX is not + defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD is defined. + */ +#undef HAVE_PARTLY_WORKING_GETCWD + +/* Define to 1 if you have the `pipe' function. */ +#undef HAVE_PIPE + +/* Define to 1 if you have the `readlink' function. */ +#undef HAVE_READLINK + +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#undef HAVE_REALLOC + +/* Define to 1 if you have the `resolvepath' function. */ +#undef HAVE_RESOLVEPATH + +/* Define to 1 if you have the `rpmatch' function. */ +#undef HAVE_RPMATCH + +/* Define to 1 if you have the header file. */ +#undef HAVE_SEARCH_H + +/* Define to 1 if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* Define to 1 if you have the `setgroups' function. */ +#undef HAVE_SETGROUPS + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the `setmntent' function. */ +#undef HAVE_SETMNTENT + +/* 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 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_STDIO_EXT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* 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 `strftime' function. */ +#undef HAVE_STRFTIME + +/* 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 if you have the strndup() function and it works. */ +#undef HAVE_STRNDUP + +/* Define to 1 if you have the `strspn' function. */ +#undef HAVE_STRSPN + +/* 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 your 'struct dirent' has a d_type member */ +#undef HAVE_STRUCT_DIRENT_D_TYPE + +/* Define to 1 if `f_fstypename' is member of `struct fsstat'. */ +#undef HAVE_STRUCT_FSSTAT_F_FSTYPENAME + +/* Define to 1 if `f_fstypename' is member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FSTYPENAME + +/* Define to 1 if `st_atimensec' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMENSEC + +/* Define to 1 if `st_atimespec.tv_nsec' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC + +/* Define to 1 if `st_atim.st__tim.tv_nsec' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC + +/* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC + +/* Define to 1 if `st_birthtimensec' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + +/* Define to 1 if `st_birthtimespec.tv_nsec' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + +/* Define to 1 if `st_birthtim.tv_nsec' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC + +/* Define to 1 if `st_blocks' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_BLOCKS + +/* Define to 1 if `st_rdev' is member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_RDEV + +/* Define to 1 if `tm_zone' is member of `struct tm'. */ +#undef HAVE_STRUCT_TM_TM_ZONE + +/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use + `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */ +#undef HAVE_ST_BLOCKS + +/* Define if struct stat has an st_dm_mode member. */ +#undef HAVE_ST_DM_MODE + +/* 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_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_MKDEV_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MNTENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MNTIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MNTTAB_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_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_UCRED_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UTSNAME_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 if struct tm has the tm_gmtoff member. */ +#undef HAVE_TM_GMTOFF + +/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use + `HAVE_STRUCT_TM_TM_ZONE' instead. */ +#undef HAVE_TM_ZONE + +/* Define to 1 if you have the `tsearch' function. */ +#undef HAVE_TSEARCH + +/* Define to 1 if you don't have `tm_zone' but do have the external array + `tzname'. */ +#undef HAVE_TZNAME + +/* Define to 1 if you have the `tzset' function. */ +#undef HAVE_TZSET + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `unsetenv' function. */ +#undef HAVE_UNSETENV + +/* Define to 1 if the system has the type `unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Define to 1 if you have the `waitpid' function. */ +#undef HAVE_WAITPID + +/* 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 `wcrtomb' function. */ +#undef HAVE_WCRTOMB + +/* Define to 1 if you have the `wcscoll' function. */ +#undef HAVE_WCSCOLL + +/* 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 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 the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Define to 1 if you have the `_ftime' function. */ +#undef HAVE__FTIME + +/* Define to 1 if you have the `__fpending' function. */ +#undef HAVE___FPENDING + +#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +#else +# define ISSLASH(C) ((C) == '/') +#endif + +/* Define if you want to use the leaf optimisation (this can still be turned + off with -noleaf) */ +#undef LEAF_OPTIMISATION + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +#undef LSTAT_FOLLOWS_SLASHED_SYMLINK + +/* Define to 1 if `major', `minor', and `makedev' are declared in . + */ +#undef MAJOR_IN_MKDEV + +/* Define to 1 if `major', `minor', and `makedev' are declared in + . */ +#undef MAJOR_IN_SYSMACROS + +/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ +#undef MALLOC_0_IS_NONNULL + +/* Define if there is no specific function for reading the list of mounted + file systems. fread will be used to read /etc/mnttab. (SVR2) */ +#undef MOUNTED_FREAD + +/* Define if (like SVR2) there is no specific function for reading the list of + mounted file systems, and your system has these header files: + and . (SVR3) */ +#undef MOUNTED_FREAD_FSTYP + +/* Define if there are functions named next_dev and fs_stat_dev for reading + the list of mounted file systems. (BeOS) */ +#undef MOUNTED_FS_STAT_DEV + +/* Define if there is a function named getfsstat for reading the list of + mounted file systems. (DEC Alpha running OSF/1) */ +#undef MOUNTED_GETFSSTAT + +/* Define if there is a function named getmnt for reading the list of mounted + file systems. (Ultrix) */ +#undef MOUNTED_GETMNT + +/* Define if there is a function named getmntent for reading the list of + mounted file systems, and that function takes a single argument. (4.3BSD, + SunOS, HP-UX, Dynix, Irix) */ +#undef MOUNTED_GETMNTENT1 + +/* Define if there is a function named getmntent for reading the list of + mounted file systems, and that function takes two arguments. (SVR4) */ +#undef MOUNTED_GETMNTENT2 + +/* Define if there is a function named getmntinfo for reading the list of + mounted file systems and it returns an array of 'struct statfs'. (4.4BSD, + Darwin) */ +#undef MOUNTED_GETMNTINFO + +/* Define if there is a function named getmntinfo for reading the list of + mounted file systems and it returns an array of 'struct statvfs'. (NetBSD + 3.0) */ +#undef MOUNTED_GETMNTINFO2 + +/* Define if there is a function named listmntent that can be used to list all + mounted file systems. (UNICOS) */ +#undef MOUNTED_LISTMNTENT + +/* Define if there is a function named mntctl that can be used to read the + list of mounted file systems, and there is a system header file that + declares `struct vmount.' (AIX) */ +#undef MOUNTED_VMOUNT + +/* 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 + +/* the number of pending output bytes on stream `fp' */ +#undef PENDING_OUTPUT_N_BYTES + +/* Define if exists and defines unusable PRI* macros. */ +#undef PRI_MACROS_BROKEN + +/* Define to 1 if the C compiler supports function prototypes. */ +#undef PROTOTYPES + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +#undef PTRDIFF_T_SUFFIX + +/* 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 to 1 if the `S_IS*' macros in do not work properly. */ +#undef STAT_MACROS_BROKEN + +/* 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 your declares `struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Define to 1 if the type of the st_atim member of a struct stat is struct + timespec. */ +#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC + +/* Defined if you specify --enable-d_type-optimisation to configure. */ +#undef USE_STRUCT_DIRENT_D_TYPE + +/* Version number of package */ +#undef VERSION + +/* Define if unsetenv() returns void, not int. */ +#undef VOID_UNSETENV + +/* 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 if you want to use fts() to do the filesystem search. */ +#undef WITH_FTS + +/* 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 if you want regoff_t to be at least as wide POSIX requires. */ +#undef _REGEX_LARGE_OFFSETS + +/* Enable extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif + +/* Define to rpl_ if the getopt replacement functions and variables should be + used. */ +#undef __GETOPT_PREFIX + +/* Define to rpl_ if the openat replacement function should be used. */ +#undef __OPENAT_PREFIX + +/* Define like PROTOTYPES; this can be used by system headers. */ +#undef __PROTOTYPES + +/* Define to `unsigned long' if does not define. */ +#undef dev_t + +/* Define to rpl_fchownat if the replacement function should be used. */ +#undef fchownat + +/* Define to a replacement function name for fnmatch(). */ +#undef fnmatch + +/* Define to a replacement function name for getline(). */ +#undef getline + +/* 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 + +/* Define to `unsigned long' if does not define. */ +#undef ino_t + +/* Define to signed long or signed long long if and + don't define. */ +#undef intmax_t + +/* Define to rpl_localtime if the replacement function should be used. */ +#undef localtime + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to a type if does not define. */ +#undef mbstate_t + +/* Define to rpl_memcmp if the replacement function should be used. */ +#undef memcmp + +/* Define to rpl_mktime if the replacement function should be used. */ +#undef mktime + +/* Define to `int' if does not define. */ +#undef mode_t + +/* Define to the name of the strftime replacement function. */ +#undef my_strftime + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to rpl_re_comp if the replacement should be used. */ +#undef re_comp + +/* Define to rpl_re_compile_fastmap if the replacement should be used. */ +#undef re_compile_fastmap + +/* Define to rpl_re_compile_pattern if the replacement should be used. */ +#undef re_compile_pattern + +/* Define to rpl_re_exec if the replacement should be used. */ +#undef re_exec + +/* Define to rpl_re_match if the replacement should be used. */ +#undef re_match + +/* Define to rpl_re_match_2 if the replacement should be used. */ +#undef re_match_2 + +/* Define to rpl_re_search if the replacement should be used. */ +#undef re_search + +/* Define to rpl_re_search_2 if the replacement should be used. */ +#undef re_search_2 + +/* Define to rpl_re_set_registers if the replacement should be used. */ +#undef re_set_registers + +/* Define to rpl_re_set_syntax if the replacement should be used. */ +#undef re_set_syntax + +/* Define to rpl_re_syntax_options if the replacement should be used. */ +#undef re_syntax_options + +/* Define to rpl_realloc if the replacement function should be used. */ +#undef realloc + +/* Define to a replacement function name for realpath(). */ +#undef realpath + +/* Define to rpl_regcomp if the replacement should be used. */ +#undef regcomp + +/* Define to rpl_regerror if the replacement should be used. */ +#undef regerror + +/* Define to rpl_regexec if the replacement should be used. */ +#undef regexec + +/* Define to rpl_regfree if the replacement should be used. */ +#undef regfree + +/* Define to equivalent of C99 restrict keyword, or to nothing if this is not + supported. Do not define if restrict is supported directly. */ +#undef restrict + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to `int' if does not define. */ +#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 diff --git a/configure b/configure new file mode 100755 index 0000000..8faedc2 --- /dev/null +++ b/configure @@ -0,0 +1,35954 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for GNU findutils 4.3.8. +# +# 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='GNU findutils' +PACKAGE_TARNAME='findutils' +PACKAGE_VERSION='4.3.8' +PACKAGE_STRING='GNU findutils 4.3.8' +PACKAGE_BUGREPORT='bug-findutils@gnu.org' + +ac_unique_file="find/pred.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +gl_header_list= +gl_func_list= +gt_needs= +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +INCLUDES +AUXDIR +WITH_FTS_TRUE +WITH_FTS_FALSE +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CPP +GREP +EGREP +RANLIB +U +ANSI2KNR +GL_COND_LIBTOOL_TRUE +GL_COND_LIBTOOL_FALSE +ALLOCA +ALLOCA_H +GNULIB_CHOWN +GNULIB_DUP2 +GNULIB_FCHDIR +GNULIB_FTRUNCATE +GNULIB_GETCWD +GNULIB_GETLOGIN_R +GNULIB_LSEEK +GNULIB_READLINK +GNULIB_SLEEP +HAVE_DUP2 +HAVE_FTRUNCATE +HAVE_READLINK +HAVE_SLEEP +HAVE_DECL_GETLOGIN_R +REPLACE_CHOWN +REPLACE_FCHDIR +REPLACE_GETCWD +REPLACE_LSEEK +LIB_CLOCK_GETTIME +ABSOLUTE_DIRENT_H +DIRENT_H +ABSOLUTE_FCNTL_H +FCNTL_H +FNMATCH_H +STDBOOL_H +HAVE__BOOL +YACC +YFLAGS +GETOPT_H +LIBINTL +LTLIBINTL +ABSOLUTE_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 +ABSOLUTE_STDINT_H +HAVE_STDINT_H +HAVE_SYS_INTTYPES_H +HAVE_SYS_BITYPES_H +BITSIZEOF_PTRDIFF_T +BITSIZEOF_SIG_ATOMIC_T +BITSIZEOF_SIZE_T +BITSIZEOF_WCHAR_T +BITSIZEOF_WINT_T +HAVE_SIGNED_SIG_ATOMIC_T +HAVE_SIGNED_WCHAR_T +HAVE_SIGNED_WINT_T +PTRDIFF_T_SUFFIX +SIG_ATOMIC_T_SUFFIX +SIZE_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 +ABSOLUTE_INTTYPES_H +PRIPTR_PREFIX +INTTYPES_H +GLIBC21 +GNULIB_MEMMEM +GNULIB_MEMPCPY +GNULIB_MEMRCHR +GNULIB_STPCPY +GNULIB_STPNCPY +GNULIB_STRCHRNUL +GNULIB_STRDUP +GNULIB_STRNDUP +GNULIB_STRNLEN +GNULIB_STRPBRK +GNULIB_STRSEP +GNULIB_STRCASESTR +GNULIB_STRTOK_R +GNULIB_MBSLEN +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 +HAVE_DECL_MEMMEM +HAVE_MEMPCPY +HAVE_DECL_MEMRCHR +HAVE_STPCPY +HAVE_STPNCPY +HAVE_STRCASECMP +HAVE_DECL_STRNCASECMP +HAVE_STRCHRNUL +HAVE_DECL_STRDUP +HAVE_STRNDUP +HAVE_DECL_STRNDUP +HAVE_DECL_STRNLEN +HAVE_STRPBRK +HAVE_STRSEP +HAVE_STRCASESTR +HAVE_DECL_STRTOK_R +LOCALE_FR_UTF8 +LOCALE_TR_UTF8 +LOCALE_ZH_CN +GNULIB_GETSUBOPT +GNULIB_MKDTEMP +GNULIB_MKSTEMP +HAVE_GETSUBOPT +HAVE_MKDTEMP +REPLACE_MKSTEMP +ABSOLUTE_STDLIB_H +ABSOLUTE_STRING_H +HAVE_LSTAT +HAVE_DECL_MKDIR +HAVE_IO_H +ABSOLUTE_SYS_STAT_H +SYS_STAT_H +REPLACE_LOCALTIME_R +REPLACE_NANOSLEEP +REPLACE_STRPTIME +REPLACE_TIMEGM +ABSOLUTE_TIME_H +TIME_H_DEFINES_STRUCT_TIMESPEC +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC +HAVE_UNISTD_H +ABSOLUTE_UNISTD_H +ABSOLUTE_WCHAR_H +WCHAR_H +HAVE_ISWCNTRL +HAVE_WINT_T +ABSOLUTE_WCTYPE_H +HAVE_WCTYPE_H +WCTYPE_H +LIBGNULIB_LIBDEPS +LIBGNULIB_LTLIBDEPS +MKINSTALLDIRS +CROSS_COMPILING_TRUE +CROSS_COMPILING_FALSE +FINDLIBS +LIBOBJS +FINDLIBOBJS +SORT +SORT_SUPPORTS_Z +HAVE_ATTRIBUTE_NORETURN +USE_NLS +MSGFMT +GMSGFMT +MSGFMT_015 +GMSGFMT_015 +XGETTEXT +XGETTEXT_015 +MSGMERGE +INTL_MACOSX_LIBS +LIBICONV +LTLIBICONV +INTLLIBS +POSUB +LTLIBOBJS +gl_LIBOBJS +gl_LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +YACC +YFLAGS' + + +# 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 GNU findutils 4.3.8 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/findutils] + --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 GNU findutils 4.3.8:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod + --enable-debug Enable debugging output which is likely to be + interesting to people debugging findutils + --enable-leaf-optimisation + Enable an optimisation which saves lstat calls to + identify subdirectories on filesystems having + traditional Unix semantics + --enable-d_type-optimization + Make use of the file type data returned in struct + dirent.d_type by readdir() + --enable-d_type-optimisation + Synonym for --enable-d_type-optimization + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-largefile omit support for large files + --disable-nls do not use Native Language Support + --disable-rpath do not hardcode runtime library paths + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --without-fts Use an older mechanism for searching the filesystem, instead of using fts() + --without-included-regex + don't compile regex; this is the default on 32-bit + systems with recent-enough versions of the GNU C + Library (use with caution on other systems). On + systems with 64-bit ptrdiff_t and 32-bit int, + --with-included-regex is the default, in case regex + functions operate on very long strings (>2GB) + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir + +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 + YACC The `Yet Another C Compiler' implementation to use. Defaults to + `bison -y'. Values other than `bison -y' will most likely break + on most systems. + YFLAGS YFLAGS contains the list arguments that will be passed by + default to Bison. This script will default YFLAGS to the empty + string to avoid a default value of `-d' given by some make + applications. + +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 +GNU findutils configure 4.3.8 +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 GNU findutils $as_me 4.3.8, 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 sys/param.h" +gl_func_list="$gl_func_list canonicalize_file_name" +gl_func_list="$gl_func_list resolvepath" +gl_header_list="$gl_header_list unistd.h" +gl_func_list="$gl_func_list getcwd" +gl_func_list="$gl_func_list readlink" +gl_func_list="$gl_func_list dup2" +gl_func_list="$gl_func_list fchdir" +gl_header_list="$gl_header_list dirent.h" +gl_header_list="$gl_header_list fcntl.h" +gl_func_list="$gl_func_list mempcpy" +gl_func_list="$gl_func_list btowc" +gl_func_list="$gl_func_list iswctype" +gl_func_list="$gl_func_list mbsrtowcs" +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 stdio_ext.h" +gl_func_list="$gl_func_list lchmod" +gl_func_list="$gl_func_list fdopendir" +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 inttypes.h" +gl_func_list="$gl_func_list alarm" +gl_header_list="$gl_header_list sys/statvfs.h" +gl_func_list="$gl_func_list mbsinit" +gl_header_list="$gl_header_list locale.h" +gl_func_list="$gl_func_list mbrtowc" +gl_func_list="$gl_func_list wcrtomb" +gl_func_list="$gl_func_list wcscoll" +gl_func_list="$gl_func_list setenv" +gl_header_list="$gl_header_list stdlib.h" +gl_func_list="$gl_func_list mblen" +gl_func_list="$gl_func_list mbrlen" +gl_func_list="$gl_func_list tzset" +gl_header_list="$gl_header_list wchar.h" +gl_header_list="$gl_header_list string.h" +gl_func_list="$gl_func_list lstat" +gl_header_list="$gl_header_list sys/stat.h" +gl_header_list="$gl_header_list time.h" +gl_func_list="$gl_func_list pipe" +gl_func_list="$gl_func_list iswcntrl" +gl_func_list="$gl_func_list wcwidth" +gt_needs="$gt_needs " +# 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 + + +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; 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 build-aux \"$srcdir\"/build-aux" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&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. + + +am__api_version='1.10' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='findutils' + VERSION='4.3.8' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + +ac_config_headers="$ac_config_headers 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 + + + + +ALL_LINGUAS="be bg ca da de el eo es et fi fr ga gl hr hu id it ja ko lg ms nl pl pt pt_BR ro ru rw sk sl sr sv tr uk vi zh_CN zh_TW" + +AUXDIR=$ac_aux_dir + + +# Check whether --with-fts was given. +if test "${with_fts+set}" = set; then + withval=$with_fts; with_fts=$withval +fi + + case $with_fts in + yes|no) ;; + '') with_fts=yes ;; + *) { { echo "$as_me:$LINENO: error: Invalid value for --with-fts: $with_fts" >&5 +echo "$as_me: error: Invalid value for --with-fts: $with_fts" >&2;} + { (exit 1); exit 1; }; } + esac + if test x"${with_fts-no}" != xno; then + WITH_FTS_TRUE= + WITH_FTS_FALSE='#' +else + WITH_FTS_TRUE='#' + WITH_FTS_FALSE= +fi + + if test x"${with_fts-no}" != xno ; then + +cat >>confdefs.h <<\_ACEOF +#define WITH_FTS 1 +_ACEOF + + fi + + +# Check whether --enable-id-cache was given. +if test "${enable_id_cache+set}" = set; then + enableval=$enable_id_cache; +cat >>confdefs.h <<\_ACEOF +#define CACHE_IDS 1 +_ACEOF + +fi + + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; ac_cv_debug=$enableval +else + ac_cv_debug=no +fi + + +# Check whether --enable-leaf-optimisation was given. +if test "${enable_leaf_optimisation+set}" = set; then + enableval=$enable_leaf_optimisation; ac_cv_leaf_optimisation=$enableval +else + ac_cv_leaf_optimisation=yes +fi + + +# Check whether --enable-d_type-optimization was given. +if test "${enable_d_type_optimization+set}" = set; then + enableval=$enable_d_type_optimization; ac_cv_d_type=$enableval +else + ac_cv_d_type=yes +fi + + +# Check whether --enable-d_type-optimisation was given. +if test "${enable_d_type_optimisation+set}" = set; then + enableval=$enable_d_type_optimisation; ac_cv_d_type=$enableval +fi + + + +{ echo "$as_me:$LINENO: checking whether debug output should be produced" >&5 +echo $ECHO_N "checking whether debug output should be produced... $ECHO_C" >&6; } +if test x$ac_cv_debug = xno; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_STAT 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for leaf optimisation" >&5 +echo $ECHO_N "checking for leaf optimisation... $ECHO_C" >&6; } +if test x$ac_cv_leaf_optimisation = xno; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define LEAF_OPTIMISATION 1 +_ACEOF + +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}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +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 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* + + + + +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 + + +{ 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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 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 _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 +_ACEOF + + + + + + + + + + +{ 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 + +{ echo "$as_me:$LINENO: checking for function prototypes" >&5 +echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; } +if test "$ac_cv_prog_cc_c89" != no; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define PROTOTYPES 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define __PROTOTYPES 1 +_ACEOF + +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$ac_cv_prog_cc_stdc" != no; then + U= ANSI2KNR= +else + U=_ ANSI2KNR=./ansi2knr +fi +# Ensure some checks needed by ansi2knr itself. + + +for ac_header in string.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 + + + +# 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' + +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 + +{ 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 + +# 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 + + + +# 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 + + + +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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 + + + + { 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. */ +long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + typedef int a[((-9223372036854775807LL < 0 + && 0 < 9223372036854775807ll) + ? 1 : -1)]; + int i = 63; +int +main () +{ +long long int llmax = 9223372036854775807ll; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll)); + ; + 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 + + + + + + +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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 canonicalize_file_name is declared" >&5 +echo $ECHO_N "checking whether canonicalize_file_name is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_canonicalize_file_name+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 canonicalize_file_name + (void) canonicalize_file_name; +#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_canonicalize_file_name=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_canonicalize_file_name=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_canonicalize_file_name" >&5 +echo "${ECHO_T}$ac_cv_have_decl_canonicalize_file_name" >&6; } +if test $ac_cv_have_decl_canonicalize_file_name = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CANONICALIZE_FILE_NAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CANONICALIZE_FILE_NAME 0 +_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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GNULIB_CHOWN=0; + GNULIB_DUP2=0; + GNULIB_FCHDIR=0; + GNULIB_FTRUNCATE=0; + GNULIB_GETCWD=0; + GNULIB_GETLOGIN_R=0; + GNULIB_LSEEK=0; + GNULIB_READLINK=0; + GNULIB_SLEEP=0; + HAVE_DUP2=1; + HAVE_FTRUNCATE=1; + HAVE_READLINK=1; + HAVE_SLEEP=1; + HAVE_DECL_GETLOGIN_R=1; + REPLACE_CHOWN=0; + REPLACE_FCHDIR=0; + REPLACE_GETCWD=0; + REPLACE_LSEEK=0; + +{ 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 unistd.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 working chown" >&5 +echo $ECHO_N "checking for working chown... $ECHO_C" >&6; } +if test "${ac_cv_func_chown_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_chown_works=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 +#include + +int +main () +{ + char *f = "conftest.chown"; + struct stat before, after; + + if (creat (f, 0600) < 0) + return 1; + if (stat (f, &before) < 0) + return 1; + if (chown (f, (uid_t) -1, (gid_t) -1) == -1) + return 1; + if (stat (f, &after) < 0) + return 1; + return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); + + ; + 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_chown_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 ) +ac_cv_func_chown_works=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.chown + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_chown_works" >&5 +echo "${ECHO_T}$ac_cv_func_chown_works" >&6; } +if test $ac_cv_func_chown_works = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHOWN 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking whether chown(2) dereferences symlinks" >&5 +echo $ECHO_N "checking whether chown(2) dereferences symlinks... $ECHO_C" >&6; } +if test "${gl_cv_func_chown_follows_symlink+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + gl_cv_func_chown_follows_symlink=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 + + int + main () + { + char const *dangling_symlink = "conftest.dangle"; + + unlink (dangling_symlink); + if (symlink ("conftest.no-such", dangling_symlink)) + abort (); + + /* Exit successfully on a conforming system, + i.e., where chown must fail with ENOENT. */ + exit ( ! (chown (dangling_symlink, getuid (), getgid ()) != 0 + && errno == ENOENT)); + } + +_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_chown_follows_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 ) +gl_cv_func_chown_follows_symlink=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_chown_follows_symlink" >&5 +echo "${ECHO_T}$gl_cv_func_chown_follows_symlink" >&6; } + + if test $gl_cv_func_chown_follows_symlink = no; then + +cat >>confdefs.h <<\_ACEOF +#define CHOWN_MODIFIES_SYMLINK 1 +_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 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 / //` + 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 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 + + + + + + + + + + + + + + + + + + + +{ echo "$as_me:$LINENO: checking for st_dm_mode in struct stat" >&5 +echo $ECHO_N "checking for st_dm_mode in struct stat... $ECHO_C" >&6; } +if test "${ac_cv_struct_st_dm_mode+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 () +{ +struct stat s; s.st_dm_mode; + ; + 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_struct_st_dm_mode=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_st_dm_mode=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_struct_st_dm_mode" >&5 +echo "${ECHO_T}$ac_cv_struct_st_dm_mode" >&6; } + + if test $ac_cv_struct_st_dm_mode = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ST_DM_MODE 1 +_ACEOF + + fi + + + + { echo "$as_me:$LINENO: checking whether strmode is declared" >&5 +echo $ECHO_N "checking whether strmode is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_strmode+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 strmode + (void) strmode; +#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_strmode=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_strmode=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strmode" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strmode" >&6; } +if test $ac_cv_have_decl_strmode = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRMODE 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRMODE 0 +_ACEOF + + +fi + + + + + + + + + +{ 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 getcwd (NULL, 0) allocates memory for result" >&5 +echo $ECHO_N "checking whether getcwd (NULL, 0) allocates memory for result... $ECHO_C" >&6; } +if test "${gl_cv_func_getcwd_null+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_func_getcwd_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. */ + +# include +# include +# ifndef getcwd + char *getcwd (); +# endif + int + main () + { + if (chdir ("/") != 0) + exit (1); + else + { + char *f = getcwd (NULL, 0); + exit (! (f && f[0] == '/' && !f[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 + gl_cv_func_getcwd_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 ) +gl_cv_func_getcwd_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: $gl_cv_func_getcwd_null" >&5 +echo "${ECHO_T}$gl_cv_func_getcwd_null" >&6; } + + + { echo "$as_me:$LINENO: checking whether getcwd is declared" >&5 +echo $ECHO_N "checking whether getcwd is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_getcwd+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 getcwd + (void) getcwd; +#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_getcwd=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_getcwd=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getcwd" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getcwd" >&6; } +if test $ac_cv_have_decl_getcwd = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETCWD 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETCWD 0 +_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 + + + + # 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 + + + + + + + # getdate.y works with bison only. + : ${YACC='bison -y'} + + + { echo "$as_me:$LINENO: checking for compound literals" >&5 +echo $ECHO_N "checking for compound literals... $ECHO_C" >&6; } +if test "${gl_cv_compound_literals+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. */ +struct s { int i, j; }; struct s s = (struct s) { 1, 2 }; +int +main () +{ +struct s t = (struct s) { 3, 4 }; + if (t.i != 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 + gl_cv_compound_literals=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_compound_literals=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gl_cv_compound_literals" >&5 +echo "${ECHO_T}$gl_cv_compound_literals" >&6; } + if test $gl_cv_compound_literals = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_COMPOUND_LITERALS 1 +_ACEOF + + fi + +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +if test "${ac_cv_struct_tm+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 () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + 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_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_tm=sys/time.h +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 +echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_tm_tm_gmtoff+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 tm ac_aggr; +if (ac_aggr.tm_gmtoff) +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_tm_tm_gmtoff=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 tm ac_aggr; +if (sizeof ac_aggr.tm_gmtoff) +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_tm_tm_gmtoff=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_tm_tm_gmtoff=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_tm_tm_gmtoff" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; } +if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_GMTOFF 1 +_ACEOF + +fi + + + + { echo "$as_me:$LINENO: checking whether getdelim is declared" >&5 +echo $ECHO_N "checking whether getdelim is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_getdelim+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 getdelim + (void) getdelim; +#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_getdelim=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_getdelim=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdelim" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getdelim" >&6; } +if test $ac_cv_have_decl_getdelim = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETDELIM 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETDELIM 0 +_ACEOF + + +fi + + + + + 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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 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 + # Try the official restrict keyword, then gcc's __restrict, and + # the less common variants. + 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 $ac_cv_header_sys_time_h = yes; then + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_sys_time_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/sys/time.h#{s#.*"\(.*/sys/time.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_sys_time_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_sys_time_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_SYS_TIME_H "$gl_cv_absolute_sys_time_h" +_ACEOF + + + ABSOLUTE_SYS_TIME_H=\"$gl_cv_absolute_sys_time_h\" + HAVE_SYS_TIME_H=1 + else + ABSOLUTE_SYS_TIME_H=\"no/such/file/sys/time.h\" + 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 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. */ +unsigned long long int ull = 18446744073709551615ULL; + typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +unsigned long long int ullmax = 18446744073709551615ull; + return (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 + + + + + + + + + + + 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 $ac_cv_header_stdint_h = yes; then + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_stdint_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/stdint.h#{s#.*"\(.*/stdint.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_stdint_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_stdint_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_STDINT_H "$gl_cv_absolute_stdint_h" +_ACEOF + + + ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\" + HAVE_STDINT_H=1 + else + ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\" + 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. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #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 */ +#include ABSOLUTE_STDINT_H +#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; +struct s { + int check_PTRDIFF: PTRDIFF_MIN < (ptrdiff_t) 0 && (ptrdiff_t) 0 < PTRDIFF_MAX ? 1 : -1; + int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= (sig_atomic_t) 0 && (sig_atomic_t) 0 < SIG_ATOMIC_MAX ? 1 : -1; + int check_SIZE: (size_t) 0 < SIZE_MAX ? 1 : -1; + int check_WCHAR: WCHAR_MIN <= (wchar_t) 0 && (wchar_t) 0 < WCHAR_MAX ? 1 : -1; + int check_WINT: WINT_MIN <= (wint_t) 0 && (wint_t) 0 < WINT_MAX ? 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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 + + + + + + + + + + + for gltype in ptrdiff_t sig_atomic_t size_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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + + 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 + + + + + + + + for gltype in ptrdiff_t sig_atomic_t size_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 + #include + #include + #include + + 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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 whether lchown is declared" >&5 +echo $ECHO_N "checking whether lchown is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_lchown+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 lchown + (void) lchown; +#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_lchown=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_lchown=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_lchown" >&5 +echo "${ECHO_T}$ac_cv_have_decl_lchown" >&6; } +if test $ac_cv_have_decl_lchown = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LCHOWN 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LCHOWN 0 +_ACEOF + + +fi + + + + + { 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" + + + + { 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 "${gl_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 + gl_cv_func_mbrtowc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_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: $gl_cv_func_mbrtowc" >&5 +echo "${ECHO_T}$gl_cv_func_mbrtowc" >&6; } + if test $gl_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_STPCPY=0; + GNULIB_STPNCPY=0; + GNULIB_STRCHRNUL=0; + GNULIB_STRDUP=0; + GNULIB_STRNDUP=0; + GNULIB_STRNLEN=0; + GNULIB_STRPBRK=0; + GNULIB_STRSEP=0; + GNULIB_STRCASESTR=0; + GNULIB_STRTOK_R=0; + GNULIB_MBSLEN=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; + HAVE_DECL_MEMMEM=1; + HAVE_MEMPCPY=1; + HAVE_DECL_MEMRCHR=1; + HAVE_STPCPY=1; + HAVE_STPNCPY=1; + HAVE_STRCASECMP=1; + HAVE_DECL_STRNCASECMP=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; + + + { echo "$as_me:$LINENO: checking whether memrchr is declared" >&5 +echo $ECHO_N "checking whether memrchr is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_memrchr+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 memrchr + (void) memrchr; +#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_memrchr=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_memrchr=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_memrchr" >&5 +echo "${ECHO_T}$ac_cv_have_decl_memrchr" >&6; } +if test $ac_cv_have_decl_memrchr = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MEMRCHR 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MEMRCHR 0 +_ACEOF + + +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GNULIB_GETSUBOPT=0; + GNULIB_MKDTEMP=0; + GNULIB_MKSTEMP=0; + HAVE_GETSUBOPT=1; + HAVE_MKDTEMP=1; + REPLACE_MKSTEMP=0; + + + + + + + + + { echo "$as_me:$LINENO: checking whether strdup is declared" >&5 +echo $ECHO_N "checking whether strdup is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_strdup+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 strdup + (void) strdup; +#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_strdup=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_strdup=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strdup" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strdup" >&6; } +if test $ac_cv_have_decl_strdup = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRDUP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRDUP 0 +_ACEOF + + +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_string_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/string.h#{s#.*"\(.*/string.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_string_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_string_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_STRING_H "$gl_cv_absolute_string_h" +_ACEOF + + + ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_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 + + + + + + + + + +{ 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 + + + + + + + + + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; + REPLACE_STRPTIME=GNULIB_PORTCHECK; + REPLACE_TIMEGM=GNULIB_PORTCHECK; + + + + + + + + + + : + + + + + + { 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_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + fi + fi + + + + + + + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_time_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/time.h#{s#.*"\(.*/time.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_time_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_time_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_TIME_H "$gl_cv_absolute_time_h" +_ACEOF + + + ABSOLUTE_TIME_H=\"$gl_cv_absolute_time_h\" + + + + + + + + + + + + + + + + + + + + + + + + + + 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='gnulib/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 + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS argmatch.$ac_objext" + + + gl_LIBOBJS="$gl_LIBOBJS canonicalize.$ac_objext" + + + : + + + + + + + : + + + + + + + : + + + + + + + + + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_CANONICALIZE 1 +_ACEOF + + + + + : + + + + + + + : + + + + + + if test $ac_cv_func_canonicalize_file_name = no; then + gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define realpath rpl_realpath +_ACEOF + + + + : + + + + + + + + + + : + + + + + + + + + + fi + + + { echo "$as_me:$LINENO: checking whether this system has an arbitrary file name length limit" >&5 +echo $ECHO_N "checking whether this system has an arbitrary file name length limit... $ECHO_C" >&6; } +if test "${gl_cv_have_arbitrary_file_name_length_limit+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 PATH_MAX || defined MAXPATHLEN +have_arbitrary_file_name_length_limit +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then + gl_cv_have_arbitrary_file_name_length_limit=yes +else + gl_cv_have_arbitrary_file_name_length_limit=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 +echo "${ECHO_T}$gl_cv_have_arbitrary_file_name_length_limit" >&6; } + + if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then + gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" + + : + + fi + + + + + + + + if test $ac_cv_func_chown_works = no; then + +cat >>confdefs.h <<\_ACEOF +#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1 +_ACEOF + + fi + + # If chown has either of the above problems, then we need the wrapper. + if test $ac_cv_func_chown_works$gl_cv_func_chown_follows_symlink = yesyes; then + : # no wrapper needed + else + REPLACE_CHOWN=1 + gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" + + { echo "$as_me:$LINENO: checking for fchown" >&5 +echo $ECHO_N "checking for fchown... $ECHO_C" >&6; } +if test "${ac_cv_func_fchown+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 fchown to an innocuous variant, in case declares fchown. + For example, HP-UX 11i declares gettimeofday. */ +#define fchown innocuous_fchown + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char fchown (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef fchown + +/* 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 fchown (); +/* 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_fchown || defined __stub___fchown +choke me +#endif + +int +main () +{ +return fchown (); + ; + 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_fchown=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_fchown=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_fchown" >&5 +echo "${ECHO_T}$ac_cv_func_fchown" >&6; } +if test $ac_cv_func_fchown = yes; then + : +else + gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext" +fi + + + fi + + + + GNULIB_CHOWN=1 + + + + + # 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 close-stream.$ac_objext" + + : + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_CLOSE_STREAM 1 +_ACEOF + + + + gl_LIBOBJS="$gl_LIBOBJS closeout.$ac_objext" + + : + + + + gl_LIBOBJS="$gl_LIBOBJS cycle-check.$ac_objext" + + { echo "$as_me:$LINENO: checking for d_ino member in directory struct" >&5 +echo $ECHO_N "checking for d_ino member in directory struct... $ECHO_C" >&6; } +if test "${gl_cv_struct_dirent_d_ino+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_struct_dirent_d_ino=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 () +{ +DIR *dp = opendir ("."); + struct dirent *e; + struct stat st; + if (! dp) + return 1; + e = readdir (dp); + return ! (e + && stat (e->d_name, &st) == 0 + && e->d_ino == st.st_ino); + ; + 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_struct_dirent_d_ino=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_struct_dirent_d_ino=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_struct_dirent_d_ino" >&5 +echo "${ECHO_T}$gl_cv_struct_dirent_d_ino" >&6; } + if test $gl_cv_struct_dirent_d_ino = yes; then + +cat >>confdefs.h <<\_ACEOF +#define D_INO_IN_DIRENT 1 +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking for d_type member in directory struct" >&5 +echo $ECHO_N "checking for d_type member in directory struct... $ECHO_C" >&6; } +if test "${jm_cv_struct_dirent_d_type+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 () +{ +struct dirent dp; dp.d_type = 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 + jm_cv_struct_dirent_d_type=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + jm_cv_struct_dirent_d_type=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: $jm_cv_struct_dirent_d_type" >&5 +echo "${ECHO_T}$jm_cv_struct_dirent_d_type" >&6; } + if test $jm_cv_struct_dirent_d_type = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_DIRENT_D_TYPE 1 +_ACEOF + + fi + + + + + + +for ac_func in dirfd +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 dirfd is declared" >&5 +echo $ECHO_N "checking whether dirfd is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_dirfd+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 () +{ +#ifndef dirfd + (void) dirfd; +#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_dirfd=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_dirfd=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_dirfd" >&5 +echo "${ECHO_T}$ac_cv_have_decl_dirfd" >&6; } +if test $ac_cv_have_decl_dirfd = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_DIRFD 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_DIRFD 0 +_ACEOF + + +fi + + + + { echo "$as_me:$LINENO: checking whether dirfd is a macro" >&5 +echo $ECHO_N "checking whether dirfd is a macro... $ECHO_C" >&6; } +if test "${gl_cv_func_dirfd_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 +#include +#ifdef dirfd + dirent_header_defines_dirfd +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then + gl_cv_func_dirfd_macro=yes +else + gl_cv_func_dirfd_macro=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_dirfd_macro" >&5 +echo "${ECHO_T}$gl_cv_func_dirfd_macro" >&6; } + + # Use the replacement only if we have no function, macro, + # or declaration with that name. + if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$gl_cv_func_dirfd_macro \ + = no,no,no; then + +for ac_func in dirfd +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 + + { echo "$as_me:$LINENO: checking how to get the file descriptor associated with an open DIR*" >&5 +echo $ECHO_N "checking how to get the file descriptor associated with an open DIR*... $ECHO_C" >&6; } +if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + dirfd_save_CFLAGS=$CFLAGS + for ac_expr in d_fd dd_fd; do + + CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" + 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 () +{ +DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; + ; + 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 + dir_fd_found=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 + CFLAGS=$dirfd_save_CFLAGS + test "$dir_fd_found" = yes && break + done + test "$dir_fd_found" = yes || ac_expr=no_such_member + + gl_cv_sys_dir_fd_member_name=$ac_expr + + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_sys_dir_fd_member_name" >&5 +echo "${ECHO_T}$gl_cv_sys_dir_fd_member_name" >&6; } + if test $gl_cv_sys_dir_fd_member_name != no_such_member; then + +cat >>confdefs.h <<_ACEOF +#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name +_ACEOF + + fi + + + fi + + + 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 / //` + 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 + + + + + : + + + + + + if test $ac_cv_func_dup2 = no; then + HAVE_DUP2=0 + gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + fi + + + + GNULIB_DUP2=1 + + + { 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 + + + + : + + + + gl_LIBOBJS="$gl_LIBOBJS exitfail.$ac_objext" + + : + + + + + : + + + + + + if test $ac_cv_func_fchdir = no; then + REPLACE_FCHDIR=1 + gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" + : + +cat >>confdefs.h <<\_ACEOF +#define FCHDIR_REPLACEMENT 1 +_ACEOF + + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_dirent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + : + + + + + if test $ac_cv_header_dirent_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 + gl_cv_absolute_dirent_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/dirent.h#{s#.*"\(.*/dirent.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_dirent_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_dirent_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_DIRENT_H "$gl_cv_absolute_dirent_h" +_ACEOF + + + ABSOLUTE_DIRENT_H=\"$gl_cv_absolute_dirent_h\" + DIRENT_H='dirent.h' + else + DIRENT_H= + fi + + + + + + GNULIB_FCHDIR=1 + + + { 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 + + + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_fcntl_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/fcntl.h#{s#.*"\(.*/fcntl.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_fcntl_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_fcntl_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_FCNTL_H "$gl_cv_absolute_fcntl_h" +_ACEOF + + + ABSOLUTE_FCNTL_H=\"$gl_cv_absolute_fcntl_h\" + + FCNTL_H='fcntl.h' + + + + gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext" + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_FCNTL_SAFER 1 +_ACEOF + + + + { echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_blocks+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_blocks) +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_stat_st_blocks=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. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blocks) +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_stat_st_blocks=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_blocks=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_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } +if test $ac_cv_member_struct_stat_st_blocks = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ST_BLOCKS 1 +_ACEOF + +else + gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext" +fi + + + if test $ac_cv_member_struct_stat_st_blocks = no; then + + + : + + + + + + : + + fi + + + + gl_LIBOBJS="$gl_LIBOBJS filemode.$ac_objext" + + : + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS filenamecat.$ac_objext" + + + : + + + + + + + + { 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 + + + + gl_LIBOBJS="$gl_LIBOBJS fopen-safer.$ac_objext" + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_FOPEN_SAFER 1 +_ACEOF + + + + + : + + + + + + +for ac_func in __fpending +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 + + fp_headers=' +# include +# if HAVE_STDIO_EXT_H +# include +# endif +' + { echo "$as_me:$LINENO: checking whether __fpending is declared" >&5 +echo $ECHO_N "checking whether __fpending is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl___fpending+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. */ +$fp_headers + +int +main () +{ +#ifndef __fpending + (void) __fpending; +#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___fpending=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___fpending=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___fpending" >&5 +echo "${ECHO_T}$ac_cv_have_decl___fpending" >&6; } +if test $ac_cv_have_decl___fpending = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___FPENDING 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___FPENDING 0 +_ACEOF + + +fi + + + if test $ac_cv_func___fpending = no; then + { echo "$as_me:$LINENO: checking how to determine the number of pending output bytes on a stream" >&5 +echo $ECHO_N "checking how to determine the number of pending output bytes on a stream... $ECHO_C" >&6; } +if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + for ac_expr in \ + \ + '# glibc2' \ + 'fp->_IO_write_ptr - fp->_IO_write_base' \ + \ + '# traditional Unix' \ + 'fp->_ptr - fp->_base' \ + \ + '# BSD' \ + 'fp->_p - fp->_bf._base' \ + \ + '# SCO, Unixware' \ + '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ + \ + '# old glibc?' \ + 'fp->__bufp - fp->__buffer' \ + \ + '# old glibc iostream?' \ + 'fp->_pptr - fp->_pbase' \ + \ + '# VMS' \ + '(*fp)->_ptr - (*fp)->_base' \ + \ + '# e.g., DGUX R4.11; the info is not available' \ + 1 \ + ; do + + # Skip each embedded comment. + case "$ac_expr" in '#'*) continue;; esac + + 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 () +{ +FILE *fp = stdin; (void) ($ac_expr); + ; + 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 + fp_done=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 + test "$fp_done" = yes && break + done + + ac_cv_sys_pending_output_n_bytes=$ac_expr + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_pending_output_n_bytes" >&5 +echo "${ECHO_T}$ac_cv_sys_pending_output_n_bytes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes +_ACEOF + + fi + + + + gl_LIBOBJS="$gl_LIBOBJS fts.$ac_objext" + + + gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + + : + + + + + + + : + + + + + + + + +for ac_func in fchmodat mkdirat openat +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 + + case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in + yes+yes) ;; + yes+*) gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext";; + *) + +cat >>confdefs.h <<\_ACEOF +#define __OPENAT_PREFIX rpl_ +_ACEOF + + + : +;; + esac + + # Assume we'll use the replacement function. + # The only case in which we won't is when we have fchownat, and it works. + use_replacement_fchownat=yes + + { echo "$as_me:$LINENO: checking for fchownat" >&5 +echo $ECHO_N "checking for fchownat... $ECHO_C" >&6; } +if test "${ac_cv_func_fchownat+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 fchownat to an innocuous variant, in case declares fchownat. + For example, HP-UX 11i declares gettimeofday. */ +#define fchownat innocuous_fchownat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char fchownat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef fchownat + +/* 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 fchownat (); +/* 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_fchownat || defined __stub___fchownat +choke me +#endif + +int +main () +{ +return fchownat (); + ; + 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_fchownat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_fchownat=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_fchownat" >&5 +echo "${ECHO_T}$ac_cv_func_fchownat" >&6; } +if test $ac_cv_func_fchownat = yes; then + have_fchownat=yes +else + have_fchownat=no +fi + + if test $have_fchownat = yes; then + + { echo "$as_me:$LINENO: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 +echo $ECHO_N "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... $ECHO_C" >&6; } +if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + gl_dangle=conftest.dangle + # Remove any remnants of a previous test. + rm -f $gl_dangle + # Arrange for deletion of the temporary file this test creates. + ac_clean_files="$ac_clean_files $gl_dangle" + ln -s conftest.no-such $gl_dangle + if test "$cross_compiling" = yes; then + gl_cv_func_fchownat_nofollow_works=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 +#include +#include +int +main () +{ + return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), + AT_SYMLINK_NOFOLLOW) != 0 + && errno == ENOENT); +} + +_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_fchownat_nofollow_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_fchownat_nofollow_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_fchownat_nofollow_works" >&5 +echo "${ECHO_T}$gl_cv_func_fchownat_nofollow_works" >&6; } + if test $gl_cv_func_fchownat_nofollow_works = no; then + : +else + use_replacement_fchownat=no +fi + + + fi + + if test $use_replacement_fchownat = yes; then + gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define fchownat rpl_fchownat +_ACEOF + + fi + + + + # Checks for header files. + + : + + + + + + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_FTS 1 +_ACEOF + + + + + + + gl_abort_bug=no + case $gl_cv_func_getcwd_null in + yes) + + + : + + + + + + + { echo "$as_me:$LINENO: checking whether getcwd handles long file names properly" >&5 +echo $ECHO_N "checking whether getcwd handles long file names properly... $ECHO_C" >&6; } +if test "${gl_cv_func_getcwd_path_max+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir3" + if test "$cross_compiling" = yes; then + gl_cv_func_getcwd_path_max=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 +#include +#include +#include +#include +#include + +#ifndef AT_FDCWD +# define AT_FDCWD 0 +#endif +#ifdef ENAMETOOLONG +# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) +#else +# define is_ENAMETOOLONG(x) 0 +#endif + +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif + +/* The length of this name must be 8. */ +#define DIR_NAME "confdir3" +#define DIR_NAME_LEN 8 +#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) + +/* The length of "../". */ +#define DOTDOTSLASH_LEN 3 + +/* Leftover bytes in the buffer, to work around library or OS bugs. */ +#define BUF_SLOP 20 + +int +main () +{ +#ifndef PATH_MAX + /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- + at least not on a local file system. And if we were to start worrying + about remote file systems, we'd have to enable the wrapper function + all of the time, just to be safe. That's not worth the cost. */ + exit (0); +#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ + - DIR_NAME_SIZE - BUF_SLOP) \ + <= PATH_MAX) + /* FIXME: Assuming there's a system for which this is true, + this should be done in a compile test. */ + exit (0); +#else + char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) + + DIR_NAME_SIZE + BUF_SLOP]; + char *cwd = getcwd (buf, PATH_MAX); + size_t initial_cwd_len; + size_t cwd_len; + int fail = 0; + size_t n_chdirs = 0; + + if (cwd == NULL) + exit (1); + + cwd_len = initial_cwd_len = strlen (cwd); + + while (1) + { + size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); + char *c = NULL; + + cwd_len += DIR_NAME_SIZE; + /* If mkdir or chdir fails, it could be that this system cannot create + any file with an absolute name longer than PATH_MAX, such as cygwin. + If so, leave fail as 0, because the current working directory can't + be too long for getcwd if it can't even be created. For other + errors, be pessimistic and consider that as a failure, too. */ + if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) + { + if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) + fail = 2; + break; + } + + if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) + { + c = getcwd (buf, PATH_MAX); + if (!c && errno == ENOENT) + { + fail = 1; + break; + } + if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno))) + { + fail = 2; + break; + } + } + + if (dotdot_max <= cwd_len - initial_cwd_len) + { + if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) + break; + c = getcwd (buf, cwd_len + 1); + if (!c) + { + if (! (errno == ERANGE || errno == ENOENT + || is_ENAMETOOLONG (errno))) + { + fail = 2; + break; + } + if (AT_FDCWD || errno == ERANGE || errno == ENOENT) + { + fail = 1; + break; + } + } + } + + if (c && strlen (c) != cwd_len) + { + fail = 2; + break; + } + ++n_chdirs; + } + + /* Leaving behind such a deep directory is not polite. + So clean up here, right away, even though the driving + shell script would also clean up. */ + { + size_t i; + + /* Try rmdir first, in case the chdir failed. */ + rmdir (DIR_NAME); + for (i = 0; i <= n_chdirs; i++) + { + if (chdir ("..") < 0) + break; + if (rmdir (DIR_NAME) != 0) + break; + } + } + + exit (fail); +#endif +} + +_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_getcwd_path_max=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 + 1) gl_cv_func_getcwd_path_max='no, but it is partly working';; + *) gl_cv_func_getcwd_path_max=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_getcwd_path_max" >&5 +echo "${ECHO_T}$gl_cv_func_getcwd_path_max" >&6; } + case $gl_cv_func_getcwd_path_max in + no,*) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PARTLY_WORKING_GETCWD 1 +_ACEOF +;; + esac + + + + : + + + + + + +for ac_func in getpagesize +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 getcwd aborts when 4k < cwd_length < 16k" >&5 +echo $ECHO_N "checking whether getcwd aborts when 4k < cwd_length < 16k... $ECHO_C" >&6; } +if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Remove any remnants of a previous test. + rm -rf confdir-14B--- + # Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir-14B---" + if test "$cross_compiling" = yes; then + gl_cv_func_getcwd_abort_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 +#include +#include +#include + +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif + +/* FIXME: skip the run-test altogether on systems without getpagesize. */ +#if ! HAVE_GETPAGESIZE +# define getpagesize() 0 +#endif + +/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than + the 16kB pagesize on ia64 linux. Those conditions make the code below + trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ +#define TARGET_LEN (5 * 1024) + +int +main () +{ + char const *dir_name = "confdir-14B---"; + char *cwd; + size_t initial_cwd_len; + int fail = 0; + size_t desired_depth; + size_t d; + + /* The bug is triggered when PATH_MAX < getpagesize (), so skip + this relative expensive and invasive test if that's not true. */ + if (getpagesize () <= PATH_MAX) + return 0; + + cwd = getcwd (NULL, 0); + if (cwd == NULL) + return 0; + + initial_cwd_len = strlen (cwd); + free (cwd); + desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) + / (1 + strlen (dir_name))); + for (d = 0; d < desired_depth; d++) + { + if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) + { + fail = 3; /* Unable to construct deep hierarchy. */ + break; + } + } + + /* If libc has the bug in question, this invocation of getcwd + results in a failed assertion. */ + cwd = getcwd (NULL, 0); + if (cwd == NULL) + fail = 4; /* getcwd failed. This is ok, and expected. */ + free (cwd); + + /* Call rmdir first, in case the above chdir failed. */ + rmdir (dir_name); + while (0 < d--) + { + if (chdir ("..") < 0) + break; + rmdir (dir_name); + } + + 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_getcwd_abort_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_getcwd_abort_bug=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_getcwd_abort_bug" >&5 +echo "${ECHO_T}$gl_cv_func_getcwd_abort_bug" >&6; } + if test $gl_cv_func_getcwd_abort_bug = yes; then + gl_abort_bug=yes +fi + +;; + esac + + case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in + yes,yes,no) ;; + *) + REPLACE_GETCWD=1 + gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" + + + + : +;; + esac + + + + GNULIB_GETCWD=1 + + + + + + + + { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_tm_tm_zone+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_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (ac_aggr.tm_zone) +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_tm_tm_zone=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 +#include <$ac_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (sizeof ac_aggr.tm_zone) +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_tm_tm_zone=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_tm_tm_zone=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_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +if test $ac_cv_member_struct_tm_tm_zone = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF + + +fi + +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_ZONE 1 +_ACEOF + +else + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+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 tzname + (void) tzname; +#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_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } +if test "${ac_cv_var_tzname+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_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main () +{ +return tzname[0][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_var_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_tzname=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_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 +_ACEOF + + fi +fi + + + + + + + + + +for ac_func in getdelim +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_getdelim = no; then + + + +for ac_func in flockfile funlockfile +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 + + + + + { echo "$as_me:$LINENO: checking whether getline is declared" >&5 +echo $ECHO_N "checking whether getline is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_getline+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 getline + (void) getline; +#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_getline=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_getline=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getline" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getline" >&6; } +if test $ac_cv_have_decl_getline = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETLINE 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETLINE 0 +_ACEOF + + +fi + + + + gl_getline_needs_run_time_check=no + { echo "$as_me:$LINENO: checking for getline" >&5 +echo $ECHO_N "checking for getline... $ECHO_C" >&6; } +if test "${ac_cv_func_getline+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 getline to an innocuous variant, in case declares getline. + For example, HP-UX 11i declares gettimeofday. */ +#define getline innocuous_getline + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getline (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getline + +/* 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 getline (); +/* 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_getline || defined __stub___getline +choke me +#endif + +int +main () +{ +return getline (); + ; + 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_getline=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getline=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_getline" >&5 +echo "${ECHO_T}$ac_cv_func_getline" >&6; } +if test $ac_cv_func_getline = yes; then + gl_getline_needs_run_time_check=yes +else + am_cv_func_working_getline=no +fi + + if test $gl_getline_needs_run_time_check = yes; then + { echo "$as_me:$LINENO: checking for working getline function" >&5 +echo $ECHO_N "checking for working getline function... $ECHO_C" >&6; } +if test "${am_cv_func_working_getline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo fooN |tr -d '\012'|tr N '\012' > conftest.data + 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) + Lucky GNU user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then + am_cv_func_working_getline=yes +else + am_cv_func_working_getline=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 +# include +# include + int main () + { /* Based on a test program from Karl Heuer. */ + char *line = NULL; + size_t siz = 0; + int len; + FILE *in = fopen ("./conftest.data", "r"); + if (!in) + return 1; + len = getline (&line, &siz, in); + exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 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 + am_cv_func_working_getline=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 ) +am_cv_func_working_getline=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: $am_cv_func_working_getline" >&5 +echo "${ECHO_T}$am_cv_func_working_getline" >&6; } + fi + + if test $am_cv_func_working_getline = no; then + +cat >>confdefs.h <<\_ACEOF +#define getline gnu_getline +_ACEOF + + gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" + + + + + + + +for ac_func in getdelim +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_getdelim = no; then + + + +for ac_func in flockfile funlockfile +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 + + + + 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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 hash.$ac_objext" + + + + + gl_LIBOBJS="$gl_LIBOBJS human.$ac_objext" + + : + + + gl_LIBOBJS="$gl_LIBOBJS i-ring.$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 */ +#include ABSOLUTE_INTTYPES_H + +/* 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 $ac_cv_header_inttypes_h = yes; then + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_inttypes_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/inttypes.h#{s#.*"\(.*/inttypes.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_inttypes_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_inttypes_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_INTTYPES_H "$gl_cv_absolute_inttypes_h" +_ACEOF + + + ABSOLUTE_INTTYPES_H=\"$gl_cv_absolute_inttypes_h\" + else + ABSOLUTE_INTTYPES_H=\"no/such/file/inttypes.h\" + fi + + + 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 + + INTTYPES_H='inttypes.h' + fi + + + + + + + : + + + + + + +for ac_func in lchown +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 + + + + + + : + + + + + + + + + + + { 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 + + : + + +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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 0 +_ACEOF + + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define malloc rpl_malloc +_ACEOF + +fi + + + + + + + + + + : + + + + + GNULIB_MBSCASESTR=1 + + + + { 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 +struct tm t; +char buf[16]; +int main () { + /* On BeOS, 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__) + /* 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. + 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. */ +# if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') 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 turkish Unicode locale" >&5 +echo $ECHO_N "checking for a turkish Unicode locale... $ECHO_C" >&6; } +if test "${gt_cv_locale_tr_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 +struct tm t; +char buf[16]; +int main () { + /* On BeOS, 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__) + /* 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. + On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. */ +# if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') return 1; +# endif + /* Check whether in the abbreviation of the eighth month, the second + character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) + return 1; + /* Check whether the upper-/lowercase mappings are as expected for + Turkish. */ + if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' + || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) + return 1; +#endif + 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=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr_TR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr_TR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr.UTF-8 + else + # None found. + gt_cv_locale_tr_utf8=none + fi + fi + fi + else + gt_cv_locale_tr_utf8=none + fi + rm -fr conftest* + +fi +{ echo "$as_me:$LINENO: result: $gt_cv_locale_tr_utf8" >&5 +echo "${ECHO_T}$gt_cv_locale_tr_utf8" >&6; } + LOCALE_TR_UTF8=$gt_cv_locale_tr_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 + + macosx= + case "$host_os" in + darwin[56]*) ;; + darwin*) macosx=yes;; + esac + if test -n "$macosx"; then + # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8 + # encodings, but the kernel does not support them. 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." + # See the comments in config.charset. Therefore we bypass the test. + gt_cv_locale_zh_CN=none + 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 +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. + 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. */ +#if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') 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 + +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 + + + + + + : + + + + + GNULIB_MBSLEN=1 + + + + + : + + + + + GNULIB_MBSSTR=1 + + + + { 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 +struct tm t; +char buf[16]; +int main () { + /* On BeOS, 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__) + /* 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. + 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. */ +# if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') 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 + + macosx= + case "$host_os" in + darwin[56]*) ;; + darwin*) macosx=yes;; + esac + if test -n "$macosx"; then + # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8 + # encodings, but the kernel does not support them. 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." + # See the comments in config.charset. Therefore we bypass the test. + gt_cv_locale_zh_CN=none + 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 +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. + 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. */ +#if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') 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 + +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 + + + + + + : + + + +for ac_func in memchr +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_memchr = no; then + + +for ac_header in bp-sym.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 + + + { echo "$as_me:$LINENO: checking for working memcmp" >&5 +echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } +if test "${ac_cv_func_memcmp_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_memcmp_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 () +{ + + /* Some versions of memcmp are not 8-bit clean. */ + char c0 = '\100', c1 = '\200', c2 = '\201'; + if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) + return 1; + + /* The Next x86 OpenStep bug shows up only when comparing 16 bytes + or more and with at least one buffer not starting on a 4-byte boundary. + William Lewis provided this test program. */ + { + char foo[21]; + char bar[21]; + int i; + for (i = 0; i < 4; i++) + { + char *a = foo + i; + char *b = bar + i; + strcpy (a, "--------01111111"); + strcpy (b, "--------10000000"); + if (memcmp (a, b, 16) >= 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 + ac_cv_func_memcmp_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_memcmp_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_memcmp_working" >&5 +echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } +test $ac_cv_func_memcmp_working = no && gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext" + + if test $ac_cv_func_memcmp_working = no; then + +cat >>confdefs.h <<\_ACEOF +#define memcmp rpl_memcmp +_ACEOF + + : + fi + + + + + + + + +for ac_func in mempcpy +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_mempcpy = no; then + HAVE_MEMPCPY=0 + + : + + fi + + + + GNULIB_MEMPCPY=1 + + + + + + + : + + + + + + if test $ac_cv_have_decl_memrchr = no; then + HAVE_DECL_MEMRCHR=0 + fi + + +for ac_func in memrchr +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_memrchr = no; then + : + fi + + + + GNULIB_MEMRCHR=1 + + + +for ac_func in memset +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_memset = no; then + + : + + fi + + + + : + + + + + + + : + + + + + +{ echo "$as_me:$LINENO: checking for working mktime" >&5 +echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; } +if test "${ac_cv_func_working_mktime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_working_mktime=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Test program from Paul Eggert and Tony Leneis. */ +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifndef HAVE_ALARM +# define alarm(X) /* empty */ +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (now) + time_t now; +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (now) + time_t now; +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (j) + int j; +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} + +int +main () +{ + time_t t, delta; + int i, j; + + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + alarm (60); + + for (;;) + { + t = (time_t_max << 1) + 1; + if (t <= time_t_max) + break; + time_t_max = t; + } + time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; + + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) + return 1; + if (! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + return 1; + + for (j = 1; ; j <<= 1) + if (! bigtime_test (j)) + return 1; + else if (INT_MAX / 2 < j) + break; + if (! bigtime_test (INT_MAX)) + return 1; + } + return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); +} +_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_working_mktime=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_working_mktime=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_working_mktime" >&5 +echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; } +if test $ac_cv_func_working_mktime = no; then + gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" +fi + + if test $ac_cv_func_working_mktime = no; then + +cat >>confdefs.h <<\_ACEOF +#define mktime rpl_mktime +_ACEOF + + + + + fi + + + gl_LIBOBJS="$gl_LIBOBJS modechange.$ac_objext" + + + + + +for ac_func in listmntent getmntinfo +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 + + + : + + + + + + + + + +# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses +# NGROUPS (as the array dimension for a struct member) without a definition. + +for ac_header in sys/ucred.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. */ +#include + +#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 + + + +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 + + + + +for ac_header in mntent.h sys/fs_types.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 + + getfsstat_includes="\ +$ac_includes_default +#if HAVE_SYS_PARAM_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_UCRED_H +# include /* needed for definition of NGROUPS */ +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_FS_TYPES_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +" +{ echo "$as_me:$LINENO: checking for struct fsstat.f_fstypename" >&5 +echo $ECHO_N "checking for struct fsstat.f_fstypename... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_fsstat_f_fstypename+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. */ +$getfsstat_includes + +int +main () +{ +static struct fsstat ac_aggr; +if (ac_aggr.f_fstypename) +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_fsstat_f_fstypename=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. */ +$getfsstat_includes + +int +main () +{ +static struct fsstat ac_aggr; +if (sizeof ac_aggr.f_fstypename) +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_fsstat_f_fstypename=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_fsstat_f_fstypename=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_fsstat_f_fstypename" >&5 +echo "${ECHO_T}$ac_cv_member_struct_fsstat_f_fstypename" >&6; } +if test $ac_cv_member_struct_fsstat_f_fstypename = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1 +_ACEOF + + +fi + + +# Determine how to get the list of mounted file systems. +ac_list_mounted_fs= + +# If the getmntent function is available but not in the standard library, +# make sure LIBS contains the appropriate -l option. +# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, +# -lseq on Dynix/PTX, -lgen on Unixware. +{ echo "$as_me:$LINENO: checking for library containing getmntent" >&5 +echo $ECHO_N "checking for library containing getmntent... $ECHO_C" >&6; } +if test "${ac_cv_search_getmntent+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 getmntent (); +int +main () +{ +return getmntent (); + ; + return 0; +} +_ACEOF +for ac_lib in '' sun seq gen; 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_getmntent=$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_getmntent+set}" = set; then + break +fi +done +if test "${ac_cv_search_getmntent+set}" = set; then + : +else + ac_cv_search_getmntent=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_getmntent" >&5 +echo "${ECHO_T}$ac_cv_search_getmntent" >&6; } +ac_res=$ac_cv_search_getmntent +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +for ac_func in getmntent +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 + + + +# This test must precede the ones for getmntent because Unicos-9 is +# reported to have the getmntent function, but its support is incompatible +# with other getmntent implementations. + +# NOTE: Normally, I wouldn't use a check for system type as I've done for +# `CRAY' below since that goes against the whole autoconf philosophy. But +# I think there is too great a chance that some non-Cray system has a +# function named listmntent to risk the false positive. + +if test -z "$ac_list_mounted_fs"; then + # Cray UNICOS 9 + { echo "$as_me:$LINENO: checking for listmntent of Cray/Unicos-9" >&5 +echo $ECHO_N "checking for listmntent of Cray/Unicos-9... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_cray_listmntent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + fu_cv_sys_mounted_cray_listmntent=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef _CRAY +yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + test $ac_cv_func_listmntent = yes \ + && fu_cv_sys_mounted_cray_listmntent=yes + +fi +rm -f conftest* + + + +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_cray_listmntent" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_cray_listmntent" >&6; } + if test $fu_cv_sys_mounted_cray_listmntent = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_LISTMNTENT 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # AIX. + { echo "$as_me:$LINENO: checking for mntctl function and struct vmount" >&5 +echo $ECHO_N "checking for mntctl function and struct vmount... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_vmount+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 { (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 + fu_cv_sys_mounted_vmount=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_vmount=no +fi + +rm -f conftest.err conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_vmount" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_vmount" >&6; } + if test $fu_cv_sys_mounted_vmount = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_VMOUNT 1 +_ACEOF + + fi +fi + +if test $ac_cv_func_getmntent = yes; then + + # This system has the getmntent function. + # Determine whether it's the one-argument variant or the two-argument one. + + if test -z "$ac_list_mounted_fs"; then + # 4.3BSD, SunOS, HP-UX, Dynix, Irix + { echo "$as_me:$LINENO: checking for one-argument getmntent function" >&5 +echo $ECHO_N "checking for one-argument getmntent function... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_getmntent1+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. */ + +/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ +#include + +#include +#if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ +# define MOUNTED MNT_MNTTAB +# endif +# if defined MNTTABNAME /* Dynix. */ +# define MOUNTED MNTTABNAME +# endif +#endif + +int +main () +{ + struct mntent *mnt = 0; char *table = MOUNTED; + if (sizeof mnt && sizeof table) 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_mounted_getmntent1=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_getmntent1=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmntent1" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmntent1" >&6; } + if test $fu_cv_sys_mounted_getmntent1 = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNTENT1 1 +_ACEOF + + fi + fi + + if test -z "$ac_list_mounted_fs"; then + # SVR4 + { echo "$as_me:$LINENO: checking for two-argument getmntent function" >&5 +echo $ECHO_N "checking for two-argument getmntent function... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_getmntent2+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 "getmntent" >/dev/null 2>&1; then + fu_cv_sys_mounted_getmntent2=yes +else + fu_cv_sys_mounted_getmntent2=no +fi +rm -f conftest* + +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmntent2" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmntent2" >&6; } + if test $fu_cv_sys_mounted_getmntent2 = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNTENT2 1 +_ACEOF + + +for ac_func in hasmntopt +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 + +fi + +if test -z "$ac_list_mounted_fs"; then + # DEC Alpha running OSF/1, and Apple Darwin 1.3. + # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h + + { echo "$as_me:$LINENO: checking for getfsstat function" >&5 +echo $ECHO_N "checking for getfsstat function... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_getfsstat+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_STRUCT_FSSTAT_F_FSTYPENAME +# define FS_TYPE(Ent) ((Ent).f_fstypename) +#else +# define FS_TYPE(Ent) mnt_names[(Ent).f_type] +#endif +$getfsstat_includes + +int +main () +{ +struct statfs *stats; + int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); + char *t = FS_TYPE (*stats); + ; + 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_mounted_getfsstat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_getfsstat=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_mounted_getfsstat" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getfsstat" >&6; } + if test $fu_cv_sys_mounted_getfsstat = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETFSSTAT 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR3 + { echo "$as_me:$LINENO: checking for FIXME existence of three headers" >&5 +echo $ECHO_N "checking for FIXME existence of three headers... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_fread_fstyp+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 +_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 + fu_cv_sys_mounted_fread_fstyp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_fread_fstyp=no +fi + +rm -f conftest.err conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_fread_fstyp" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_fread_fstyp" >&6; } + if test $fu_cv_sys_mounted_fread_fstyp = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_FREAD_FSTYP 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + { echo "$as_me:$LINENO: checking for getmntinfo function" >&5 +echo $ECHO_N "checking for getmntinfo function... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + test "$ac_cv_func_getmntinfo" = yes \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmntinfo" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmntinfo" >&6; } + if test $fu_cv_sys_mounted_getmntinfo = yes; then + { echo "$as_me:$LINENO: checking whether getmntinfo returns statvfs structures" >&5 +echo $ECHO_N "checking whether getmntinfo returns statvfs structures... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_getmntinfo2+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 +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_STATVFS_H +# include +#endif +extern int getmntinfo (struct statfs **, int); + +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 + fu_cv_sys_mounted_getmntinfo2=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_getmntinfo2=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmntinfo2" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmntinfo2" >&6; } + if test $fu_cv_sys_mounted_getmntinfo2 = no; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNTINFO 1 +_ACEOF + + else + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNTINFO2 1 +_ACEOF + + fi + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # Ultrix + { echo "$as_me:$LINENO: checking for getmnt function" >&5 +echo $ECHO_N "checking for getmnt function... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_getmnt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +_ACEOF +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 + fu_cv_sys_mounted_getmnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_getmnt=no +fi + +rm -f conftest.err conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_getmnt" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_getmnt" >&6; } + if test $fu_cv_sys_mounted_getmnt = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_GETMNT 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # BeOS + + +for ac_func in next_dev fs_stat_dev +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 + + +for ac_header in fs_info.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 BEOS mounted file system support functions" >&5 +echo $ECHO_N "checking for BEOS mounted file system support functions... $ECHO_C" >&6; } + if test $ac_cv_header_fs_info_h = yes \ + && test $ac_cv_func_next_dev = yes \ + && test $ac_cv_func_fs_stat_dev = yes; then + fu_result=yes + else + fu_result=no + fi + { echo "$as_me:$LINENO: result: $fu_result" >&5 +echo "${ECHO_T}$fu_result" >&6; } + if test $fu_result = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_FS_STAT_DEV 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR2 + { echo "$as_me:$LINENO: checking whether it is possible to resort to fread on /etc/mnttab" >&5 +echo $ECHO_N "checking whether it is possible to resort to fread on /etc/mnttab... $ECHO_C" >&6; } + if test "${fu_cv_sys_mounted_fread+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 { (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 + fu_cv_sys_mounted_fread=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fu_cv_sys_mounted_fread=no +fi + +rm -f conftest.err conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $fu_cv_sys_mounted_fread" >&5 +echo "${ECHO_T}$fu_cv_sys_mounted_fread" >&6; } + if test $fu_cv_sys_mounted_fread = yes; then + ac_list_mounted_fs=found + +cat >>confdefs.h <<\_ACEOF +#define MOUNTED_FREAD 1 +_ACEOF + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + { { echo "$as_me:$LINENO: error: could not determine how to read list of mounted file systems" >&5 +echo "$as_me: error: could not determine how to read list of mounted file systems" >&2;} + { (exit 1); exit 1; }; } + # FIXME -- no need to abort building the whole package + # Can't build mountlist.c or anything that needs its functions +fi + +if test $ac_list_mounted_fs = found; then + gl_cv_list_mounted_fs=yes +else + gl_cv_list_mounted_fs=no +fi + + + + if test $gl_cv_list_mounted_fs = yes; then + gl_LIBOBJS="$gl_LIBOBJS mountlist.$ac_objext" + + +for ac_header in sys/mntent.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 struct statfs.f_fstypename" >&5 +echo $ECHO_N "checking for struct statfs.f_fstypename... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_statfs_f_fstypename+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 () +{ +static struct statfs ac_aggr; +if (ac_aggr.f_fstypename) +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_statfs_f_fstypename=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 + #include + #include + + +int +main () +{ +static struct statfs ac_aggr; +if (sizeof ac_aggr.f_fstypename) +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_statfs_f_fstypename=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_statfs_f_fstypename=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_statfs_f_fstypename" >&5 +echo "${ECHO_T}$ac_cv_member_struct_statfs_f_fstypename" >&6; } +if test $ac_cv_member_struct_statfs_f_fstypename = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 +_ACEOF + + +fi + + + + fi + + + gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + + : + + + + + + + : + + + + + + + + +for ac_func in fchmodat mkdirat openat +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 + + case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in + yes+yes) ;; + yes+*) gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext";; + *) + +cat >>confdefs.h <<\_ACEOF +#define __OPENAT_PREFIX rpl_ +_ACEOF + + + : +;; + esac + + # Assume we'll use the replacement function. + # The only case in which we won't is when we have fchownat, and it works. + use_replacement_fchownat=yes + + { echo "$as_me:$LINENO: checking for fchownat" >&5 +echo $ECHO_N "checking for fchownat... $ECHO_C" >&6; } +if test "${ac_cv_func_fchownat+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 fchownat to an innocuous variant, in case declares fchownat. + For example, HP-UX 11i declares gettimeofday. */ +#define fchownat innocuous_fchownat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char fchownat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef fchownat + +/* 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 fchownat (); +/* 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_fchownat || defined __stub___fchownat +choke me +#endif + +int +main () +{ +return fchownat (); + ; + 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_fchownat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_fchownat=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_fchownat" >&5 +echo "${ECHO_T}$ac_cv_func_fchownat" >&6; } +if test $ac_cv_func_fchownat = yes; then + have_fchownat=yes +else + have_fchownat=no +fi + + if test $have_fchownat = yes; then + + { echo "$as_me:$LINENO: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 +echo $ECHO_N "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... $ECHO_C" >&6; } +if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + gl_dangle=conftest.dangle + # Remove any remnants of a previous test. + rm -f $gl_dangle + # Arrange for deletion of the temporary file this test creates. + ac_clean_files="$ac_clean_files $gl_dangle" + ln -s conftest.no-such $gl_dangle + if test "$cross_compiling" = yes; then + gl_cv_func_fchownat_nofollow_works=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 +#include +#include +int +main () +{ + return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), + AT_SYMLINK_NOFOLLOW) != 0 + && errno == ENOENT); +} + +_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_fchownat_nofollow_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_fchownat_nofollow_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_fchownat_nofollow_works" >&5 +echo "${ECHO_T}$gl_cv_func_fchownat_nofollow_works" >&6; } + if test $gl_cv_func_fchownat_nofollow_works = no; then + : +else + use_replacement_fchownat=no +fi + + + fi + + if test $use_replacement_fchownat = yes; then + gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define fchownat rpl_fchownat +_ACEOF + + fi + + + + + : + + + + + + + + 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 "${gl_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 + gl_cv_func_mbrtowc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_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: $gl_cv_func_mbrtowc" >&5 +echo "${ECHO_T}$gl_cv_func_mbrtowc" >&6; } + if test $gl_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 + + +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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 realloc" >&5 +echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6; } +if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_realloc_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 *realloc (); +#endif + +int +main () +{ +return ! realloc (0, 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_realloc_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_realloc_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_realloc_0_nonnull" >&5 +echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_REALLOC 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define HAVE_REALLOC 0 +_ACEOF + + gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define realloc rpl_realloc +_ACEOF + +fi + + + + + + : + + + + + + + +# Check whether --with-included-regex was given. +if test "${with_included_regex+set}" = set; then + withval=$with_included_regex; +fi + + + case $with_included_regex in #( + yes|no) ac_use_included_regex=$with_included_regex + ;; + '') + # If the system regex support is good enough that it passes the + # following run test, then default to *not* using the included regex.c. + # If cross compiling, assume the test would fail and use the included + # regex.c. + { echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5 +echo $ECHO_N "checking for working re_compile_pattern... $ECHO_C" >&6; } +if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_func_re_compile_pattern_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 + #if HAVE_LOCALE_H + #include + #endif + #include + #include + +int +main () +{ +static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; + const char *s; + struct re_registers regs; + + #if HAVE_LOCALE_H + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ + if (setlocale (LC_ALL, "en_US.UTF-8")) + { + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + return 1; + if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + return 1; + if (! setlocale (LC_ALL, "C")) + return 1; + } + #endif + + /* This test is from glibc bug 3957, reported by Andrew Mackey. */ + re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[^x]b", 6, ®ex); + if (s) + return 1; + + /* This should fail, but succeeds for glibc-2.5. */ + if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) + return 1; + + /* This regular expression is from Spencer ere test number 75 + in grep-2.3. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); + /* This should fail with _Invalid character class name_ error. */ + if (!s) + return 1; + + /* This should succeed, but does not for glibc-2.1.3. */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("{1", 2, ®ex); + + if (s) + return 1; + + /* The following example is derived from a problem report + against gawk from Jorge Stolfi . */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[an\371]*n", 7, ®ex); + if (s) + return 1; + + /* This should match, but does not for glibc-2.2.1. */ + if (re_match (®ex, "an", 2, 0, ®s) != 2) + return 1; + + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + return 1; + + /* glibc-2.2.93 does not work with a negative RANGE argument. */ + if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) + return 1; + + /* The version of regex.c in older versions of gnulib + ignored RE_ICASE. Detect that problem too. */ + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + return 1; + + if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) + return 1; + + /* REG_STARTEND was added to glibc on 2004-01-15. + Reject older versions. */ + if (! REG_STARTEND) + return 1; + + /* Reject hosts whose regoff_t values are too narrow. + These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t + and 32-bit int. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) + 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_re_compile_pattern_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 ) +gl_cv_func_re_compile_pattern_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: $gl_cv_func_re_compile_pattern_working" >&5 +echo "${ECHO_T}$gl_cv_func_re_compile_pattern_working" >&6; } + case $gl_cv_func_re_compile_pattern_working in #( + yes) ac_use_included_regex=no;; #( + no) ac_use_included_regex=yes;; + esac + ;; + *) { { echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5 +echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if test $ac_use_included_regex = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _REGEX_LARGE_OFFSETS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_syntax_options rpl_re_syntax_options +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_set_syntax rpl_re_set_syntax +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_compile_pattern rpl_re_compile_pattern +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_compile_fastmap rpl_re_compile_fastmap +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_search rpl_re_search +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_search_2 rpl_re_search_2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_match rpl_re_match +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_match_2 rpl_re_match_2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_set_registers rpl_re_set_registers +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_comp rpl_re_comp +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_exec rpl_re_exec +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regcomp rpl_regcomp +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regexec rpl_regexec +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regerror rpl_regerror +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regfree rpl_regfree +_ACEOF + + gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" + + + + + : + + + + + + + + + + + + + + + { 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 + + + + fi + + + +for ac_func in rpmatch +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_rpmatch = no; then + : + fi + + + gl_LIBOBJS="$gl_LIBOBJS save-cwd.$ac_objext" + + : + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS savedir.$ac_objext" + + + + : + + + + + + if test $ac_cv_func_setenv = no; then + gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" + + + + : + + + + + + +for ac_header in search.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 tsearch +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 if environ is properly declared" >&5 +echo $ECHO_N "checking if environ is properly declared... $ECHO_C" >&6; } + if test "${gt_cv_var_environ_declaration+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 + extern struct { int foo; } environ; +int +main () +{ +environ.foo = 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 + gt_cv_var_environ_declaration=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_var_environ_declaration=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $gt_cv_var_environ_declaration" >&5 +echo "${ECHO_T}$gt_cv_var_environ_declaration" >&6; } + if test $gt_cv_var_environ_declaration = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ENVIRON_DECL 1 +_ACEOF + + fi + + + fi + + + +for ac_func in unsetenv +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_unsetenv = no; then + gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" + + + : + + + + + + + + { echo "$as_me:$LINENO: checking if environ is properly declared" >&5 +echo $ECHO_N "checking if environ is properly declared... $ECHO_C" >&6; } + if test "${gt_cv_var_environ_declaration+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 + extern struct { int foo; } environ; +int +main () +{ +environ.foo = 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 + gt_cv_var_environ_declaration=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_var_environ_declaration=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $gt_cv_var_environ_declaration" >&5 +echo "${ECHO_T}$gt_cv_var_environ_declaration" >&6; } + if test $gt_cv_var_environ_declaration = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ENVIRON_DECL 1 +_ACEOF + + fi + + + else + { echo "$as_me:$LINENO: checking for unsetenv() return type" >&5 +echo $ECHO_N "checking for unsetenv() return type... $ECHO_C" >&6; } +if test "${gt_cv_func_unsetenv_ret+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 +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +int unsetenv (const char *name); +#else +int unsetenv(); +#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_func_unsetenv_ret='int' +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_func_unsetenv_ret='void' +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gt_cv_func_unsetenv_ret" >&5 +echo "${ECHO_T}$gt_cv_func_unsetenv_ret" >&6; } + if test $gt_cv_func_unsetenv_ret = 'void'; then + +cat >>confdefs.h <<\_ACEOF +#define VOID_UNSETENV 1 +_ACEOF + + fi + fi + + + { 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 + + + + + + : + + + + + + + { echo "$as_me:$LINENO: checking for struct stat.st_atim.tv_nsec" >&5 +echo $ECHO_N "checking for struct stat.st_atim.tv_nsec... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_atim_tv_nsec+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_atim.tv_nsec) +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_stat_st_atim_tv_nsec=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 + #include + +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_atim.tv_nsec) +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_stat_st_atim_tv_nsec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_atim_tv_nsec=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_stat_st_atim_tv_nsec" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_atim_tv_nsec" >&6; } +if test $ac_cv_member_struct_stat_st_atim_tv_nsec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 +_ACEOF + +{ echo "$as_me:$LINENO: checking whether struct stat.st_atim is of type struct timespec" >&5 +echo $ECHO_N "checking whether struct stat.st_atim is of type struct timespec... $ECHO_C" >&6; } +if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+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_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + +int +main () +{ + + st.st_atim = ts; + + ; + 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_typeof_struct_stat_st_atim_is_struct_timespec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 +echo "${ECHO_T}$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 +_ACEOF + + fi +else + { echo "$as_me:$LINENO: checking for struct stat.st_atimespec.tv_nsec" >&5 +echo $ECHO_N "checking for struct stat.st_atimespec.tv_nsec... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_atimespec_tv_nsec+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_atimespec.tv_nsec) +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_stat_st_atimespec_tv_nsec=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 + #include + +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_atimespec.tv_nsec) +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_stat_st_atimespec_tv_nsec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_atimespec_tv_nsec=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_stat_st_atimespec_tv_nsec" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_atimespec_tv_nsec" >&6; } +if test $ac_cv_member_struct_stat_st_atimespec_tv_nsec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 +_ACEOF + + +else + { echo "$as_me:$LINENO: checking for struct stat.st_atimensec" >&5 +echo $ECHO_N "checking for struct stat.st_atimensec... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_atimensec+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_atimensec) +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_stat_st_atimensec=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 + #include + +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_atimensec) +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_stat_st_atimensec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_atimensec=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_stat_st_atimensec" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_atimensec" >&6; } +if test $ac_cv_member_struct_stat_st_atimensec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 +_ACEOF + + +else + { echo "$as_me:$LINENO: checking for struct stat.st_atim.st__tim.tv_nsec" >&5 +echo $ECHO_N "checking for struct stat.st_atim.st__tim.tv_nsec... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_atim.st__tim.tv_nsec) +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_stat_st_atim_st__tim_tv_nsec=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 + #include + +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_atim.st__tim.tv_nsec) +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_stat_st_atim_st__tim_tv_nsec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec=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_stat_st_atim_st__tim_tv_nsec" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" >&6; } +if test $ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 +_ACEOF + + +fi + +fi + +fi + +fi + + + + + + + : + + + + + + { echo "$as_me:$LINENO: checking for struct stat.st_birthtimespec.tv_nsec" >&5 +echo $ECHO_N "checking for struct stat.st_birthtimespec.tv_nsec... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_birthtimespec_tv_nsec+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_birthtimespec.tv_nsec) +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_stat_st_birthtimespec_tv_nsec=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 + #include + +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_birthtimespec.tv_nsec) +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_stat_st_birthtimespec_tv_nsec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=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_stat_st_birthtimespec_tv_nsec" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&6; } +if test $ac_cv_member_struct_stat_st_birthtimespec_tv_nsec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 +_ACEOF + + +else + { echo "$as_me:$LINENO: checking for struct stat.st_birthtimensec" >&5 +echo $ECHO_N "checking for struct stat.st_birthtimensec... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_birthtimensec+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_birthtimensec) +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_stat_st_birthtimensec=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 + #include + +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_birthtimensec) +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_stat_st_birthtimensec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_birthtimensec=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_stat_st_birthtimensec" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtimensec" >&6; } +if test $ac_cv_member_struct_stat_st_birthtimensec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 +_ACEOF + + +else + { echo "$as_me:$LINENO: checking for struct stat.st_birthtim.tv_nsec" >&5 +echo $ECHO_N "checking for struct stat.st_birthtim.tv_nsec... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_birthtim_tv_nsec+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_birthtim.tv_nsec) +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_stat_st_birthtim_tv_nsec=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 + #include + +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_birthtim.tv_nsec) +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_stat_st_birthtim_tv_nsec=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_birthtim_tv_nsec=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_stat_st_birthtim_tv_nsec" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtim_tv_nsec" >&6; } +if test $ac_cv_member_struct_stat_st_birthtim_tv_nsec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 +_ACEOF + + +fi + +fi + +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 $ac_cv_header_stdint_h = yes; then + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_stdint_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/stdint.h#{s#.*"\(.*/stdint.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_stdint_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_stdint_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_STDINT_H "$gl_cv_absolute_stdint_h" +_ACEOF + + + ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\" + HAVE_STDINT_H=1 + else + ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\" + 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. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #include + #include + #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 */ +#include ABSOLUTE_STDINT_H +#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; +struct s { + int check_PTRDIFF: PTRDIFF_MIN < (ptrdiff_t) 0 && (ptrdiff_t) 0 < PTRDIFF_MAX ? 1 : -1; + int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= (sig_atomic_t) 0 && (sig_atomic_t) 0 < SIG_ATOMIC_MAX ? 1 : -1; + int check_SIZE: (size_t) 0 < SIZE_MAX ? 1 : -1; + int check_WCHAR: WCHAR_MIN <= (wchar_t) 0 && (wchar_t) 0 < WCHAR_MAX ? 1 : -1; + int check_WINT: WINT_MIN <= (wint_t) 0 && (wint_t) 0 < WINT_MAX ? 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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 + + + + + + + + + + + for gltype in ptrdiff_t sig_atomic_t size_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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + +#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 + #include + #include + #include + + 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 + + + + + + + + for gltype in ptrdiff_t sig_atomic_t size_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 + #include + #include + #include + + 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 + + + + { 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 + + + { 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 absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_stdlib_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/stdlib.h#{s#.*"\(.*/stdlib.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_stdlib_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_stdlib_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_STDLIB_H "$gl_cv_absolute_stdlib_h" +_ACEOF + + + ABSOLUTE_STDLIB_H=\"$gl_cv_absolute_stdlib_h\" + + + + + + + + + +for ac_func in stpcpy +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_stpcpy = no; then + HAVE_STPCPY=0 + + : + + fi + + + + GNULIB_STPCPY=1 + + + + +for ac_func in strdup +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_have_decl_strdup = no; then + HAVE_DECL_STRDUP=0 + fi + : + + + + GNULIB_STRDUP=1 + + + + gl_LIBOBJS="$gl_LIBOBJS strftime.$ac_objext" + + # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. + + + + + + + : + + + + + + + + + + + + + + + + : + + + + + + + +cat >>confdefs.h <<\_ACEOF +#define my_strftime nstrftime +_ACEOF + + + + + + + + + + + + : + + + + + + 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 doens'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 "${jm_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 + jm_cv_func_strtoimax_macro=yes +else + jm_cv_func_strtoimax_macro=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $jm_cv_func_strtoimax_macro" >&5 +echo "${ECHO_T}$jm_cv_func_strtoimax_macro" >&6; } + + if test "$jm_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 + + : + + fi + fi + + + +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 + + : + + fi + fi + + + + + + { 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 "${jm_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 + jm_cv_func_strtoumax_macro=yes +else + jm_cv_func_strtoumax_macro=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $jm_cv_func_strtoumax_macro" >&5 +echo "${ECHO_T}$jm_cv_func_strtoumax_macro" >&6; } + + if test "$jm_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 + + + + : + + + + + + if test $ac_cv_func_lstat = yes; then + HAVE_LSTAT=1 + else + HAVE_LSTAT=0 + fi + + + { echo "$as_me:$LINENO: checking whether mkdir is declared" >&5 +echo $ECHO_N "checking whether mkdir is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_mkdir+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 mkdir + (void) mkdir; +#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_mkdir=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_mkdir=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_mkdir" >&5 +echo "${ECHO_T}$ac_cv_have_decl_mkdir" >&6; } +if test $ac_cv_have_decl_mkdir = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MKDIR 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MKDIR 0 +_ACEOF + + +for ac_header in io.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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_have_decl_mkdir = yes; then + HAVE_DECL_MKDIR=1 + else + HAVE_DECL_MKDIR=0 + fi + + if test "$ac_cv_header_io_h" = yes; then + HAVE_IO_H=1 + else + HAVE_IO_H=0 + fi + + + + + + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_sys_stat_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/sys/stat.h#{s#.*"\(.*/sys/stat.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_sys_stat_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_sys_stat_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_SYS_STAT_H "$gl_cv_absolute_sys_stat_h" +_ACEOF + + + ABSOLUTE_SYS_STAT_H=\"$gl_cv_absolute_sys_stat_h\" + + SYS_STAT_H='sys/stat.h' + + + { 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; } + + + + + + + + + + + { echo "$as_me:$LINENO: checking whether localtime_r is compatible with its POSIX signature" >&5 +echo $ECHO_N "checking whether localtime_r is compatible with its POSIX signature... $ECHO_C" >&6; } +if test "${gl_cv_time_r_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. */ +#include +int +main () +{ +/* We don't need to append 'restrict's to the argument types, + even though the POSIX signature has the 'restrict's, + since C99 says they can't affect type compatibility. */ + struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; + if (ptr) 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 + gl_cv_time_r_posix=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_time_r_posix=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gl_cv_time_r_posix" >&5 +echo "${ECHO_T}$gl_cv_time_r_posix" >&6; } + if test $gl_cv_time_r_posix = yes; then + REPLACE_LOCALTIME_R=0 + else + REPLACE_LOCALTIME_R=1 + gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" + + : + + fi + + + + + + + + + : + + + + + + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_unistd_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/unistd.h#{s#.*"\(.*/unistd.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_unistd_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_unistd_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_UNISTD_H "$gl_cv_absolute_unistd_h" +_ACEOF + + + ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\" + else + HAVE_UNISTD_H=0 + fi + + + + + + : + + + + + + gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS fd-safer.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS pipe-safer.$ac_objext" + + + { 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 $gl_cv_header_wchar_h_standalone = yes; then + 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_absolute_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 + gl_cv_absolute_wchar_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/wchar.h#{s#.*"\(.*/wchar.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_wchar_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_wchar_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_WCHAR_H "$gl_cv_absolute_wchar_h" +_ACEOF + + + ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\" + WCHAR_H=wchar.h + fi + + + + + + : + + + + + + 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 + WCTYPE_H= + fi + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_absolute_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 + gl_cv_absolute_wctype_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | +sed -n '\#/wctype.h#{s#.*"\(.*/wctype.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_absolute_wctype_h" >&5 +echo "${ECHO_T}$gl_cv_absolute_wctype_h" >&6; } +cat >>confdefs.h <<_ACEOF +#define ABSOLUTE_WCTYPE_H "$gl_cv_absolute_wctype_h" +_ACEOF + + + ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\" + HAVE_WCTYPE_H=1 + else + ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\" + HAVE_WCTYPE_H=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 + + + + gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext" + + + + : + + + : + + + + gl_LIBOBJS="$gl_LIBOBJS xgetcwd.$ac_objext" + + + + + + : + + + + gl_LIBOBJS="$gl_LIBOBJS xstrtod.$ac_objext" + + + gl_LIBOBJS="$gl_LIBOBJS xstrtol.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS xstrtoul.$ac_objext" + + + gl_LIBOBJS="$gl_LIBOBJS yesno.$ac_objext" + + : + + LIBGNULIB_LIBDEPS="$gl_libdeps" + + LIBGNULIB_LTLIBDEPS="$gl_ltlibdeps" + + + + + + + + + + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + case "$ac_aux_dir" in + /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; + *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; + esac + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + + if test "x$cross_compiling" = xyes; then + CROSS_COMPILING_TRUE= + CROSS_COMPILING_FALSE='#' +else + CROSS_COMPILING_TRUE='#' + CROSS_COMPILING_FALSE= +fi + + + +{ echo "$as_me:$LINENO: checking for getpwnam" >&5 +echo $ECHO_N "checking for getpwnam... $ECHO_C" >&6; } +if test "${ac_cv_func_getpwnam+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 getpwnam to an innocuous variant, in case declares getpwnam. + For example, HP-UX 11i declares gettimeofday. */ +#define getpwnam innocuous_getpwnam + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getpwnam (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getpwnam + +/* 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 (); +/* 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_getpwnam || defined __stub___getpwnam +choke me +#endif + +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_func_getpwnam=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getpwnam=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_getpwnam" >&5 +echo "${ECHO_T}$ac_cv_func_getpwnam" >&6; } +if test $ac_cv_func_getpwnam = yes; then + : +else + +{ 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 + +fi + + +{ echo "$as_me:$LINENO: checking for modf in -lm" >&5 +echo $ECHO_N "checking for modf in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_modf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 modf (); +int +main () +{ +return modf (); + ; + 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_m_modf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_modf=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_m_modf" >&5 +echo "${ECHO_T}$ac_cv_lib_m_modf" >&6; } +if test $ac_cv_lib_m_modf = yes; then + FINDLIBS="-lm $FINDLIBS" + +cat >>confdefs.h <<_ACEOF +#define HAVE_MODF_IN_LIBM 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for fabs in -lm" >&5 +echo $ECHO_N "checking for fabs in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_fabs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 fabs (); +int +main () +{ +return fabs (); + ; + 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_m_fabs=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_fabs=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_m_fabs" >&5 +echo "${ECHO_T}$ac_cv_lib_m_fabs" >&6; } +if test $ac_cv_lib_m_fabs = yes; then + FINDLIBS="-lm $FINDLIBS" + +cat >>confdefs.h <<_ACEOF +#define HAVE_FABS_IN_LIBM 1 +_ACEOF + +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 fcntl.h string.h limits.h errno.h stdlib.h stddef.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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/utsname.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 bug-findutils@gnu.org ## +## ------------------------------------ ## +_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 sys/types.h defines makedev" >&5 +echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_types_h_makedev+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 makedev(0, 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_header_sys_types_h_makedev=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_types_h_makedev=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_header_sys_types_h_makedev" >&5 +echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; } + +if test $ac_cv_header_sys_types_h_makedev = no; then +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 +echo $ECHO_N "checking sys/mkdev.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 sys/mkdev.h presence" >&5 +echo $ECHO_N "checking sys/mkdev.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: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-findutils@gnu.org ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_mkdev_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_mkdev_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } + +fi +if test $ac_cv_header_sys_mkdev_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define MAJOR_IN_MKDEV 1 +_ACEOF + +fi + + + + if test $ac_cv_header_sys_mkdev_h = no; then + if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 +echo $ECHO_N "checking sys/sysmacros.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 sys/sysmacros.h presence" >&5 +echo $ECHO_N "checking sys/sysmacros.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: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-findutils@gnu.org ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_sysmacros_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; } + +fi +if test $ac_cv_header_sys_sysmacros_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define MAJOR_IN_SYSMACROS 1 +_ACEOF + +fi + + + fi +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 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 + + + + +{ 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 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 ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } +if test "${ac_cv_type_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. */ +$ac_includes_default +typedef ssize_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_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_ssize_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } +if test $ac_cv_type_ssize_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t 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 ino_t" >&5 +echo $ECHO_N "checking for ino_t... $ECHO_C" >&6; } +if test "${ac_cv_type_ino_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 ino_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_ino_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_ino_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_ino_t" >&5 +echo "${ECHO_T}$ac_cv_type_ino_t" >&6; } +if test $ac_cv_type_ino_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define ino_t unsigned long +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for dev_t" >&5 +echo $ECHO_N "checking for dev_t... $ECHO_C" >&6; } +if test "${ac_cv_type_dev_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 dev_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_dev_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_dev_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_dev_t" >&5 +echo "${ECHO_T}$ac_cv_type_dev_t" >&6; } +if test $ac_cv_type_dev_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define dev_t unsigned long +_ACEOF + +fi + +{ 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 struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_blocks+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_blocks) +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_stat_st_blocks=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. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blocks) +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_stat_st_blocks=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_blocks=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_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } +if test $ac_cv_member_struct_stat_st_blocks = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ST_BLOCKS 1 +_ACEOF + +else + case " $LIBOBJS " in + *" fileblocks.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" + ;; +esac + +fi + + +{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 +echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_rdev+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 () +{ +static struct stat ac_aggr; +if (ac_aggr.st_rdev) +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_stat_st_rdev=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. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_rdev) +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_stat_st_rdev=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_rdev=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_stat_st_rdev" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; } +if test $ac_cv_member_struct_stat_st_rdev = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 +_ACEOF + + +fi + + +{ echo "$as_me:$LINENO: checking whether we should use struct dirent.d_type, if available" >&5 +echo $ECHO_N "checking whether we should use struct dirent.d_type, if available... $ECHO_C" >&6; } +if test x$ac_cv_d_type = xno; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define USE_STRUCT_DIRENT_D_TYPE 1 +_ACEOF + + { echo "$as_me:$LINENO: checking for struct dirent.d_type" >&5 +echo $ECHO_N "checking for struct dirent.d_type... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_dirent_d_type+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 () +{ +static struct dirent ac_aggr; +if (ac_aggr.d_type) +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_dirent_d_type=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 +#include + +int +main () +{ +static struct dirent ac_aggr; +if (sizeof ac_aggr.d_type) +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_dirent_d_type=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_dirent_d_type=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_dirent_d_type" >&5 +echo "${ECHO_T}$ac_cv_member_struct_dirent_d_type" >&6; } +if test $ac_cv_member_struct_dirent_d_type = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_DIRENT_D_TYPE 1 +_ACEOF + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_DIRENT_D_TYPE 1 +_ACEOF + +fi + +fi + + +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +if test "${ac_cv_struct_tm+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 () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + 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_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_tm=sys/time.h +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_tm_tm_zone+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_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (ac_aggr.tm_zone) +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_tm_tm_zone=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 +#include <$ac_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (sizeof ac_aggr.tm_zone) +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_tm_tm_zone=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_tm_tm_zone=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_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +if test $ac_cv_member_struct_tm_tm_zone = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF + + +fi + +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_ZONE 1 +_ACEOF + +else + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+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 tzname + (void) tzname; +#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_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } +if test "${ac_cv_var_tzname+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_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main () +{ +return tzname[0][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_var_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_tzname=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_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 +_ACEOF + + fi +fi + + + +for ac_func in strftime +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 + # strftime is in -lintl on SCO UNIX. +{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 +echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; } +if test "${ac_cv_lib_intl_strftime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $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 strftime (); +int +main () +{ +return strftime (); + ; + 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_intl_strftime=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_intl_strftime=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_intl_strftime" >&5 +echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; } +if test $ac_cv_lib_intl_strftime = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_STRFTIME 1 +_ACEOF + +LIBS="-lintl $LIBS" +fi + +fi +done + + + + + + + + +for ac_func in memcmp memset stpcpy strdup strstr strtol 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 + case " $LIBOBJS " in + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; +esac + +fi +done + + + + + + + + +for ac_func in fchdir getcwd strerror endgrent endpwent 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 + + +for ac_func in vprintf +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 + +{ echo "$as_me:$LINENO: checking for _doprnt" >&5 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } +if test "${ac_cv_func__doprnt+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 _doprnt to an innocuous variant, in case declares _doprnt. + For example, HP-UX 11i declares gettimeofday. */ +#define _doprnt innocuous__doprnt + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef _doprnt + +/* 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 _doprnt (); +/* 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__doprnt || defined __stub____doprnt +choke me +#endif + +int +main () +{ +return _doprnt (); + ; + 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__doprnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func__doprnt=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__doprnt" >&5 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } +if test $ac_cv_func__doprnt = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOPRNT 1 +_ACEOF + +fi + +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 closedir returns void" >&5 +echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6; } +if test "${ac_cv_func_closedir_void+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_closedir_void=yes +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_dirent> +#ifndef __cplusplus +int closedir (); +#endif + +int +main () +{ +return closedir (opendir (".")) != 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_closedir_void=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 ) +ac_cv_func_closedir_void=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: $ac_cv_func_closedir_void" >&5 +echo "${ECHO_T}$ac_cv_func_closedir_void" >&6; } +if test $ac_cv_func_closedir_void = yes; then + +cat >>confdefs.h <<\_ACEOF +#define CLOSEDIR_VOID 1 +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking for getmntent" >&5 +echo $ECHO_N "checking for getmntent... $ECHO_C" >&6; } +if test "${ac_cv_func_getmntent+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 getmntent to an innocuous variant, in case declares getmntent. + For example, HP-UX 11i declares gettimeofday. */ +#define getmntent innocuous_getmntent + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getmntent (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getmntent + +/* 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 getmntent (); +/* 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_getmntent || defined __stub___getmntent +choke me +#endif + +int +main () +{ +return getmntent (); + ; + 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_getmntent=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getmntent=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_getmntent" >&5 +echo "${ECHO_T}$ac_cv_func_getmntent" >&6; } +if test $ac_cv_func_getmntent = yes; then + : +else + # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, +# -lseq on Dynix/PTX, -lgen on Unixware. +{ echo "$as_me:$LINENO: checking for library containing getmntent" >&5 +echo $ECHO_N "checking for library containing getmntent... $ECHO_C" >&6; } +if test "${ac_cv_search_getmntent+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 getmntent (); +int +main () +{ +return getmntent (); + ; + return 0; +} +_ACEOF +for ac_lib in '' sun seq gen; 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_getmntent=$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_getmntent+set}" = set; then + break +fi +done +if test "${ac_cv_search_getmntent+set}" = set; then + : +else + ac_cv_search_getmntent=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_getmntent" >&5 +echo "${ECHO_T}$ac_cv_search_getmntent" >&6; } +ac_res=$ac_cv_search_getmntent +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +for ac_func in getmntent +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 + + +for ac_func in getmntent +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 + + + +for ac_func in setmntent endmntent +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 + + + + + +for ac_func in waitpid strspn +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 + case $FINDLIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ + *" $ac_func.$ac_objext "* ) ;; + *) FINDLIBOBJS="$FINDLIBOBJS $ac_func.$ac_objext" ;; +esac + +fi +done + + + +for ac_func in forcefindlib +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 + case $FINDLIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ + *" $ac_func.$ac_objext "* ) ;; + *) FINDLIBOBJS="$FINDLIBOBJS $ac_func.$ac_objext" ;; +esac + +fi +done + + + + +# Check for common but not-POSIX functions. + +for ac_func in setgroups +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_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 + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + + + + + + : + + + + + + + +# Check whether --with-included-regex was given. +if test "${with_included_regex+set}" = set; then + withval=$with_included_regex; +fi + + + case $with_included_regex in #( + yes|no) ac_use_included_regex=$with_included_regex + ;; + '') + # If the system regex support is good enough that it passes the + # following run test, then default to *not* using the included regex.c. + # If cross compiling, assume the test would fail and use the included + # regex.c. + { echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5 +echo $ECHO_N "checking for working re_compile_pattern... $ECHO_C" >&6; } +if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_func_re_compile_pattern_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 + #if HAVE_LOCALE_H + #include + #endif + #include + #include + +int +main () +{ +static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; + const char *s; + struct re_registers regs; + + #if HAVE_LOCALE_H + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ + if (setlocale (LC_ALL, "en_US.UTF-8")) + { + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + return 1; + if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + return 1; + if (! setlocale (LC_ALL, "C")) + return 1; + } + #endif + + /* This test is from glibc bug 3957, reported by Andrew Mackey. */ + re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[^x]b", 6, ®ex); + if (s) + return 1; + + /* This should fail, but succeeds for glibc-2.5. */ + if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) + return 1; + + /* This regular expression is from Spencer ere test number 75 + in grep-2.3. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); + /* This should fail with _Invalid character class name_ error. */ + if (!s) + return 1; + + /* This should succeed, but does not for glibc-2.1.3. */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("{1", 2, ®ex); + + if (s) + return 1; + + /* The following example is derived from a problem report + against gawk from Jorge Stolfi . */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[an\371]*n", 7, ®ex); + if (s) + return 1; + + /* This should match, but does not for glibc-2.2.1. */ + if (re_match (®ex, "an", 2, 0, ®s) != 2) + return 1; + + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + return 1; + + /* glibc-2.2.93 does not work with a negative RANGE argument. */ + if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) + return 1; + + /* The version of regex.c in older versions of gnulib + ignored RE_ICASE. Detect that problem too. */ + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + return 1; + + if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) + return 1; + + /* REG_STARTEND was added to glibc on 2004-01-15. + Reject older versions. */ + if (! REG_STARTEND) + return 1; + + /* Reject hosts whose regoff_t values are too narrow. + These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t + and 32-bit int. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) + 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_re_compile_pattern_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 ) +gl_cv_func_re_compile_pattern_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: $gl_cv_func_re_compile_pattern_working" >&5 +echo "${ECHO_T}$gl_cv_func_re_compile_pattern_working" >&6; } + case $gl_cv_func_re_compile_pattern_working in #( + yes) ac_use_included_regex=no;; #( + no) ac_use_included_regex=yes;; + esac + ;; + *) { { echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5 +echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if test $ac_use_included_regex = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _REGEX_LARGE_OFFSETS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_syntax_options rpl_re_syntax_options +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_set_syntax rpl_re_set_syntax +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_compile_pattern rpl_re_compile_pattern +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_compile_fastmap rpl_re_compile_fastmap +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_search rpl_re_search +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_search_2 rpl_re_search_2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_match rpl_re_match +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_match_2 rpl_re_match_2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_set_registers rpl_re_set_registers +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_comp rpl_re_comp +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_exec rpl_re_exec +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regcomp rpl_regcomp +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regexec rpl_regexec +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regerror rpl_regerror +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regfree rpl_regfree +_ACEOF + + case " $LIBOBJS " in + *" regex.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS regex.$ac_objext" + ;; +esac + + + + + + : + + + + + + + + + + + + + + + { 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 + + + + fi + + + + +# Define intmax_t to 'signed long' or 'signed long long' +# if it is not already defined in or . + + + + + ac_cv_type_long_long=$ac_cv_type_long_long_int + if test $ac_cv_type_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + + fi + + + if test $ac_cv_header_inttypes_h = no && test $ac_cv_header_stdint_h = no; then + + test $ac_cv_type_long_long = yes \ + && ac_type='long long' \ + || ac_type='long' + +cat >>confdefs.h <<_ACEOF +#define intmax_t $ac_type +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INTMAX_T 1 +_ACEOF + + fi + +# Extract the first word of "sort", so it can be a program name with args. +set dummy sort; 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_path_SORT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SORT in + [\\/]* | ?:[\\/]*) + ac_cv_path_SORT="$SORT" # Let the user override the test with a path. + ;; + *) + 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_path_SORT="$as_dir/$ac_word$ac_exec_ext" + 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_path_SORT" && ac_cv_path_SORT="sort" + ;; +esac +fi +SORT=$ac_cv_path_SORT +if test -n "$SORT"; then + { echo "$as_me:$LINENO: result: $SORT" >&5 +echo "${ECHO_T}$SORT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + { echo "$as_me:$LINENO: checking if $SORT supports the -z option" >&5 +echo $ECHO_N "checking if $SORT supports the -z option... $ECHO_C" >&6; } +# find out if the sort command has a working -z option. +if $SORT -z -c < "${srcdir:-.}/m4/order-good.bin" 2>/dev/null >/dev/null +then + # sort has a -z option, but we have not yet established that + # sort thinks there is more than one input line there. We have + # to make sort -c do its thing with the input lines in the wrong + # order to determine that (we can't do it in one shot because + # if sort returns nonzero we cant tell that it wasn't just + # complaining about this unknown -z option. + if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null + then + # sort likes -z but it doesn't seem to make \0 + # a delimiter. + ac_sort_has_z=false + else + ac_sort_has_z=true + fi +else + # Doesn't like the z option. + ac_sort_has_z=false +fi +if $ac_sort_has_z +then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SORT_SUPPORTS_Z=true + +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SORT_SUPPORTS_Z=false + +fi + + + +{ echo "$as_me:$LINENO: checking for struct dirent.d_type" >&5 +echo $ECHO_N "checking for struct dirent.d_type... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_dirent_d_type+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 () +{ +static struct dirent ac_aggr; +if (ac_aggr.d_type) +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_dirent_d_type=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 +#include + +int +main () +{ +static struct dirent ac_aggr; +if (sizeof ac_aggr.d_type) +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_dirent_d_type=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_dirent_d_type=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_dirent_d_type" >&5 +echo "${ECHO_T}$ac_cv_member_struct_dirent_d_type" >&6; } + + +{ echo "$as_me:$LINENO: checking for __attribute__ ((__noreturn__)) support" >&5 +echo $ECHO_N "checking for __attribute__ ((__noreturn__)) support... $ECHO_C" >&6; } +if test "${jy_cv_cc_attribute_noreturn+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 () +{ +void report_fatal_error(void) __attribute__ ((__noreturn__)); + ; + 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 + jy_cv_cc_attribute_noreturn=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + jy_cv_cc_attribute_noreturn=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $jy_cv_cc_attribute_noreturn" >&5 +echo "${ECHO_T}$jy_cv_cc_attribute_noreturn" >&6; } +if test $jy_cv_cc_attribute_noreturn = yes; then + HAVE_ATTRIBUTE_NORETURN=1 +else + HAVE_ATTRIBUTE_NORETURN=0 +fi + + +cat >>confdefs.h <<_ACEOF +#define HAVE_ATTRIBUTE_NORETURN $HAVE_ATTRIBUTE_NORETURN +_ACEOF + + + + + { echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { echo "$as_me:$LINENO: result: $USE_NLS" >&5 +echo "${ECHO_T}$USE_NLS" >&6; } + + + + + + +# Prepare PATH_SEPARATOR. +# 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; 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_path_MSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 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); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; 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_path_GMSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + 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_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + 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_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { echo "$as_me:$LINENO: result: $GMSGFMT" >&5 +echo "${ECHO_T}$GMSGFMT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + 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 + + 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 + + + +# Prepare PATH_SEPARATOR. +# 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; 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_path_XGETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 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); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + rm -f messages.po + + 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 + + + +# Prepare PATH_SEPARATOR. +# 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; 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_path_MSGMERGE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$localedir" || localedir='${datadir}/locale' + + + ac_config_commands="$ac_config_commands po-directories" + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# 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 +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + + { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + + + + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBICONV_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 +echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6; } +if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + 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 () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + 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 + gt_cv_func_CFPreferencesCopyAppValue=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_func_CFPreferencesCopyAppValue=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 +_ACEOF + + fi + { echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 +echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6; } +if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + 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 () +{ +CFLocaleCopyCurrent(); + ; + 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 + gt_cv_func_CFLocaleCopyCurrent=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_func_CFLocaleCopyCurrent=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CFLOCALECOPYCURRENT 1 +_ACEOF + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 +echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6; } +if { as_var=$gt_func_gnugettext_libc; 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 +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + 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 "$gt_func_gnugettext_libc=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$gt_func_gnugettext_libc=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 '${'$gt_func_gnugettext_libc'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } +if test "${am_cv_func_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + 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 () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + 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_func_iconv=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_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + 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 () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + 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_lib_iconv=yes + am_cv_func_iconv=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_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { echo "$as_me:$LINENO: checking for working iconv" >&5 +echo $ECHO_N "checking for working iconv... $ECHO_C" >&6; } +if test "${am_cv_func_iconv_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + if test "$cross_compiling" = yes; then + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="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 +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-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 + am_cv_func_iconv_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 ) +am_cv_func_iconv_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + LIBS="$am_save_LIBS" + +fi +{ echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 +echo "${ECHO_T}$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBINTL= + LTLIBINTL= + INCINTL= + LIBINTL_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBINTL_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + { echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 +echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6; } +if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + 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 "$gt_func_gnugettext_libintl=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$gt_func_gnugettext_libintl=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + 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 + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=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_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +ac_res=`eval echo '${'$gt_func_gnugettext_libintl'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + fi + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_NLS 1 +_ACEOF + + else + USE_NLS=no + fi + fi + + { echo "$as_me:$LINENO: checking whether to use NLS" >&5 +echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $USE_NLS" >&5 +echo "${ECHO_T}$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 +echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { echo "$as_me:$LINENO: result: $gt_source" >&5 +echo "${ECHO_T}$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { echo "$as_me:$LINENO: checking how to link with libintl" >&5 +echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $LIBINTL" >&5 +echo "${ECHO_T}$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTEXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + + fi + + POSUB=po + fi + + + + INTLLIBS="$LIBINTL" + + + + + + + + + +cat >>confdefs.h <<\_ACEOF +#define FINDUTILS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ALREADY_INCLUDED_CONFIG_H 1 +_ACEOF + + +# This is necessary so that .o files in LIBOBJS are also built via +# the ANSI2KNR-filtering rules. +#LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` +##AC_CONFIG_SUBDIRS(gnulib) +ac_config_files="$ac_config_files gnulib/Makefile gnulib/lib/Makefile" + +ac_config_files="$ac_config_files m4/Makefile" + +ac_config_files="$ac_config_files Makefile tests/Makefile build-aux/Makefile find/Makefile find/testsuite/Makefile xargs/Makefile xargs/testsuite/Makefile locate/Makefile locate/testsuite/Makefile po/Makefile.in po/Makefile doc/Makefile lib/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${WITH_FTS_TRUE}" && test -z "${WITH_FTS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"WITH_FTS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"WITH_FTS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +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 + + +if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CROSS_COMPILING\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CROSS_COMPILING\" 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 GNU findutils $as_me 4.3.8, 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="\\ +GNU findutils config.status 4.3.8 +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" +# 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%}" + + +_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" ;; + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; + "gnulib/lib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/lib/Makefile" ;; + "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "build-aux/Makefile") CONFIG_FILES="$CONFIG_FILES build-aux/Makefile" ;; + "find/Makefile") CONFIG_FILES="$CONFIG_FILES find/Makefile" ;; + "find/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES find/testsuite/Makefile" ;; + "xargs/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/Makefile" ;; + "xargs/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/testsuite/Makefile" ;; + "locate/Makefile") CONFIG_FILES="$CONFIG_FILES locate/Makefile" ;; + "locate/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES locate/testsuite/Makefile" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +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 +INCLUDES!$INCLUDES$ac_delim +AUXDIR!$AUXDIR$ac_delim +WITH_FTS_TRUE!$WITH_FTS_TRUE$ac_delim +WITH_FTS_FALSE!$WITH_FTS_FALSE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +RANLIB!$RANLIB$ac_delim +U!$U$ac_delim +ANSI2KNR!$ANSI2KNR$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 +GNULIB_CHOWN!$GNULIB_CHOWN$ac_delim +GNULIB_DUP2!$GNULIB_DUP2$ac_delim +GNULIB_FCHDIR!$GNULIB_FCHDIR$ac_delim +GNULIB_FTRUNCATE!$GNULIB_FTRUNCATE$ac_delim +GNULIB_GETCWD!$GNULIB_GETCWD$ac_delim +GNULIB_GETLOGIN_R!$GNULIB_GETLOGIN_R$ac_delim +GNULIB_LSEEK!$GNULIB_LSEEK$ac_delim +GNULIB_READLINK!$GNULIB_READLINK$ac_delim +GNULIB_SLEEP!$GNULIB_SLEEP$ac_delim +HAVE_DUP2!$HAVE_DUP2$ac_delim +HAVE_FTRUNCATE!$HAVE_FTRUNCATE$ac_delim +HAVE_READLINK!$HAVE_READLINK$ac_delim +HAVE_SLEEP!$HAVE_SLEEP$ac_delim +HAVE_DECL_GETLOGIN_R!$HAVE_DECL_GETLOGIN_R$ac_delim +REPLACE_CHOWN!$REPLACE_CHOWN$ac_delim +REPLACE_FCHDIR!$REPLACE_FCHDIR$ac_delim +REPLACE_GETCWD!$REPLACE_GETCWD$ac_delim +REPLACE_LSEEK!$REPLACE_LSEEK$ac_delim +LIB_CLOCK_GETTIME!$LIB_CLOCK_GETTIME$ac_delim +ABSOLUTE_DIRENT_H!$ABSOLUTE_DIRENT_H$ac_delim +DIRENT_H!$DIRENT_H$ac_delim +ABSOLUTE_FCNTL_H!$ABSOLUTE_FCNTL_H$ac_delim +FCNTL_H!$FCNTL_H$ac_delim +FNMATCH_H!$FNMATCH_H$ac_delim +STDBOOL_H!$STDBOOL_H$ac_delim +HAVE__BOOL!$HAVE__BOOL$ac_delim +YACC!$YACC$ac_delim +YFLAGS!$YFLAGS$ac_delim +GETOPT_H!$GETOPT_H$ac_delim +LIBINTL!$LIBINTL$ac_delim +LTLIBINTL!$LTLIBINTL$ac_delim +ABSOLUTE_SYS_TIME_H!$ABSOLUTE_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 +ABSOLUTE_STDINT_H!$ABSOLUTE_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 +BITSIZEOF_PTRDIFF_T!$BITSIZEOF_PTRDIFF_T$ac_delim +BITSIZEOF_SIG_ATOMIC_T!$BITSIZEOF_SIG_ATOMIC_T$ac_delim +BITSIZEOF_SIZE_T!$BITSIZEOF_SIZE_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 +SIG_ATOMIC_T_SUFFIX!$SIG_ATOMIC_T_SUFFIX$ac_delim +SIZE_T_SUFFIX!$SIZE_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 +ABSOLUTE_INTTYPES_H!$ABSOLUTE_INTTYPES_H$ac_delim +PRIPTR_PREFIX!$PRIPTR_PREFIX$ac_delim +INTTYPES_H!$INTTYPES_H$ac_delim +GLIBC21!$GLIBC21$ac_delim +GNULIB_MEMMEM!$GNULIB_MEMMEM$ac_delim +GNULIB_MEMPCPY!$GNULIB_MEMPCPY$ac_delim +GNULIB_MEMRCHR!$GNULIB_MEMRCHR$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_STRCASESTR!$GNULIB_STRCASESTR$ac_delim +GNULIB_STRTOK_R!$GNULIB_STRTOK_R$ac_delim +GNULIB_MBSLEN!$GNULIB_MBSLEN$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 +_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_DECL_MEMMEM!$HAVE_DECL_MEMMEM$ac_delim +HAVE_MEMPCPY!$HAVE_MEMPCPY$ac_delim +HAVE_DECL_MEMRCHR!$HAVE_DECL_MEMRCHR$ac_delim +HAVE_STPCPY!$HAVE_STPCPY$ac_delim +HAVE_STPNCPY!$HAVE_STPNCPY$ac_delim +HAVE_STRCASECMP!$HAVE_STRCASECMP$ac_delim +HAVE_DECL_STRNCASECMP!$HAVE_DECL_STRNCASECMP$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 +LOCALE_FR_UTF8!$LOCALE_FR_UTF8$ac_delim +LOCALE_TR_UTF8!$LOCALE_TR_UTF8$ac_delim +LOCALE_ZH_CN!$LOCALE_ZH_CN$ac_delim +GNULIB_GETSUBOPT!$GNULIB_GETSUBOPT$ac_delim +GNULIB_MKDTEMP!$GNULIB_MKDTEMP$ac_delim +GNULIB_MKSTEMP!$GNULIB_MKSTEMP$ac_delim +HAVE_GETSUBOPT!$HAVE_GETSUBOPT$ac_delim +HAVE_MKDTEMP!$HAVE_MKDTEMP$ac_delim +REPLACE_MKSTEMP!$REPLACE_MKSTEMP$ac_delim +ABSOLUTE_STDLIB_H!$ABSOLUTE_STDLIB_H$ac_delim +ABSOLUTE_STRING_H!$ABSOLUTE_STRING_H$ac_delim +HAVE_LSTAT!$HAVE_LSTAT$ac_delim +HAVE_DECL_MKDIR!$HAVE_DECL_MKDIR$ac_delim +HAVE_IO_H!$HAVE_IO_H$ac_delim +ABSOLUTE_SYS_STAT_H!$ABSOLUTE_SYS_STAT_H$ac_delim +SYS_STAT_H!$SYS_STAT_H$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 +ABSOLUTE_TIME_H!$ABSOLUTE_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 +HAVE_UNISTD_H!$HAVE_UNISTD_H$ac_delim +ABSOLUTE_UNISTD_H!$ABSOLUTE_UNISTD_H$ac_delim +ABSOLUTE_WCHAR_H!$ABSOLUTE_WCHAR_H$ac_delim +WCHAR_H!$WCHAR_H$ac_delim +HAVE_ISWCNTRL!$HAVE_ISWCNTRL$ac_delim +HAVE_WINT_T!$HAVE_WINT_T$ac_delim +ABSOLUTE_WCTYPE_H!$ABSOLUTE_WCTYPE_H$ac_delim +HAVE_WCTYPE_H!$HAVE_WCTYPE_H$ac_delim +WCTYPE_H!$WCTYPE_H$ac_delim +LIBGNULIB_LIBDEPS!$LIBGNULIB_LIBDEPS$ac_delim +LIBGNULIB_LTLIBDEPS!$LIBGNULIB_LTLIBDEPS$ac_delim +MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim +CROSS_COMPILING_TRUE!$CROSS_COMPILING_TRUE$ac_delim +CROSS_COMPILING_FALSE!$CROSS_COMPILING_FALSE$ac_delim +FINDLIBS!$FINDLIBS$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +FINDLIBOBJS!$FINDLIBOBJS$ac_delim +SORT!$SORT$ac_delim +SORT_SUPPORTS_Z!$SORT_SUPPORTS_Z$ac_delim +HAVE_ATTRIBUTE_NORETURN!$HAVE_ATTRIBUTE_NORETURN$ac_delim +USE_NLS!$USE_NLS$ac_delim +MSGFMT!$MSGFMT$ac_delim +GMSGFMT!$GMSGFMT$ac_delim +MSGFMT_015!$MSGFMT_015$ac_delim +GMSGFMT_015!$GMSGFMT_015$ac_delim +XGETTEXT!$XGETTEXT$ac_delim +XGETTEXT_015!$XGETTEXT_015$ac_delim +MSGMERGE!$MSGMERGE$ac_delim +INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim +LIBICONV!$LIBICONV$ac_delim +LTLIBICONV!$LTLIBICONV$ac_delim +INTLLIBS!$INTLLIBS$ac_delim +POSUB!$POSUB$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +gl_LIBOBJS!$gl_LIBOBJS$ac_delim +gl_LTLIBOBJS!$gl_LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 75; 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 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" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + "po-directories":C) + 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 ;; + + 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 + diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..6607395 --- /dev/null +++ b/configure.in @@ -0,0 +1,253 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT([GNU findutils], 4.3.8, [bug-findutils@gnu.org]) +AC_CONFIG_AUX_DIR(build-aux) +AM_INIT_AUTOMAKE + +AC_CONFIG_SRCDIR([find/pred.c]) +AC_CONFIG_HEADERS([config.h]) +AC_CANONICAL_HOST +AC_CONFIG_MACRO_DIR(gnulib/m4) + +dnl Set of available languages. +ALL_LINGUAS="be bg ca da de el eo es et fi fr ga gl hr hu id it ja ko lg ms nl pl pt pt_BR ro ru rw sk sl sr sv tr uk vi zh_CN zh_TW" + +AC_SUBST(INCLUDES)dnl +AC_SUBST(AUXDIR,$ac_aux_dir) +dnl check for --with-fts +FIND_WITH_FTS + +AC_ARG_ENABLE(id-cache, +[ --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod], + AC_DEFINE(CACHE_IDS, 1, [Define if you want find -nouser and -nogroup to make tables of + used UIDs and GIDs at startup instead of using getpwuid or + getgrgid when needed. Speeds up -nouser and -nogroup unless you + are running NIS or Hesiod, which make password and group calls + very expensive.])) + +AC_ARG_ENABLE(debug, + AS_HELP_STRING(--enable-debug,Enable debugging output which is likely to be interesting to people debugging findutils), + [ac_cv_debug=$enableval],[ac_cv_debug=no]) + +AC_ARG_ENABLE(leaf-optimisation, + AS_HELP_STRING(--enable-leaf-optimisation,Enable an optimisation which saves lstat calls to identify subdirectories on filesystems having traditional Unix semantics), + [ac_cv_leaf_optimisation=$enableval],[ac_cv_leaf_optimisation=yes]) + +AC_ARG_ENABLE(d_type-optimization, + AS_HELP_STRING(--enable-d_type-optimization,Make use of the file type data returned in struct dirent.d_type by readdir()), + [ac_cv_d_type=$enableval],[ac_cv_d_type=yes]) + +dnl This one has no default, because otherwise we would have to say +dnl both --enable-d_type-optimisation=no and --enable-d_type-optimization=no +dnl to turn it off. +AC_ARG_ENABLE(d_type-optimisation, + AS_HELP_STRING(--enable-d_type-optimisation,Synonym for --enable-d_type-optimization), + [ac_cv_d_type=$enableval],[]) + + +AC_MSG_CHECKING([whether debug output should be produced]) +if test x$ac_cv_debug = xno; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([yes]) + AC_DEFINE(DEBUG, 1, [Define if you want to see find's innards]) + AC_DEFINE(DEBUG_STAT, 1, [Define if you want to see a message every time find calls the stat() system call]) +fi + +AC_MSG_CHECKING([for leaf optimisation]) +if test x$ac_cv_leaf_optimisation = xno; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([yes]) + AC_DEFINE(LEAF_OPTIMISATION, 1, [Define if you want to use the leaf optimisation (this can still be turned off with -noleaf)]) +fi + + + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CPP + +AC_AIX + + +dnl AC_MINIX +dnl for gnulib +gl_EARLY +dnl gl_EARLY calls AC_GNU_SOURCE anyway. + + +AC_ISC_POSIX +AM_C_PROTOTYPES + +AC_PROG_INSTALL +AC_PROG_RANLIB +dnl AC_PROG_LIBTOOL +AC_PROG_MAKE_SET +AC_SYS_LARGEFILE + + +gl_INIT + + + +dnl Older versions of gnulib/m4/nls.m4 provide AM_MKINSTALLDIRS. +dnl The current version of gnulib does not, but the version of +dnl po/Makefile.in.in that comes with gettext-0.14.6 expects +dnl that @MKINSTALLDIRS@ will be expanded. +AM_MKINSTALLDIRS + +dnl lib/regexprops needs to be a native program, because we need to +dnl run it in order to generate the documentation about the properties +dnl of regular expressions. See lib/Makefile.am. +AM_CONDITIONAL(CROSS_COMPILING, [[test "x$cross_compiling" = xyes]]) + +dnl Try to get a POSIX.1 environment. + +dnl Checks for libraries. If getpwnam() isn't present in the +dnl C library, try -lsun. +AC_CHECK_FUNC(getpwnam, [], +[AC_CHECK_LIB(sun, getpwnam)]) + +AC_CHECK_LIB([m],[modf],[FINDLIBS="-lm $FINDLIBS"] + AC_DEFINE_UNQUOTED(HAVE_MODF_IN_LIBM,1,[modf is defined in -lm])) +AC_CHECK_LIB([m],[fabs],[FINDLIBS="-lm $FINDLIBS"] + AC_DEFINE_UNQUOTED(HAVE_FABS_IN_LIBM,1,[fabs is defined in -lm])) +AC_SUBST([FINDLIBS]) + +dnl Checks for header files. +AC_HEADER_STDC +dnl Assume unistd.h is present - coreutils does too. +AC_CHECK_HEADERS(fcntl.h string.h limits.h errno.h stdlib.h stddef.h) +AC_CHECK_HEADERS(unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h) +AC_CHECK_HEADERS(sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h) +dnl find.c needs sys/utsname.h because it calls uname(2). +AC_CHECK_HEADERS(sys/utsname.h) +AC_HEADER_MAJOR +AC_HEADER_DIRENT +AC_HEADER_STAT +AC_HEADER_SYS_WAIT + + +dnl Checks for typedefs, structures, and compiler characteristics. + +AC_TYPE_UID_T +AC_TYPE_SIZE_T +AC_CHECK_TYPE(ssize_t, int) +AC_TYPE_PID_T +AC_CHECK_TYPE(ino_t, unsigned long) +AC_CHECK_TYPE(dev_t, unsigned long) +AC_TYPE_MODE_T +AC_STRUCT_ST_BLOCKS +AC_CHECK_MEMBERS([struct stat.st_rdev]) + +AC_MSG_CHECKING([whether we should use struct dirent.d_type, if available]) +if test x$ac_cv_d_type = xno; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([yes]) + AC_DEFINE(USE_STRUCT_DIRENT_D_TYPE, 1, + [Defined if you specify --enable-d_type-optimisation to configure.]) + AC_CHECK_MEMBERS([struct dirent.d_type],[ + AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1, + [Define to 1 if your 'struct dirent' has a d_type member])], + [],[ +#include +#include ]) +fi + + +AC_STRUCT_TM +AC_STRUCT_TIMEZONE + +dnl Checks for library functions that are provided by gnulib. +AC_FUNC_STRFTIME +AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strstr strtol strtoul) +AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent setlocale) +AC_FUNC_VPRINTF +AC_FUNC_ALLOCA +AC_FUNC_CLOSEDIR_VOID + +dnl We don't just use AC_FUNC_GETMNTENT directly because it +dnl will try to use -lsun on platforms which have getmntent() in the +dnl C library, for example UNICOS. +AC_CHECK_FUNC(getmntent, [], [AC_FUNC_GETMNTENT]) +AC_CHECK_FUNCS(getmntent) +AC_CHECK_FUNCS(setmntent endmntent) + + +dnl Checks for library functions that are provided by findlib. +FINDLIB_REPLACE_FUNCS(waitpid strspn) +FINDLIB_REPLACE_FUNCS(forcefindlib) + + +# Check for common but not-POSIX functions. +AC_CHECK_FUNCS(setgroups) + + +dnl gl_XALLOC +gl_FUNC_ALLOCA + +dnl Use gl_INCLUDED_REGEX so that findutils will build on systems like +dnl Solaris, which lacks those functions in libc (see GNU Savannah bug +dnl #11710) (Sun Sep 4 20:15:11 2005: gl_INCLUDED_REGEX no longer seems +dnl to be available in gnulib CVS) +gl_REGEX + +AC_PREREQ(2.59) + +# Define intmax_t to 'signed long' or 'signed long long' +# if it is not already defined in or . +dnl Derived from gnulib's uintmax_t which was from Paul Eggert. +AC_DEFUN([jy_AC_TYPE_INTMAX_T], +[ + if test $ac_cv_header_inttypes_h = no && test $ac_cv_header_stdint_h = no; then + AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) + test $ac_cv_type_long_long = yes \ + && ac_type='long long' \ + || ac_type='long' + AC_DEFINE_UNQUOTED(intmax_t, $ac_type, + [Define to signed long or signed long long + if and don't define.]) + else + AC_DEFINE(HAVE_INTMAX_T, 1, + [Define if you have the 'intmax_t' type in or .]) + fi +]) + +jy_AC_TYPE_INTMAX_T +jy_SORTZ + + +AC_CHECK_MEMBER(struct dirent.d_type,,,[ +#include +#include ]) + +jy_AC_ATTRIBUTE_NORETURN + +dnl internationalization macros +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION(0.14.5) + +dnl regextype.c and regexprops.c are designed to be usable outside findutils, +dnl but findutils doesn't want to support all the regex types in gnulib, +dnl and wants to support an additional one (RE_SYNTAX_EMACS|RE_DOT_NEWLINE). +dnl Hence they need to know if they are being compiled into findutils or not. +AC_DEFINE([FINDUTILS], 1, [Define if we are compiling GNU findutils]) +AC_DEFINE([ALREADY_INCLUDED_CONFIG_H], 1, [Define so that source code can verify that config.h was already included]) + +# This is necessary so that .o files in LIBOBJS are also built via +# the ANSI2KNR-filtering rules. +#LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` +##AC_CONFIG_SUBDIRS(gnulib) +AC_CONFIG_FILES(gnulib/Makefile gnulib/lib/Makefile) +AC_CONFIG_FILES(m4/Makefile) +AC_CONFIG_FILES([Makefile + tests/Makefile build-aux/Makefile + find/Makefile find/testsuite/Makefile + xargs/Makefile xargs/testsuite/Makefile + locate/Makefile locate/testsuite/Makefile + po/Makefile.in po/Makefile + doc/Makefile lib/Makefile + ]) +AC_OUTPUT +dnl intl/Makefile diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..ec70e4f --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,70 @@ +info_TEXINFOS = find.texi +find_TEXINFOS = perm.texi getdate.texi regexprops.texi +MOSTLYCLEANFILES = find.cps +CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz + +# To build regexprops.texi, we need to build the regexprops program and +# run it on the host. If we are cross compiling, we may not have a native +# binary. When this is the case, we use a workaround; don't delete the +# file for 'make clean'. This fixes Savannah bug #19658. +if !CROSS_COMPILING +CLEANFILES += regexprops.texi +endif + +MAKEINFOTXT = $(MAKEINFO) --plaintext + +find.txt: find.texi $(srcdir)/version.texi $(find_TEXINFOS) + +# find.txt is a file which we need to know how to build +# because it gets put on the www.gnu.org website. +# This rule is derived from the .texi.html rule. +.texi.txt: + rm -rf $(@:.txt=.tmp) + if $(MAKEINFOTXT) $(AM_MAKEINFOTXTFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.txt=.tmp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \ + mv $(@:.txt=) $@; else mv $(@:.txt=.tmp) $@; fi; \ + else \ + if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \ + rm -rf $(@:.txt=); else rm -Rf $(@:.txt=.tmp) $@; fi; \ + exit 1; \ + fi + + +# find_mono.html is a file which we need to know how to build +# because it gets put on the www.gnu.org website. +# This rule is derived from the generic .texi.html rule. +find_mono.html: find.texi + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) --no-split $(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 + + +# findutils.texi_html_node.tar.gz is a file which we need to know +# how to build because it gets put on the www.gnu.org website. +# This rule depends on GNU tar, but it's principally used +# by the maintainer, and we don't need to build the file +# for "make all" or "make install" (or even "make check"). +findutils.texi_html_node.tar.gz: find.html + tar zcf $@ $< + +if CROSS_COMPILING +regexprops.texi: ../gnulib/lib/regex.h + echo "WARNING: $? is newer than $@ but $@ cannot be rebuilt because we are cross-compiling. Continuing anyway." >&2 +else +regexprops.texi: ../gnulib/lib/regex.h + cd ../lib && $(MAKE) $(AM_MAKEFLAGS) regexprops$(EXEEXT) + ../lib/regexprops$(EXEEXT) "Regular Expressions" > $@ + rm ../lib/regexprops$(EXEEXT) +endif diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..689af3b --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,943 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ + +# To build regexprops.texi, we need to build the regexprops program and +# run it on the host. If we are cross compiling, we may not have a native +# binary. When this is the case, we use a workaround; don't delete the +# file for 'make clean'. This fixes Savannah bug #19658. +@CROSS_COMPILING_FALSE@am__append_1 = regexprops.texi +subdir = doc +DIST_COMMON = $(find_TEXINFOS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ + $(srcdir)/version.texi mdate-sh texinfo.tex +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/find.info +TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex +am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux +DVIS = find.dvi +PDFS = find.pdf +PSS = find.ps +HTMLS = find.html +TEXINFOS = find.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__installdirs = "$(DESTDIR)$(infodir)" +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|^.*/||'`; +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +info_TEXINFOS = find.texi +find_TEXINFOS = perm.texi getdate.texi regexprops.texi +MOSTLYCLEANFILES = find.cps +CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz \ + $(am__append_1) +MAKEINFOTXT = $(MAKEINFO) --plaintext +all: all-am + +.SUFFIXES: +.SUFFIXES: .dvi .html .info .pdf .ps .texi .txt +$(srcdir)/Makefile.in: $(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 doc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits 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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +.texi.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 + +.texi.dvi: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $< + +.texi.pdf: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $< + +.texi.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)/find.info: find.texi $(srcdir)/version.texi $(find_TEXINFOS) +find.dvi: find.texi $(srcdir)/version.texi $(find_TEXINFOS) +find.pdf: find.texi $(srcdir)/version.texi $(find_TEXINFOS) +find.html: find.texi $(srcdir)/version.texi $(find_TEXINFOS) +$(srcdir)/version.texi: $(srcdir)/stamp-vti +$(srcdir)/stamp-vti: find.texi $(top_srcdir)/configure + @(dir=.; test -f ./find.texi || dir=$(srcdir); \ + set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/find.texi`; \ + echo "@set UPDATED $$1 $$2 $$3"; \ + echo "@set UPDATED-MONTH $$2 $$3"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)") > vti.tmp + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) + -@rm -f vti.tmp + @cp $(srcdir)/version.texi $@ + +mostlyclean-vti: + -rm -f vti.tmp + +maintainer-clean-vti: + -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi +.dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) -o $@ $< + +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + +uninstall-info-am: + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && \ + (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 test -d "$(DESTDIR)$(infodir)" && 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 + +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + 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 find.aux find.cp find.cps find.fn find.fns find.ky find.kys find.log \ + find.pg find.pgs find.tmp find.toc find.tp find.tps find.vr \ + find.vrs find.dvi find.pdf find.ps find.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 +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info +check-am: all-am +check: check-am +all-am: Makefile $(INFO_DEPS) +installdirs: + for dir in "$(DESTDIR)$(infodir)"; 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: + -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) + +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: $(DVIS) + +html: html-am + +html-am: $(HTMLS) + +info: info-am + +info-am: $(INFO_DEPS) + +install-data-am: install-info-am + +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \ + done +install-exec-am: + +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ + else \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ + fi; \ + done +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-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \ + done +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti + +pdf: pdf-am + +pdf-am: $(PDFS) + +ps: ps-am + +ps-am: $(PSS) + +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic dist-info \ + distclean distclean-generic distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti mostlyclean \ + mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \ + uninstall-html-am uninstall-info-am uninstall-pdf-am \ + uninstall-ps-am + + +find.txt: find.texi $(srcdir)/version.texi $(find_TEXINFOS) + +# find.txt is a file which we need to know how to build +# because it gets put on the www.gnu.org website. +# This rule is derived from the .texi.html rule. +.texi.txt: + rm -rf $(@:.txt=.tmp) + if $(MAKEINFOTXT) $(AM_MAKEINFOTXTFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.txt=.tmp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \ + mv $(@:.txt=) $@; else mv $(@:.txt=.tmp) $@; fi; \ + else \ + if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \ + rm -rf $(@:.txt=); else rm -Rf $(@:.txt=.tmp) $@; fi; \ + exit 1; \ + fi + +# find_mono.html is a file which we need to know how to build +# because it gets put on the www.gnu.org website. +# This rule is derived from the generic .texi.html rule. +find_mono.html: find.texi + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) --no-split $(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 + +# findutils.texi_html_node.tar.gz is a file which we need to know +# how to build because it gets put on the www.gnu.org website. +# This rule depends on GNU tar, but it's principally used +# by the maintainer, and we don't need to build the file +# for "make all" or "make install" (or even "make check"). +findutils.texi_html_node.tar.gz: find.html + tar zcf $@ $< + +@CROSS_COMPILING_TRUE@regexprops.texi: ../gnulib/lib/regex.h +@CROSS_COMPILING_TRUE@ echo "WARNING: $? is newer than $@ but $@ cannot be rebuilt because we are cross-compiling. Continuing anyway." >&2 +@CROSS_COMPILING_FALSE@regexprops.texi: ../gnulib/lib/regex.h +@CROSS_COMPILING_FALSE@ cd ../lib && $(MAKE) $(AM_MAKEFLAGS) regexprops$(EXEEXT) +@CROSS_COMPILING_FALSE@ ../lib/regexprops$(EXEEXT) "Regular Expressions" > $@ +@CROSS_COMPILING_FALSE@ rm ../lib/regexprops$(EXEEXT) +# 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/doc/find.info b/doc/find.info new file mode 100644 index 0000000..d131130 --- /dev/null +++ b/doc/find.info @@ -0,0 +1,6835 @@ +This is ../../findutils/doc/find.info, produced by makeinfo version 4.8 +from ../../findutils/doc/find.texi. + +INFO-DIR-SECTION Basics +START-INFO-DIR-ENTRY +* Finding files: (find). Operating on files matching certain criteria. +END-INFO-DIR-ENTRY + +INFO-DIR-SECTION Individual utilities +START-INFO-DIR-ENTRY +* find: (find)Invoking find. Finding and acting on files. +* locate: (find)Invoking locate. Finding files in a database. +* updatedb: (find)Invoking updatedb. Building the locate database. +* xargs: (find)Invoking xargs. Operating on many files. +END-INFO-DIR-ENTRY + + This file documents the GNU utilities for finding files that match +certain criteria and performing various operations on them. + + Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005 Free +Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + + Permission is granted to copy and distribute modified versions of +this manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + + Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be stated in a +translation approved by the Foundation. + + +File: find.info, Node: Top, Next: Introduction, Up: (dir) + +GNU Findutils +************* + +This file documents the GNU utilities for finding files that match +certain criteria and performing various actions on them. + + This is edition 4.3.8, for `find' version 4.3.8. + +* Menu: + +* Introduction:: Summary of the tasks this manual describes. +* Finding Files:: Finding files that match certain criteria. +* Actions:: Doing things to files you have found. +* Databases:: Maintaining file name databases. +* File Permissions:: How to control access to files. +* Date input formats:: Specifying literal times. +* Reference:: Summary of how to invoke the programs. +* Common Tasks:: Solutions to common real-world problems. +* Worked Examples:: Examples demonstrating more complex points. +* Security Considerations:: Security issues relating to findutils. +* Error Messages:: Explanations of some messages you might see. +* Primary Index:: The components of `find' expressions. + + +File: find.info, Node: Introduction, Next: Finding Files, Prev: Top, Up: Top + +1 Introduction +************** + +This manual shows how to find files that meet criteria you specify, and +how to perform various actions on the files that you find. The +principal programs that you use to perform these tasks are `find', +`locate', and `xargs'. Some of the examples in this manual use +capabilities specific to the GNU versions of those programs. + + GNU `find' was originally written by Eric Decker, with enhancements +by David MacKenzie, Jay Plett, and Tim Wood. GNU `xargs' was +originally written by Mike Rendell, with enhancements by David +MacKenzie. GNU `locate' and its associated utilities were originally +written by James Woods, with enhancements by David MacKenzie. The idea +for `find -print0' and `xargs -0' came from Dan Bernstein. The current +maintainer of GNU findutils (and this manual) is James Youngman. Many +other people have contributed bug fixes, small improvements, and +helpful suggestions. Thanks! + + To report a bug in GNU findutils, please use the form on the Savannah +web site at `http://savannah.gnu.org/bugs/?group=findutils'. Reporting +bugs this way means that you will then be able to track progress in +fixing the problem. + + If you don't have web access, you can also just send mail to the +mailing list. The mailing list carries +discussion of bugs in findutils, questions and answers about the +software and discussion of the development of the programs. To join +the list, send email to . + + Please read any relevant sections of this manual before asking for +help on the mailing list. You may also find it helpful to read the +NON-BUGS section of the `find' manual page. + + If you ask for help on the mailing list, people will be able to help +you much more effectively if you include the following things: + + * The version of the software you are running. You can find this + out by running `locate --version'. + + * What you were trying to do + + * The _exact_ command line you used + + * The _exact_ output you got (if this is very long, try to find a + smaller example which exhibits the same problem) + + * The output you expected to get + +* Menu: + +* Scope:: +* Overview:: +* find Expressions:: + + +File: find.info, Node: Scope, Next: Overview, Up: Introduction + +1.1 Scope +========= + +For brevity, the word "file" in this manual means a regular file, a +directory, a symbolic link, or any other kind of node that has a +directory entry. A directory entry is also called a "file name". A +file name may contain some, all, or none of the directories in a path +that leads to the file. These are all examples of what this manual +calls "file names": + + parser.c + README + ./budget/may-94.sc + fred/.cshrc + /usr/local/include/termcap.h + + A "directory tree" is a directory and the files it contains, all of +its subdirectories and the files they contain, etc. It can also be a +single non-directory file. + + These programs enable you to find the files in one or more directory +trees that: + + * have names that contain certain text or match a certain pattern; + + * are links to certain files; + + * were last used during a certain period of time; + + * are within a certain size range; + + * are of a certain type (regular file, directory, symbolic link, + etc.); + + * are owned by a certain user or group; + + * have certain access permissions or special mode bits; + + * contain text that matches a certain pattern; + + * are within a certain depth in the directory tree; + + * or some combination of the above. + + Once you have found the files you're looking for (or files that are +potentially the ones you're looking for), you can do more to them than +simply list their names. You can get any combination of the files' +attributes, or process the files in many ways, either individually or +in groups of various sizes. Actions that you might want to perform on +the files you have found include, but are not limited to: + + * view or edit + + * store in an archive + + * remove or rename + + * change access permissions + + * classify into groups + + This manual describes how to perform each of those tasks, and more. + + +File: find.info, Node: Overview, Next: find Expressions, Prev: Scope, Up: Introduction + +1.2 Overview +============ + +The principal programs used for making lists of files that match given +criteria and running commands on them are `find', `locate', and +`xargs'. An additional command, `updatedb', is used by system +administrators to create databases for `locate' to use. + + `find' searches for files in a directory hierarchy and prints +information about the files it found. It is run like this: + + find [FILE...] [EXPRESSION] + +Here is a typical use of `find'. This example prints the names of all +files in the directory tree rooted in `/usr/src' whose name ends with +`.c' and that are larger than 100 Kilobytes. + find /usr/src -name '*.c' -size +100k -print + + Notice that the wildcard must be enclosed in quotes in order to +protect it from expansion by the shell. + + `locate' searches special file name databases for file names that +match patterns. The system administrator runs the `updatedb' program +to create the databases. `locate' is run like this: + + locate [OPTION...] PATTERN... + +This example prints the names of all files in the default file name +database whose name ends with `Makefile' or `makefile'. Which file +names are stored in the database depends on how the system +administrator ran `updatedb'. + locate '*[Mm]akefile' + + The name `xargs', pronounced EX-args, means "combine arguments." +`xargs' builds and executes command lines by gathering together +arguments it reads on the standard input. Most often, these arguments +are lists of file names generated by `find'. `xargs' is run like this: + + xargs [OPTION...] [COMMAND [INITIAL-ARGUMENTS]] + +The following command searches the files listed in the file `file-list' +and prints all of the lines in them that contain the word `typedef'. + xargs grep typedef < file-list + + +File: find.info, Node: find Expressions, Prev: Overview, Up: Introduction + +1.3 `find' Expressions +====================== + +The expression that `find' uses to select files consists of one or more +"primaries", each of which is a separate command line argument to +`find'. `find' evaluates the expression each time it processes a file. +An expression can contain any of the following types of primaries: + +"options" + affect overall operation rather than the processing of a specific + file; + +"tests" + return a true or false value, depending on the file's attributes; + +"actions" + have side effects and return a true or false value; and + +"operators" + connect the other arguments and affect when and whether they are + evaluated. + + You can omit the operator between two primaries; it defaults to +`-and'. *Note Combining Primaries With Operators::, for ways to +connect primaries into more complex expressions. If the expression +contains no actions other than `-prune', `-print' is performed on all +files for which the entire expression is true (*note Print File Name::). + + Options take effect immediately, rather than being evaluated for each +file when their place in the expression is reached. Therefore, for +clarity, it is best to place them at the beginning of the expression. +There are two exceptions to this; `-daystart' and `-follow' have +different effects depending on where in the command line they appear. +This can be confusing, so it's best to keep them at the beginning, too. + + Many of the primaries take arguments, which immediately follow them +in the next command line argument to `find'. Some arguments are file +names, patterns, or other strings; others are numbers. Numeric +arguments can be specified as + +`+N' + for greater than N, + +`-N' + for less than N, + +`N' + for exactly N. + + +File: find.info, Node: Finding Files, Next: Actions, Prev: Introduction, Up: Top + +2 Finding Files +*************** + +By default, `find' prints to the standard output the names of the files +that match the given criteria. *Note Actions::, for how to get more +information about the matching files. + +* Menu: + +* Name:: +* Links:: +* Time:: +* Size:: +* Type:: +* Owner:: +* Mode Bits:: +* Contents:: +* Directories:: +* Filesystems:: +* Combining Primaries With Operators:: + + +File: find.info, Node: Name, Next: Links, Up: Finding Files + +2.1 Name +======== + +Here are ways to search for files whose name matches a certain pattern. +*Note Shell Pattern Matching::, for a description of the PATTERN +arguments to these tests. + + Each of these tests has a case-sensitive version and a +case-insensitive version, whose name begins with `i'. In a +case-insensitive comparison, the patterns `fo*' and `F??' match the +file names `Foo', `FOO', `foo', `fOo', etc. + +* Menu: + +* Base Name Patterns:: +* Full Name Patterns:: +* Fast Full Name Search:: +* Shell Pattern Matching:: Wildcards used by these programs. + + +File: find.info, Node: Base Name Patterns, Next: Full Name Patterns, Up: Name + +2.1.1 Base Name Patterns +------------------------ + + -- Test: -name pattern + -- Test: -iname pattern + True if the base of the file name (the path with the leading + directories removed) matches shell pattern PATTERN. For `-iname', + the match is case-insensitive.(1) To ignore a whole directory + tree, use `-prune' (*note Directories::). As an example, to find + Texinfo source files in `/usr/local/doc': + + find /usr/local/doc -name '*.texi' + + Notice that the wildcard must be enclosed in quotes in order to + protect it from expansion by the shell. + + As of findutils version 4.2.2, patterns for `-name' and `-iname' + will match a file name with a leading `.'. For example the + command `find /tmp -name \*bar' will match the file + `/tmp/.foobar'. Braces within the pattern (`{}') are not + considered to be special (that is, `find . -name 'foo{1,2}'' + matches a file named `foo{1,2}', not the files `foo1' and `foo2'. + + ---------- Footnotes ---------- + + (1) Because we need to perform case-insensitive matching, the GNU +fnmatch implementation is always used; if the C library includes the GNU +implementation, we use that and otherwise we use the one from gnulib + + +File: find.info, Node: Full Name Patterns, Next: Fast Full Name Search, Prev: Base Name Patterns, Up: Name + +2.1.2 Full Name Patterns +------------------------ + + -- Test: -wholename pattern + -- Test: -iwholename pattern + True if the entire file name, starting with the command line + argument under which the file was found, matches shell pattern + PATTERN. For `-iwholename', the match is case-insensitive. To + ignore a whole directory tree, use `-prune' rather than checking + every file in the tree (*note Directories::). The "entire file + name" as used by `find' starts with the starting-point specified + on the command line, and is not converted to an absolute pathname, + so for example `cd /; find tmp -wholename /tmp' will never match + anything. + + -- Test: -path pattern + -- Test: -ipath pattern + These tests are deprecated, but work as for `-wholename' and + `-iwholename', respectively. The `-ipath' test is a GNU + extension, but `-path' is also provided by HP-UX `find'. + + -- Test: -regex expr + -- Test: -iregex expr + True if the entire file name matches regular expression EXPR. + This is a match on the whole path, not a search. For example, to + match a file named `./fubar3', you can use the regular expression + `.*bar.' or `.*b.*3', but not `f.*r3'. *Note Syntax of Regular + Expressions: (emacs)Regexps, for a description of the syntax of + regular expressions. For `-iregex', the match is + case-insensitive. There are several varieties of regular + expressions; by default this test uses POSIX basic regular + expressions, but this can be changed with the option `-regextype'. + + -- Option: -regextype name + This option controls the variety of regular expression syntax + understood by the `-regex' and `-iregex' tests. This option is + positional; that is, it only affects regular expressions which + occur later in the command line. If this option is not given, GNU + Emacs regular expressions are assumed. Currently-implemented types + are + + `emacs' + Regular expressions compatible with GNU Emacs; this is also + the default behaviour if this option is not used. + + `posix-awk' + Regular expressions compatible with the POSIX awk command + (not GNU awk) + + `posix-basic' + POSIX Basic Regular Expressions. + + `posix-egrep' + Regular expressions compatible with the POSIX egrep command + + `posix-extended' + POSIX Extended Regular Expressions + + *Note Regular Expressions:: for more information on the regular + expression dialects understood by GNU findutils. + + + +File: find.info, Node: Fast Full Name Search, Next: Shell Pattern Matching, Prev: Full Name Patterns, Up: Name + +2.1.3 Fast Full Name Search +--------------------------- + +To search for files by name without having to actually scan the +directories on the disk (which can be slow), you can use the `locate' +program. For each shell pattern you give it, `locate' searches one or +more databases of file names and displays the file names that contain +the pattern. *Note Shell Pattern Matching::, for details about shell +patterns. + + If a pattern is a plain string--it contains no +metacharacters--`locate' displays all file names in the database that +contain that string. If a pattern contains metacharacters, `locate' +only displays file names that match the pattern exactly. As a result, +patterns that contain metacharacters should usually begin with a `*', +and will most often end with one as well. The exceptions are patterns +that are intended to explicitly match the beginning or end of a file +name. + + If you only want `locate' to match against the last component of the +file names (the "base name" of the files) you can use the `--basename' +option. The opposite behaviour is the default, but can be selected +explicitly by using the option `--wholename'. + + The command + locate PATTERN + + is almost equivalent to + find DIRECTORIES -name PATTERN + + where DIRECTORIES are the directories for which the file name +databases contain information. The differences are that the `locate' +information might be out of date, and that `locate' handles wildcards +in the pattern slightly differently than `find' (*note Shell Pattern +Matching::). + + The file name databases contain lists of files that were on the +system when the databases were last updated. The system administrator +can choose the file name of the default database, the frequency with +which the databases are updated, and the directories for which they +contain entries. + + Here is how to select which file name databases `locate' searches. +The default is system-dependent. At the time this document was +generated, the default was `/usr/local/var/locatedb'. + +`--database=PATH' +`-d PATH' + Instead of searching the default file name database, search the + file name databases in PATH, which is a colon-separated list of + database file names. You can also use the environment variable + `LOCATE_PATH' to set the list of database files to search. The + option overrides the environment variable if both are used. + + GNU `locate' can read file name databases generated by the `slocate' +package. However, these generally contain a list of all the files on +the system, and so when using this database, `locate' will produce +output only for files which are accessible to you. *Note Invoking +locate::, for a description of the `--existing' option which is used to +do this. + + The `updatedb' program can also generate database in a format +compatible with `slocate'. *Note Invoking updatedb::, for a +description of its `--dbformat' and `--output' options. + + +File: find.info, Node: Shell Pattern Matching, Prev: Fast Full Name Search, Up: Name + +2.1.4 Shell Pattern Matching +---------------------------- + +`find' and `locate' can compare file names, or parts of file names, to +shell patterns. A "shell pattern" is a string that may contain the +following special characters, which are known as "wildcards" or +"metacharacters". + + You must quote patterns that contain metacharacters to prevent the +shell from expanding them itself. Double and single quotes both work; +so does escaping with a backslash. + +`*' + Matches any zero or more characters. + +`?' + Matches any one character. + +`[STRING]' + Matches exactly one character that is a member of the string + STRING. This is called a "character class". As a shorthand, + STRING may contain ranges, which consist of two characters with a + dash between them. For example, the class `[a-z0-9_]' matches a + lowercase letter, a number, or an underscore. You can negate a + class by placing a `!' or `^' immediately after the opening + bracket. Thus, `[^A-Z@]' matches any character except an + uppercase letter or an at sign. + +`\' + Removes the special meaning of the character that follows it. This + works even in character classes. + + In the `find' tests that do shell pattern matching (`-name', +`-wholename', etc.), wildcards in the pattern will match a `.' at the +beginning of a file name. This is also the case for `locate'. Thus, +`find -name '*macs'' will match a file named `.emacs', as will `locate +'*macs''. + + Slash characters have no special significance in the shell pattern +matching that `find' and `locate' do, unlike in the shell, in which +wildcards do not match them. Therefore, a pattern `foo*bar' can match +a file name `foo3/bar', and a pattern `./sr*sc' can match a file name +`./src/misc'. + + If you want to locate some files with the `locate' command but don't +need to see the full list you can use the `--limit' option to see just +a small number of results, or the `--count' option to display only the +total number of matches. + + +File: find.info, Node: Links, Next: Time, Prev: Name, Up: Finding Files + +2.2 Links +========= + +There are two ways that files can be linked together. "Symbolic links" +are a special type of file whose contents are a portion of the name of +another file. "Hard links" are multiple directory entries for one +file; the file names all have the same index node ("inode") number on +the disk. + +* Menu: + +* Symbolic Links:: +* Hard Links:: + + +File: find.info, Node: Symbolic Links, Next: Hard Links, Up: Links + +2.2.1 Symbolic Links +-------------------- + +Symbolic links are names that reference other files. GNU `find' will +handle symbolic links in one of two ways; firstly, it can dereference +the links for you - this means that if it comes across a symbolic link, +it examines the file that the link points to, in order to see if it +matches the criteria you have specified. Secondly, it can check the +link itself in case you might be looking for the actual link. If the +file that the symbolic link points to is also within the directory +hierarchy you are searching with the `find' command, you may not see a +great deal of difference between these two alternatives. + + By default, `find' examines symbolic links themselves when it finds +them (and, if it later comes across the linked-to file, it will examine +that, too). If you would prefer `find' to dereference the links and +examine the file that each link points to, specify the `-L' option to +`find'. You can explicitly specify the default behaviour by using the +`-P' option. The `-H' option is a half-way-between option which +ensures that any symbolic links listed on the command line are +dereferenced, but other symbolic links are not. + + Symbolic links are different to "hard links" in the sense that you +need permission to search the directories in the linked-to file name to +dereference the link. This can mean that even if you specify the `-L' +option, `find' may not be able to determine the properties of the file +that the link points to (because you don't have sufficient permission). +In this situation, `find' uses the properties of the link itself. +This also occurs if a symbolic link exists but points to a file that is +missing. + + The options controlling the behaviour of `find' with respect to +links are as follows :- + +`-P' + `find' does not dereference symbolic links at all. This is the + default behaviour. This option must be specified before any of the + file names on the command line. + +`-H' + `find' does not dereference symbolic links (except in the case of + file names on the command line, which are dereferenced). If a + symbolic link cannot be dereferenced, the information for the + symbolic link itself is used. This option must be specified + before any of the file names on the command line. + +`-L' + `find' dereferences symbolic links where possible, and where this + is not possible it uses the properties of the symbolic link itself. + This option must be specified before any of the file names on the + command line. Use of this option also implies the same behaviour + as the `-noleaf' option. If you later use the `-H' or `-P' + options, this does not turn off `-noleaf'. + +`-follow' + This option forms part of the "expression" and must be specified + after the file names, but it is otherwise equivalent to `-L'. The + `-follow' option affects only those tests which appear after it on + the command line. This option is deprecated. Where possible, you + should use `-L' instead. + + The following differences in behavior occur when the `-L' option is +used: + + * `find' follows symbolic links to directories when searching + directory trees. + + * `-lname' and `-ilname' always return false (unless they happen to + match broken symbolic links). + + * `-type' reports the types of the files that symbolic links point + to. This means that in combination with `-L', `-type l' will be + true only for broken symbolic links. To check for symbolic links + when `-L' has been specified, use `-xtype l'. + + * Implies `-noleaf' (*note Directories::). + + If the `-L' option or the `-H' option is used, the file names used +as arguments to `-newer', `-anewer', and `-cnewer' are dereferenced and +the timestamp from the pointed-to file is used instead (if possible - +otherwise the timestamp from the symbolic link is used). + + -- Test: -lname pattern + -- Test: -ilname pattern + True if the file is a symbolic link whose contents match shell + pattern PATTERN. For `-ilname', the match is case-insensitive. + *Note Shell Pattern Matching::, for details about the PATTERN + argument. If the `-L' option is in effect, this test will always + return false for symbolic links unless they are broken. So, to + list any symbolic links to `sysdep.c' in the current directory and + its subdirectories, you can do: + + find . -lname '*sysdep.c' + + +File: find.info, Node: Hard Links, Prev: Symbolic Links, Up: Links + +2.2.2 Hard Links +---------------- + +Hard links allow more than one name to refer to the same file. To find +all the names which refer to the same file as NAME, use `-samefile +NAME'. If you are not using the `-L' option, you can confine your +search to one filesystem using the `-xdev' option. This is useful +because hard links cannot point outside a single filesystem, so this +can cut down on needless searching. + + If the `-L' option is in effect, and NAME is in fact a symbolic +link, the symbolic link will be dereferenced. Hence you are searching +for other links (hard or symbolic) to the file pointed to by NAME. If +`-L' is in effect but NAME is not itself a symbolic link, other +symbolic links to the file NAME will be matched. + + You can also search for files by inode number. This can occasionally +be useful in diagnosing problems with filesystems for example, because +`fsck' tends to print inode numbers. Inode numbers also occasionally +turn up in log messages for some types of software, and are used to +support the `ftok()' library function. + + You can learn a file's inode number and the number of links to it by +running `ls -li' or `find -ls'. + + You can search for hard links to inode number NUM by using `-inum +NUM'. If there are any filesystem mount points below the directory +where you are starting the search, use the `-xdev' option unless you +are also using the `-L' option. Using `-xdev' this saves needless +searching, since hard links to a file must be on the same filesystem. +*Note Filesystems::. + + -- Test: -samefile NAME + File is a hard link to the same inode as NAME. If the `-L' option + is in effect, symbolic links to the same file as NAME points to + are also matched. + + -- Test: -inum n + File has inode number N. The `+' and `-' qualifiers also work, + though these are rarely useful. Much of the time it is easier to + use `-samefile' rather than this option. + + You can also search for files that have a certain number of links, +with `-links'. Directories normally have at least two hard links; +their `.' entry is the second one. If they have subdirectories, each +of those also has a hard link called `..' to its parent directory. The +`.' and `..' directory entries are not normally searched unless they +are mentioned on the `find' command line. + + -- Test: -links n + File has N hard links. + + -- Test: -links +n + File has more than N hard links. + + -- Test: -links -n + File has fewer than N hard links. + + +File: find.info, Node: Time, Next: Size, Prev: Links, Up: Finding Files + +2.3 Time +======== + +Each file has three time stamps, which record the last time that +certain operations were performed on the file: + + 1. access (read the file's contents) + + 2. change the status (modify the file or its attributes) + + 3. modify (change the file's contents) + + Some systems also provide a timestamp that indicates when a file was +_created_. For example, the UFS2 fileystem under NetBSD-3.1 records +the _birth time_ of each file. This information is also available +under other versions of BSD and some versions of Cygwin. However, even +on systems which support file birth time, files may exist for which +this information was not recorded (for example, UFS1 file systems +simply do not contain this information). + + You can search for files whose time stamps are within a certain age +range, or compare them to other time stamps. + +* Menu: + +* Age Ranges:: +* Comparing Timestamps:: + + +File: find.info, Node: Age Ranges, Next: Comparing Timestamps, Up: Time + +2.3.1 Age Ranges +---------------- + +These tests are mainly useful with ranges (`+N' and `-N'). + + -- Test: -atime n + -- Test: -ctime n + -- Test: -mtime n + True if the file was last accessed (or its status changed, or it + was modified) N*24 hours ago. The number of 24-hour periods since + the file's timestamp is always rounded down; therefore 0 means + "less than 24 hours ago", 1 means "between 24 and 48 hours ago", + and so forth. Fractional values are supported but this only + really makes sense for the case where ranges (`+N' and `-N') are + used. + + -- Test: -amin n + -- Test: -cmin n + -- Test: -mmin n + True if the file was last accessed (or its status changed, or it + was modified) N minutes ago. These tests provide finer granularity + of measurement than `-atime' et al., but rounding is done in a + similar way (again, fractions are supported). For example, to list + files in `/u/bill' that were last read from 2 to 6 minutes ago: + + find /u/bill -amin +2 -amin -6 + + -- Option: -daystart + Measure times from the beginning of today rather than from 24 hours + ago. So, to list the regular files in your home directory that + were modified yesterday, do + + find ~/ -daystart -type f -mtime 1 + + The `-daystart' option is unlike most other options in that it has + an effect on the way that other tests are performed. The affected + tests are `-amin', `-cmin', `-mmin', `-atime', `-ctime' and + `-mtime'. The `-daystart' option only affects the behaviour of + any tests which appear after it on the command line. + + +File: find.info, Node: Comparing Timestamps, Prev: Age Ranges, Up: Time + +2.3.2 Comparing Timestamps +-------------------------- + + -- Test: -newerXY reference + Succeeds if timestamp `X' of the file being considered is newer + than timestamp `Y' of the file `reference'. The latters `X' and + `Y' can be any of the following letters: + + `a' + Last-access time of `reference' + + `B' + Birth time of `reference' (when this is not known, the test + cannot succeed) + + `c' + Last-change time of `reference' + + `m' + Last-modification time of `reference' + + `t' + The `reference' argument is interpreted as a literal time, + rather than the name of a file. *Note Date input formats::, + for a description of how the timestamp is understood. Tests + of the form `-newerXt' are valid but tests of the form + `-newertY' are not. + + For example the test `-newerac /tmp/foo' succeeds for all files + which have been accessed more recently than `/tmp/foo' was + changed. Here `X' is `a' and `Y' is `c'. + + Not all files have a known birth time. If `Y' is `b' and the + birth time of `reference' is not available, `find' exits with an + explanatory error message. If `X' is `b' and we do not know the + birth time the file currently being considered, the test simply + fails (that is, it behaves like `-false' does). + + Some operating systems (for example, most implementations of Unix) + do not support file birth times. Some others, for example + NetBSD-3.1, do. Even on operating systems which support file + birth times, the information may not be available for specific + files. For example, under NetBSD, file birth times are supported + on UFS2 file systems, but not UFS1 file systems. + + + There are two ways to list files in `/usr' modified after February 1 +of the current year. One uses `-newermt': + + find /usr -newermt "Feb 1" + + The other way of doing this works on the versions of find before +4.3.3: + + touch -t 02010000 /tmp/stamp$$ + find /usr -newer /tmp/stamp$$ + rm -f /tmp/stamp$$ + + -- Test: -anewer file + -- Test: -cnewer file + -- Test: -newer file + True if the file was last accessed (or its status changed, or it + was modified) more recently than FILE was modified. These tests + are affected by `-follow' only if `-follow' comes before them on + the command line. *Note Symbolic Links::, for more information on + `-follow'. As an example, to list any files modified since + `/bin/sh' was last modified: + + find . -newer /bin/sh + + -- Test: -used n + True if the file was last accessed N days after its status was + last changed. Useful for finding files that are not being used, + and could perhaps be archived or removed to save disk space. + + +File: find.info, Node: Size, Next: Type, Prev: Time, Up: Finding Files + +2.4 Size +======== + + -- Test: -size n[bckwMG] + True if the file uses N units of space, rounding up. The units + are 512-byte blocks by default, but they can be changed by adding a + one-character suffix to N: + + `b' + 512-byte blocks (never 1024) + + `c' + bytes + + `k' + kilobytes (1024 bytes) + + `w' + 2-byte words + + `M' + Megabytes (units of 1048576 bytes) + + `G' + Gigabytes (units of 1073741824 bytes) + + The `b' suffix always considers blocks to be 512 bytes. This is + not affected by the setting (or non-setting) of the POSIXLY_CORRECT + environment variable. This behaviour is different to the + behaviour of the `-ls' action). If you want to use 1024-byte + units, use the `k' suffix instead. + + The number can be prefixed with a `+' or a `-'. A plus sign + indicates that the test should succeed if the file uses at least N + units of storage (a common use of this test) and a minus sign + indicates that the test should succeed if the file uses less than + N units of storage. There is no `=' prefix, because that's the + default anyway. + + The size does not count indirect blocks, but it does count blocks + in sparse files that are not actually allocated. In other words, + it's consistent with the result you get for `ls -l' or `wc -c'. + This handling of sparse files differs from the output of the `%k' + and `%b' format specifiers for the `-printf' predicate. + + + -- Test: -empty + True if the file is empty and is either a regular file or a + directory. This might help determine good candidates for + deletion. This test is useful with `-depth' (*note Directories::) + and `-delete' (*note Single File::). + + +File: find.info, Node: Type, Next: Owner, Prev: Size, Up: Finding Files + +2.5 Type +======== + + -- Test: -type c + True if the file is of type C: + + `b' + block (buffered) special + + `c' + character (unbuffered) special + + `d' + directory + + `p' + named pipe (FIFO) + + `f' + regular file + + `l' + symbolic link; if `-L' is in effect, this is true only for + broken symbolic links. If you want to search for symbolic + links when `-L' is in effect, use `-xtype' instead of `-type'. + + `s' + socket + + `D' + door (Solaris) + + -- Test: -xtype c + This test behaves the same as `-type' unless the file is a + symbolic link. If the file is a symbolic link, the result is as + follows (in the table below, `X' should be understood to represent + any letter except `l'): + + ``-P -xtype l'' + True if the symbolic link is broken + + ``-P -xtype X'' + True if the (ultimate) target file is of type `X'. + + ``-L -xtype l'' + Always true + + ``-L -xtype X'' + False unless the symbolic link is broken + + In other words, for symbolic links, `-xtype' checks the type of + the file that `-type' does not check. + + The `-H' option also affects the behaviour of `-xtype'. When `-H' + is in effect, `-xtype' behaves as if `-L' had been specified when + examining files listed on the command line, and as if `-P' had + been specified otherwise. If neither `-H' nor `-L' was specified, + `-xtype' behaves as if `-P' had been specified. + + *Note Symbolic Links::, for more information on `-follow' and `-L'. + + +File: find.info, Node: Owner, Next: Mode Bits, Prev: Type, Up: Finding Files + +2.6 Owner +========= + + -- Test: -user uname + -- Test: -group gname + True if the file is owned by user UNAME (belongs to group GNAME). + A numeric ID is allowed. + + -- Test: -uid n + -- Test: -gid n + True if the file's numeric user ID (group ID) is N. These tests + support ranges (`+N' and `-N'), unlike `-user' and `-group'. + + -- Test: -nouser + -- Test: -nogroup + True if no user corresponds to the file's numeric user ID (no group + corresponds to the numeric group ID). These cases usually mean + that the files belonged to users who have since been removed from + the system. You probably should change the ownership of such + files to an existing user or group, using the `chown' or `chgrp' + program. + + +File: find.info, Node: Mode Bits, Next: Contents, Prev: Owner, Up: Finding Files + +2.7 File Mode Bits +================== + +*Note File Permissions::, for information on how file mode bits are +structured and how to specify them. + + Four tests determine what users can do with files. These are +`-readable', `-writable', `-executable' and `-perm'. The first three +tests ask the operating system if the current user can perform the +relevant operation on a file, while `-perm' just examines the file's +mode. The file mode may give a misleading impression of what the user +can actually do, because the file may have an access control list, or +exist on a read-only filesystem, for example. Of these four tests +though, only `-perm' is specified by the POSIX standard. + + The `-readable', `-writable' and `-executable' tests are implemented +via the `access' system call. This is implemented within the operating +system itself. If the file being considered is on an NFS filesystem, +the remote system may allow or forbid read or write operations for +reasons of which the NFS client cannot take account. This includes +user-ID mapping, either in the general sense or the more restricted +sense in which remote superusers are treated by the NFS server as if +they are the local user `nobody' on the NFS server. + + None of the tests in this section should be used to verify that a +user is authorised to perform any operation (on the file being tested or +any other file) because of the possibility of a race condition. That +is, the situation may change between the test and an action being taken +on the basis of the result of that test. + + -- Test: -readable + True if the file can be read by the invoking user. + + -- Test: -writable + True if the file can be written by the invoking user. This is an + in-principle check, and other things may prevent a successful write + operation; for example, the filesystem might be full. + + -- Test: -executable + True if the file can be executed/searched by the invoking user. + + -- Test: -perm pmode + True if the file's mode bits match PMODE, which can be either a + symbolic or numeric MODE (*note File Permissions::) optionally + prefixed by `-' or `/'. + + A PMODE that starts with neither `-' nor `/' matches if MODE + exactly matches the file mode bits. + + A PMODE that starts with `-' matches if _all_ the file mode bits + set in MODE are set for the file; bits not set in MODE are ignored. + + A PMODE that starts with `/' matches if _any_ of the file mode + bits set in MODE are set for the file; bits not set in MODE are + ignored. This is a GNU extension. + + If you don't use the `/' or `-' form with a symbolic mode string, + you may have to specify a rather complex mode string. For example + `-perm g=w' will only match files that have mode 0020 (that is, + ones for which group write permission is the only file mode bit + set). It is more likely that you will want to use the `/' or `-' + forms, for example `-perm -g=w', which matches any file with group + write permission. + + `-perm 664' + Match files that have read and write permission for their + owner, and group, but that the rest of the world can read but + not write to. Do not match files that meet these criteria + but have other file mode bits set (for example if someone can + execute/search the file). + + `-perm -664' + Match files that have read and write permission for their + owner, and group, but that the rest of the world can read but + not write to, without regard to the presence of any extra + file mode bits (for example the executable bit). This + matches a file with mode 0777, for example. + + `-perm /222' + Match files that are writable by somebody (their owner, or + their group, or anybody else). + + `-perm /022' + Match files that are writable by either their owner or their + group. The files don't have to be writable by both the owner + and group to be matched; either will do. + + `-perm /g+w,o+w' + As above. + + `-perm /g=w,o=w' + As above. + + `-perm -022' + Match files that are writable by both their owner and their + group. + + `-perm -444 -perm /222 ! -perm /111' + Match files that are readable for everybody, have at least one + write bit set (i.e., somebody can write to them), but that + cannot be executed/searched by anybody. Note that in some + shells the `!' must be escaped;. + + `-perm -a+r -perm /a+w ! -perm /a+x' + As above. + + `-perm -g+w,o+w' + As above. + + Warning: If you specify `-perm /000' or `-perm /mode' where + the symbolic mode `mode' has no bits set, the test currently + matches no files. This differs from the behaviour of `-perm + -000', which matches all files. The behaviour of `-perm + /000' will be changed to be consistent with the behaviour of + `-perm -000'. The change will probably be made in early 2006. + + + +File: find.info, Node: Contents, Next: Directories, Prev: Mode Bits, Up: Finding Files + +2.8 Contents +============ + +To search for files based on their contents, you can use the `grep' +program. For example, to find out which C source files in the current +directory contain the string `thing', you can do: + + grep -l thing *.[ch] + + If you also want to search for the string in files in subdirectories, +you can combine `grep' with `find' and `xargs', like this: + + find . -name '*.[ch]' | xargs grep -l thing + + The `-l' option causes `grep' to print only the names of files that +contain the string, rather than the lines that contain it. The string +argument (`thing') is actually a regular expression, so it can contain +metacharacters. This method can be refined a little by using the `-r' +option to make `xargs' not run `grep' if `find' produces no output, and +using the `find' action `-print0' and the `xargs' option `-0' to avoid +misinterpreting files whose names contain spaces: + + find . -name '*.[ch]' -print0 | xargs -r -0 grep -l thing + + For a fuller treatment of finding files whose contents match a +pattern, see the manual page for `grep'. + + +File: find.info, Node: Directories, Next: Filesystems, Prev: Contents, Up: Finding Files + +2.9 Directories +=============== + +Here is how to control which directories `find' searches, and how it +searches them. These two options allow you to process a horizontal +slice of a directory tree. + + -- Option: -maxdepth levels + Descend at most LEVELS (a non-negative integer) levels of + directories below the command line arguments. `-maxdepth 0' means + only apply the tests and actions to the command line arguments. + + -- Option: -mindepth levels + Do not apply any tests or actions at levels less than LEVELS (a + non-negative integer). `-mindepth 1' means process all files + except the command line arguments. + + -- Option: -depth + Process each directory's contents before the directory itself. + Doing this is a good idea when producing lists of files to archive + with `cpio' or `tar'. If a directory does not have write + permission for its owner, its contents can still be restored from + the archive since the directory's permissions are restored after + its contents. + + -- Option: -d + This is a deprecated synonym for `-depth', for compatibility with + Mac OS X, FreeBSD and OpenBSD. The `-depth' option is a POSIX + feature, so it is better to use that. + + -- Action: -prune + If the file is a directory, do not descend into it. The result is + true. For example, to skip the directory `src/emacs' and all + files and directories under it, and print the names of the other + files found: + + find . -wholename './src/emacs' -prune -o -print + + The above command will not print `./src/emacs' among its list of + results. This however is not due to the effect of the `-prune' + action (which only prevents further descent, it doesn't make sure + we ignore that item). Instead, this effect is due to the use of + `-o'. Since the left hand side of the "or" condition has + succeeded for `./src/emacs', it is not necessary to evaluate the + right-hand-side (`-print') at all for this particular file. If + you wanted to print that directory name you could use either an + extra `-print' action: + + find . -wholename './src/emacs' -prune -print -o -print + + or use the comma operator: + + find . -wholename './src/emacs' -prune , -print + + If the `-depth' option is in effect, the subdirectories will have + already been visited in any case. Hence `-prune' has no effect + and returns false. + + -- Action: -quit + Exit immediately (with return value zero if no errors have + occurred). No child processes will be left running, but no more + files specified on the command line will be processed. For + example, `find /tmp/foo /tmp/bar -print -quit' will print only + `/tmp/foo'. Any command lines which have been built by `-exec ... + \+' or `-execdir ... \+' are invoked before the program is + executed. + + -- Option: -noleaf + Do not optimize by assuming that directories contain 2 fewer + subdirectories than their hard link count. This option is needed + when searching filesystems that do not follow the Unix + directory-link convention, such as CD-ROM or MS-DOS filesystems or + AFS volume mount points. Each directory on a normal Unix + filesystem has at least 2 hard links: its name and its `.' entry. + Additionally, its subdirectories (if any) each have a `..' entry + linked to that directory. When `find' is examining a directory, + after it has statted 2 fewer subdirectories than the directory's + link count, it knows that the rest of the entries in the directory + are non-directories ("leaf" files in the directory tree). If only + the files' names need to be examined, there is no need to stat + them; this gives a significant increase in search speed. + + -- Option: -ignore_readdir_race + If a file disappears after its name has been read from a directory + but before `find' gets around to examining the file with `stat', + don't issue an error message. If you don't specify this option, an + error message will be issued. This option can be useful in system + scripts (cron scripts, for example) that examine areas of the + filesystem that change frequently (mail queues, temporary + directories, and so forth), because this scenario is common for + those sorts of directories. Completely silencing error messages + from `find' is undesirable, so this option neatly solves the + problem. There is no way to search one part of the filesystem + with this option on and part of it with this option off, though. + When this option is turned on and find discovers that one of the + start-point files specified on the command line does not exist, no + error message will be issued. + + + -- Option: -noignore_readdir_race + This option reverses the effect of the `-ignore_readdir_race' + option. + + +File: find.info, Node: Filesystems, Next: Combining Primaries With Operators, Prev: Directories, Up: Finding Files + +2.10 Filesystems +================ + +A "filesystem" is a section of a disk, either on the local host or +mounted from a remote host over a network. Searching network +filesystems can be slow, so it is common to make `find' avoid them. + + There are two ways to avoid searching certain filesystems. One way +is to tell `find' to only search one filesystem: + + -- Option: -xdev + -- Option: -mount + Don't descend directories on other filesystems. These options are + synonyms. + + The other way is to check the type of filesystem each file is on, and +not descend directories that are on undesirable filesystem types: + + -- Test: -fstype type + True if the file is on a filesystem of type TYPE. The valid + filesystem types vary among different versions of Unix; an + incomplete list of filesystem types that are accepted on some + version of Unix or another is: + ext2 ext3 proc sysfs ufs 4.2 4.3 nfs tmp mfs S51K S52K + You can use `-printf' with the `%F' directive to see the types of + your filesystems. The `%D' directive shows the device number. + *Note Print File Information::. `-fstype' is usually used with + `-prune' to avoid searching remote filesystems (*note + Directories::). + + +File: find.info, Node: Combining Primaries With Operators, Prev: Filesystems, Up: Finding Files + +2.11 Combining Primaries With Operators +======================================= + +Operators build a complex expression from tests and actions. The +operators are, in order of decreasing precedence: + +`( EXPR )' + Force precedence. True if EXPR is true. + +`! EXPR' +`-not EXPR' + True if EXPR is false. In some shells, it is necessary to protect + the `!' from shell interpretation by quoting it. + +`EXPR1 EXPR2' +`EXPR1 -a EXPR2' +`EXPR1 -and EXPR2' + And; EXPR2 is not evaluated if EXPR1 is false. + +`EXPR1 -o EXPR2' +`EXPR1 -or EXPR2' + Or; EXPR2 is not evaluated if EXPR1 is true. + +`EXPR1 , EXPR2' + List; both EXPR1 and EXPR2 are always evaluated. True if EXPR2 is + true. The value of EXPR1 is discarded. This operator lets you do + multiple independent operations on one traversal, without + depending on whether other operations succeeded. The two + operations EXPR1 and EXPR2 are not always fully independent, since + EXPR1 might have side effects like touching or deleting files, or + it might use `-prune' which would also affect EXPR2. + + `find' searches the directory tree rooted at each file name by +evaluating the expression from left to right, according to the rules of +precedence, until the outcome is known (the left hand side is false for +`-and', true for `-or'), at which point `find' moves on to the next +file name. + + There are two other tests that can be useful in complex expressions: + + -- Test: -true + Always true. + + -- Test: -false + Always false. + + +File: find.info, Node: Actions, Next: Databases, Prev: Finding Files, Up: Top + +3 Actions +********* + +There are several ways you can print information about the files that +match the criteria you gave in the `find' expression. You can print +the information either to the standard output or to a file that you +name. You can also execute commands that have the file names as +arguments. You can use those commands as further filters to select +files. + +* Menu: + +* Print File Name:: +* Print File Information:: +* Run Commands:: +* Delete Files:: +* Adding Tests:: + + +File: find.info, Node: Print File Name, Next: Print File Information, Up: Actions + +3.1 Print File Name +=================== + + -- Action: -print + True; print the entire file name on the standard output, followed + by a newline. If there is the faintest possibility that one of + the files for which you are searching might contain a newline, you + should use `-print0' instead. + + -- Action: -fprint file + True; print the entire file name into file FILE, followed by a + newline. If FILE does not exist when `find' is run, it is + created; if it does exist, it is truncated to 0 bytes. The named + output file is always created, even if no output is sent to it. + The file names `/dev/stdout' and `/dev/stderr' are handled + specially; they refer to the standard output and standard error + output, respectively. + + If there is the faintest possibility that one of the files for + which you are searching might contain a newline, you should use + `-fprint0' instead. + + +File: find.info, Node: Print File Information, Next: Run Commands, Prev: Print File Name, Up: Actions + +3.2 Print File Information +========================== + + -- Action: -ls + True; list the current file in `ls -dils' format on the standard + output. The output looks like this: + + 204744 17 -rw-r--r-- 1 djm staff 17337 Nov 2 1992 ./lwall-quotes + + The fields are: + + 1. The inode number of the file. *Note Hard Links::, for how to + find files based on their inode number. + + 2. the number of blocks in the file. The block counts are of 1K + blocks, unless the environment variable `POSIXLY_CORRECT' is + set, in which case 512-byte blocks are used. *Note Size::, + for how to find files based on their size. + + 3. The file's type and file mode bits. The type is shown as a + dash for a regular file; for other file types, a letter like + for `-type' is used (*note Type::). The file mode bits are + read, write, and execute/search for the file's owner, its + group, and other users, respectively; a dash means the + permission is not granted. *Note File Permissions::, for + more details about file permissions. *Note Mode Bits::, for + how to find files based on their file mode bits. + + 4. The number of hard links to the file. + + 5. The user who owns the file. + + 6. The file's group. + + 7. The file's size in bytes. + + 8. The date the file was last modified. + + 9. The file's name. `-ls' quotes non-printable characters in the + file names using C-like backslash escapes. This may change + soon, as the treatment of unprintable characters is + harmonised for `-ls', `-fls', `-print', `-fprint', `-printf' + and `-fprintf'. + + -- Action: -fls file + True; like `-ls' but write to FILE like `-fprint' (*note Print + File Name::). The named output file is always created, even if no + output is sent to it. + + -- Action: -printf format + True; print FORMAT on the standard output, interpreting `\' + escapes and `%' directives. Field widths and precisions can be + specified as with the `printf' C function. Format flags (like `#' + for example) may not work as you expect because many of the + fields, even numeric ones, are printed with %s. Numeric flags + which are affected in this way include G, U, b, D, k and n. This + difference in behaviour means though that the format flag `-' will + work; it forces left-alignment of the field. Unlike `-print', + `-printf' does not add a newline at the end of the string. If you + want a newline at the end of the string, add a `\n'. + + -- Action: -fprintf file format + True; like `-printf' but write to FILE like `-fprint' (*note Print + File Name::). The output file is always created, even if no + output is ever sent to it. + +* Menu: + +* Escapes:: +* Format Directives:: +* Time Formats:: + + +File: find.info, Node: Escapes, Next: Format Directives, Up: Print File Information + +3.2.1 Escapes +------------- + +The escapes that `-printf' and `-fprintf' recognise are: + +`\a' + Alarm bell. + +`\b' + Backspace. + +`\c' + Stop printing from this format immediately and flush the output. + +`\f' + Form feed. + +`\n' + Newline. + +`\r' + Carriage return. + +`\t' + Horizontal tab. + +`\v' + Vertical tab. + +`\\' + A literal backslash (`\'). + +`\0' + ASCII NUL. + +`\NNN' + The character whose ASCII code is NNN (octal). + + A `\' character followed by any other character is treated as an +ordinary character, so they both are printed, and a warning message is +printed to the standard error output (because it was probably a typo). + + +File: find.info, Node: Format Directives, Next: Time Formats, Prev: Escapes, Up: Print File Information + +3.2.2 Format Directives +----------------------- + +`-printf' and `-fprintf' support the following format directives to +print information about the file being processed. The C `printf' +function, field width and precision specifiers are supported, as +applied to string (%s) types. That is, you can specify "minimum field +width"."maximum field width" for each directive. Format flags (like +`#' for example) may not work as you expect because many of the fields, +even numeric ones, are printed with %s. The format flag `-' does work; +it forces left-alignment of the field. + + `%%' is a literal percent sign. A `%' character followed by an +unrecognised character (i.e., not a known directive or `printf' field +width and precision specifier), is discarded (but the unrecognised +character is printed), and a warning message is printed to the standard +error output (because it was probably a typo). Don't rely on this +behaviour, because other directives may be added in the future. + + A `%' at the end of the format argument causes undefined behaviour +since there is no following character. In some locales, it may hide +your door keys, while in others it may remove the final page from the +novel you are reading. + +* Menu: + +* Name Directives:: +* Ownership Directives:: +* Size Directives:: +* Location Directives:: +* Time Directives:: +* Formatting Flags:: + + +File: find.info, Node: Name Directives, Next: Ownership Directives, Up: Format Directives + +3.2.2.1 Name Directives +....................... + +`%p' + File's name (not the absolute path name, but the name of the file + as it was encountered by `find' - that is, as a relative path from + one of the starting points). + +`%f' + File's name with any leading directories removed (only the last + element). + +`%h' + Leading directories of file's name (all but the last element and + the slash before it). If the file's name contains no slashes (for + example because it was named on the command line and is in the + current working directory), then "%h" expands to ".". This + prevents "%h/%f" expanding to "/foo", which would be surprising + and probably not desirable. + +`%P' + File's name with the name of the command line argument under which + it was found removed from the beginning. + +`%H' + Command line argument under which file was found. + + +File: find.info, Node: Ownership Directives, Next: Size Directives, Prev: Name Directives, Up: Format Directives + +3.2.2.2 Ownership Directives +............................ + +`%g' + File's group name, or numeric group ID if the group has no name. + +`%G' + File's numeric group ID. + +`%u' + File's user name, or numeric user ID if the user has no name. + +`%U' + File's numeric user ID. + +`%m' + File's mode bits (in octal). If you always want to have a leading + zero on the number, use the '#' format flag, for example '%#m'. + + The file mode bit numbers used are the traditional Unix numbers, + which will be as expected on most systems, but if your system's + file mode bit layout differs from the traditional Unix semantics, + you will see a difference between the mode as printed by `%m' and + the mode as it appears in `struct stat'. + +`%M' + File's type and mode bits (in symbolic form, as for `ls'). This + directive is supported in findutils 4.2.5 and later. + + +File: find.info, Node: Size Directives, Next: Location Directives, Prev: Ownership Directives, Up: Format Directives + +3.2.2.3 Size Directives +....................... + +`%k' + The amount of disk space used for this file in 1K blocks. Since + disk space is allocated in multiples of the filesystem block size + this is usually greater than %s/1024, but it can also be smaller + if the file is a sparse file (that is, it has "holes"). + +`%b' + The amount of disk space used for this file in 512-byte blocks. + Since disk space is allocated in multiples of the filesystem block + size this is usually greater than %s/512, but it can also be + smaller if the file is a sparse file (that is, it has "holes"). + +`%s' + File's size in bytes. + +`%S' + File's sparseness. This is calculated as `(BLOCKSIZE*st_blocks / + st_size)'. The exact value you will get for an ordinary file of a + certain length is system-dependent. However, normally sparse files + will have values less than 1.0, and files which use indirect blocks + and have few holes may have a value which is greater than 1.0. The + value used for BLOCKSIZE is system-dependent, but is usually 512 + bytes. If the file size is zero, the value printed is undefined. + On systems which lack support for st_blocks, a file's sparseness is + assumed to be 1.0. + + +File: find.info, Node: Location Directives, Next: Time Directives, Prev: Size Directives, Up: Format Directives + +3.2.2.4 Location Directives +........................... + +`%d' + File's depth in the directory tree (depth below a file named on the + command line, not depth below the root directory). Files named on + the command line have a depth of 0. Subdirectories immediately + below them have a depth of 1, and so on. + +`%D' + The device number on which the file exists (the `st_dev' field of + `struct stat'), in decimal. + +`%F' + Type of the filesystem the file is on; this value can be used for + `-fstype' (*note Directories::). + +`%l' + Object of symbolic link (empty string if file is not a symbolic + link). + +`%i' + File's inode number (in decimal). + +`%n' + Number of hard links to file. + +`%y' + Type of the file as used with `-type'. If the file is a symbolic + link, `l' will be printed. + +`%Y' + Type of the file as used with `-type'. If the file is a symbolic + link, it is dereferenced. If the file is a broken symbolic link, + `N' is printed. + + + +File: find.info, Node: Time Directives, Next: Formatting Flags, Prev: Location Directives, Up: Format Directives + +3.2.2.5 Time Directives +....................... + +Some of these directives use the C `ctime' function. Its output +depends on the current locale, but it typically looks like + + Wed Nov 2 00:42:36 1994 + +`%a' + File's last access time in the format returned by the C `ctime' + function. + +`%AK' + File's last access time in the format specified by K (*note Time + Formats::). + +`%c' + File's last status change time in the format returned by the C + `ctime' function. + +`%CK' + File's last status change time in the format specified by K (*note + Time Formats::). + +`%t' + File's last modification time in the format returned by the C + `ctime' function. + +`%TK' + File's last modification time in the format specified by K (*note + Time Formats::). + + +File: find.info, Node: Time Formats, Prev: Format Directives, Up: Print File Information + +3.2.3 Time Formats +------------------ + +Below are the formats for the directives `%A', `%C', and `%T', which +print the file's timestamps. Some of these formats might not be +available on all systems, due to differences in the C `strftime' +function between systems. + +* Menu: + +* Time Components:: +* Date Components:: +* Combined Time Formats:: + + +File: find.info, Node: Time Components, Next: Date Components, Up: Time Formats + +3.2.3.1 Time Components +....................... + +The following format directives print single components of the time. + +`H' + hour (00..23) + +`I' + hour (01..12) + +`k' + hour ( 0..23) + +`l' + hour ( 1..12) + +`p' + locale's AM or PM + +`Z' + time zone (e.g., EDT), or nothing if no time zone is determinable + +`M' + minute (00..59) + +`S' + second (00..61) + +`@' + seconds since Jan. 1, 1970, 00:00 GMT. + + +File: find.info, Node: Date Components, Next: Combined Time Formats, Prev: Time Components, Up: Time Formats + +3.2.3.2 Date Components +....................... + +The following format directives print single components of the date. + +`a' + locale's abbreviated weekday name (Sun..Sat) + +`A' + locale's full weekday name, variable length (Sunday..Saturday) + +`b' +`h' + locale's abbreviated month name (Jan..Dec) + +`B' + locale's full month name, variable length (January..December) + +`m' + month (01..12) + +`d' + day of month (01..31) + +`w' + day of week (0..6) + +`j' + day of year (001..366) + +`U' + week number of year with Sunday as first day of week (00..53) + +`W' + week number of year with Monday as first day of week (00..53) + +`Y' + year (1970...) + +`y' + last two digits of year (00..99) + + +File: find.info, Node: Combined Time Formats, Prev: Date Components, Up: Time Formats + +3.2.3.3 Combined Time Formats +............................. + +The following format directives print combinations of time and date +components. + +`r' + time, 12-hour (hh:mm:ss [AP]M) + +`T' + time, 24-hour (hh:mm:ss) + +`X' + locale's time representation (H:M:S) + +`c' + locale's date and time (Sat Nov 04 12:02:33 EST 1989) + +`D' + date (mm/dd/yy) + +`x' + locale's date representation (mm/dd/yy) + +`+' + Date and time, separated by '+', for example `2004-04-28+22:22:05'. + The time is given in the current timezone (which may be affected by + setting the TZ environment variable). This is a GNU extension. + + +File: find.info, Node: Formatting Flags, Prev: Time Directives, Up: Format Directives + +3.2.3.4 Formatting Flags +........................ + +The `%m' and `%d' directives support the `#', `0' and `+' flags, but +the other directives do not, even if they print numbers. Numeric +directives that do not support these flags include + + `G', `U', `b', `D', `k' and `n'. + + All fields support the format flag `-', which makes fields +left-aligned. That is, if the field width is greater than the actual +contents of the field, the requisite number of spaces are printed after +the field content instead of before it. + + +File: find.info, Node: Run Commands, Next: Delete Files, Prev: Print File Information, Up: Actions + +3.3 Run Commands +================ + +You can use the list of file names created by `find' or `locate' as +arguments to other commands. In this way you can perform arbitrary +actions on the files. + +* Menu: + +* Single File:: +* Multiple Files:: +* Querying:: + + +File: find.info, Node: Single File, Next: Multiple Files, Up: Run Commands + +3.3.1 Single File +----------------- + +Here is how to run a command on one file at a time. + + -- Action: -execdir command ; + Execute COMMAND; true if zero status is returned. `find' takes + all arguments after `-exec' to be part of the command until an + argument consisting of `;' is reached. It replaces the string + `{}' by the current file name being processed everywhere it occurs + in the command. Both of these constructions need to be escaped + (with a `\') or quoted to protect them from expansion by the + shell. The command is executed in the directory in which `find' + was run. + + For example, to compare each C header file in or below the current + directory with the file `/tmp/master': + + find . -name '*.h' -execdir diff -u '{}' /tmp/master ';' + + If you use `-execdir', you must ensure that the current directory is +not on $PATH, because otherwise an attacker could make `find' run +commands of their choice simply by leaving a suitably-named file in the +right directory. GNU find will refuse to run if you use `-execdir' and +the current directory is in $PATH. + + Another similar option, `-exec' is supported, but is less secure. +*Note Security Considerations::, for a discussion of the security +problems surrounding `-exec'. + + -- Action: -exec command ; + This insecure variant of the `-execdir' action is specified by + POSIX. The main difference is that the command is executed in the + directory from which `find' was invoked, meaning that `{}' is + expanded to a relative path starting with the name of one of the + starting directories, rather than just the basename of the matched + file. + + While some implementations of `find' replace the `{}' only where + it appears on its own in an argument, GNU `find' replaces `{}' + wherever it appears. + + +File: find.info, Node: Multiple Files, Next: Querying, Prev: Single File, Up: Run Commands + +3.3.2 Multiple Files +-------------------- + +Sometimes you need to process files one at a time. But usually this is +not necessary, and, it is faster to run a command on as many files as +possible at a time, rather than once per file. Doing this saves on the +time it takes to start up the command each time. + + The `-execdir' and `-exec' actions have variants that build command +lines containing as many matched files as possible. + + -- Action: -execdir command {} + + This works as for `-execdir command ;', except that the `{}' at + the end of the command is expanded to a list of names of matching + files. This expansion is done in such a way as to avoid exceeding + the maximum command line length available on the system. Only one + `{}' is allowed within the command, and it must appear at the end, + immediately before the `+'. A `+' appearing in any position other + than immediately after `{}' is not considered to be special (that + is, it does not terminate the command). + + -- Action: -exec command {} + + This insecure variant of the `-execdir' action is specified by + POSIX. The main difference is that the command is executed in the + directory from which `find' was invoked, meaning that `{}' is + expanded to a relative path starting with the name of one of the + starting directories, rather than just the basename of the matched + file. + + Before `find' exits, any partially-built command lines are executed. +This happens even if the exit was caused by the `-quit' action. +However, some types of error (for example not being able to invoke +`stat()' on the current directory) can cause an immediate fatal exit. +In this situation, any partially-built command lines will not be +invoked (this prevents possible infinite loops). + + At first sight, it looks like the list of filenames to be processed +can only be at the end of the command line, and that this might be a +problem for some comamnds (`cp' and `rsync' for example). + + However, there is a slightly obscure but powerful workarouund for +this problem which takes advantage of the behaviour of `sh -c':- + + find startpoint -tests ... -exec sh -c 'scp "$@" remote:/dest' sh {} + + + In the example above, the filenames we want to work on need to occur +on the `scp' command line before the name of the destination. We use +the shell to invoke the command `scp "$@" remote:/dest' and the shell +expands `"$@"' to the list of filenames we want to process. + + Another, but less secure, way to run a command on more than one file +at once, is to use the `xargs' command, which is invoked like this: + + xargs [OPTION...] [COMMAND [INITIAL-ARGUMENTS]] + + `xargs' normally reads arguments from the standard input. These +arguments are delimited by blanks (which can be protected with double +or single quotes or a backslash) or newlines. It executes the COMMAND +(default is `/bin/echo') one or more times with any INITIAL-ARGUMENTS +followed by arguments read from standard input. Blank lines on the +standard input are ignored. If the `-L' option is in use, trailing +blanks indicate that `xargs' should consider the following line to be +part of this one. + + Instead of blank-delimited names, it is safer to use `find -print0' +or `find -fprint0' and process the output by giving the `-0' or +`--null' option to GNU `xargs', GNU `tar', GNU `cpio', or `perl'. The +`locate' command also has a `-0' or `--null' option which does the same +thing. + + You can use shell command substitution (backquotes) to process a list +of arguments, like this: + + grep -l sprintf `find $HOME -name '*.c' -print` + + However, that method produces an error if the length of the `.c' +file names exceeds the operating system's command line length limit. +`xargs' avoids that problem by running the command as many times as +necessary without exceeding the limit: + + find $HOME -name '*.c' -print | xargs grep -l sprintf + + However, if the command needs to have its standard input be a +terminal (`less', for example), you have to use the shell command +substitution method or use the `--arg-file' option of `xargs'. + + The `xargs' command will process all its input, building command +lines and executing them, unless one of the commands exits with a +status of 255 (this will cause xargs to issue an error message and +stop) or it reads a line contains the end of file string specified with +the `--eof' option. + +* Menu: + +* Unsafe File Name Handling:: +* Safe File Name Handling:: +* Unusual Characters in File Names:: +* Limiting Command Size:: +* Interspersing File Names:: + + +File: find.info, Node: Unsafe File Name Handling, Next: Safe File Name Handling, Up: Multiple Files + +3.3.2.1 Unsafe File Name Handling +................................. + +Because file names can contain quotes, backslashes, blank characters, +and even newlines, it is not safe to process them using `xargs' in its +default mode of operation. But since most files' names do not contain +blanks, this problem occurs only infrequently. If you are only +searching through files that you know have safe names, then you need +not be concerned about it. + + Error messages issued by `find' and `locate' quote unusual +characters in file names in order to prevent unwanted changes in the +terminal's state. + + In many applications, if `xargs' botches processing a file because +its name contains special characters, some data might be lost. The +importance of this problem depends on the importance of the data and +whether anyone notices the loss soon enough to correct it. However, +here is an extreme example of the problems that using blank-delimited +names can cause. If the following command is run daily from `cron', +then any user can remove any file on the system: + + find / -name '#*' -atime +7 -print | xargs rm + + For example, you could do something like this: + + eg$ echo > '# + vmunix' + +and then `cron' would delete `/vmunix', if it ran `xargs' with `/' as +its current directory. + + To delete other files, for example `/u/joeuser/.plan', you could do +this: + + eg$ mkdir '# + ' + eg$ cd '# + ' + eg$ mkdir u u/joeuser u/joeuser/.plan' + ' + eg$ echo > u/joeuser/.plan' + /#foo' + eg$ cd .. + eg$ find . -name '#*' -print | xargs echo + ./# ./# /u/joeuser/.plan /#foo + + +File: find.info, Node: Safe File Name Handling, Next: Unusual Characters in File Names, Prev: Unsafe File Name Handling, Up: Multiple Files + +3.3.2.2 Safe File Name Handling +............................... + +Here is how to make `find' output file names so that they can be used +by other programs without being mangled or misinterpreted. You can +process file names generated this way by giving the `-0' or `--null' +option to GNU `xargs', GNU `tar', GNU `cpio', or `perl'. + + -- Action: -print0 + True; print the entire file name on the standard output, followed + by a null character. + + -- Action: -fprint0 file + True; like `-print0' but write to FILE like `-fprint' (*note Print + File Name::). The output file is always created. + + As of findutils version 4.2.4, the `locate' program also has a +`--null' option which does the same thing. For similarity with +`xargs', the short form of the option `-0' can also be used. + + If you want to be able to handle file names safely but need to run +commands which want to be connected to a terminal on their input, you +can use the `--arg-file' option to `xargs' like this: + + find / -name xyzzy -print0 > list + xargs --null --arg-file=list munge + + The example above runs the `munge' program on all the files named +`xyzzy' that we can find, but `munge''s input will still be the +terminal (or whatever the shell was using as standard input). If your +shell has the "process substitution" feature `<(...)', you can do this +in just one step: + + xargs --null --arg-file=<(find / -name xyzzy -print0) munge + + +File: find.info, Node: Unusual Characters in File Names, Next: Limiting Command Size, Prev: Safe File Name Handling, Up: Multiple Files + +3.3.2.3 Unusual Characters in File Names +........................................ + +As discussed above, you often need to be careful about how the names of +files are handled by `find' and other programs. If the output of +`find' is not going to another program but instead is being shown on a +terminal, this can still be a problem. For example, some character +sequences can reprogram the function keys on some terminals. *Note +Security Considerations::, for a discussion of other security problems +relating to `find'. + + Unusual characters are handled differently by various actions, as +described below. + +`-print0' +`-fprint0' + Always print the exact file name, unchanged, even if the output is + going to a terminal. + +`-ok' +`-okdir' + Always print the exact file name, unchanged. This will probably + change in a future release. + +`-ls' +`-fls' + Unusual characters are always escaped. White space, backslash, and + double quote characters are printed using C-style escaping (for + example `\f', `\"'). Other unusual characters are printed using + an octal escape. Other printable characters (for `-ls' and `-fls' + these are the characters between octal 041 and 0176) are printed + as-is. + +`-printf' +`-fprintf' + If the output is not going to a terminal, it is printed as-is. + Otherwise, the result depends on which directive is in use: + + %D, %F, %H, %Y, %y + These expand to values which are not under control of files' + owners, and so are printed as-is. + + %a, %b, %c, %d, %g, %G, %i, %k, %m, %M, %n, %s, %t, %u, %U + These have values which are under the control of files' + owners but which cannot be used to send arbitrary data to the + terminal, and so these are printed as-is. + + %f, %h, %l, %p, %P + The output of these directives is quoted if the output is + going to a terminal. + + This quoting is performed in the same way as for GNU `ls'. + This is not the same quoting mechanism as the one used for + `-ls' and `fls'. If you are able to decide what format to + use for the output of `find' then it is normally better to + use `\0' as a terminator than to use newline, as file names + can contain white space and newline characters. + +`-print' +`-fprint' + Quoting is handled in the same way as for the `%p' directive of + `-printf' and `-fprintf'. If you are using `find' in a script or + in a situation where the matched files might have arbitrary names, + you should consider using `-print0' instead of `-print'. + + The `locate' program quotes and escapes unusual characters in file +names in the same way as `find''s `-print' action. + + The behaviours described above may change soon, as the treatment of +unprintable characters is harmonised for `-ls', `-fls', `-print', +`-fprint', `-printf' and `-fprintf'. + + +File: find.info, Node: Limiting Command Size, Next: Interspersing File Names, Prev: Unusual Characters in File Names, Up: Multiple Files + +3.3.2.4 Limiting Command Size +............................. + +`xargs' gives you control over how many arguments it passes to the +command each time it executes it. By default, it uses up to `ARG_MAX' +- 2k, or 128k, whichever is smaller, characters per command. It uses +as many lines and arguments as fit within that limit. The following +options modify those values. + +`--no-run-if-empty' +`-r' + If the standard input does not contain any nonblanks, do not run + the command. By default, the command is run once even if there is + no input. This option is a GNU extension. + +`--max-lines[=MAX-LINES]' +`-L MAX-LINES' +`-l[MAX-LINES]' + Use at most MAX-LINES nonblank input lines per command line; + MAX-LINES defaults to 1 if omitted; omitting the argument is not + allowed in the case of the `-L' option. Trailing blanks cause an + input line to be logically continued on the next input line, for + the purpose of counting the lines. Implies `-x'. The preferred + name for this option is `-L' as this is specified by POSIX. + +`--max-args=MAX-ARGS' +`-n MAX-ARGS' + Use at most MAX-ARGS arguments per command line. Fewer than + MAX-ARGS arguments will be used if the size (see the `-s' option) + is exceeded, unless the `-x' option is given, in which case + `xargs' will exit. + +`--max-chars=MAX-CHARS' +`-s MAX-CHARS' + Use at most MAX-CHARS characters per command line, including the + command initial arguments and the terminating nulls at the ends of + the argument strings. If you specify a value for this option + which is too large or small, a warning message is printed and the + appropriate upper or lower limit is used instead. You can use + `--show-limits' option to understand the command-line limits + applying to `xargs' and how this is affected by any other options. + The POSIX limits shown when you do this have already been + adjusted to take into account the size of your environment + variables. + + The largest allowed value is system-dependent, and is calculated as + the argument length limit for exec, less the size of your + environment, less 2048 bytes of headroom. If this value is more + than 128KiB, 128Kib is used as the default value; otherwise, the + default value is the maximum. + +`--max-procs=MAX-PROCS' +`-P MAX-PROCS' + Run up to MAX-PROCS processes at a time; the default is 1. If + MAX-PROCS is 0, `xargs' will run as many processes as possible at + a time. Use the `-n', `-s', or `-L' option with `-P'; otherwise + chances are that the command will be run only once. + + +File: find.info, Node: Interspersing File Names, Prev: Limiting Command Size, Up: Multiple Files + +3.3.2.5 Interspersing File Names +................................ + +`xargs' can insert the name of the file it is processing between +arguments you give for the command. Unless you also give options to +limit the command size (*note Limiting Command Size::), this mode of +operation is equivalent to `find -exec' (*note Single File::). + +`--replace[=REPLACE-STR]' +`-I REPLACE-STR' +`-i REPLACE-STR' + Replace occurrences of REPLACE-STR in the initial arguments with + names read from the input. Also, unquoted blanks do not terminate + arguments; instead, the input is split at newlines only. For the + `-i' option, if REPLACE-STR is omitted for `--replace' or `-i', it + defaults to `{}' (like for `find -exec'). Implies `-x' and `-l + 1'. `-i' is deprecated in favour of `-I'. As an example, to sort + each file in the `bills' directory, leaving the output in that + file name with `.sorted' appended, you could do: + + find bills -type f | xargs -I XX sort -o XX.sorted XX + + The equivalent command using `find -execdir' is: + + find bills -type f -execdir sort -o '{}.sorted' '{}' ';' + + When you use the `-I' option, each line read from the input is +buffered internally. This means that there is an upper limit on the +length of input line that xargs will accept when used with the `-I' +option. To work around this limitation, you can use the `-s' option to +increase the amount of buffer space that xargs uses, and you can also +use an extra invocation of xargs to ensure that very long lines do not +occur. For example: + + somecommand | xargs -s 50000 echo | xargs -I '{}' -s 100000 rm '{}' + + Here, the first invocation of `xargs' has no input line length limit +because it doesn't use the `-I' option. The second invocation of +`xargs' does have such a limit, but we have ensured that the it never +encounters a line which is longer than it can handle. + + This is not an ideal solution. Instead, the `-I' option should not +impose a line length limit (apart from any limit imposed by the +operating system) and so one might consider this limitation to be a +bug. A better solution would be to allow `xargs -I' to automatically +move to a larger value for the `-s' option when this is needed. + + This sort of problem doesn't occur with the output of `find' because +it emits just one filename per line. + + +File: find.info, Node: Querying, Prev: Multiple Files, Up: Run Commands + +3.3.3 Querying +-------------- + +To ask the user whether to execute a command on a single file, you can +use the `find' primary `-okdir' instead of `-execdir', and the `find' +primary `-ok' instead of `-exec': + + -- Action: -okdir command ; + Like `-execdir' (*note Single File::), but ask the user first (on + the standard input); if the response does not start with `y' or + `Y', do not run the command, and return false. If the command is + run, its standard input is redirected from `/dev/null'. + + -- Action: -ok command ; + This insecure variant of the `-okdir' action is specified by + POSIX. The main difference is that the command is executed in the + directory from which `find' was invoked, meaning that `{}' is + expanded to a relative path starting with the name of one of the + starting directories, rather than just the basename of the matched + file. If the command is run, its standard input is redirected from + `/dev/null'. + + When processing multiple files with a single command, to query the +user you give `xargs' the following option. When using this option, +you might find it useful to control the number of files processed per +invocation of the command (*note Limiting Command Size::). + +`--interactive' +`-p' + Prompt the user about whether to run each command line and read a + line from the terminal. Only run the command line if the response + starts with `y' or `Y'. Implies `-t'. + + +File: find.info, Node: Delete Files, Next: Adding Tests, Prev: Run Commands, Up: Actions + +3.4 Delete Files +================ + + -- Action: -delete + Delete files or directories; true if removal succeeded. If the + removal failed, an error message is issued. + + The use of the `-delete' action on the command line automatically + turns on the `-depth' option (*note find Expressions::). + + +File: find.info, Node: Adding Tests, Prev: Delete Files, Up: Actions + +3.5 Adding Tests +================ + +You can test for file attributes that none of the `find' builtin tests +check. To do this, use `xargs' to run a program that filters a list of +files printed by `find'. If possible, use `find' builtin tests to pare +down the list, so the program run by `xargs' has less work to do. The +tests builtin to `find' will likely run faster than tests that other +programs perform. + + For reasons of efficiency it is often useful to limit the number of +times an external program has to be run. For this reason, it is often +a good idea to implement "extended" tests by using `xargs'. + + For example, here is a way to print the names of all of the +unstripped binaries in the `/usr/local' directory tree. Builtin tests +avoid running `file' on files that are not regular files or are not +executable. + + find /usr/local -type f -perm /a=x | xargs file | + grep 'not stripped' | cut -d: -f1 + +The `cut' program removes everything after the file name from the +output of `file'. + + However, using `xargs' can present important security problems +(*note Security Considerations::). These can be avoided by using +`-execdir'. The `-execdir' action is also a useful way of putting your +own test in the middle of a set of other tests or actions for `find' +(for example, you might want to use `-prune'). + + To place a special test somewhere in the middle of a `find' +expression, you can use `-execdir' (or, less securely, `-exec') to run +a program that performs the test. Because `-execdir' evaluates to the +exit status of the executed program, you can use a program (which can +be a shell script) that tests for a special attribute and make it exit +with a true (zero) or false (non-zero) status. It is a good idea to +place such a special test _after_ the builtin tests, because it starts +a new process which could be avoided if a builtin test evaluates to +false. + + Here is a shell script called `unstripped' that checks whether its +argument is an unstripped binary file: + + #! /bin/sh + file "$1" | grep -q "not stripped" + + This script relies on the shell exiting with the status of the last +command in the pipeline, in this case `grep'. The `grep' command exits +with a true status if it found any matches, false if not. Here is an +example of using the script (assuming it is in your search path). It +lists the stripped executables (and shell scripts) in the file `sbins' +and the unstripped ones in `ubins'. + + find /usr/local -type f -perm /a=x \ + \( -execdir unstripped '{}' \; -fprint ubins -o -fprint sbins \) + + +File: find.info, Node: Databases, Next: File Permissions, Prev: Actions, Up: Top + +4 File Name Databases +********************* + +The file name databases used by `locate' contain lists of files that +were in particular directory trees when the databases were last +updated. The file name of the default database is determined when +`locate' and `updatedb' are configured and installed. The frequency +with which the databases are updated and the directories for which they +contain entries depend on how often `updatedb' is run, and with which +arguments. + + You can obtain some statistics about the databases by using `locate +--statistics'. + +* Menu: + +* Database Locations:: +* Database Formats:: +* Newline Handling:: + + +File: find.info, Node: Database Locations, Next: Database Formats, Up: Databases + +4.1 Database Locations +====================== + +There can be multiple file name databases. Users can select which +databases `locate' searches using the `LOCATE_PATH' environment +variable or a command line option. The system administrator can choose +the file name of the default database, the frequency with which the +databases are updated, and the directories for which they contain +entries. File name databases are updated by running the `updatedb' +program, typically nightly. + + In networked environments, it often makes sense to build a database +at the root of each filesystem, containing the entries for that +filesystem. `updatedb' is then run for each filesystem on the +fileserver where that filesystem is on a local disk, to prevent +thrashing the network. + + *Note Invoking updatedb::, for the description of the options to +`updatedb'. These options can be used to specify which directories are +indexed by each database file. + + The default location for the locate database depends on how findutils +is built, but the findutils installation accompanying this manual uses +the default location `/usr/local/var/locatedb'. + + If no database exists at `/usr/local/var/locatedb' but the user did +not specify where to look (by using `-d' or setting `LOCATE_PATH'), +then `locate' will also check for a "secure" database in +`/var/lib/slocate/slocate.db'. + + +File: find.info, Node: Database Formats, Next: Newline Handling, Prev: Database Locations, Up: Databases + +4.2 Database Formats +==================== + +The file name databases contain lists of files that were in particular +directory trees when the databases were last updated. The file name +database format changed starting with GNU `locate' version 4.0 to allow +machines with different byte orderings to share the databases. + + GNU `locate' can read both the old and new database formats. +However, old versions of `locate' (on other Unix systems, or GNU +`locate' before version 4.0) produce incorrect results if run against a +database in something other than the old format. + + Support for the old database format will eventually be discontinued, +first in `updatedb' and later in `locate'. + + If you run `locate --statistics', the resulting summary indicates +the type of each `locate' database. You select which database format +`updatedb' will use with the `--dbformat' option. + +* Menu: + +* LOCATE02 Database Format:: +* Sample LOCATE02 Database:: +* slocate Database Format:: +* Old Database Format:: + + +File: find.info, Node: LOCATE02 Database Format, Next: Sample LOCATE02 Database, Up: Database Formats + +4.2.1 LOCATE02 Database Format +------------------------------ + +`updatedb' runs a program called `frcode' to "front-compress" the list +of file names, which reduces the database size by a factor of 4 to 5. +Front-compression (also known as incremental encoding) works as follows. + + The database entries are a sorted list (case-insensitively, for +users' convenience). Since the list is sorted, each entry is likely to +share a prefix (initial string) with the previous entry. Each database +entry begins with an offset-differential count byte, which is the +additional number of characters of prefix of the preceding entry to use +beyond the number that the preceding entry is using of its predecessor. +(The counts can be negative.) Following the count is a +null-terminated ASCII remainder--the part of the name that follows the +shared prefix. + + If the offset-differential count is larger than can be stored in a +byte (+/-127), the byte has the value 0x80 and the count follows in a +2-byte word, with the high byte first (network byte order). + + Every database begins with a dummy entry for a file called +`LOCATE02', which `locate' checks for to ensure that the database file +has the correct format; it ignores the entry in doing the search. + + Databases cannot be concatenated together, even if the first (dummy) +entry is trimmed from all but the first database. This is because the +offset-differential count in the first entry of the second and +following databases will be wrong. + + In the output of `locate --statistics', the new database format is +referred to as `LOCATE02'. + + +File: find.info, Node: Sample LOCATE02 Database, Next: slocate Database Format, Prev: LOCATE02 Database Format, Up: Database Formats + +4.2.2 Sample LOCATE02 Database +------------------------------ + +Sample input to `frcode': + + /usr/src + /usr/src/cmd/aardvark.c + /usr/src/cmd/armadillo.c + /usr/tmp/zoo + + Length of the longest prefix of the preceding entry to share: + + 0 /usr/src + 8 /cmd/aardvark.c + 14 rmadillo.c + 5 tmp/zoo + + Output from `frcode', with trailing nulls changed to newlines and +count bytes made printable: + + 0 LOCATE02 + 0 /usr/src + 8 /cmd/aardvark.c + 6 rmadillo.c + -9 tmp/zoo + + (6 = 14 - 8, and -9 = 5 - 14) + + +File: find.info, Node: slocate Database Format, Next: Old Database Format, Prev: Sample LOCATE02 Database, Up: Database Formats + +4.2.3 slocate Database Format +----------------------------- + +The `slocate' program uses a database format similar to, but not quite +the same as, GNU `locate'. The first byte of the database specifies +its "security level". If the security level is 0, `slocate' will read, +match and print filenames on the basis of the information in the +database only. However, if the security level byte is 1, `slocate' +omits entries from its output if the invoking user is unable to access +them. The second byte of the database is zero. The second byte is +immediately followed by the first database entry. The first entry in +the database is not preceded by any differential count or dummy entry. +Instead the differential count for the first item is assumed to be zero. +.P Starting with the second entry (if any) in the database, data is +interpreted as for the GNU LOCATE02 format. + + +File: find.info, Node: Old Database Format, Prev: slocate Database Format, Up: Database Formats + +4.2.4 Old Database Format +------------------------- + +The old database format is used by Unix `locate' and `find' programs +and earlier releases of the GNU ones. `updatedb' produces this format +if given the `--old-format' option. + + `updatedb' runs programs called `bigram' and `code' to produce +old-format databases. The old format differs from the new one in the +following ways. Instead of each entry starting with an +offset-differential count byte and ending with a null, byte values from +0 through 28 indicate offset-differential counts from -14 through 14. +The byte value indicating that a long offset-differential count follows +is 0x1e (30), not 0x80. The long counts are stored in host byte order, +which is not necessarily network byte order, and host integer word +size, which is usually 4 bytes. They also represent a count 14 less +than their value. The database lines have no termination byte; the +start of the next line is indicated by its first byte having a value <= +30. + + In addition, instead of starting with a dummy entry, the old database +format starts with a 256 byte table containing the 128 most common +bigrams in the file list. A bigram is a pair of adjacent bytes. Bytes +in the database that have the high bit set are indexes (with the high +bit cleared) into the bigram table. The bigram and offset-differential +count coding makes these databases 20-25% smaller than the new format, +but makes them not 8-bit clean. Any byte in a file name that is in the +ranges used for the special codes is replaced in the database by a +question mark, which not coincidentally is the shell wildcard to match +a single character. + + The old format therefore cannot faithfully store entries with +non-ASCII characters. It therefore should not be used in +internationalised environments. That is, most installations should not +use it. + + Because the long counts are stored by the `code' program as +native-order machine words, the database format is not eaily used in +environments which differ in terms of byte order. If locate databases +are to be shared between machines, the LOCATE02 database format should +be used. This has other benefits as discussed above. However, the +length of the filename currently being processed can normally be used +to place reasonable limits on the long counts and so this information +is used by locate to help it guess the byte ordering of the old format +database. Unless it finds evidence to the contrary, `locate' will +assume that the byte order of the database is the same as the native +byte order of the machine running `locate'. The output of `locate +--statistics' also includes information about the byte order of +old-format databases. + + The output of `locate --statistics' will give an incorrect count of +the number of file names containing newlines or high-bit characters for +old-format databases. + + Old versions of GNU `locate' fail to correctly handle very long file +names, possibly leading to security problems relating to a heap buffer +overrun. *Note Security Considerations for locate::, for a detailed +explanation. + + +File: find.info, Node: Newline Handling, Prev: Database Formats, Up: Databases + +4.3 Newline Handling +==================== + +Within the database, file names are terminated with a null character. +This is the case for both the old and the new format. + + When the new database format is being used, the compression technique +used to generate the database though relies on the ability to sort the +list of files before they are presented to `frcode'. + + If the system's sort command allows its input list of files to be +separated with null characters via the `-z' option, this option is used +and therefore `updatedb' and `locate' will both correctly handle file +names containing newlines. If the `sort' command lacks support for +this, the list of files is delimited with the newline character, +meaning that parts of file names containing newlines will be +incorrectly sorted. This can result in both incorrect matches and +incorrect failures to match. + + On the other hand, if you are using the old database format, file +names with embedded newlines are not correctly handled. There is no +technical limitation which enforces this, it's just that the `bigram' +program has not been updated to support lists of file names separated +by nulls. + + So, if you are using the new database format (this is the default) +and your system uses GNU `sort', newlines will be correctly handled at +all times. Otherwise, newlines may not be correctly handled. + + +File: find.info, Node: File Permissions, Next: Date input formats, Prev: Databases, Up: Top + +5 File Permissions +****************** + +Each file has a set of "file mode bits" that control the kinds of +access that users have to that file. They can be represented either in +symbolic form or as an octal number. + +* Menu: + +* Mode Structure:: Structure of file mode bits. +* Symbolic Modes:: Mnemonic representation of file mode bits. +* Numeric Modes:: File mode bits as octal numbers. +* Directory Setuid and Setgid:: Set-user-ID and set-group-ID on directories. + + +File: find.info, Node: Mode Structure, Next: Symbolic Modes, Up: File Permissions + +5.1 Structure of File Mode Bits +=============================== + +The file mode bits have two parts: the "file permission bits", which +control ordinary access to the file, and "special mode bits", which +affect only some files. + + There are three kinds of permissions that a user can have for a file: + + 1. permission to read the file. For directories, this means + permission to list the contents of the directory. + + 2. permission to write to (change) the file. For directories, this + means permission to create and remove files in the directory. + + 3. permission to execute the file (run it as a program). For + directories, this means permission to access files in the + directory. + + There are three categories of users who may have different +permissions to perform any of the above operations on a file: + + 1. the file's owner; + + 2. other users who are in the file's group; + + 3. everyone else. + + Files are given an owner and group when they are created. Usually +the owner is the current user and the group is the group of the +directory the file is in, but this varies with the operating system, the +file system the file is created on, and the way the file is created. +You can change the owner and group of a file by using the `chown' and +`chgrp' commands. + + In addition to the three sets of three permissions listed above, the +file mode bits have three special components, which affect only +executable files (programs) and, on most systems, directories: + + 1. Set the process's effective user ID to that of the file upon + execution (called the "set-user-ID bit", or sometimes the "setgid + bit"). For directories on a few systems, give files created in + the directory the same owner as the directory, no matter who + creates them, and set the set-user-ID bit of newly-created + subdirectories. + + 2. Set the process's effective group ID to that of the file upon + execution (called the "set-group-ID bit", or sometimes the "setgid + bit"). For directories on most systems, give files created in the + directory the same group as the directory, no matter what group + the user who creates them is in, and set the set-group-ID bit of + newly-created subdirectories. + + 3. Prevent unprivileged users from removing or renaming a file in a + directory unless they own the file or the directory; this is + called the "restricted deletion flag" for the directory, and is + commonly found on world-writable directories like `/tmp'. + + For regular files on some older systems, save the program's text + image on the swap device so it will load more quickly when run; + this is called the "sticky bit". + + In addition to the file mode bits listed above, there may be file +attributes specific to the file system, e.g., access control lists +(ACLs), whether a file is compressed, whether a file can be modified +(immutability), and whether a file can be dumped. These are usually +set using programs specific to the file system. For example: + +ext2 + On GNU and GNU/Linux the file attributes specific to the ext2 file + system are set using `chattr'. + +FFS + On FreeBSD the file flags specific to the FFS file system are set + using `chflags'. + + Even if a file's mode bits allow an operation on that file, that +operation may still fail, because: + + * the file-system-specific attributes or flags do not permit it; or + + * the file system is mounted as read-only. + + For example, if the immutable attribute is set on a file, it cannot +be modified, regardless of the fact that you may have just run `chmod +a+w FILE'. + + +File: find.info, Node: Symbolic Modes, Next: Numeric Modes, Prev: Mode Structure, Up: File Permissions + +5.2 Symbolic Modes +================== + +"Symbolic modes" represent changes to files' mode bits as operations on +single-character symbols. They allow you to modify either all or +selected parts of files' mode bits, optionally based on their previous +values, and perhaps on the current `umask' as well (*note Umask and +Protection::). + + The format of symbolic modes is: + + [ugoa...][+-=]PERMS...[,...] + +where PERMS is either zero or more letters from the set `rwxXst', or a +single letter from the set `ugo'. + + The following sections describe the operators and other details of +symbolic modes. + +* Menu: + +* Setting Permissions:: Basic operations on permissions. +* Copying Permissions:: Copying existing permissions. +* Changing Special Mode Bits:: Special mode bits. +* Conditional Executability:: Conditionally affecting executability. +* Multiple Changes:: Making multiple changes. +* Umask and Protection:: The effect of the umask. + + +File: find.info, Node: Setting Permissions, Next: Copying Permissions, Up: Symbolic Modes + +5.2.1 Setting Permissions +------------------------- + +The basic symbolic operations on a file's permissions are adding, +removing, and setting the permission that certain users have to read, +write, and execute or search the file. These operations have the +following format: + + USERS OPERATION PERMISSIONS + +The spaces between the three parts above are shown for readability only; +symbolic modes cannot contain spaces. + + The USERS part tells which users' access to the file is changed. It +consists of one or more of the following letters (or it can be empty; +*note Umask and Protection::, for a description of what happens then). +When more than one of these letters is given, the order that they are +in does not matter. + +`u' + the user who owns the file; + +`g' + other users who are in the file's group; + +`o' + all other users; + +`a' + all users; the same as `ugo'. + + The OPERATION part tells how to change the affected users' access to +the file, and is one of the following symbols: + +`+' + to add the PERMISSIONS to whatever permissions the USERS already + have for the file; + +`-' + to remove the PERMISSIONS from whatever permissions the USERS + already have for the file; + +`=' + to make the PERMISSIONS the only permissions that the USERS have + for the file. + + The PERMISSIONS part tells what kind of access to the file should be +changed; it is normally zero or more of the following letters. As with +the USERS part, the order does not matter when more than one letter is +given. Omitting the PERMISSIONS part is useful only with the `=' +operation, where it gives the specified USERS no access at all to the +file. + +`r' + the permission the USERS have to read the file; + +`w' + the permission the USERS have to write to the file; + +`x' + the permission the USERS have to execute the file, or search it if + it is a directory. + + For example, to give everyone permission to read and write a regular +file, but not to execute it, use: + + a=rw + + To remove write permission for all users other than the file's +owner, use: + + go-w + +The above command does not affect the access that the owner of the file +has to it, nor does it affect whether other users can read or execute +the file. + + To give everyone except a file's owner no permission to do anything +with that file, use the mode below. Other users could still remove the +file, if they have write permission on the directory it is in. + + go= + +Another way to specify the same thing is: + + og-rwx + + +File: find.info, Node: Copying Permissions, Next: Changing Special Mode Bits, Prev: Setting Permissions, Up: Symbolic Modes + +5.2.2 Copying Existing Permissions +---------------------------------- + +You can base a file's permissions on its existing permissions. To do +this, instead of using a series of `r', `w', or `x' letters after the +operator, you use the letter `u', `g', or `o'. For example, the mode + + o+g + +adds the permissions for users who are in a file's group to the +permissions that other users have for the file. Thus, if the file +started out as mode 664 (`rw-rw-r--'), the above mode would change it +to mode 666 (`rw-rw-rw-'). If the file had started out as mode 741 +(`rwxr----x'), the above mode would change it to mode 745 +(`rwxr--r-x'). The `-' and `=' operations work analogously. + + +File: find.info, Node: Changing Special Mode Bits, Next: Conditional Executability, Prev: Copying Permissions, Up: Symbolic Modes + +5.2.3 Changing Special Mode Bits +-------------------------------- + +In addition to changing a file's read, write, and execute/search +permissions, you can change its special mode bits. *Note Mode +Structure::, for a summary of these special mode bits. + + To change the file mode bits to set the user ID on execution, use +`u' in the USERS part of the symbolic mode and `s' in the PERMISSIONS +part. + + To change the file mode bits to set the group ID on execution, use +`g' in the USERS part of the symbolic mode and `s' in the PERMISSIONS +part. + + To set both user and group ID on execution, omit the USERS part of +the symbolic mode (or use `a') and use `s' in the PERMISSIONS part. + + To change the file mode bits to set the restricted deletion flag or +sticky bit, omit the USERS part of the symbolic mode (or use `a') and +use `t' in the PERMISSIONS part. + + For example, to set the set-user-ID mode bit of a program, you can +use the mode: + + u+s + + To remove both set-user-ID and set-group-ID mode bits from it, you +can use the mode: + + a-s + + To set the restricted deletion flag or sticky bit, you can use the +mode: + + +t + + The combination `o+s' has no effect. On GNU systems the +combinations `u+t' and `g+t' have no effect, and `o+t' acts like plain +`+t'. + + The `=' operator is not very useful with special mode bits. For +example, the mode: + + o=t + +does set the restricted deletion flag or sticky bit, but it also +removes all read, write, and execute/search permissions that users not +in the file's group might have had for it. + + *Note Directory Setuid and Setgid::, for additional rules concerning +set-user-ID and set-group-ID bits and directories. + + +File: find.info, Node: Conditional Executability, Next: Multiple Changes, Prev: Changing Special Mode Bits, Up: Symbolic Modes + +5.2.4 Conditional Executability +------------------------------- + +There is one more special type of symbolic permission: if you use `X' +instead of `x', execute/search permission is affected only if the file +is a directory or already had execute permission. + + For example, this mode: + + a+X + +gives all users permission to search directories, or to execute files if +anyone could execute them before. + + +File: find.info, Node: Multiple Changes, Next: Umask and Protection, Prev: Conditional Executability, Up: Symbolic Modes + +5.2.5 Making Multiple Changes +----------------------------- + +The format of symbolic modes is actually more complex than described +above (*note Setting Permissions::). It provides two ways to make +multiple changes to files' mode bits. + + The first way is to specify multiple OPERATION and PERMISSIONS parts +after a USERS part in the symbolic mode. + + For example, the mode: + + og+rX-w + +gives users other than the owner of the file read permission and, if it +is a directory or if someone already had execute permission to it, +gives them execute/search permission; and it also denies them write +permission to the file. It does not affect the permission that the +owner of the file has for it. The above mode is equivalent to the two +modes: + + og+rX + og-w + + The second way to make multiple changes is to specify more than one +simple symbolic mode, separated by commas. For example, the mode: + + a+r,go-w + +gives everyone permission to read the file and removes write permission +on it for all users except its owner. Another example: + + u=rwx,g=rx,o= + +sets all of the permission bits for the file explicitly. (It gives +users who are not in the file's group no permission at all for it.) + + The two methods can be combined. The mode: + + a+r,g+x-w + +gives all users permission to read the file, and gives users who are in +the file's group permission to execute/search it as well, but not +permission to write to it. The above mode could be written in several +different ways; another is: + + u+r,g+rx,o+r,g-w + + +File: find.info, Node: Umask and Protection, Prev: Multiple Changes, Up: Symbolic Modes + +5.2.6 The Umask and Protection +------------------------------ + +If the USERS part of a symbolic mode is omitted, it defaults to `a' +(affect all users), except that any permissions that are _set_ in the +system variable `umask' are _not affected_. The value of `umask' can +be set using the `umask' command. Its default value varies from system +to system. + + Omitting the USERS part of a symbolic mode is generally not useful +with operations other than `+'. It is useful with `+' because it +allows you to use `umask' as an easily customizable protection against +giving away more permission to files than you intended to. + + As an example, if `umask' has the value 2, which removes write +permission for users who are not in the file's group, then the mode: + + +w + +adds permission to write to the file to its owner and to other users who +are in the file's group, but _not_ to other users. In contrast, the +mode: + + a+w + +ignores `umask', and _does_ give write permission for the file to all +users. + + +File: find.info, Node: Numeric Modes, Next: Directory Setuid and Setgid, Prev: Symbolic Modes, Up: File Permissions + +5.3 Numeric Modes +================= + +As an alternative to giving a symbolic mode, you can give an octal +(base 8) number that represents the mode. This number is always +interpreted in octal; you do not have to add a leading `0', as you do +in C. Mode `0055' is the same as mode `55'. + + A numeric mode is usually shorter than the corresponding symbolic +mode, but it is limited in that normally it cannot take into account the +previous file mode bits; it can only set them absolutely. (As +discussed in the next section, the set-user-ID and set-group-ID bits of +directories are an exception to this general limitation.) + + The permissions granted to the user, to other users in the file's +group, and to other users not in the file's group each require three +bits, which are represented as one octal digit. The three special mode +bits also require one bit each, and they are as a group represented as +another octal digit. Here is how the bits are arranged, starting with +the lowest valued bit: + + Value in Corresponding + Mode Mode Bit + + Other users not in the file's group: + 1 Execute/search + 2 Write + 4 Read + + Other users in the file's group: + 10 Execute/search + 20 Write + 40 Read + + The file's owner: + 100 Execute/search + 200 Write + 400 Read + + Special mode bits: + 1000 Restricted deletion flag or sticky bit + 2000 Set group ID on execution + 4000 Set user ID on execution + + For example, numeric mode `4755' corresponds to symbolic mode +`u=rwxs,go=rx', and numeric mode `664' corresponds to symbolic mode +`ug=rw,o=r'. Numeric mode `0' corresponds to symbolic mode `a='. + + +File: find.info, Node: Directory Setuid and Setgid, Prev: Numeric Modes, Up: File Permissions + +5.4 Directories and the Set-User-ID and Set-Group-ID Bits +========================================================= + +On most systems, if a directory's set-group-ID bit is set, newly +created subfiles inherit the same group as the directory, and newly +created subdirectories inherit the set-group-ID bit of the parent +directory. On a few systems, a directory's set-user-ID bit has a +similar effect on the ownership of new subfiles and the set-user-ID +bits of new subdirectories. These mechanisms let users share files +more easily, by lessening the need to use `chmod' or `chown' to share +new files. + + These convenience mechanisms rely on the set-user-ID and set-group-ID +bits of directories. If commands like `chmod' and `mkdir' routinely +cleared these bits on directories, the mechanisms would be less +convenient and it would be harder to share files. Therefore, a command +like `chmod' does not affect the set-user-ID or set-group-ID bits of a +directory unless the user specifically mentions them in a symbolic +mode, or sets them in a numeric mode. For example, on systems that +support set-group-ID inheritance: + + # These commands leave the set-user-ID and + # set-group-ID bits of the subdirectories alone, + # so that they retain their default values. + mkdir A B C + chmod 755 A + chmod 0755 B + chmod u=rwx,go=rx C + mkdir -m 755 D + mkdir -m 0755 E + mkdir -m u=rwx,go=rx F + + If you want to try to set these bits, you must mention them +explicitly in the symbolic or numeric modes, e.g.: + + # These commands try to set the set-user-ID + # and set-group-ID bits of the subdirectories. + mkdir G H + chmod 6755 G + chmod u=rwx,go=rx,a+s H + mkdir -m 6755 I + mkdir -m u=rwx,go=rx,a+s J + + If you want to try to clear these bits, you must mention them +explicitly in a symbolic mode, e.g.: + + # This command tries to clear the set-user-ID + # and set-group-ID bits of the directory D. + chmod a-s D + + This behavior is a GNU extension. Portable scripts should not rely +on requests to set or clear these bits on directories, as POSIX allows +implementations to ignore these requests. + + +File: find.info, Node: Date input formats, Next: Reference, Prev: File Permissions, Up: Top + +6 Date input formats +******************** + +First, a quote: + + Our units of temporal measurement, from seconds on up to months, + are so complicated, asymmetrical and disjunctive so as to make + coherent mental reckoning in time all but impossible. Indeed, had + some tyrannical god contrived to enslave our minds to time, to + make it all but impossible for us to escape subjection to sodden + routines and unpleasant surprises, he could hardly have done + better than handing down our present system. It is like a set of + trapezoidal building blocks, with no vertical or horizontal + surfaces, like a language in which the simplest thought demands + ornate constructions, useless particles and lengthy + circumlocutions. Unlike the more successful patterns of language + and science, which enable us to face experience boldly or at least + level-headedly, our system of temporal calculation silently and + persistently encourages our terror of time. + + ... It is as though architects had to measure length in feet, + width in meters and height in ells; as though basic instruction + manuals demanded a knowledge of five different languages. It is + no wonder then that we often look into our own immediate past or + future, last Tuesday or a week from Sunday, with feelings of + helpless confusion. ... + + -- Robert Grudin, `Time and the Art of Living'. + + This section describes the textual date representations that GNU +programs accept. These are the strings you, as a user, can supply as +arguments to the various programs. The C interface (via the `get_date' +function) is not described here. + +* Menu: + +* General date syntax:: Common rules. +* Calendar date items:: 19 Dec 1994. +* Time of day items:: 9:20pm. +* Time zone items:: EST, PDT, GMT. +* Day of week items:: Monday and others. +* Relative items in date strings:: next tuesday, 2 years ago. +* Pure numbers in date strings:: 19931219, 1440. +* Seconds since the Epoch:: @1078100502. +* Specifying time zone rules:: TZ="America/New_York", TZ="UTC0". +* Authors of get_date:: Bellovin, Eggert, Salz, Berets, et al. + + +File: find.info, Node: General date syntax, Next: Calendar date items, Up: Date input formats + +6.1 General date syntax +======================= + +A "date" is a string, possibly empty, containing many items separated +by whitespace. The whitespace may be omitted when no ambiguity arises. +The empty string means the beginning of today (i.e., midnight). Order +of the items is immaterial. A date string may contain many flavors of +items: + + * calendar date items + + * time of day items + + * time zone items + + * day of the week items + + * relative items + + * pure numbers. + +We describe each of these item types in turn, below. + + A few ordinal numbers may be written out in words in some contexts. +This is most useful for specifying day of the week items or relative +items (see below). Among the most commonly used ordinal numbers, the +word `last' stands for -1, `this' stands for 0, and `first' and `next' +both stand for 1. Because the word `second' stands for the unit of +time there is no way to write the ordinal number 2, but for convenience +`third' stands for 3, `fourth' for 4, `fifth' for 5, `sixth' for 6, +`seventh' for 7, `eighth' for 8, `ninth' for 9, `tenth' for 10, +`eleventh' for 11 and `twelfth' for 12. + + When a month is written this way, it is still considered to be +written numerically, instead of being "spelled in full"; this changes +the allowed strings. + + In the current implementation, only English is supported for words +and abbreviations like `AM', `DST', `EST', `first', `January', +`Sunday', `tomorrow', and `year'. + + The output of the `date' command is not always acceptable as a date +string, not only because of the language problem, but also because +there is no standard meaning for time zone items like `IST'. When using +`date' to generate a date string intended to be parsed later, specify a +date format that is independent of language and that does not use time +zone items other than `UTC' and `Z'. Here are some ways to do this: + + $ LC_ALL=C TZ=UTC0 date + Mon Mar 1 00:21:42 UTC 2004 + $ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ' + 2004-03-01 00:21:42Z + $ date --iso-8601=ns | tr T ' ' # --iso-8601 is a GNU extension. + 2004-02-29 16:21:42,692722128-0800 + $ date --rfc-2822 # a GNU extension + Sun, 29 Feb 2004 16:21:42 -0800 + $ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension. + 2004-02-29 16:21:42 -0800 + $ date +'@%s.%N' # %s and %N are GNU extensions. + @1078100502.692722128 + + Alphabetic case is completely ignored in dates. Comments may be +introduced between round parentheses, as long as included parentheses +are properly nested. Hyphens not followed by a digit are currently +ignored. Leading zeros on numbers are ignored. + + Invalid dates like `2005-02-29' or times like `24:00' are rejected. +In the typical case of a host that does not support leap seconds, a +time like `23:59:60' is rejected even if it corresponds to a valid leap +second. + + +File: find.info, Node: Calendar date items, Next: Time of day items, Prev: General date syntax, Up: Date input formats + +6.2 Calendar date items +======================= + +A "calendar date item" specifies a day of the year. It is specified +differently, depending on whether the month is specified numerically or +literally. All these strings specify the same calendar date: + + 1972-09-24 # ISO 8601. + 72-9-24 # Assume 19xx for 69 through 99, + # 20xx for 00 through 68. + 72-09-24 # Leading zeros are ignored. + 9/24/72 # Common U.S. writing. + 24 September 1972 + 24 Sept 72 # September has a special abbreviation. + 24 Sep 72 # Three-letter abbreviations always allowed. + Sep 24, 1972 + 24-sep-72 + 24sep72 + + The year can also be omitted. In this case, the last specified year +is used, or the current year if none. For example: + + 9/24 + sep 24 + + Here are the rules. + + For numeric months, the ISO 8601 format `YEAR-MONTH-DAY' is allowed, +where YEAR is any positive number, MONTH is a number between 01 and 12, +and DAY is a number between 01 and 31. A leading zero must be present +if a number is less than ten. If YEAR is 68 or smaller, then 2000 is +added to it; otherwise, if YEAR is less than 100, then 1900 is added to +it. The construct `MONTH/DAY/YEAR', popular in the United States, is +accepted. Also `MONTH/DAY', omitting the year. + + Literal months may be spelled out in full: `January', `February', +`March', `April', `May', `June', `July', `August', `September', +`October', `November' or `December'. Literal months may be abbreviated +to their first three letters, possibly followed by an abbreviating dot. +It is also permitted to write `Sept' instead of `September'. + + When months are written literally, the calendar date may be given as +any of the following: + + DAY MONTH YEAR + DAY MONTH + MONTH DAY YEAR + DAY-MONTH-YEAR + + Or, omitting the year: + + MONTH DAY + + +File: find.info, Node: Time of day items, Next: Time zone items, Prev: Calendar date items, Up: Date input formats + +6.3 Time of day items +===================== + +A "time of day item" in date strings specifies the time on a given day. +Here are some examples, all of which represent the same time: + + 20:02:00.000000 + 20:02 + 8:02pm + 20:02-0500 # In EST (U.S. Eastern Standard Time). + + More generally, the time of day may be given as +`HOUR:MINUTE:SECOND', where HOUR is a number between 0 and 23, MINUTE +is a number between 0 and 59, and SECOND is a number between 0 and 59 +possibly followed by `.' or `,' and a fraction containing one or more +digits. Alternatively, `:SECOND' can be omitted, in which case it is +taken to be zero. On the rare hosts that support leap seconds, SECOND +may be 60. + + If the time is followed by `am' or `pm' (or `a.m.' or `p.m.'), HOUR +is restricted to run from 1 to 12, and `:MINUTE' may be omitted (taken +to be zero). `am' indicates the first half of the day, `pm' indicates +the second half of the day. In this notation, 12 is the predecessor of +1: midnight is `12am' while noon is `12pm'. (This is the zero-oriented +interpretation of `12am' and `12pm', as opposed to the old tradition +derived from Latin which uses `12m' for noon and `12pm' for midnight.) + + The time may alternatively be followed by a time zone correction, +expressed as `SHHMM', where S is `+' or `-', HH is a number of zone +hours and MM is a number of zone minutes. You can also separate HH +from MM with a colon. When a time zone correction is given this way, it +forces interpretation of the time relative to Coordinated Universal +Time (UTC), overriding any previous specification for the time zone or +the local time zone. For example, `+0530' and `+05:30' both stand for +the time zone 5.5 hours ahead of UTC (e.g., India). The MINUTE part of +the time of day may not be elided when a time zone correction is used. +This is the best way to specify a time zone correction by fractional +parts of an hour. + + Either `am'/`pm' or a time zone correction may be specified, but not +both. + + +File: find.info, Node: Time zone items, Next: Day of week items, Prev: Time of day items, Up: Date input formats + +6.4 Time zone items +=================== + +A "time zone item" specifies an international time zone, indicated by a +small set of letters, e.g., `UTC' or `Z' for Coordinated Universal +Time. Any included periods are ignored. By following a +non-daylight-saving time zone by the string `DST' in a separate word +(that is, separated by some white space), the corresponding daylight +saving time zone may be specified. Alternatively, a +non-daylight-saving time zone can be followed by a time zone +correction, to add the two values. This is normally done only for +`UTC'; for example, `UTC+05:30' is equivalent to `+05:30'. + + Time zone items other than `UTC' and `Z' are obsolescent and are not +recommended, because they are ambiguous; for example, `EST' has a +different meaning in Australia than in the United States. Instead, +it's better to use unambiguous numeric time zone corrections like +`-0500', as described in the previous section. + + If neither a time zone item nor a time zone correction is supplied, +time stamps are interpreted using the rules of the default time zone +(*note Specifying time zone rules::). + + +File: find.info, Node: Day of week items, Next: Relative items in date strings, Prev: Time zone items, Up: Date input formats + +6.5 Day of week items +===================== + +The explicit mention of a day of the week will forward the date (only +if necessary) to reach that day of the week in the future. + + Days of the week may be spelled out in full: `Sunday', `Monday', +`Tuesday', `Wednesday', `Thursday', `Friday' or `Saturday'. Days may +be abbreviated to their first three letters, optionally followed by a +period. The special abbreviations `Tues' for `Tuesday', `Wednes' for +`Wednesday' and `Thur' or `Thurs' for `Thursday' are also allowed. + + A number may precede a day of the week item to move forward +supplementary weeks. It is best used in expression like `third +monday'. In this context, `last DAY' or `next DAY' is also acceptable; +they move one week before or after the day that DAY by itself would +represent. + + A comma following a day of the week item is ignored. + + +File: find.info, Node: Relative items in date strings, Next: Pure numbers in date strings, Prev: Day of week items, Up: Date input formats + +6.6 Relative items in date strings +================================== + +"Relative items" adjust a date (or the current date if none) forward or +backward. The effects of relative items accumulate. Here are some +examples: + + 1 year + 1 year ago + 3 years + 2 days + + The unit of time displacement may be selected by the string `year' +or `month' for moving by whole years or months. These are fuzzy units, +as years and months are not all of equal duration. More precise units +are `fortnight' which is worth 14 days, `week' worth 7 days, `day' +worth 24 hours, `hour' worth 60 minutes, `minute' or `min' worth 60 +seconds, and `second' or `sec' worth one second. An `s' suffix on +these units is accepted and ignored. + + The unit of time may be preceded by a multiplier, given as an +optionally signed number. Unsigned numbers are taken as positively +signed. No number at all implies 1 for a multiplier. Following a +relative item by the string `ago' is equivalent to preceding the unit +by a multiplier with value -1. + + The string `tomorrow' is worth one day in the future (equivalent to +`day'), the string `yesterday' is worth one day in the past (equivalent +to `day ago'). + + The strings `now' or `today' are relative items corresponding to +zero-valued time displacement, these strings come from the fact a +zero-valued time displacement represents the current time when not +otherwise changed by previous items. They may be used to stress other +items, like in `12:00 today'. The string `this' also has the meaning +of a zero-valued time displacement, but is preferred in date strings +like `this thursday'. + + When a relative item causes the resulting date to cross a boundary +where the clocks were adjusted, typically for daylight saving time, the +resulting date and time are adjusted accordingly. + + The fuzz in units can cause problems with relative items. For +example, `2003-07-31 -1 month' might evaluate to 2003-07-01, because +2003-06-31 is an invalid date. To determine the previous month more +reliably, you can ask for the month before the 15th of the current +month. For example: + + $ date -R + Thu, 31 Jul 2003 13:02:39 -0700 + $ date --date='-1 month' +'Last month was %B?' + Last month was July? + $ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!' + Last month was June! + + Also, take care when manipulating dates around clock changes such as +daylight saving leaps. In a few cases these have added or subtracted +as much as 24 hours from the clock, so it is often wise to adopt +universal time by setting the `TZ' environment variable to `UTC0' +before embarking on calendrical calculations. + + +File: find.info, Node: Pure numbers in date strings, Next: Seconds since the Epoch, Prev: Relative items in date strings, Up: Date input formats + +6.7 Pure numbers in date strings +================================ + +The precise interpretation of a pure decimal number depends on the +context in the date string. + + If the decimal number is of the form YYYYMMDD and no other calendar +date item (*note Calendar date items::) appears before it in the date +string, then YYYY is read as the year, MM as the month number and DD as +the day of the month, for the specified calendar date. + + If the decimal number is of the form HHMM and no other time of day +item appears before it in the date string, then HH is read as the hour +of the day and MM as the minute of the hour, for the specified time of +day. MM can also be omitted. + + If both a calendar date and a time of day appear to the left of a +number in the date string, but no relative item, then the number +overrides the year. + + +File: find.info, Node: Seconds since the Epoch, Next: Specifying time zone rules, Prev: Pure numbers in date strings, Up: Date input formats + +6.8 Seconds since the Epoch +=========================== + +If you precede a number with `@', it represents an internal time stamp +as a count of seconds. The number can contain an internal decimal +point (either `.' or `,'); any excess precision not supported by the +internal representation is truncated toward minus infinity. Such a +number cannot be combined with any other date item, as it specifies a +complete time stamp. + + Internally, computer times are represented as a count of seconds +since an epoch--a well-defined point of time. On GNU and POSIX +systems, the epoch is 1970-01-01 00:00:00 UTC, so `@0' represents this +time, `@1' represents 1970-01-01 00:00:01 UTC, and so forth. GNU and +most other POSIX-compliant systems support such times as an extension +to POSIX, using negative counts, so that `@-1' represents 1969-12-31 +23:59:59 UTC. + + Traditional Unix systems count seconds with 32-bit two's-complement +integers and can represent times from 1901-12-13 20:45:52 through +2038-01-19 03:14:07 UTC. More modern systems use 64-bit counts of +seconds with nanosecond subcounts, and can represent all the times in +the known lifetime of the universe to a resolution of 1 nanosecond. + + On most hosts, these counts ignore the presence of leap seconds. +For example, on most hosts `@915148799' represents 1998-12-31 23:59:59 +UTC, `@915148800' represents 1999-01-01 00:00:00 UTC, and there is no +way to represent the intervening leap second 1998-12-31 23:59:60 UTC. + + +File: find.info, Node: Specifying time zone rules, Next: Authors of get_date, Prev: Seconds since the Epoch, Up: Date input formats + +6.9 Specifying time zone rules +============================== + +Normally, dates are interpreted using the rules of the current time +zone, which in turn are specified by the `TZ' environment variable, or +by a system default if `TZ' is not set. To specify a different set of +default time zone rules that apply just to one date, start the date +with a string of the form `TZ="RULE"'. The two quote characters (`"') +must be present in the date, and any quotes or backslashes within RULE +must be escaped by a backslash. + + For example, with the GNU `date' command you can answer the question +"What time is it in New York when a Paris clock shows 6:30am on October +31, 2004?" by using a date beginning with `TZ="Europe/Paris"' as shown +in the following shell transcript: + + $ export TZ="America/New_York" + $ date --date='TZ="Europe/Paris" 2004-10-31 06:30' + Sun Oct 31 01:30:00 EDT 2004 + + In this example, the `--date' operand begins with its own `TZ' +setting, so the rest of that operand is processed according to +`Europe/Paris' rules, treating the string `2004-10-31 06:30' as if it +were in Paris. However, since the output of the `date' command is +processed according to the overall time zone rules, it uses New York +time. (Paris was normally six hours ahead of New York in 2004, but +this example refers to a brief Halloween period when the gap was five +hours.) + + A `TZ' value is a rule that typically names a location in the `tz' +database (http://www.twinsun.com/tz/tz-link.htm). A recent catalog of +location names appears in the TWiki Date and Time Gateway +(http://twiki.org/cgi-bin/xtra/tzdate). A few non-GNU hosts require a +colon before a location name in a `TZ' setting, e.g., +`TZ=":America/New_York"'. + + The `tz' database includes a wide variety of locations ranging from +`Arctic/Longyearbyen' to `Antarctica/South_Pole', but if you are at sea +and have your own private time zone, or if you are using a non-GNU host +that does not support the `tz' database, you may need to use a POSIX +rule instead. Simple POSIX rules like `UTC0' specify a time zone +without daylight saving time; other rules can specify simple daylight +saving regimes. *Note Specifying the Time Zone with `TZ': (libc)TZ +Variable. + + +File: find.info, Node: Authors of get_date, Prev: Specifying time zone rules, Up: Date input formats + +6.10 Authors of `get_date' +========================== + +`get_date' was originally implemented by Steven M. Bellovin +() while at the University of North Carolina at +Chapel Hill. The code was later tweaked by a couple of people on +Usenet, then completely overhauled by Rich $alz () and +Jim Berets () in August, 1990. Various revisions for +the GNU system were made by David MacKenzie, Jim Meyering, Paul Eggert +and others. + + This chapter was originally produced by Franc,ois Pinard +() from the `getdate.y' source code, and then +edited by K. Berry (). + + +File: find.info, Node: Reference, Next: Common Tasks, Prev: Date input formats, Up: Top + +7 Reference +*********** + +Below are summaries of the command line syntax for the programs +discussed in this manual. + +* Menu: + +* Invoking find:: +* Invoking locate:: +* Invoking updatedb:: +* Invoking xargs:: +* Regular Expressions:: +* Environment Variables:: + + +File: find.info, Node: Invoking find, Next: Invoking locate, Up: Reference + +7.1 Invoking `find' +=================== + + find [-H] [-L] [-P] [-D DEBUGOPTIONS] [-OLEVEL] [FILE...] [EXPRESSION] + + `find' searches the directory tree rooted at each file name FILE by +evaluating the EXPRESSION on each file it finds in the tree. + + The command line may begin with the `-H', `-L', `-P', `-D' and `-O' +options. These are followed by a list of files or directories that +should be searched. If no files to search are specified, the current +directory (`.') is used. + + This list of files to search is followed by a list of expressions +describing the files we wish to search for. The first part of the +expression is recognised by the fact that it begins with `-' followed +by some other letters (for example `-print'), or is either `(' or `!'. +Any arguments after it are the rest of the expression. + + If no expression is given, the expression `-print' is used. + + The `find' command exits with status zero if all files matched are +processed successfully, greater than zero if errors occur. + + The `find' program also recognises two options for administrative +use: + +`--help' + Print a summary of the command line usage and exit. + +`--version' + Print the version number of `find' and exit. + + The `-version' option is a synonym for `--version' + +* Menu: + +* Filesystem Traversal Options:: +* Warning Messages:: +* Optimisation Options:: +* Debug Options:: +* Find Expressions:: + + +File: find.info, Node: Filesystem Traversal Options, Next: Warning Messages, Up: Invoking find + +7.1.1 Filesystem Traversal Options +---------------------------------- + +The options `-H', `-L' or `-P' may be specified at the start of the +command line (if none of these is specified, `-P' is assumed). If you +specify more than one of these options, the last one specified takes +effect (but note that the `-follow' option is equivalent to `-L'). + +`-P' + Never follow symbolic links (this is the default), except in the + case of the `-xtype' predicate. + +`-L' + Always follow symbolic links, except in the case of the `-xtype' + predicate. + +`-H' + Follow symbolic links specified in the list of files to search, or + which are otherwise specified on the command line. + + If `find' would follow a symbolic link, but cannot for any reason +(for example, because it has insufficient permissions or the link is +broken), it falls back on using the properties of the symbolic link +itself. *Note Symbolic Links:: for a more complete description of how +symbolic links are handled. + + +File: find.info, Node: Warning Messages, Next: Optimisation Options, Prev: Filesystem Traversal Options, Up: Invoking find + +7.1.2 Warning Messages +---------------------- + +If there is an error on the `find' command line, an error message is +normally issued. However, there are some usages that are inadvisable +but which `find' should still accept. Under these circumstances, +`find' may issue a warning message. By default, warnings are enabled +only if `find' is being run interactively (specifically, if the +standard input is a terminal). Warning messages can be controlled +explicitly by the use of options on the command line: + +`-warn' + Issue warning messages where appropriate. + +`-nowarn' + Do not issue warning messages. + + These options take effect at the point on the command line where they +are specified. Therefore it's not useful to specify `-nowarn' at the +end of the command line. The warning messages affected by the above +options are triggered by: + + - Use of the `-d' option which is deprecated; please use `-depth' + instead, since the latter is POSIX-compliant. + + - Use of the `-ipath' option which is deprecated; please use + `-iwholename' instead. + + - Specifying an option (for example `-mindepth') after a non-option + (for example `-type' or `-print') on the command line. + + The default behaviour above is designed to work in that way so that +existing shell scripts don't generate spurious errors, but people will +be made aware of the problem. + + Some warning messages are issued for less common or more serious +problems, and consequently cannot be turned off: + + - Use of an unrecognised backslash escape sequence with `-fprintf' + + - Use of an unrecognised formatting directive with `-fprintf' + + +File: find.info, Node: Optimisation Options, Next: Debug Options, Prev: Warning Messages, Up: Invoking find + +7.1.3 Optimisation Options +-------------------------- + +The `-OLEVEL' option sets `find''s optimisation level to LEVEL. The +default optimisation level is 1. + + At certain optimisation levels, `find' reorders tests to speed up +execution while preserving the overall effect; that is, predicates with +side effects are not reordered relative to each other. The +optimisations performed at each optimisation level are as follows. + +`0' + Currently equivalent to optimisation level 1. + +`1' + This is the default optimisation level and corresponds to the + traditional behaviour. Expressions are reordered so that tests + based only on the names of files (for example` -name' and + `-regex') are performed first. + +`2' + Any `-type' or `-xtype' tests are performed after any tests based + only on the names of files, but before any tests that require + information from the inode. On many modern versions of Unix, file + types are returned by `readdir()' and so these predicates are + faster to evaluate than predicates which need to stat the file + first. + +`3' + At this optimisation level, the full cost-based query optimiser is + enabled. The order of tests is modified so that cheap (i.e., fast) + tests are performed first and more expensive ones are performed + later, if necessary. Within each cost band, predicates are + evaluated earlier or later according to whether they are likely to + succeed or not. For `-o', predicates which are likely to succeed + are evaluated earlier, and for `-a', predicates which are likely + to fail are evaluated earlier. + + +File: find.info, Node: Debug Options, Next: Find Expressions, Prev: Optimisation Options, Up: Invoking find + +7.1.4 Debug Options +------------------- + +The `-D' option makes `find' produce diagnostic output. Much of the +information is useful only for diagnosing problems, and so most people +will not find this option helpful. + + The list of debug options should be comma separated. Compatibility +of the debug options is not guaranteed between releases of findutils. +For a complete list of valid debug options, see the output of `find -D +help'. Valid debug options include: +`help' + Explain the debugging options. + +`tree' + Show the expression tree in its original and optimised form. + +`stat' + Print messages as files are examined with the stat and lstat system + calls. The find program tries to minimise such calls. + +`opt' + Prints diagnostic information relating to the optimisation of the + expression tree; see the `-O' option. + +`rates' + Prints a summary indicating how often each predicate succeeded or + failed. + + +File: find.info, Node: Find Expressions, Prev: Debug Options, Up: Invoking find + +7.1.5 Find Expressions +---------------------- + +The final part of the `find' command line is a list of expressions. +*Note Primary Index::, for a summary of all of the tests, actions, and +options that the expression can contain. If the expression is missing, +`-print' is assumed. + + +File: find.info, Node: Invoking locate, Next: Invoking updatedb, Prev: Invoking find, Up: Reference + +7.2 Invoking `locate' +===================== + + locate [OPTION...] PATTERN... + + For each PATTERN given `locate' searches one or more file name +databases returning each match of PATTERN. + + For each PATTERN given `locate' searches one or more file name +databases returning each match of PATTERN. + +`--all' +`-A' + Print only names which match all non-option arguments, not those + matching one or more non-option arguments. + +`--basename' +`-b' + The specified pattern is matched against just the last component of + the name of a file in the `locate' database. This last component + is also called the "base name". For example, the base name of + `/tmp/mystuff/foo.old.c' is `foo.old.c'. If the pattern contains + metacharacters, it must match the base name exactly. If not, it + must match part of the base name. + +`--count' +`-c' + Instead of printing the matched file names, just print the total + number of matches found, unless `--print' (`-p') is also present. + +`--database=PATH' +`-d PATH' + Instead of searching the default `locate' database + `/usr/local/var/locatedb', `locate' searches the file name + databases in PATH, which is a colon-separated list of database + file names. You can also use the environment variable + `LOCATE_PATH' to set the list of database files to search. The + option overrides the environment variable if both are used. Empty + elements in PATH (that is, a leading or trailing colon, or two + colons in a row) are taken to stand for the default database. A + database can be supplied on stdin, using `-' as an element of + `path'. If more than one element of `path' is `-', later instances + are ignored (but a warning message is printed). + +`--existing' +`-e' + Only print out such names which currently exist (instead of such + names which existed when the database was created). Note that + this may slow down the program a lot, if there are many matches in + the database. The way in which broken symbolic links are treated + is affected by the `-L', `-P' and `-H' options. Please note that + it is possible for the file to be deleted after `locate' has + checked that it exists, but before you use it. This option is + automatically turned on when reading an `slocate' database in + secure mode (*note slocate Database Format::). + +`--non-existing' +`-E' + Only print out such names which currently do not exist (instead of + such names which existed when the database was created). Note that + this may slow down the program a lot, if there are many matches in + the database. The way in which broken symbolic links are treated + is affected by the `-L', `-P' and `-H' options. Please note that + `locate' checks that the file does not exist, but a file of the + same name might be created after `locate''s check but before you + read `locate''s output. + +`--follow' +`-L' + If testing for the existence of files (with the `-e' or `-E' + options), consider broken symbolic links to be non-existing. This + is the default behaviour. + +`--nofollow' +`-P' +`-H' + If testing for the existence of files (with the `-e' or `-E' + options), treat broken symbolic links as if they were existing + files. The `-H' form of this option is provided purely for + similarity with `find'; the use of `-P' is recommended over `-H'. + +`--ignore-case' +`-i' + Ignore case distinctions in both the pattern and the file names. + +`--limit=N' +`-l N' + Limit the number of results printed to N. When used with the + `--count' option, the value printed will never be larger than this + limit. + +`--max-database-age=D' + Normally, `locate' will issue a warning message when it searches a + database which is more than 8 days old. This option changes that + value to something other than 8. The effect of specifying a + negative value is undefined. + +`--mmap' +`-m' + Accepted but does nothing. The option is supported only to provide + compatibility with BSD's `locate'. + +`--null' +`-0' + Results are separated with the ASCII NUL character rather than the + newline character. To get the full benefit of the use of this + option, use the new `locate' database format (that is the default + anyway). + +`--print' +`-p' + Print search results when they normally would not, because of the + presence of `--statistics' (`-S') or `--count' (`-c'). + +`--wholename' +`-w' + The specified pattern is matched against the whole name of the + file in the `locate' database. If the pattern contains + metacharacters, it must match exactly. If not, it must match part + of the whole file name. This is the default behaviour. + +`--regex' +`-r' + Instead of using substring or shell glob matching, the pattern + specified on the command line is understood to be a regular + expression. GNU Emacs-style regular expressions are assumed unless + the `--regextype' option is also given. File names from the + `locate' database are matched using the specified regular + expression. If the `-i' flag is also given, matching is + case-insensitive. Matches are performed against the whole path + name, and so by default a pathname will be matched if any part of + it matches the specified regular expression. The regular + expression may use `^' or `$' to anchor a match at the beginning + or end of a pathname. + +`--regextype' + This option changes the regular expression syntax and behaviour + used by the `--regex' option. *Note Regular Expressions:: for more + information on the regular expression dialects understood by GNU + findutils. + +`--stdio' +`-s' + Accepted but does nothing. The option is supported only to provide + compatibility with BSD's `locate'. + +`--statistics' +`-S' + Print some summary information for each `locate' database. No + search is performed unless non-option arguments are given. + Although the BSD version of locate also has this option, the + format of the output is different. + +`--help' + Print a summary of the command line usage for `locate' and exit. + +`--version' + Print the version number of `locate' and exit. + + +File: find.info, Node: Invoking updatedb, Next: Invoking xargs, Prev: Invoking locate, Up: Reference + +7.3 Invoking `updatedb' +======================= + + updatedb [OPTION...] + + `updatedb' creates and updates the database of file names used by +`locate'. `updatedb' generates a list of files similar to the output +of `find' and then uses utilities for optimizing the database for +performance. `updatedb' is often run periodically as a `cron' job and +configured with environment variables or command options. Typically, +operating systems have a shell script that "exports" configurations for +variable definitions and uses another shell script that "sources" the +configuration file into the environment and then executes `updatedb' in +the environment. + + `updatedb' creates and updates the database of file names used by +`locate'. `updatedb' generates a list of files similar to the output +of `find' and then uses utilities for optimizing the database for +performance. `updatedb' is often run periodically as a `cron' job and +configured with environment variables or command options. Typically, +operating systems have a shell script that "exports" configurations for +variable definitions and uses another shell script that "sources" the +configuration file into the environment and then executes `updatedb' in +the environment. + +`--findoptions='OPTION...'' + Global options to pass on to `find'. The environment variable + `FINDOPTIONS' also sets this value. Default is none. + +`--localpaths='PATH...'' + Non-network directories to put in the database. Default is `/'. + +`--netpaths='PATH...'' + Network (NFS, AFS, RFS, etc.) directories to put in the database. + The environment variable `NETPATHS' also sets this value. Default + is none. + +`--prunepaths='PATH...'' + Directories to omit from the database, which would otherwise be + included. The environment variable `PRUNEPATHS' also sets this + value. Default is `/tmp /usr/tmp /var/tmp /afs'. The paths are + used as regular expressions (with `find ... -regex', so you need + to specify these paths in the same way that `find' will encounter + them. This means for example that the paths must not include + trailing slashes. + +`--prunefs='PATH...'' + Filesystems to omit from the database, which would otherwise be + included. Note that files are pruned when a filesystem is reached; + Any filesystem mounted under an undesired filesystem will be + ignored. The environment variable `PRUNEFS' also sets this value. + Default is `nfs NFS proc'. + +`--output=DBFILE' + The database file to build. The default is system-dependent, but + when this document was formatted it was `/usr/local/var/locatedb'. + +`--localuser=USER' + The user to search the non-network directories as, using `su'. + Default is to search the non-network directories as the current + user. You can also use the environment variable `LOCALUSER' to + set this user. + +`--netuser=USER' + The user to search network directories as, using `su'. Default + `user' is `daemon'. You can also use the environment variable + `NETUSER' to set this user. + +`--old-format' + Generate a `locate' database in the old format, for compatibility + with versions of `locate' other than GNU `locate'. Using this + option means that `locate' will not be able to properly handle + non-ASCII characters in file names (that is, file names containing + characters which have the eighth bit set, such as many of the + characters from the ISO-8859-1 character set). *Note Database + Formats::, for a detailed description of the supported database + formats. + +`--dbformat=FORMAT' + Generate the locate database in format `FORMAT'. Supported + database formats include `LOCATE02' (which is the default), `old' + and `slocate'. The `old' format exists for compatibility with + implementations of `locate' on other Unix systems. The `slocate' + format exists for compatibility with `slocate'. *Note Database + Formats::, for a detailed description of each format. + +`--help' + Print a summary of the command line usage and exit. + +`--version' + Print the version number of `updatedb' and exit. + + +File: find.info, Node: Invoking xargs, Next: Regular Expressions, Prev: Invoking updatedb, Up: Reference + +7.4 Invoking `xargs' +==================== + + xargs [OPTION...] [COMMAND [INITIAL-ARGUMENTS]] + + `xargs' exits with the following status: + +0 + if it succeeds + +123 + if any invocation of the command exited with status 1-125 + +124 + if the command exited with status 255 + +125 + if the command is killed by a signal + +126 + if the command cannot be run + +127 + if the command is not found + +1 + if some other error occurred. + + Exit codes greater than 128 are used by the shell to indicate that a +program died due to a fatal signal. + +`--arg-file=INPUTFILE' +`-a oINPUTFILE' + Read names from the file INPUTFILE instead of standard input. If + you use this option, the standard input stream remains unchanged + when commands are run. Otherwise, stdin is redirected from + `/dev/null'. + +`--null' +`-0' + Input file names are terminated by a null character instead of by + whitespace, and any quotes and backslash characters are not + considered special (every character is taken literally). Disables + the end of file string, which is treated like any other argument. + +`--delimiter DELIM' +`-d DELIM' + Input file names are terminated by the specified character DELIM + instead of by whitespace, and any quotes and backslash characters + are not considered special (every character is taken literally). + Disables the end of file string, which is treated like any other + argument. + + The specified delimiter may be a single character, a C-style + character escape such as `\n', or an octal or hexadecimal escape + code. Octal and hexadecimal escape codes are understood as for the + `printf' command. Multibyte characters are not supported. + +`-E EOF-STR' +`--eof[=EOF-STR]' +`-e[EOF-STR]' + Set the end of file string to EOF-STR. If the end of file string + occurs as a line of input, the rest of the input is ignored. If + EOF-STR is omitted (`-e') or blank (either `-e' or `-E'), there is + no end of file string. The `-e' form of this option is deprecated + in favour of the POSIX-compliant `-E' option, which you should use + instead. As of GNU xargs version 4.2.9, the default behaviour of + xargs is not to have a logical end-of-file marker. The POSIX + standard (IEEE Std 1003.1, 2004 Edition) allows this. + +`--help' + Print a summary of the options to `xargs' and exit. + +`-I REPLACE-STR' +`--replace[=REPLACE-STR]' +`-i[REPLACE-STR]' + Replace occurrences of REPLACE-STR in the initial arguments with + names read from standard input. Also, unquoted blanks do not + terminate arguments; instead, the input is split at newlines only. + If REPLACE-STR is omitted (omitting it is allowed only for `-i'), + it defaults to `{}' (like for `find -exec'). Implies `-x' and `-l + 1'. The `-i' option is deprecated in favour of the `-I' option. + +`-L MAX-LINES' +`--max-lines[=MAX-LINES]' +`-l[MAX-LINES]' + Use at most MAX-LINES non-blank input lines per command line. For + `-l', MAX-LINES defaults to 1 if omitted. For `-L', the argument + is mandatory. Trailing blanks cause an input line to be logically + continued on the next input line, for the purpose of counting the + lines. Implies `-x'. The `-l' form of this option is deprecated + in favour of the POSIX-compliant `-L' option. + +`--max-args=MAX-ARGS' +`-n MAX-ARGS' + Use at most MAX-ARGS arguments per command line. Fewer than + MAX-ARGS arguments will be used if the size (see the `-s' option) + is exceeded, unless the `-x' option is given, in which case + `xargs' will exit. + +`--interactive' +`-p' + Prompt the user about whether to run each command line and read a + line from the terminal. Only run the command line if the response + starts with `y' or `Y'. Implies `-t'. + +`--no-run-if-empty' +`-r' + If the standard input is completely empty, do not run the command. + By default, the command is run once even if there is no input. + +`--max-chars=MAX-CHARS' +`-s MAX-CHARS' + Use at most MAX-CHARS characters per command line, including the + command, initial arguments and any terminating nulls at the ends of + the argument strings. + +`--show-limits' + Display the limits on the command-line length which are imposed by + the operating system, `xargs'' choice of buffer size and the `-s' + option. Pipe the input from `/dev/null' (and perhaps specify + `--no-run-if-empty') if you don't want `xargs' to do anything. + +`--verbose' +`-t' + Print the command line on the standard error output before + executing it. + +`--version' + Print the version number of `xargs' and exit. + +`--exit' +`-x' + Exit if the size (see the `-s' option) is exceeded. + +`--max-procs=MAX-PROCS' +`-P MAX-PROCS' + Run simultaneously up to MAX-PROCS processes at once; the default + is 1. If MAX-PROCS is 0, `xargs' will run as many processes as + possible simultaneously. + + +File: find.info, Node: Regular Expressions, Next: Environment Variables, Prev: Invoking xargs, Up: Reference + +7.5 Regular Expressions +======================= + +The `-regex' and `-iregex' tests of `find' allow matching by regular +expression, as does the `--regex' option of `locate'. There are many +different types of Regular Expression, but the type used by `find' and +`locate' is the same as is used in GNU Emacs. Both programs provide an +option which allows you to select an alternative regular expression +syntax; for `find' this is the `-regextype' option, and for `locate' +this is the `--regextype' option. + + These options take a single argument, which indicates the specific +regular expression syntax and behaviour that should be used. This +should be one of the following: + +* Menu: + +* findutils-default regular expression syntax:: +* awk regular expression syntax:: +* egrep regular expression syntax:: +* emacs regular expression syntax:: +* gnu-awk regular expression syntax:: +* grep regular expression syntax:: +* posix-awk regular expression syntax:: +* posix-basic regular expression syntax:: +* posix-egrep regular expression syntax:: +* posix-extended regular expression syntax:: + + +File: find.info, Node: findutils-default regular expression syntax, Next: awk regular expression syntax, Up: Regular Expressions + +7.5.1 `findutils-default' regular expression syntax +--------------------------------------------------- + +The character `.' matches any single character. + +`+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`\+' + matches a `+' + +`\?' + matches a `?'. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +ignored. Within square brackets, `\' is taken literally. Character +classes are not supported, so for example you would need to use `[0-9]' +instead of `[[:digit:]]'. + + GNU extensions are supported: + 1. `\w' matches a character within a word + + 2. `\W' matches a character which is not within a word + + 3. `\<' matches the beginning of a word + + 4. `\>' matches the end of a word + + 5. `\b' matches a word boundary + + 6. `\B' matches characters which are not a word boundary + + 7. `\`' matches the beginning of the whole input + + 8. `\'' matches the end of the whole input + + + Grouping is performed with backslashes followed by parentheses `\(', +`\)'. A backslash followed by a digit acts as a back-reference and +matches the same thing as the previous grouped expression indicated by +that number. For example `\2' matches the second group expression. +The order of group expressions is determined by the position of their +opening parenthesis `\('. + + The alternation operator is `\|'. + + The character `^' only represents the beginning of a string when it +appears: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `\(' + + 3. After the alternation operator `\|' + + + The character `$' only represents the end of a string when it +appears: + 1. At the end of a regular expression + + 2. Before a close-group, signified by `\)' + + 3. Before the alternation operator `\|' + + + `*', `+' and `?' are special at any point in a regular expression +except: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `\(' + + 3. After the alternation operator `\|' + + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: awk regular expression syntax, Next: egrep regular expression syntax, Prev: findutils-default regular expression syntax, Up: Regular Expressions + +7.5.2 `awk' regular expression syntax +------------------------------------- + +The character `.' matches any single character except the null +character. + +`+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`\+' + matches a `+' + +`\?' + matches a `?'. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +invalid. Within square brackets, `\' can be used to quote the +following character. Character classes are not supported, so for +example you would need to use `[0-9]' instead of `[[:digit:]]'. + + GNU extensions are not supported and so `\w', `\W', `\<', `\>', +`\b', `\B', `\`', and `\'' match `w', `W', `<', `>', `b', `B', ``', and +`'' respectively. + + Grouping is performed with parentheses `()'. An unmatched `)' +matches just itself. A backslash followed by a digit matches that +digit. + + The alternation operator is `|'. + + The characters `^' and `$' always represent the beginning and end of +a string respectively, except within square brackets. Within brackets, +`^' can be used to invert the membership of the character class being +specified. + + `*', `+' and `?' are special at any point in a regular expression +except: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `(' + + 3. After the alternation operator `|' + + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: egrep regular expression syntax, Next: emacs regular expression syntax, Prev: awk regular expression syntax, Up: Regular Expressions + +7.5.3 `egrep' regular expression syntax +--------------------------------------- + +The character `.' matches any single character except newline. + +`+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`\+' + matches a `+' + +`\?' + matches a `?'. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +ignored. Within square brackets, `\' is taken literally. Character +classes are supported; for example `[[:digit:]]' will match a single +decimal digit. Non-matching lists `[^...]' do not ever match newline. + + GNU extensions are supported: + 1. `\w' matches a character within a word + + 2. `\W' matches a character which is not within a word + + 3. `\<' matches the beginning of a word + + 4. `\>' matches the end of a word + + 5. `\b' matches a word boundary + + 6. `\B' matches characters which are not a word boundary + + 7. `\`' matches the beginning of the whole input + + 8. `\'' matches the end of the whole input + + + Grouping is performed with parentheses `()'. A backslash followed +by a digit acts as a back-reference and matches the same thing as the +previous grouped expression indicated by that number. For example `\2' +matches the second group expression. The order of group expressions is +determined by the position of their opening parenthesis `('. + + The alternation operator is `|'. + + The characters `^' and `$' always represent the beginning and end of +a string respectively, except within square brackets. Within brackets, +`^' can be used to invert the membership of the character class being +specified. + + The characters `*', `+' and `?' are special anywhere in a regular +expression. + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: emacs regular expression syntax, Next: gnu-awk regular expression syntax, Prev: egrep regular expression syntax, Up: Regular Expressions + +7.5.4 `emacs' regular expression syntax +--------------------------------------- + +The character `.' matches any single character except newline. + +`+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`\+' + matches a `+' + +`\?' + matches a `?'. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +ignored. Within square brackets, `\' is taken literally. Character +classes are not supported, so for example you would need to use `[0-9]' +instead of `[[:digit:]]'. + + GNU extensions are supported: + 1. `\w' matches a character within a word + + 2. `\W' matches a character which is not within a word + + 3. `\<' matches the beginning of a word + + 4. `\>' matches the end of a word + + 5. `\b' matches a word boundary + + 6. `\B' matches characters which are not a word boundary + + 7. `\`' matches the beginning of the whole input + + 8. `\'' matches the end of the whole input + + + Grouping is performed with backslashes followed by parentheses `\(', +`\)'. A backslash followed by a digit acts as a back-reference and +matches the same thing as the previous grouped expression indicated by +that number. For example `\2' matches the second group expression. +The order of group expressions is determined by the position of their +opening parenthesis `\('. + + The alternation operator is `\|'. + + The character `^' only represents the beginning of a string when it +appears: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `\(' + + 3. After the alternation operator `\|' + + + The character `$' only represents the end of a string when it +appears: + 1. At the end of a regular expression + + 2. Before a close-group, signified by `\)' + + 3. Before the alternation operator `\|' + + + `*', `+' and `?' are special at any point in a regular expression +except: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `\(' + + 3. After the alternation operator `\|' + + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: gnu-awk regular expression syntax, Next: grep regular expression syntax, Prev: emacs regular expression syntax, Up: Regular Expressions + +7.5.5 `gnu-awk' regular expression syntax +----------------------------------------- + +The character `.' matches any single character. + +`+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`\+' + matches a `+' + +`\?' + matches a `?'. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +invalid. Within square brackets, `\' can be used to quote the +following character. Character classes are supported; for example +`[[:digit:]]' will match a single decimal digit. + + GNU extensions are supported: + 1. `\w' matches a character within a word + + 2. `\W' matches a character which is not within a word + + 3. `\<' matches the beginning of a word + + 4. `\>' matches the end of a word + + 5. `\b' matches a word boundary + + 6. `\B' matches characters which are not a word boundary + + 7. `\`' matches the beginning of the whole input + + 8. `\'' matches the end of the whole input + + + Grouping is performed with parentheses `()'. An unmatched `)' +matches just itself. A backslash followed by a digit acts as a +back-reference and matches the same thing as the previous grouped +expression indicated by that number. For example `\2' matches the +second group expression. The order of group expressions is determined +by the position of their opening parenthesis `('. + + The alternation operator is `|'. + + The characters `^' and `$' always represent the beginning and end of +a string respectively, except within square brackets. Within brackets, +`^' can be used to invert the membership of the character class being +specified. + + `*', `+' and `?' are special at any point in a regular expression +except: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `(' + + 3. After the alternation operator `|' + + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: grep regular expression syntax, Next: posix-awk regular expression syntax, Prev: gnu-awk regular expression syntax, Up: Regular Expressions + +7.5.6 `grep' regular expression syntax +-------------------------------------- + +The character `.' matches any single character except newline. + +`\+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`\?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`+ and ?' + match themselves. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +ignored. Within square brackets, `\' is taken literally. Character +classes are supported; for example `[[:digit:]]' will match a single +decimal digit. Non-matching lists `[^...]' do not ever match newline. + + GNU extensions are supported: + 1. `\w' matches a character within a word + + 2. `\W' matches a character which is not within a word + + 3. `\<' matches the beginning of a word + + 4. `\>' matches the end of a word + + 5. `\b' matches a word boundary + + 6. `\B' matches characters which are not a word boundary + + 7. `\`' matches the beginning of the whole input + + 8. `\'' matches the end of the whole input + + + Grouping is performed with backslashes followed by parentheses `\(', +`\)'. A backslash followed by a digit acts as a back-reference and +matches the same thing as the previous grouped expression indicated by +that number. For example `\2' matches the second group expression. +The order of group expressions is determined by the position of their +opening parenthesis `\('. + + The alternation operator is `\|'. + + The character `^' only represents the beginning of a string when it +appears: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `\(' + + 3. After a newline + + 4. After the alternation operator `\|' + + + The character `$' only represents the end of a string when it +appears: + 1. At the end of a regular expression + + 2. Before a close-group, signified by `\)' + + 3. Before a newline + + 4. Before the alternation operator `\|' + + + `\*', `\+' and `\?' are special at any point in a regular expression +except: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `\(' + + 3. After a newline + + 4. After the alternation operator `\|' + + + Intervals are specified by `\{' and `\}'. Invalid intervals such as +`a\{1z' are not accepted. + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: posix-awk regular expression syntax, Next: posix-basic regular expression syntax, Prev: grep regular expression syntax, Up: Regular Expressions + +7.5.7 `posix-awk' regular expression syntax +------------------------------------------- + +The character `.' matches any single character except the null +character. + +`+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`\+' + matches a `+' + +`\?' + matches a `?'. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +invalid. Within square brackets, `\' can be used to quote the +following character. Character classes are supported; for example +`[[:digit:]]' will match a single decimal digit. + + GNU extensions are not supported and so `\w', `\W', `\<', `\>', +`\b', `\B', `\`', and `\'' match `w', `W', `<', `>', `b', `B', ``', and +`'' respectively. + + Grouping is performed with parentheses `()'. An unmatched `)' +matches just itself. A backslash followed by a digit acts as a +back-reference and matches the same thing as the previous grouped +expression indicated by that number. For example `\2' matches the +second group expression. The order of group expressions is determined +by the position of their opening parenthesis `('. + + The alternation operator is `|'. + + The characters `^' and `$' always represent the beginning and end of +a string respectively, except within square brackets. Within brackets, +`^' can be used to invert the membership of the character class being +specified. + + `*', `+' and `?' are special at any point in a regular expression +except the following places, where they are not allowed: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `(' + + 3. After the alternation operator `|' + + + Intervals are specified by `{' and `}'. Invalid intervals such as +`a{1z' are not accepted. + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: posix-basic regular expression syntax, Next: posix-egrep regular expression syntax, Prev: posix-awk regular expression syntax, Up: Regular Expressions + +7.5.8 `posix-basic' regular expression syntax +--------------------------------------------- + +The character `.' matches any single character except the null +character. + +`\+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`\?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`+ and ?' + match themselves. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +invalid. Within square brackets, `\' is taken literally. Character +classes are supported; for example `[[:digit:]]' will match a single +decimal digit. + + GNU extensions are supported: + 1. `\w' matches a character within a word + + 2. `\W' matches a character which is not within a word + + 3. `\<' matches the beginning of a word + + 4. `\>' matches the end of a word + + 5. `\b' matches a word boundary + + 6. `\B' matches characters which are not a word boundary + + 7. `\`' matches the beginning of the whole input + + 8. `\'' matches the end of the whole input + + + Grouping is performed with backslashes followed by parentheses `\(', +`\)'. A backslash followed by a digit acts as a back-reference and +matches the same thing as the previous grouped expression indicated by +that number. For example `\2' matches the second group expression. +The order of group expressions is determined by the position of their +opening parenthesis `\('. + + The alternation operator is `\|'. + + The character `^' only represents the beginning of a string when it +appears: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `\(' + + 3. After the alternation operator `\|' + + + The character `$' only represents the end of a string when it +appears: + 1. At the end of a regular expression + + 2. Before a close-group, signified by `\)' + + 3. Before the alternation operator `\|' + + + `\*', `\+' and `\?' are special at any point in a regular expression +except: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `\(' + + 3. After the alternation operator `\|' + + + Intervals are specified by `\{' and `\}'. Invalid intervals such as +`a\{1z' are not accepted. + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: posix-egrep regular expression syntax, Next: posix-extended regular expression syntax, Prev: posix-basic regular expression syntax, Up: Regular Expressions + +7.5.9 `posix-egrep' regular expression syntax +--------------------------------------------- + +The character `.' matches any single character except newline. + +`+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`\+' + matches a `+' + +`\?' + matches a `?'. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +ignored. Within square brackets, `\' is taken literally. Character +classes are supported; for example `[[:digit:]]' will match a single +decimal digit. Non-matching lists `[^...]' do not ever match newline. + + GNU extensions are supported: + 1. `\w' matches a character within a word + + 2. `\W' matches a character which is not within a word + + 3. `\<' matches the beginning of a word + + 4. `\>' matches the end of a word + + 5. `\b' matches a word boundary + + 6. `\B' matches characters which are not a word boundary + + 7. `\`' matches the beginning of the whole input + + 8. `\'' matches the end of the whole input + + + Grouping is performed with parentheses `()'. A backslash followed +by a digit acts as a back-reference and matches the same thing as the +previous grouped expression indicated by that number. For example `\2' +matches the second group expression. The order of group expressions is +determined by the position of their opening parenthesis `('. + + The alternation operator is `|'. + + The characters `^' and `$' always represent the beginning and end of +a string respectively, except within square brackets. Within brackets, +`^' can be used to invert the membership of the character class being +specified. + + The characters `*', `+' and `?' are special anywhere in a regular +expression. + + Intervals are specified by `{' and `}'. Invalid intervals are +treated as literals, for example `a{1' is treated as `a\{1' + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: posix-extended regular expression syntax, Prev: posix-egrep regular expression syntax, Up: Regular Expressions + +7.5.10 `posix-extended' regular expression syntax +------------------------------------------------- + +The character `.' matches any single character except the null +character. + +`+' + indicates that the regular expression should match one or more + occurrences of the previous atom or regexp. + +`?' + indicates that the regular expression should match zero or one + occurrence of the previous atom or regexp. + +`\+' + matches a `+' + +`\?' + matches a `?'. + + Bracket expressions are used to match ranges of characters. Bracket +expressions where the range is backward, for example `[z-a]', are +invalid. Within square brackets, `\' is taken literally. Character +classes are supported; for example `[[:digit:]]' will match a single +decimal digit. + + GNU extensions are supported: + 1. `\w' matches a character within a word + + 2. `\W' matches a character which is not within a word + + 3. `\<' matches the beginning of a word + + 4. `\>' matches the end of a word + + 5. `\b' matches a word boundary + + 6. `\B' matches characters which are not a word boundary + + 7. `\`' matches the beginning of the whole input + + 8. `\'' matches the end of the whole input + + + Grouping is performed with parentheses `()'. An unmatched `)' +matches just itself. A backslash followed by a digit acts as a +back-reference and matches the same thing as the previous grouped +expression indicated by that number. For example `\2' matches the +second group expression. The order of group expressions is determined +by the position of their opening parenthesis `('. + + The alternation operator is `|'. + + The characters `^' and `$' always represent the beginning and end of +a string respectively, except within square brackets. Within brackets, +`^' can be used to invert the membership of the character class being +specified. + + `*', `+' and `?' are special at any point in a regular expression +except the following places, where they are not allowed: + 1. At the beginning of a regular expression + + 2. After an open-group, signified by `(' + + 3. After the alternation operator `|' + + + Intervals are specified by `{' and `}'. Invalid intervals such as +`a{1z' are not accepted. + + The longest possible match is returned; this applies to the regular +expression as a whole and (subject to this constraint) to +subexpressions within groups. + + +File: find.info, Node: Environment Variables, Prev: Regular Expressions, Up: Reference + +7.6 Environment Variables +========================= + +LANG + Provides a default value for the internationalisation variables + that are unset or null. + +LC_ALL + If set to a non-empty string value, override the values of all the + other internationalisation variables. + +LC_COLLATE + The POSIX standard specifies that this variable affects the pattern + matching to be used for the `\-name' option. GNU find uses the + GNU version of the `fnmatch' library function. + + POSIX also specifies that the `LC_COLLATE' environment variable + affects the interpretation of the user's response to the query + issued by `\-ok', but this is not the case for GNU find. + +LC_CTYPE + This variable affects the treatment of character classes used with + the `-name' test, if the system's `fnmatch' library function + supports this. It has no effect on the behaviour of the `-ok' + expression. + +LC_MESSAGES + Determines the locale to be used for internationalised messages. + +NLSPATH + Determines the location of the internationalisation message + catalogues. + +PATH + Affects the directories which are searched to find the executables + invoked by `-exec', `-execdir' `-ok' and `-okdir'. If the PATH + environment variable includes the current directory (by explicitly + including `.' or by having an empty element), and the find command + line includes `-execdir' or `-okdir', `find' will refuse to run. + *Note Security Considerations::, for a more detailed discussion of + security matters. + +POSIXLY_CORRECT + Determines the block size used by `-ls' and `-fls'. If + POSIXLY_CORRECT is set, blocks are units of 512 bytes. Otherwise + they are units of 1024 bytes. + +TZ + Affects the time zone used for some of the time-related format + directives of `-printf' and `-fprintf'. + + +File: find.info, Node: Common Tasks, Next: Worked Examples, Prev: Reference, Up: Top + +8 Common Tasks +************** + +The sections that follow contain some extended examples that both give +a good idea of the power of these programs, and show you how to solve +common real-world problems. + +* Menu: + +* Viewing And Editing:: +* Archiving:: +* Cleaning Up:: +* Strange File Names:: +* Fixing Permissions:: +* Classifying Files:: + + +File: find.info, Node: Viewing And Editing, Next: Archiving, Up: Common Tasks + +8.1 Viewing And Editing +======================= + +To view a list of files that meet certain criteria, simply run your +file viewing program with the file names as arguments. Shells +substitute a command enclosed in backquotes with its output, so the +whole command looks like this: + + less `find /usr/include -name '*.h' | xargs grep -l mode_t` + +You can edit those files by giving an editor name instead of a file +viewing program: + + emacs `find /usr/include -name '*.h' | xargs grep -l mode_t` + + Because there is a limit to the length of any individual command +line, there is a limit to the number of files that can be handled in +this way. We can get around this difficulty by using xargs like this: + + find /usr/include -name '*.h' | xargs grep -l mode_t > todo + xargs --arg-file=todo emacs + + Here, `xargs' will run `emacs' as many times as necessary to visit +all of the files listed in the file `todo'. + + +File: find.info, Node: Archiving, Next: Cleaning Up, Prev: Viewing And Editing, Up: Common Tasks + +8.2 Archiving +============= + +You can pass a list of files produced by `find' to a file archiving +program. GNU `tar' and `cpio' can both read lists of file names from +the standard input--either delimited by nulls (the safe way) or by +blanks (the lazy, risky default way). To use null-delimited names, +give them the `--null' option. You can store a file archive in a file, +write it on a tape, or send it over a network to extract on another +machine. + + One common use of `find' to archive files is to send a list of the +files in a directory tree to `cpio'. Use `-depth' so if a directory +does not have write permission for its owner, its contents can still be +restored from the archive since the directory's permissions are +restored after its contents. Here is an example of doing this using +`cpio'; you could use a more complex `find' expression to archive only +certain files. + + find . -depth -print0 | + cpio --create --null --format=crc --file=/dev/nrst0 + + You could restore that archive using this command: + + cpio --extract --null --make-dir --unconditional \ + --preserve --file=/dev/nrst0 + + Here are the commands to do the same things using `tar': + + find . -depth -print0 | + tar --create --null --files-from=- --file=/dev/nrst0 + + tar --extract --null --preserve-perm --same-owner \ + --file=/dev/nrst0 + + Here is an example of copying a directory from one machine to +another: + + find . -depth -print0 | cpio -0o -Hnewc | + rsh OTHER-MACHINE "cd `pwd` && cpio -i0dum" + + +File: find.info, Node: Cleaning Up, Next: Strange File Names, Prev: Archiving, Up: Common Tasks + +8.3 Cleaning Up +=============== + +This section gives examples of removing unwanted files in various +situations. Here is a command to remove the CVS backup files created +when an update requires a merge: + + find . -name '.#*' -print0 | xargs -0r rm -f + + The command above works, but the following is safer: + + find . -name '.#*' -depth -delete + + You can run this command to clean out your clutter in `/tmp'. You +might place it in the file your shell runs when you log out +(`.bash_logout', `.logout', or `.zlogout', depending on which shell you +use). + + find /tmp -depth -user "$LOGNAME" -type f -delete + + If your `find' command removes directories, you may find that you +get a spurious error message when `find' tries to recurse into a +directory that has now been removed. Using the `-depth' option will +normally resolve this problem. + + To remove old Emacs backup and auto-save files, you can use a command +like the following. It is especially important in this case to use +null-terminated file names because Emacs packages like the VM mailer +often create temporary file names with spaces in them, like `#reply to +David J. MacKenzie<1>#'. + + find ~ \( -name '*~' -o -name '#*#' \) -print0 | + xargs --no-run-if-empty --null rm -vf + + Removing old files from `/tmp' is commonly done from `cron': + + find /tmp /var/tmp -not -type d -mtime +3 -delete + find /tmp /var/tmp -depth -mindepth 1 -type d -empty -delete + + The second `find' command above uses `-depth' so it cleans out empty +directories depth-first, hoping that the parents become empty and can +be removed too. It uses `-mindepth' to avoid removing `/tmp' itself if +it becomes totally empty. + + +File: find.info, Node: Strange File Names, Next: Fixing Permissions, Prev: Cleaning Up, Up: Common Tasks + +8.4 Strange File Names +====================== + +`find' can help you remove or rename a file with strange characters in +its name. People are sometimes stymied by files whose names contain +characters such as spaces, tabs, control characters, or characters with +the high bit set. The simplest way to remove such files is: + + rm -i SOME*PATTERN*THAT*MATCHES*THE*PROBLEM*FILE + + `rm' asks you whether to remove each file matching the given +pattern. If you are using an old shell, this approach might not work +if the file name contains a character with the high bit set; the shell +may strip it off. A more reliable way is: + + find . -maxdepth 1 TESTS -okdir rm '{}' \; + +where TESTS uniquely identify the file. The `-maxdepth 1' option +prevents `find' from wasting time searching for the file in any +subdirectories; if there are no subdirectories, you may omit it. A +good way to uniquely identify the problem file is to figure out its +inode number; use + + ls -i + + Suppose you have a file whose name contains control characters, and +you have found that its inode number is 12345. This command prompts +you for whether to remove it: + + find . -maxdepth 1 -inum 12345 -okdir rm -f '{}' \; + + If you don't want to be asked, perhaps because the file name may +contain a strange character sequence that will mess up your screen when +printed, then use `-execdir' instead of `-okdir'. + + If you want to rename the file instead, you can use `mv' instead of +`rm': + + find . -maxdepth 1 -inum 12345 -okdir mv '{}' NEW-FILE-NAME \; + + +File: find.info, Node: Fixing Permissions, Next: Classifying Files, Prev: Strange File Names, Up: Common Tasks + +8.5 Fixing Permissions +====================== + +Suppose you want to make sure that everyone can write to the +directories in a certain directory tree. Here is a way to find +directories lacking either user or group write permission (or both), +and fix their permissions: + + find . -type d -not -perm -ug=w | xargs chmod ug+w + +You could also reverse the operations, if you want to make sure that +directories do _not_ have world write permission. + + +File: find.info, Node: Classifying Files, Prev: Fixing Permissions, Up: Common Tasks + +8.6 Classifying Files +===================== + +If you want to classify a set of files into several groups based on +different criteria, you can use the comma operator to perform multiple +independent tests on the files. Here is an example: + + find / -type d \( -perm -o=w -fprint allwrite , \ + -perm -o=x -fprint allexec \) + + echo "Directories that can be written to by everyone:" + cat allwrite + echo "" + echo "Directories with search permissions for everyone:" + cat allexec + + `find' has only to make one scan through the directory tree (which +is one of the most time consuming parts of its work). + + +File: find.info, Node: Worked Examples, Next: Security Considerations, Prev: Common Tasks, Up: Top + +9 Worked Examples +***************** + +The tools in the findutils package, and in particular `find', have a +large number of options. This means that quite often, there is more +than one way to do things. Some of the options and facilities only +exist for compatibility with other tools, and findutils provides +improved ways of doing things. + + This chapter describes a number of useful tasks that are commonly +performed, and compares the different ways of achieving them. + +* Menu: + +* Deleting Files:: +* Updating A Timestamp File:: + + +File: find.info, Node: Deleting Files, Next: Updating A Timestamp File, Up: Worked Examples + +9.1 Deleting Files +================== + +One of the most common tasks that `find' is used for is locating files +that can be deleted. This might include: + + * Files last modified more than 3 years ago which haven't been + accessed for at least 2 years + + * Files belonging to a certain user + + * Temporary files which are no longer required + + This example concentrates on the actual deletion task rather than on +sophisticated ways of locating the files that need to be deleted. +We'll assume that the files we want to delete are old files underneath +`/var/tmp/stuff'. + +9.1.1 The Traditional Way +------------------------- + +The traditional way to delete files in `var/tmp/stuff' that have not +been modified in over 90 days would have been: + + find /var/tmp/stuff -mtime +90 -exec /bin/rm {} \; + + The above command uses `-exec' to run the `/bin/rm' command to +remove each file. This approach works and in fact would have worked in +Version 7 Unix in 1979. However, there are a number of problems with +this approach. + + The most obvious problem with the approach above is that it causes +`find' to fork every time it finds a file that needs to delete, and the +child process then has to use the `exec' system call to launch +`/bin/rm'. All this is quite inefficient. If we are going to use +`/bin/rm' to do this job, it is better to make it delete more than one +file at a time. + + The most obvious way of doing this is to use the shell's command +expansion feature: + + /bin/rm `find /var/tmp/stuff -mtime +90 -print` + or you could use the more modern form + /bin/rm $(find /var/tmp/stuff -mtime +90 -print) + + The commands above are much more efficient than the first attempt. +However, there is a problem with them. The shell has a maximum command +length which is imposed by the operating system (the actual limit +varies between systems). This means that while the command expansion +technique will usually work, it will suddenly fail when there are lots +of files to delete. Since the task is to delete unwanted files, this +is precisely the time we don't want things to go wrong. + +9.1.2 Making Use of xargs +------------------------- + +So, is there a way to be more efficient in the use of `fork()' and +`exec()' without running up against this limit? Yes, we can be almost +optimally efficient by making use of the `xargs' command. The `xargs' +command reads arguments from its standard input and builds them into +command lines. We can use it like this: + + find /var/tmp/stuff -mtime +90 -print | xargs /bin/rm + + For example if the files found by `find' are `/var/tmp/stuff/A', +`/var/tmp/stuff/B' and `/var/tmp/stuff/C' then `xargs' might issue the +commands + + /bin/rm /var/tmp/stuff/A /var/tmp/stuff/B + /bin/rm /var/tmp/stuff/C + + The above assumes that `xargs' has a very small maximum command line +length. The real limit is much larger but the idea is that `xargs' +will run `/bin/rm' as many times as necessary to get the job done, +given the limits on command line length. + + This usage of `xargs' is pretty efficient, and the `xargs' command +is widely implemented (all modern versions of Unix offer it). So far +then, the news is all good. However, there is bad news too. + +9.1.3 Unusual characters in filenames +------------------------------------- + +Unix-like systems allow any characters to appear in file names with the +exception of the ASCII NUL character and the backslash. Backslashes +can occur in path names (as the directory separator) but not in the +names of actual directory entries. This means that the list of files +that `xargs' reads could in fact contain white space characters -- +spaces, tabs and newline characters. Since by default, `xargs' assumes +that the list of files it is reading uses white space as an argument +separator, it cannot correctly handle the case where a filename +actually includes white space. This makes the default behaviour of +`xargs' almost useless for handling arbitrary data. + + To solve this problem, GNU findutils introduced the `-print0' action +for `find'. This uses the ASCII NUL character to separate the entries +in the file list that it produces. This is the ideal choice of +separator since it is the only character that cannot appear within a +path name. The `-0' option to `xargs' makes it assume that arguments +are separated with ASCII NUL instead of white space. It also turns off +another misfeature in the default behaviour of `xargs', which is that +it pays attention to quote characters in its input. Some versions of +`xargs' also terminate when they see a lone `_' in the input, but GNU +`find' no longer does that (since it has become an optional behaviour +in the Unix standard). + + So, putting `find -print0' together with `xargs -0' we get this +command: + + find /var/tmp/stuff -mtime +90 -print0 | xargs -0 /bin/rm + + The result is an efficient way of proceeding that correctly handles +all the possible characters that could appear in the list of files to +delete. This is good news. However, there is, as I'm sure you're +expecting, also more bad news. The problem is that this is not a +portable construct; although other versions of Unix (notable +BSD-derived ones) support `-print0', it's not universal. So, is there +a more universal mechanism? + +9.1.4 Going back to -exec +------------------------- + +There is indeed a more universal mechanism, which is a slight +modification to the `-exec' action. The normal `-exec' action assumes +that the command to run is terminated with a semicolon (the semicolon +normally has to be quoted in order to protect it from interpretation as +the shell command separator). The SVR4 edition of Unix introduced a +slight variation, which involves terminating the command with `+' +instead: + + find /var/tmp/stuff -mtime +90 -exec /bin/rm {} \+ + + The above use of `-exec' causes `find' to build up a long command +line and then issue it. This can be less efficient than some uses of +`xargs'; for example `xargs' allows new command lines to be built up +while the previous command is still executing, and allows you to +specify a number of commands to run in parallel. However, the `find +... -exec ... +' construct has the advantage of wide portability. GNU +findutils did not support `-exec ... +' until version 4.2.12; one of +the reasons for this is that it already had the `-print0' action in any +case. + +9.1.5 A more secure version of -exec +------------------------------------ + +The command above seems to be efficient and portable. However, within +it lurks a security problem. The problem is shared with all the +commands we've tried in this worked example so far, too. The security +problem is a race condition; that is, if it is possible for somebody to +manipulate the filesystem that you are searching while you are +searching it, it is possible for them to persuade your `find' command +to cause the deletion of a file that you can delete but they normally +cannot. + + The problem occurs because the `-exec' action is defined by the +POSIX standard to invoke its command with the same working directory as +`find' had when it was started. This means that the arguments which +replace the {} include a relative path from `find''s starting point +down the file that needs to be deleted. For example, + + find /var/tmp/stuff -mtime +90 -exec /bin/rm {} \+ + + might actually issue the command: + + /bin/rm /var/tmp/stuff/A /var/tmp/stuff/B /var/tmp/stuff/passwd + + Notice the file `/var/tmp/stuff/passwd'. Likewise, the command: + + cd /var/tmp && find stuff -mtime +90 -exec /bin/rm {} \+ + + might actually issue the command: + + /bin/rm stuff/A stuff/B stuff/passwd + + If an attacker can rename `stuff' to something else (making use of +their write permissions in `/var/tmp') they can replace it with a +symbolic link to `/etc'. That means that the `/bin/rm' command will be +invoked on `/etc/passwd'. If you are running your `find' command as +root, the attacker has just managed to delete a vital file. All they +needed to do to achieve this was replace a subdirectory with a symbolic +link at the vital moment. + + There is however, a simple solution to the problem. This is an +action which works a lot like `-exec' but doesn't need to traverse a +chain of directories to reach the file that it needs to work on. This +is the `-execdir' action, which was introduced by the BSD family of +operating systems. The command, + + find /var/tmp/stuff -mtime +90 -execdir /bin/rm {} \+ + + might delete a set of files by performing these actions: + + 1. Change directory to /var/tmp/stuff/foo + + 2. Invoke `/bin/rm ./file1 ./file2 ./file3' + + 3. Change directory to /var/tmp/stuff/bar + + 4. Invoke `/bin/rm ./file99 ./file100 ./file101' + + This is a much more secure method. We are no longer exposed to a +race condition. For many typical uses of `find', this is the best +strategy. It's reasonably efficient, but the length of the command +line is limited not just by the operating system limits, but also by +how many files we actually need to delete from each directory. + + Is it possible to do any better? In the case of general file +processing, no. However, in the specific case of deleting files it is +indeed possible to do better. + +9.1.6 Using the -delete action +------------------------------ + +The most efficient and secure method of solving this problem is to use +the `-delete' action: + + find /var/tmp/stuff -mtime +90 -delete + + This alternative is more efficient than any of the `-exec' or +`-execdir' actions, since it entirely avoids the overhead of forking a +new process and using `exec' to run `/bin/rm'. It is also normally +more efficient than `xargs' for the same reason. The file deletion is +performed from the directory containing the entry to be deleted, so the +`-delete' action has the same security advantages as the `-execdir' +action has. + + The `-delete' action was introduced by the BSD family of operating +systems. + +9.1.7 Improving things still further +------------------------------------ + +Is it possible to improve things still further? Not without either +modifying the system library to the operating system or having more +specific knowledge of the layout of the filesystem and disk I/O +subsystem, or both. + + The `find' command traverses the filesystem, reading directories. +It then issues a separate system call for each file to be deleted. If +we could modify the operating system, there are potential gains that +could be made: + + * We could have a system call to which we pass more than one filename + for deletion + + * Alternatively, we could pass in a list of inode numbers (on + GNU/Linux systems, `readdir()' also returns the inode number of + each directory entry) to be deleted. + + The above possibilities sound interesting, but from the kernel's +point of view it is difficult to enforce standard Unix access controls +for such processing by inode number. Such a facility would probably +need to be restricted to the superuser. + + Another way of improving performance would be to increase the +parallelism of the process. For example if the directory hierarchy we +are searching is actually spread across a number of disks, we might +somehow be able to arrange for `find' to process each disk in parallel. +In practice GNU `find' doesn't have such an intimate understanding of +the system's filesystem layout and disk I/O subsystem. + + However, since the system administrator can have such an +understanding they can take advantage of it like so: + + find /var/tmp/stuff1 -mtime +90 -delete & + find /var/tmp/stuff2 -mtime +90 -delete & + find /var/tmp/stuff3 -mtime +90 -delete & + find /var/tmp/stuff4 -mtime +90 -delete & + wait + + In the example above, four separate instances of `find' are used to +search four subdirectories in parallel. The `wait' command simply +waits for all of these to complete. Whether this approach is more or +less efficient than a single instance of `find' depends on a number of +things: + + * Are the directories being searched in parallel actually on separate + disks? If not, this parallel search might just result in a lot of + disk head movement and so the speed might even be slower. + + * Other activity - are other programs also doing things on those + disks? + +9.1.8 Conclusion +---------------- + +The fastest and most secure way to delete files with the help of `find' +is to use `-delete'. Using `xargs -0 -P N' can also make effective use +of the disk, but it is not as secure. + + In the case where we're doing things other than deleting files, the +most secure alternative is `-execdir ... +', but this is not as +portable as the insecure action `-exec ... +'. + + The `-delete' action is not completely portable, but the only other +possibility which is as secure (`-execdir') is no more portable. The +most efficient portable alternative is `-exec ...+', but this is +insecure and isn't supported by versions of GNU findutils prior to +4.2.12. + + +File: find.info, Node: Updating A Timestamp File, Prev: Deleting Files, Up: Worked Examples + +9.2 Updating A Timestamp File +============================= + +Suppose we have a directory full of files which is maintained with a +set of automated tools; perhaps one set of tools updates them and +another set of tools uses the result. In this situation, it might be +useful for the second set of tools to know if the files have recently +been changed. It might be useful, for example, to have a 'timestamp' +file which gives the timestamp on the newest file in the collection. + + We can use `find' to achieve this, but there are several different +ways to do it. + +9.2.1 Updating the Timestamp The Wrong Way +------------------------------------------ + +The obvious but wrong answer is just to use `-newer':- + + find subdir -newer timestamp -exec touch -r {} timestamp \; + + This does the right sort of thing but has a bug. Suppose that two +files in the subdirectory have been updated, and that these are called +`file1' and `file2'. The command above will update `timestamp' with +the modification time of `file1' or that of `file2', but we don't know +which one. Since the timestamps on `file1' and `file2' will in general +be different, this could well be the wrong value. + + One solution to this problem is to modify `find' to recheck the +modification time of `timestamp' every time a file is to be compared +against it, but that will reduce the performance of `find'. + +9.2.2 Using the test utility to compare timestamps +-------------------------------------------------- + +The `test' command can be used to compare timestamps: + + find subdir -exec test {} -nt timestamp \; -exec touch -r {} timestamp \; + + This will ensure that any changes made to the modification time of +`timestamp' that take place during the execution of `find' are taken +into account. This resolves our earlier problem, but unfortunately +this runs much more slowly. + +9.2.3 A combined approach +------------------------- + +We can of course still use `-newer' to cut down on the number of calls +to `test': + + find subdir -newer timestamp -a \ + -exec test {} -nt timestamp \; -a \ + -exec touch -r {} timestamp \; + + Here, the `-newer' test excludes all the files which are definitely +older than the timestamp, but all the files which are newer than the +old value of the timestamp are compared against the current updated +timestamp. + + This is indeed faster in general, but the speed difference will +depend on how many updated files there are. + +9.2.4 Using -printf and sort to compare timestamps +-------------------------------------------------- + +It is possible to use the `-printf' action to abandon the use of `test' +entirely: + + newest=$(find subdir -newer timestamp -printf "%A%p\n" | + sort -n | + tail -1 | + cut -d: -f2- ) + touch -r "${newest:-timestamp}" timestamp + + The command above works by generating a list of the timestamps and +names of all the files which are newer than the timestamp. The `sort', +`tail' and `cut' commands simply pull out the name of the file with the +largest timestamp value (that is, the latest file). The `touch' +command is then used to update the timestamp, + + The `"${newest:-timestamp}"' expression simply expands to the value +of `$newest' if that variable is set, but to `timestamp' otherwise. +This ensures that an argument is always given to the `-r' option of the +`touch' command. + + This approach seems quite efficient, but unfortunately it has a bug. +Many operating systems now keep file modification time information at a +granularity which is finer than one second. Unfortunately the `%A@' +format for `-printf' only prints a whole-number value currently; that +is, these values are at a one-second granularity. This means that in +our example above, `$newest' will be the name of a file which is no +more than one second older than the newest file, but may indeed be +older. + + It would be possible to solve this problem with some kind of loop: + + while true; do + newest=$(find subdir -newer timestamp -printf "%A@:%p\n" | + sort -n | + tail -1 | + cut -d: -f2- ) + if test -z "$newest" ; then + break + else + touch -r "$newest" timestamp + fi + done + + A better fix for this problem would be to allow the `%A@' format to +produce a result having a fractional part, too. While this is planned +for GNU `find', it hasn't been done yet. + +9.2.5 Coping with sub-second timestamp resolution +------------------------------------------------- + +Another tool which often works with timestamps is `make'. We can use +`find' to generate a `Makefile' file on the fly and then use `make' to +update the timestamps: + + makefile=$(mktemp) + find subdir \ + \( \! -xtype l \) \ + -newer timestamp \ + -printf "timestamp:: %p\n\ttouch -r %p timestamp\n\n" > "$makefile" + make -f "$makefile" + rm -f "$makefile" + + Unfortunately although the solution above is quite elegant, it fails +to cope with white space within file names, and adjusting it to do so +would require a rather complex shell script. + +9.2.6 Coping with odd filenames too +----------------------------------- + +We can fix both of these problems (looping and problems with white +space), and do things more efficiently too. The following command +works with newlines and doesn't need to sort the list of filenames. + + find subdir -newer timestamp -printf "%A@:%p\0" | + perl -0 newest.pl | + xargs --no-run-if-empty --null -i \ + find {} -maxdepth 0 -newer timestamp -exec touch -r {} timestamp \; + + The first `find' command generates a list of files which are newer +than the original timestamp file, and prints a list of them with their +timestamps. The `newest.pl' script simply filters out all the +filenames which have timestamps which are older than whatever the +newest file is:- + + + #! /usr/bin/perl -0 + my @newest = (); + my $latest_stamp = undef; + while (<>) { + my ($stamp, $name) = split(/:/); + if (!defined($latest_stamp) || ($tstamp > $latest_stamp)) { + $latest_stamp = $stamp; + @newest = (); + } + if ($tstamp >= $latest_stamp) { + push @newest, $name; + } + } + print join("\0", @newest); + + This prints a list of zero or more files, all of which are newer than +the original timestamp file, and which have the same timestamp as each +other, to the nearest second. The second `find' command takes each +resulting file one at a time, and if that is newer than the timestamp +file, the timestamp is updated. + + +File: find.info, Node: Security Considerations, Next: Error Messages, Prev: Worked Examples, Up: Top + +10 Security Considerations +************************** + +Security considerations are important if you are using `find' or +`xargs' to search for or process files that don't belong to you or +which other people have control. Security considerations relating to +`locate' may also apply if you have files which you do not want others +to see. + + The most severe forms of security problems affecting `find' and +related programs are when third parties bring about a situation +allowing them to do something they would normally not be able to +accomplish. This is called _privilege elevation_. This might include +deleting files they would not normally be able to delete. It is common +for the operating system to periodically invoke `find' for +self-maintenance purposes. These invocations of `find' are +particularly problematic from a security point of view as these are +often invoked by the superuser and search the entire filesystem +hierarchy. Generally, the severity of any associated problem depends +on what the system is going to do with the files found by `find'. + +* Menu: + +* Levels of Risk:: What is your level of exposure to security problems? +* Security Considerations for find:: Security problems with find +* Security Considerations for xargs:: Security problems with xargs +* Security Considerations for locate:: Security problems with locate +* Security Summary:: That was all very complex, what does it boil down to? + + +File: find.info, Node: Levels of Risk, Next: Security Considerations for find, Up: Security Considerations + +10.1 Levels of Risk +=================== + +There are some security risks inherent in the use of `find', `xargs' +and (to a lesser extent) `locate'. The severity of these risks depends +on what sort of system you are using: + +*High risk* + Multi-user systems where you do not control (or trust) the other + users, and on which you execute `find', including areas where + those other users can manipulate the filesystem (for example + beneath `/home' or `/tmp'). + +*Medium Risk* + Systems where the actions of other users can create file names + chosen by them, but to which they don't have access while `find' is + being run. This access might include leaving programs running + (shell background jobs, `at' or `cron' tasks, for example). On + these sorts of systems, carefully written commands (avoiding use of + `-print' for example) should not expose you to a high degree of + risk. Most systems fall into this category. + +*Low Risk* + Systems to which untrusted parties do not have access, cannot + create file names of their own choice (even remotely) and which + contain no security flaws which might enable an untrusted third + party to gain access. Most systems do not fall into this category + because there are many ways in which external parties can affect + the names of files that are created on your system. The system on + which I am writing this for example automatically downloads + software updates from the Internet; the names of the files in + which these updates exist are chosen by third parties(1). + + In the discussion above, "risk" denotes the likelihood that someone +can cause `find', `xargs', `locate' or some other program which is +controlled by them to do something you did not intend. The levels of +risk suggested do not take any account of the consequences of this sort +of event. That is, if you operate a "low risk" type system, but the +consequences of a security problem are disastrous, then you should +still give serious thought to all the possible security problems, many +of which of course will not be discussed here - this section of the +manual is intended to be informative but not comprehensive or +exhaustive. + + If you are responsible for the operation of a system where the +consequences of a security problem could be very important, you should +do two things:- + + 1. Define a security policy which defines who is allowed to do what + on your system. + + 2. Seek competent advice on how to enforce your policy, detect + breaches of that policy, and take account of any potential problems + that might fall outside the scope of your policy. + + ---------- Footnotes ---------- + + (1) Of course, I trust these parties to a large extent anyway, +because I install software provided by them; I choose to trust them in +this way, and that's a deliberate choice + + +File: find.info, Node: Security Considerations for find, Next: Security Considerations for xargs, Prev: Levels of Risk, Up: Security Considerations + +10.2 Security Considerations for `find' +======================================= + +Some of the actions `find' might take have a direct effect; these +include `-exec' and `-delete'. However, it is also common to use +`-print' explicitly or implicitly, and so if `find' produces the wrong +list of file names, that can also be a security problem; consider the +case for example where `find' is producing a list of files to be +deleted. + + We normally assume that the `find' command line expresses the file +selection criteria and actions that the user had in mind - that is, the +command line is "trusted" data. + + From a security analysis point of view, the output of `find' should +be correct; that is, the output should contain only the names of those +files which meet the user's criteria specified on the command line. +This applies for the `-exec' and `-delete' actions; one can consider +these to be part of the output. + + On the other hand, the contents of the filesystem can be manipulated +by other people, and hence we regard this as "untrusted" data. This +implies that the `find' command line is a filter which converts the +untrusted contents of the filesystem into a correct list of output +files. + + The filesystem will in general change while `find' is searching it; +in fact, most of the potential security problems with `find' relate to +this issue in some way. + + "Race conditions" are a general class of security problem where the +relative ordering of actions taken by `find' (for example) and +something else are critically important in getting the correct and +expected result(1) . + + For `find', an attacker might move or rename files or directories in +the hope that an action might be taken against a file which was not +normally intended to be affected. Alternatively, this sort of attack +might be intended to persuade `find' to search part of the filesystem +which would not normally be included in the search (defeating the +`-prune' action for example). + +* Menu: + +* Problems with -exec and filenames:: +* Changing the Current Working Directory:: +* Race Conditions with -exec:: +* Race Conditions with -print and -print0:: + + ---------- Footnotes ---------- + + (1) This is more or less the definition of the term "race condition" + + +File: find.info, Node: Problems with -exec and filenames, Next: Changing the Current Working Directory, Up: Security Considerations for find + +10.2.1 Problems with -exec and filenames +---------------------------------------- + +It is safe in many cases to use the `-execdir' action with any file +name. Because `-execdir' prefixes the arguments it passes to programs +with `./', you will not accidentally pass an argument which is +interpreted as an option. For example the file `-f' would be passed to +`rm' as `./-f', which is harmless. + + However, your degree of safety does depend on the nature of the +program you are running. For example constructs such as these two +commands + + # risky + find -exec sh -c "something {}" \; + find -execdir sh -c "something {}" \; + + are very dangerous. The reason for this is that the `{}' is +expanded to a filename which might contain a semicolon or other +characters special to the shell. If for example someone creates the +file `/tmp/foo; rm -rf $HOME' then the two commands above could delete +someone's home directory. + + So for this reason do not run any command which will pass untrusted +data (such as the names of files) to commands which interpret arguments +as commands to be further interpreted (for example `sh'). + + In the case of the shell, there is a clever workaround for this +problem: + + # safer + find -exec sh -c 'something "$@"' {} \; + find -execdir sh -c 'something "$@"' {}\; + + This approach is not guaranteed to avoid every problem, but it is +much safer than substituting data of an attacker's choice into the text +of a shell command. + + +File: find.info, Node: Changing the Current Working Directory, Next: Race Conditions with -exec, Prev: Problems with -exec and filenames, Up: Security Considerations for find + +10.2.2 Changing the Current Working Directory +--------------------------------------------- + +As `find' searches the filesystem, it finds subdirectories and then +searches within them by changing its working directory. First, `find' +reaches and recognises a subdirectory. It then decides if that +subdirectory meets the criteria for being searched; that is, any +`-xdev' or `-prune' expressions are taken into account. The `find' +program will then change working directory and proceed to search the +directory. + + A race condition attack might take the form that once the checks +relevant to `-xdev' and `-prune' have been done, an attacker might +rename the directory that was being considered, and put in its place a +symbolic link that actually points somewhere else. + + The idea behind this attack is to fool `find' into going into the +wrong directory. This would leave `find' with a working directory +chosen by an attacker, bypassing any protection apparently provided by +`-xdev' and `-prune', and any protection provided by being able to +_not_ list particular directories on the `find' command line. This +form of attack is particularly problematic if the attacker can predict +when the `find' command will be run, as is the case with `cron' tasks +for example. + + GNU `find' has specific safeguards to prevent this general class of +problem. The exact form of these safeguards depends on the properties +of your system. + +* Menu: + +* O_NOFOLLOW:: Safely changing directory using fchdir(). +* Systems without O_NOFOLLOW:: Checking for symbolic links after chdir(). + + +File: find.info, Node: O_NOFOLLOW, Next: Systems without O_NOFOLLOW, Up: Changing the Current Working Directory + +10.2.2.1 O_NOFOLLOW +................... + +If your system supports the O_NOFOLLOW flag (1) to the `open(2)' system +call, `find' uses it when safely changing directory. The target +directory is first opened and then `find' changes working directory +with the `fchdir()' system call. This ensures that symbolic links are +not followed, preventing the sort of race condition attack in which use +is made of symbolic links. + + If for any reason this approach does not work, `find' will fall back +on the method which is normally used if O_NOFOLLOW is not supported. + + You can tell if your system supports O_NOFOLLOW by running + + find --version + + This will tell you the version number and which features are enabled. +For example, if I run this on my system now, this gives: + GNU find version 4.2.18-CVS + Features enabled: D_TYPE O_NOFOLLOW(enabled) + + Here, you can see that I am running a version of `find' which was +built from the development (CVS) code prior to the release of +findutils-4.2.18, and that the D_TYPE and O_NOFOLLOW features are +present. O_NOFOLLOW is qualified with "enabled". This simply means +that the current system seems to support O_NOFOLLOW. This check is +needed because it is possible to build `find' on a system that defines +O_NOFOLLOW and then run it on a system that ignores the O_NOFOLLOW +flag. We try to detect such cases at startup by checking the operating +system and version number; when this happens you will see +"O_NOFOLLOW(disabled)" instead. + + ---------- Footnotes ---------- + + (1) GNU/Linux (kernel version 2.1.126 and later) and FreeBSD +(3.0-CURRENT and later) support this + + +File: find.info, Node: Systems without O_NOFOLLOW, Prev: O_NOFOLLOW, Up: Changing the Current Working Directory + +10.2.2.2 Systems without O_NOFOLLOW +................................... + +The strategy for preventing this type of problem on systems that lack +support for the O_NOFOLLOW flag is more complex. Each time `find' +changes directory, it examines the directory it is about to move to, +issues the `chdir()' system call, and then checks that it has ended up +in the subdirectory it expected. If all is as expected, processing +continues as normal. However, there are two main reasons why the +directory might change: the use of an automounter and the someone +removing the old directory and replacing it with something else while +`find' is trying to descend into it. + + Where a filesystem "automounter" is in use it can be the case that +the use of the `chdir()' system call can itself cause a new filesystem +to be mounted at that point. On systems that do not support +O_NOFOLLOW, this will cause `find''s security check to fail. + + However, this does not normally represent a security problem, since +the automounter configuration is normally set up by the system +administrator. Therefore, if the `chdir()' sanity check fails, `find' +will make one more attempt(1). If that succeeds, execution carries on +as normal. This is the usual case for automounters. + + Where an attacker is trying to exploit a race condition, the problem +may not have gone away on the second attempt. If this is the case, +`find' will issue a warning message and then ignore that subdirectory. +When this happens, actions such as `-exec' or `-print' may already have +taken place for the problematic subdirectory. This is because `find' +applies tests and actions to directories before searching within them +(unless `-depth' was specified). + + Because of the nature of the directory-change operation and security +check, in the worst case the only things that `find' would have done +with the directory are to move into it and back out to the original +parent. No operations would have been performed within that directory. + + ---------- Footnotes ---------- + + (1) This may not be the case for the fts-based executable + + +File: find.info, Node: Race Conditions with -exec, Next: Race Conditions with -print and -print0, Prev: Changing the Current Working Directory, Up: Security Considerations for find + +10.2.3 Race Conditions with -exec +--------------------------------- + +The `-exec' action causes another program to be run. It passes to the +program the name of the file which is being considered at the time. +The invoked program will typically then perform some action on that +file. Once again, there is a race condition which can be exploited +here. We shall take as a specific example the command + + find /tmp -path /tmp/umsp/passwd -exec /bin/rm + + In this simple example, we are identifying just one file to be +deleted and invoking `/bin/rm' to delete it. A problem exists because +there is a time gap between the point where `find' decides that it +needs to process the `-exec' action and the point where the `/bin/rm' +command actually issues the `unlink()' system call to delete the file +from the filesystem. Within this time period, an attacker can rename +the `/tmp/umsp' directory, replacing it with a symbolic link to `/etc'. +There is no way for `/bin/rm' to determine that it is working on the +same file that `find' had in mind. Once the symbolic link is in place, +the attacker has persuaded `find' to cause the deletion of the +`/etc/passwd' file, which is not the effect intended by the command +which was actually invoked. + + One possible defence against this type of attack is to modify the +behaviour of `-exec' so that the `/bin/rm' command is run with the +argument `./passwd' and a suitable choice of working directory. This +would allow the normal sanity check that `find' performs to protect +against this form of attack too. Unfortunately, this strategy cannot +be used as the POSIX standard specifies that the current working +directory for commands invoked with `-exec' must be the same as the +current working directory from which `find' was invoked. This means +that the `-exec' action is inherently insecure and can't be fixed. + + GNU `find' implements a more secure variant of the `-exec' action, +`-execdir'. The `-execdir' action ensures that it is not necessary to +dereference subdirectories to process target files. The current +directory used to invoke programs is the same as the directory in which +the file to be processed exists (`/tmp/umsp' in our example, and only +the basename of the file to be processed is passed to the invoked +command, with a `./' prepended (giving `./passwd' in our example). + + The `-execdir' action refuses to do anything if the current +directory is included in the $PATH environment variable. This is +necessary because `-execdir' runs programs in the same directory in +which it finds files - in general, such a directory might be writable +by untrusted users. For similar reasons, `-execdir' does not allow +`{}' to appear in the name of the command to be run. + + +File: find.info, Node: Race Conditions with -print and -print0, Prev: Race Conditions with -exec, Up: Security Considerations for find + +10.2.4 Race Conditions with -print and -print0 +---------------------------------------------- + +The `-print' and `-print0' actions can be used to produce a list of +files matching some criteria, which can then be used with some other +command, perhaps with `xargs'. Unfortunately, this means that there is +an unavoidable time gap between `find' deciding that one or more files +meet its criteria and the relevant command being executed. For this +reason, the `-print' and `-print0' actions are just as insecure as +`-exec'. + + In fact, since the construction + + find ... -print | xargs .... + + does not cope correctly with newlines or other "white space" in file +names, and copes poorly with file names containing quotes, the `-print' +action is less secure even than `-print0'. + + +File: find.info, Node: Security Considerations for xargs, Next: Security Considerations for locate, Prev: Security Considerations for find, Up: Security Considerations + +10.3 Security Considerations for `xargs' +======================================== + +The description of the race conditions affecting the `-print' action of +`find' shows that `xargs' cannot be secure if it is possible for an +attacker to modify a filesystem after `find' has started but before +`xargs' has completed all its actions. + + However, there are other security issues that exist even if it is not +possible for an attacker to have access to the filesystem in real time. +Firstly, if it is possible for an attacker to create files with names +of their choice on the filesystem, then `xargs' is insecure unless the +`-0' option is used. If a file with the name +`/home/someuser/foo/bar\n/etc/passwd' exists (assume that `\n' stands +for a newline character), then `find ... -print' can be persuaded to +print three separate lines: + + /home/someuser/foo/bar + + /etc/passwd + + If it finds a blank line in the input, `xargs' will ignore it. +Therefore, if some action is to be taken on the basis of this list of +files, the `/etc/passwd' file would be included even if this was not +the intent of the person running find. There are circumstances in +which an attacker can use this to their advantage. The same +consideration applies to file names containing ordinary spaces rather +than newlines, except that of course the list of file names will no +longer contain an "extra" newline. + + This problem is an unavoidable consequence of the default behaviour +of the `xargs' command, which is specified by the POSIX standard. The +only ways to avoid this problem are either to avoid all use of `xargs' +in favour for example of `find -exec' or (where available) `find +-execdir', or to use the `-0' option, which ensures that `xargs' +considers file names to be separated by ASCII NUL characters rather +than whitespace. However, useful as this option is, the POSIX standard +does not make it mandatory. + + POSIX also specifies that `xargs' interprets quoting and trailing +whitespace specially in filenames, too. This means that using `find +... -print | xargs ...' can cause the commands run by `xargs' to +receive a list of file names which is not the same as the list printed +by `find'. The interpretation of quotes and trailing whitespace is +turned off by the `-0' argument to `xargs', which is another reason to +use that option. + + +File: find.info, Node: Security Considerations for locate, Next: Security Summary, Prev: Security Considerations for xargs, Up: Security Considerations + +10.4 Security Considerations for `locate' +========================================= + +10.4.1 Race Conditions +---------------------- + +It is fairly unusual for the output of `locate' to be fed into another +command. However, if this were to be done, this would raise the same +set of security issues as the use of `find ... -print'. Although the +problems relating to whitespace in file names can be resolved by using +`locate''s `-0' option, this still leaves the race condition problems +associated with `find ... -print0'. There is no way to avoid these +problems in the case of `locate'. + +10.4.2 Long File Name Bugs with Old-Format Databases +---------------------------------------------------- + +Old versions of `locate' have a bug in the way that old-format +databases are read. This bug affects the following versions of +`locate': + + 1. All releases prior to 4.2.31 + + 2. All 4.3.x releases prior to 4.3.7 + + The affected versions of `locate' read file names into a +fixed-length 1026 byte buffer, allocated on the heap. This buffer is +not extended if file names are too long to fit into the buffer. No +range checking on the length of the filename is performed. This could +in theory lead to a privilege escalation attack. Findutils versions +4.3.0 to 4.3.6 are also affected. + + On systems using the old database format and affected versions of +`locate', carefully-chosen long file names could in theory allow +malicious users to run code of their choice as any user invoking locate. + + If remote users can choose the names of files stored on your system, +and these files are indexed by `updatedb', this may be a remote +security vulnerability. Findutils version 4.2.31 and findutils version +4.3.7 include fixes for this problem. The `updatedb', `bigram' and +`code' programs do no appear to be affected. + + If you are also using GNU coreutils, you can use the following +command to determine the length of the longest file name on a given +system: + + find / -print0 | tr -c '\0' 'x' | tr '\0' '\n' | wc -L + + Although this problem is significant, the old database format is not +the default, and use of the old database format is not common. Most +installations and most users will not be affected by this problem. + + +File: find.info, Node: Security Summary, Prev: Security Considerations for locate, Up: Security Considerations + +10.5 Summary +============ + +Where untrusted parties can create files on the system, or affect the +names of files that are created, all uses for `find', `locate' and +`xargs' have known security problems except the following: + +Informational use only + Uses where the programs are used to prepare lists of file names + upon which no further action will ever be taken. + +`-delete' + Use of the `-delete' action with `find' to delete files which meet + specified criteria + +`-execdir' + Use of the `-execdir' action with `find' where the `PATH' + environment variable contains directories which contain only + trusted programs. + + +File: find.info, Node: Error Messages, Next: Primary Index, Prev: Security Considerations, Up: Top + +11 Error Messages +***************** + +This section describes some of the error messages sometimes made by +`find', `xargs', or `locate', explains them and in some cases provides +advice as to what you should do about this. + + This manual is written in English. The GNU findutils software +features translations of error messages for many languages. For this +reason the error messages produced by the programs are made to be as +self-explanatory as possible. This approach avoids leaving people to +figure out which test an English-language error message corresponds to. +Error messages which are self-explanatory will not normally be +mentioned in this document. For those messages mentioned in this +document, only the English-language version of the message will be +listed. + +* Menu: + +* Error Messages From find:: +* Error Messages From xargs:: +* Error Messages From locate:: +* Error Messages From updatedb:: + + +File: find.info, Node: Error Messages From find, Next: Error Messages From xargs, Up: Error Messages + +11.1 Error Messages From `find' +=============================== + +Most error messages produced by find are self-explanatory. Error +messages sometimes include a filename. When this happens, the filename +is quoted in order to prevent any unusual characters in the filename +making unwanted changes in the state of the terminal. + +`invalid predicate `-foo'' + This means that the `find' command line included something that + started with a dash or other special character. The `find' + program tried to interpret this as a test, action or option, but + didn't recognise it. If it was intended to be a test, check what + was specified against the documentation. If, on the other hand, + the string is the name of a file which has been expanded from a + wildcard (for example because you have a `*' on the command line), + consider using `./*' or just `.' instead. + +`unexpected extra predicate' + This usually happens if you have an extra bracket on the command + line (for example `find . -print \)'). + +`Warning: filesystem /path/foo has recently been mounted' +`Warning: filesystem /path/foo has recently been unmounted' + These messages might appear when `find' moves into a directory and + finds that the device number and inode are different to what it + expected them to be. If the directory `find' has moved into is on + an network filesystem (NFS), it will not issue this message, + because `automount' frequently mounts new filesystems on + directories as you move into them (that is how it knows you want + to use the filesystem). So, if you do see this message, be wary -- + `automount' may not have been responsible. Consider the + possibility that someone else is manipulating the filesystem while + `find' is running. Some people might do this in order to mislead + `find' or persuade it to look at one set of files when it thought + it was looking at another set. + +`/path/foo changed during execution of find (old device number 12345, new device number 6789, filesystem type is ) [ref XXX]' + This message is issued when `find' moves into a directory and ends + up somewhere it didn't expect to be. This happens in one of two + circumstances. Firstly, this happens when `automount' intervenes + on a system where `find' doesn't know how to determine what the + current set of mounted filesystems is. + + Secondly, this can happen when the device number of a directory + appears to change during a change of current directory, but `find' + is moving up the filesystem hierarchy rather than down into it. + In order to prevent `find' wandering off into some unexpected part + of the filesystem, we stop it at this point. + +`Don't know how to use getmntent() to read `/etc/mtab'. This is a bug.' + This message is issued when a problem similar to the above occurs + on a system where `find' doesn't know how to figure out the current + list of mount points. Ask for help on . + +`/path/foo/bar changed during execution of find (old inode number 12345, new inode number 67893, filesystem type is ) [ref XXX]"),' + This message is issued when `find' moves into a directory and + discovers that the inode number of that directory is different + from the inode number that it obtained when it examined the + directory previously. This usually means that while `find' was + deep in a directory hierarchy doing a time consuming operation, + somebody has moved one of the parent directories to another + location in the same filesystem. This may or may not have been + done maliciously. In any case, `find' stops at this point to + avoid traversing parts of the filesystem that it wasn't intended. + You can use `ls -li' or `find /path -inum 12345 -o -inum 67893' to + find out more about what has happened. + +`sanity check of the fnmatch() library function failed.' + Please submit a bug report. You may well be asked questions about + your system, and if you compiled the `findutils' code yourself, + you should keep your copy of the build tree around. The likely + explanation is that your system has a buggy implementation of + `fnmatch' that looks enough like the GNU version to fool + `configure', but which doesn't work properly. + +`cannot fork' + This normally happens if you use the `-exec' action or something + similar (`-ok' and so forth) but the system has run out of free + process slots. This is either because the system is very busy and + the system has reached its maximum process limit, or because you + have a resource limit in place and you've reached it. Check the + system for runaway processes (with `ps', if possible). Some + process slots are normally reserved for use by `root'. + +`some-program terminated by signal 99' + Some program which was launched with `-exec' or similar was killed + with a fatal signal. This is just an advisory message. + + +File: find.info, Node: Error Messages From xargs, Next: Error Messages From locate, Prev: Error Messages From find, Up: Error Messages + +11.2 Error Messages From xargs +============================== + +`environment is too large for exec' + This message means that you have so many environment variables set + (or such large values for them) that there is no room within the + system-imposed limits on program command line argument length to + invoke any program. This is an unlikely situation and is more + likely result of an attempt to test the limits of `xargs', or + break it. Please try unsetting some environment variables, or + exiting the current shell. You can also use `xargs --show-limits' + to understand the relevant sizes. + +`can not fit single argument within argument list size limit' + You are using the `-I' option and `xargs' doesn't have enough + space to build a command line because it has read a really large + item and it doesn't fit. You can probably work around this + problem with the `-s' option, but the default size is pretty + large. This is a rare situation and is more likely an attempt to + test the limits of `xargs', or break it. Otherwise, you will need + to try to shorten the problematic argument or not use `xargs'. + +`cannot fork' + See the description of the similar message for `find'. + +`: exited with status 255; aborting' + When a command run by `xargs' exits with status 255, `xargs' is + supposed to stop. If this is not what you intended, wrap the + program you are trying to invoke in a shell script which doesn't + return status 255. + +`: terminated by signal 99' + See the description of the similar message for `find'. + + +File: find.info, Node: Error Messages From locate, Next: Error Messages From updatedb, Prev: Error Messages From xargs, Up: Error Messages + +11.3 Error Messages From `locate' +================================= + +`warning: database `/usr/local/var/locatedb' is more than 8 days old' + The `locate' program relies on a database which is periodically + built by the `updatedb' program. That hasn't happened in a long + time. To fix this problem, run `updatedb' manually. This can + often happen on systems that are generally not left on, so the + periodic "cron" task which normally does this doesn't get a chance + to run. + +`locate database `/usr/local/var/locatedb' is corrupt or invalid' + This should not happen. Re-run `updatedb'. If that works, but + `locate' still produces this error, run `locate --version' and + `updatedb --version'. These should produce the same output. If + not, you are using a mixed toolset; check your `$PATH' environment + variable and your shell aliases (if you have any). If both + programs claim to be GNU versions, this is a bug; all versions of + these programs should interoperate without problem. Ask for help + on . + + +File: find.info, Node: Error Messages From updatedb, Prev: Error Messages From locate, Up: Error Messages + +11.4 Error Messages From updatedb +================================= + +The `updatedb' program (and the programs it invokes) do issue error +messages, but none seem to be candidates for guidance. If you are +having a problem understanding one of these, ask for help on +. + + +File: find.info, Node: Primary Index, Prev: Error Messages, Up: Top + +`find' Primary Index +******************** + +This is a list of all of the primaries (tests, actions, and options) +that make up `find' expressions for selecting files. *Note find +Expressions::, for more information on expressions. + +[index] +* Menu: + +* !: Combining Primaries With Operators. + (line 14) +* (): Combining Primaries With Operators. + (line 10) +* ,: Combining Primaries With Operators. + (line 27) +* -a: Combining Primaries With Operators. + (line 20) +* -amin: Age Ranges. (line 20) +* -and: Combining Primaries With Operators. + (line 20) +* -anewer: Comparing Timestamps. + (line 62) +* -atime: Age Ranges. (line 9) +* -cmin: Age Ranges. (line 21) +* -cnewer: Comparing Timestamps. + (line 63) +* -ctime: Age Ranges. (line 10) +* -d: Directories. (line 29) +* -daystart: Age Ranges. (line 31) +* -delete: Delete Files. (line 7) +* -depth: Directories. (line 21) +* -empty: Size. (line 50) +* -exec <1>: Multiple Files. (line 25) +* -exec: Single File. (line 34) +* -execdir <1>: Multiple Files. (line 15) +* -execdir: Single File. (line 9) +* -executable: Mode Bits. (line 42) +* -false: Combining Primaries With Operators. + (line 47) +* -fls: Print File Information. + (line 48) +* -fprint: Print File Name. (line 13) +* -fprint0: Safe File Name Handling. + (line 16) +* -fprintf: Print File Information. + (line 65) +* -fstype: Filesystems. (line 22) +* -gid: Owner. (line 13) +* -group: Owner. (line 8) +* -ignore_readdir_race: Directories. (line 86) +* -ilname: Symbolic Links. (line 87) +* -iname: Base Name Patterns. (line 8) +* -inum: Hard Links. (line 41) +* -ipath: Full Name Patterns. (line 20) +* -iregex: Full Name Patterns. (line 26) +* -iwholename: Full Name Patterns. (line 8) +* -links: Hard Links. (line 53) +* -lname: Symbolic Links. (line 86) +* -ls: Print File Information. + (line 7) +* -maxdepth: Directories. (line 11) +* -mindepth: Directories. (line 16) +* -mmin: Age Ranges. (line 22) +* -mount: Filesystems. (line 15) +* -mtime: Age Ranges. (line 11) +* -name: Base Name Patterns. (line 7) +* -newer: Comparing Timestamps. + (line 64) +* -newerXY: Comparing Timestamps. + (line 7) +* -nogroup: Owner. (line 18) +* -noignore_readdir_race: Directories. (line 103) +* -noleaf: Directories. (line 71) +* -not: Combining Primaries With Operators. + (line 14) +* -nouser: Owner. (line 17) +* -o: Combining Primaries With Operators. + (line 24) +* -ok: Querying. (line 17) +* -okdir: Querying. (line 11) +* -or: Combining Primaries With Operators. + (line 24) +* -path: Full Name Patterns. (line 19) +* -perm: Mode Bits. (line 45) +* -print: Print File Name. (line 7) +* -print0: Safe File Name Handling. + (line 12) +* -printf: Print File Information. + (line 53) +* -prune: Directories. (line 34) +* -quit: Directories. (line 62) +* -readable: Mode Bits. (line 34) +* -regex: Full Name Patterns. (line 25) +* -regextype: Full Name Patterns. (line 37) +* -samefile: Hard Links. (line 36) +* -size: Size. (line 7) +* -true: Combining Primaries With Operators. + (line 44) +* -type: Type. (line 7) +* -uid: Owner. (line 12) +* -used: Comparing Timestamps. + (line 74) +* -user: Owner. (line 7) +* -wholename: Full Name Patterns. (line 7) +* -writable: Mode Bits. (line 37) +* -xdev: Filesystems. (line 14) +* -xtype: Type. (line 36) +* ago in date strings: Relative items in date strings. + (line 23) +* am in date strings: Time of day items. (line 22) +* day in date strings: Relative items in date strings. + (line 15) +* first in date strings: General date syntax. (line 26) +* fortnight in date strings: Relative items in date strings. + (line 15) +* get_date: Date input formats. (line 6) +* hour in date strings: Relative items in date strings. + (line 15) +* last DAY: Day of week items. (line 15) +* last in date strings: General date syntax. (line 26) +* midnight in date strings: Time of day items. (line 22) +* minute in date strings: Relative items in date strings. + (line 15) +* month in date strings: Relative items in date strings. + (line 15) +* next DAY: Day of week items. (line 15) +* next in date strings: General date syntax. (line 26) +* noon in date strings: Time of day items. (line 22) +* now in date strings: Relative items in date strings. + (line 33) +* pm in date strings: Time of day items. (line 22) +* this in date strings: Relative items in date strings. + (line 33) +* today in date strings: Relative items in date strings. + (line 33) +* tomorrow in date strings: Relative items in date strings. + (line 29) +* week in date strings: Relative items in date strings. + (line 15) +* year in date strings: Relative items in date strings. + (line 15) +* yesterday in date strings: Relative items in date strings. + (line 29) + + + +Tag Table: +Node: Top1523 +Node: Introduction2650 +Node: Scope4946 +Node: Overview6892 +Node: find Expressions8763 +Node: Finding Files10595 +Node: Name11060 +Node: Base Name Patterns11688 +Ref: Base Name Patterns-Footnote-112786 +Node: Full Name Patterns12998 +Node: Fast Full Name Search15661 +Node: Shell Pattern Matching18708 +Node: Links20798 +Node: Symbolic Links21233 +Node: Hard Links25735 +Node: Time28289 +Node: Age Ranges29266 +Node: Comparing Timestamps30955 +Node: Size33820 +Node: Type35662 +Node: Owner37330 +Node: Mode Bits38155 +Node: Contents43282 +Node: Directories44453 +Node: Filesystems49414 +Node: Combining Primaries With Operators50765 +Node: Actions52383 +Node: Print File Name52945 +Node: Print File Information53962 +Node: Escapes56971 +Node: Format Directives57722 +Node: Name Directives59185 +Node: Ownership Directives60171 +Node: Size Directives61179 +Node: Location Directives62550 +Node: Time Directives63669 +Node: Time Formats64572 +Node: Time Components65008 +Node: Date Components65514 +Node: Combined Time Formats66337 +Node: Formatting Flags67054 +Node: Run Commands67666 +Node: Single File68024 +Node: Multiple Files69946 +Node: Unsafe File Name Handling74610 +Node: Safe File Name Handling76323 +Node: Unusual Characters in File Names77899 +Node: Limiting Command Size80935 +Node: Interspersing File Names83683 +Node: Querying86138 +Node: Delete Files87668 +Node: Adding Tests88072 +Node: Databases90712 +Node: Database Locations91430 +Node: Database Formats92877 +Node: LOCATE02 Database Format93986 +Node: Sample LOCATE02 Database95677 +Node: slocate Database Format96361 +Node: Old Database Format97368 +Node: Newline Handling100553 +Node: File Permissions101999 +Node: Mode Structure102601 +Node: Symbolic Modes106289 +Node: Setting Permissions107380 +Node: Copying Permissions109986 +Node: Changing Special Mode Bits110798 +Node: Conditional Executability112613 +Node: Multiple Changes113150 +Node: Umask and Protection114810 +Node: Numeric Modes115908 +Node: Directory Setuid and Setgid117801 +Node: Date input formats120056 +Node: General date syntax122383 +Node: Calendar date items125335 +Node: Time of day items127333 +Node: Time zone items129450 +Node: Day of week items130685 +Node: Relative items in date strings131675 +Node: Pure numbers in date strings134478 +Node: Seconds since the Epoch135460 +Node: Specifying time zone rules137082 +Node: Authors of get_date139447 +Node: Reference140200 +Node: Invoking find140550 +Node: Filesystem Traversal Options142032 +Node: Warning Messages143125 +Node: Optimisation Options144879 +Node: Debug Options146612 +Node: Find Expressions147666 +Node: Invoking locate148032 +Node: Invoking updatedb154358 +Node: Invoking xargs158598 +Node: Regular Expressions163628 +Node: findutils-default regular expression syntax164823 +Node: awk regular expression syntax167328 +Node: egrep regular expression syntax169213 +Node: emacs regular expression syntax171424 +Node: gnu-awk regular expression syntax173952 +Node: grep regular expression syntax176292 +Node: posix-awk regular expression syntax179017 +Node: posix-basic regular expression syntax181288 +Node: posix-egrep regular expression syntax183926 +Node: posix-extended regular expression syntax186299 +Node: Environment Variables188774 +Node: Common Tasks190718 +Node: Viewing And Editing191143 +Node: Archiving192149 +Node: Cleaning Up193781 +Node: Strange File Names195570 +Node: Fixing Permissions197220 +Node: Classifying Files197784 +Node: Worked Examples198502 +Node: Deleting Files199139 +Node: Updating A Timestamp File212158 +Node: Security Considerations218888 +Node: Levels of Risk220424 +Ref: Levels of Risk-Footnote-1223224 +Node: Security Considerations for find223403 +Ref: Security Considerations for find-Footnote-1225727 +Node: Problems with -exec and filenames225800 +Node: Changing the Current Working Directory227423 +Node: O_NOFOLLOW229194 +Ref: O_NOFOLLOW-Footnote-1230840 +Node: Systems without O_NOFOLLOW230942 +Ref: Systems without O_NOFOLLOW-Footnote-1233087 +Node: Race Conditions with -exec233149 +Node: Race Conditions with -print and -print0236062 +Node: Security Considerations for xargs236984 +Node: Security Considerations for locate239488 +Node: Security Summary241870 +Node: Error Messages242629 +Node: Error Messages From find243641 +Node: Error Messages From xargs248760 +Node: Error Messages From locate250520 +Node: Error Messages From updatedb251752 +Node: Primary Index252155 + +End Tag Table diff --git a/doc/find.texi b/doc/find.texi new file mode 100644 index 0000000..c862f2a --- /dev/null +++ b/doc/find.texi @@ -0,0 +1,5043 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename find.info +@settitle Finding Files +@c For double-sided printing, uncomment: +@c @setchapternewpage odd +@c %**end of header + +@include version.texi +@include ../locate/dblocation.texi + +@iftex +@finalout +@end iftex + +@dircategory Basics +@direntry +* Finding files: (find). Operating on files matching certain criteria. +@end direntry + +@dircategory Individual utilities +@direntry +* find: (find)Invoking find. Finding and acting on files. +* locate: (find)Invoking locate. Finding files in a database. +* updatedb: (find)Invoking updatedb. Building the locate database. +* xargs: (find)Invoking xargs. Operating on many files. +@end direntry + +@copying + +This file documents the GNU utilities for finding files that match +certain criteria and performing various operations on them. + +Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005 Free +Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +@ignore +Permission is granted to process this file through TeX and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). + +@end ignore +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be stated in a +translation approved by the Foundation. +@end copying + +@titlepage +@title Finding Files +@subtitle Edition @value{EDITION}, for GNU @code{find} version @value{VERSION} +@subtitle @value{UPDATED} +@author by David MacKenzie and James Youngman + +@page +@vskip 0pt plus 1filll +@insertcopying{} +@end titlepage + +@contents + +@ifnottex +@node Top +@top GNU Findutils +@comment node-name, next, previous, up + +This file documents the GNU utilities for finding files that match +certain criteria and performing various actions on them. + +This is edition @value{EDITION}, for @code{find} version @value{VERSION}. +@end ifnottex + +@c The master menu, created with texinfo-master-menu, goes here. + +@menu +* Introduction:: Summary of the tasks this manual describes. +* Finding Files:: Finding files that match certain criteria. +* Actions:: Doing things to files you have found. +* Databases:: Maintaining file name databases. +* File Permissions:: How to control access to files. +* Date input formats:: Specifying literal times. +* Reference:: Summary of how to invoke the programs. +* Common Tasks:: Solutions to common real-world problems. +* Worked Examples:: Examples demonstrating more complex points. +* Security Considerations:: Security issues relating to findutils. +* Error Messages:: Explanations of some messages you might see. +* Primary Index:: The components of @code{find} expressions. +@end menu + +@node Introduction +@chapter Introduction + +This manual shows how to find files that meet criteria you specify, +and how to perform various actions on the files that you find. The +principal programs that you use to perform these tasks are +@code{find}, @code{locate}, and @code{xargs}. Some of the examples in +this manual use capabilities specific to the GNU versions of those +programs. + +GNU @code{find} was originally written by Eric Decker, with +enhancements by David MacKenzie, Jay Plett, and Tim Wood. GNU +@code{xargs} was originally written by Mike Rendell, with enhancements +by David MacKenzie. GNU @code{locate} and its associated utilities +were originally written by James Woods, with enhancements by David +MacKenzie. The idea for @samp{find -print0} and @samp{xargs -0} came +from Dan Bernstein. The current maintainer of GNU findutils (and this +manual) is James Youngman. Many other people have contributed bug +fixes, small improvements, and helpful suggestions. Thanks! + +To report a bug in GNU findutils, please use the form on the Savannah +web site at +@code{http://savannah.gnu.org/bugs/?group=findutils}. Reporting bugs +this way means that you will then be able to track progress in fixing +the problem. + +If you don't have web access, you can also just send mail to the +mailing list. The mailing list @email{bug-findutils@@gnu.org} carries +discussion of bugs in findutils, questions and answers about the +software and discussion of the development of the programs. To join +the list, send email to @email{bug-findutils-request@@gnu.org}. + +Please read any relevant sections of this manual before asking for +help on the mailing list. You may also find it helpful to read the +NON-BUGS section of the @code{find} manual page. + +If you ask for help on the mailing list, people will be able to help +you much more effectively if you include the following things: + +@itemize @bullet +@item The version of the software you are running. You can find this +out by running @samp{locate --version}. +@item What you were trying to do +@item The @emph{exact} command line you used +@item The @emph{exact} output you got (if this is very long, try to +find a smaller example which exhibits the same problem) +@item The output you expected to get +@end itemize + +@menu +* Scope:: +* Overview:: +* find Expressions:: +@end menu + +@node Scope +@section Scope + +For brevity, the word @dfn{file} in this manual means a regular file, +a directory, a symbolic link, or any other kind of node that has a +directory entry. A directory entry is also called a @dfn{file name}. +A file name may contain some, all, or none of the directories in a +path that leads to the file. These are all examples of what this +manual calls ``file names'': + +@example +parser.c +README +./budget/may-94.sc +fred/.cshrc +/usr/local/include/termcap.h +@end example + +A @dfn{directory tree} is a directory and the files it contains, all +of its subdirectories and the files they contain, etc. It can also be +a single non-directory file. + +These programs enable you to find the files in one or more directory +trees that: + +@itemize @bullet +@item +have names that contain certain text or match a certain pattern; +@item +are links to certain files; +@item +were last used during a certain period of time; +@item +are within a certain size range; +@item +are of a certain type (regular file, directory, symbolic link, etc.); +@item +are owned by a certain user or group; +@item +have certain access permissions or special mode bits; +@item +contain text that matches a certain pattern; +@item +are within a certain depth in the directory tree; +@item +or some combination of the above. +@end itemize + +Once you have found the files you're looking for (or files that are +potentially the ones you're looking for), you can do more to them than +simply list their names. You can get any combination of the files' +attributes, or process the files in many ways, either individually or +in groups of various sizes. Actions that you might want to perform on +the files you have found include, but are not limited to: + +@itemize @bullet +@item +view or edit +@item +store in an archive +@item +remove or rename +@item +change access permissions +@item +classify into groups +@end itemize + +This manual describes how to perform each of those tasks, and more. + +@node Overview +@section Overview + +The principal programs used for making lists of files that match given +criteria and running commands on them are @code{find}, @code{locate}, +and @code{xargs}. An additional command, @code{updatedb}, is used by +system administrators to create databases for @code{locate} to use. + +@code{find} searches for files in a directory hierarchy and prints +information about the files it found. It is run like this: + +@example +find @r{[}@var{file}@dots{}@r{]} @r{[}@var{expression}@r{]} +@end example + +@noindent +Here is a typical use of @code{find}. This example prints the names +of all files in the directory tree rooted in @file{/usr/src} whose +name ends with @samp{.c} and that are larger than 100 Kilobytes. +@example +find /usr/src -name '*.c' -size +100k -print +@end example + +Notice that the wildcard must be enclosed in quotes in order to +protect it from expansion by the shell. + +@code{locate} searches special file name databases for file names that +match patterns. The system administrator runs the @code{updatedb} +program to create the databases. @code{locate} is run like this: + +@example +locate @r{[}@var{option}@dots{}@r{]} @var{pattern}@dots{} +@end example + +@noindent +This example prints the names of all files in the default file name +database whose name ends with @samp{Makefile} or @samp{makefile}. +Which file names are stored in the database depends on how the system +administrator ran @code{updatedb}. +@example +locate '*[Mm]akefile' +@end example + +The name @code{xargs}, pronounced EX-args, means ``combine +arguments.'' @code{xargs} builds and executes command lines by +gathering together arguments it reads on the standard input. Most +often, these arguments are lists of file names generated by +@code{find}. @code{xargs} is run like this: + +@example +xargs @r{[}@var{option}@dots{}@r{]} @r{[}@var{command} @r{[}@var{initial-arguments}@r{]}@r{]} +@end example + +@noindent +The following command searches the files listed in the file +@file{file-list} and prints all of the lines in them that contain the +word @samp{typedef}. +@example +xargs grep typedef < file-list +@end example + +@node find Expressions +@section @code{find} Expressions + +The expression that @code{find} uses to select files consists of one +or more @dfn{primaries}, each of which is a separate command line +argument to @code{find}. @code{find} evaluates the expression each +time it processes a file. An expression can contain any of the +following types of primaries: + +@table @dfn +@item options +affect overall operation rather than the processing of a specific +file; +@item tests +return a true or false value, depending on the file's attributes; +@item actions +have side effects and return a true or false value; and +@item operators +connect the other arguments and affect when and whether they are +evaluated. +@end table + +You can omit the operator between two primaries; it defaults to +@samp{-and}. @xref{Combining Primaries With Operators}, for ways to +connect primaries into more complex expressions. If the expression +contains no actions other than @samp{-prune}, @samp{-print} is +performed on all files for which the entire expression is true +(@pxref{Print File Name}). + +Options take effect immediately, rather than being evaluated for each +file when their place in the expression is reached. Therefore, for +clarity, it is best to place them at the beginning of the expression. +There are two exceptions to this; @samp{-daystart} and @samp{-follow} +have different effects depending on where in the command line they +appear. This can be confusing, so it's best to keep them at the +beginning, too. + +Many of the primaries take arguments, which immediately follow them in +the next command line argument to @code{find}. Some arguments are +file names, patterns, or other strings; others are numbers. Numeric +arguments can be specified as + +@table @code +@item +@var{n} +for greater than @var{n}, +@item -@var{n} +for less than @var{n}, +@item @var{n} +for exactly @var{n}. +@end table + +@node Finding Files +@chapter Finding Files + +By default, @code{find} prints to the standard output the names of the +files that match the given criteria. @xref{Actions}, for how to get +more information about the matching files. + + +@menu +* Name:: +* Links:: +* Time:: +* Size:: +* Type:: +* Owner:: +* Mode Bits:: +* Contents:: +* Directories:: +* Filesystems:: +* Combining Primaries With Operators:: +@end menu + +@node Name +@section Name + +Here are ways to search for files whose name matches a certain +pattern. @xref{Shell Pattern Matching}, for a description of the +@var{pattern} arguments to these tests. + +Each of these tests has a case-sensitive version and a +case-insensitive version, whose name begins with @samp{i}. In a +case-insensitive comparison, the patterns @samp{fo*} and @samp{F??} +match the file names @file{Foo}, @samp{FOO}, @samp{foo}, @samp{fOo}, +etc. + +@menu +* Base Name Patterns:: +* Full Name Patterns:: +* Fast Full Name Search:: +* Shell Pattern Matching:: Wildcards used by these programs. +@end menu + +@node Base Name Patterns +@subsection Base Name Patterns + +@deffn Test -name pattern +@deffnx Test -iname pattern +True if the base of the file name (the path with the leading +directories removed) matches shell pattern @var{pattern}. For +@samp{-iname}, the match is case-insensitive.@footnote{Because we +need to perform case-insensitive matching, the GNU fnmatch +implementation is always used; if the C library includes the GNU +implementation, we use that and otherwise we use the one from gnulib} +To ignore a whole directory tree, use @samp{-prune} +(@pxref{Directories}). As an example, to find Texinfo source files in +@file{/usr/local/doc}: + +@example +find /usr/local/doc -name '*.texi' +@end example + +Notice that the wildcard must be enclosed in quotes in order to +protect it from expansion by the shell. + +As of findutils version 4.2.2, patterns for @samp{-name} and +@samp{-iname} will match a file name with a leading @samp{.}. For +example the command @samp{find /tmp -name \*bar} will match the file +@file{/tmp/.foobar}. Braces within the pattern (@samp{@{@}}) are not +considered to be special (that is, @code{find . -name 'foo@{1,2@}'} +matches a file named @file{foo@{1,2@}}, not the files @file{foo1} and +@file{foo2}. +@end deffn + + +@node Full Name Patterns +@subsection Full Name Patterns + +@deffn Test -wholename pattern +@deffnx Test -iwholename pattern +True if the entire file name, starting with the command line argument +under which the file was found, matches shell pattern @var{pattern}. +For @samp{-iwholename}, the match is case-insensitive. To ignore a +whole directory tree, use @samp{-prune} rather than checking every +file in the tree (@pxref{Directories}). The ``entire file name'' as +used by @code{find} starts with the starting-point specified on the +command line, and is not converted to an absolute pathname, so for +example @code{cd /; find tmp -wholename /tmp} will never match +anything. +@end deffn + +@deffn Test -path pattern +@deffnx Test -ipath pattern +These tests are deprecated, but work as for @samp{-wholename} and +@samp{-iwholename}, respectively. The @samp{-ipath} test is a GNU +extension, but @samp{-path} is also provided by HP-UX @code{find}. +@end deffn + +@deffn Test -regex expr +@deffnx Test -iregex expr +True if the entire file name matches regular expression @var{expr}. +This is a match on the whole path, not a search. For example, to +match a file named @file{./fubar3}, you can use the regular expression +@samp{.*bar.} or @samp{.*b.*3}, but not @samp{f.*r3}. @xref{Regexps, +, Syntax of Regular Expressions, emacs, The GNU Emacs Manual}, for a +description of the syntax of regular expressions. For @samp{-iregex}, +the match is case-insensitive. There are several varieties of regular +expressions; by default this test uses POSIX basic regular +expressions, but this can be changed with the option +@samp{-regextype}. +@end deffn + +@deffn Option -regextype name +This option controls the variety of regular expression syntax +understood by the @samp{-regex} and @samp{-iregex} tests. This option +is positional; that is, it only affects regular expressions which +occur later in the command line. If this option is not given, GNU +Emacs regular expressions are assumed. Currently-implemented types +are + + +@table @samp +@item emacs +Regular expressions compatible with GNU Emacs; this is also the +default behaviour if this option is not used. +@item posix-awk +Regular expressions compatible with the POSIX awk command (not GNU awk) +@item posix-basic +POSIX Basic Regular Expressions. +@item posix-egrep +Regular expressions compatible with the POSIX egrep command +@item posix-extended +POSIX Extended Regular Expressions +@end table + +@ref{Regular Expressions} for more information on the regular +expression dialects understood by GNU findutils. + + +@end deffn + +@node Fast Full Name Search +@subsection Fast Full Name Search + +To search for files by name without having to actually scan the +directories on the disk (which can be slow), you can use the +@code{locate} program. For each shell pattern you give it, +@code{locate} searches one or more databases of file names and +displays the file names that contain the pattern. @xref{Shell Pattern +Matching}, for details about shell patterns. + +If a pattern is a plain string---it contains no +metacharacters---@code{locate} displays all file names in the database +that contain that string. If a pattern contains +metacharacters, @code{locate} only displays file names that match the +pattern exactly. As a result, patterns that contain metacharacters +should usually begin with a @samp{*}, and will most often end with one +as well. The exceptions are patterns that are intended to explicitly +match the beginning or end of a file name. + +If you only want @code{locate} to match against the last component of +the file names (the ``base name'' of the files) you can use the +@samp{--basename} option. The opposite behaviour is the default, but +can be selected explicitly by using the option @samp{--wholename}. + +The command +@example +locate @var{pattern} +@end example + +is almost equivalent to +@example +find @var{directories} -name @var{pattern} +@end example + +where @var{directories} are the directories for which the file name +databases contain information. The differences are that the +@code{locate} information might be out of date, and that @code{locate} +handles wildcards in the pattern slightly differently than @code{find} +(@pxref{Shell Pattern Matching}). + +The file name databases contain lists of files that were on the system +when the databases were last updated. The system administrator can +choose the file name of the default database, the frequency with which +the databases are updated, and the directories for which they contain +entries. + +Here is how to select which file name databases @code{locate} +searches. The default is system-dependent. At the time this document +was generated, the default was @file{@value{LOCATE_DB}}. + +@table @code +@item --database=@var{path} +@itemx -d @var{path} +Instead of searching the default file name database, search the file +name databases in @var{path}, which is a colon-separated list of +database file names. You can also use the environment variable +@code{LOCATE_PATH} to set the list of database files to search. The +option overrides the environment variable if both are used. +@end table + +GNU @code{locate} can read file name databases generated by the +@code{slocate} package. However, these generally contain a list of +all the files on the system, and so when using this database, +@code{locate} will produce output only for files which are accessible +to you. @xref{Invoking locate}, for a description of the +@samp{--existing} option which is used to do this. + +The @code{updatedb} program can also generate database in a format +compatible with @code{slocate}. @xref{Invoking updatedb}, for a +description of its @samp{--dbformat} and @samp{--output} options. + + +@node Shell Pattern Matching +@subsection Shell Pattern Matching + +@code{find} and @code{locate} can compare file names, or parts of file +names, to shell patterns. A @dfn{shell pattern} is a string that may +contain the following special characters, which are known as +@dfn{wildcards} or @dfn{metacharacters}. + +You must quote patterns that contain metacharacters to prevent the +shell from expanding them itself. Double and single quotes both work; +so does escaping with a backslash. + +@table @code +@item * +Matches any zero or more characters. + +@item ? +Matches any one character. + +@item [@var{string}] +Matches exactly one character that is a member of the string +@var{string}. This is called a @dfn{character class}. As a +shorthand, @var{string} may contain ranges, which consist of two +characters with a dash between them. For example, the class +@samp{[a-z0-9_]} matches a lowercase letter, a number, or an +underscore. You can negate a class by placing a @samp{!} or @samp{^} +immediately after the opening bracket. Thus, @samp{[^A-Z@@]} matches +any character except an uppercase letter or an at sign. + +@item \ +Removes the special meaning of the character that follows it. This +works even in character classes. +@end table + +In the @code{find} tests that do shell pattern matching (@samp{-name}, +@samp{-wholename}, etc.), wildcards in the pattern will match a +@samp{.} at the beginning of a file name. This is also the case for +@code{locate}. Thus, @samp{find -name '*macs'} will match a file +named @file{.emacs}, as will @samp{locate '*macs'}. + +Slash characters have no special significance in the shell pattern +matching that @code{find} and @code{locate} do, unlike in the shell, +in which wildcards do not match them. Therefore, a pattern +@samp{foo*bar} can match a file name @samp{foo3/bar}, and a pattern +@samp{./sr*sc} can match a file name @samp{./src/misc}. + +If you want to locate some files with the @samp{locate} command but +don't need to see the full list you can use the @samp{--limit} option +to see just a small number of results, or the @samp{--count} option to +display only the total number of matches. + +@node Links +@section Links + +There are two ways that files can be linked together. @dfn{Symbolic +links} are a special type of file whose contents are a portion of the +name of another file. @dfn{Hard links} are multiple directory entries +for one file; the file names all have the same index node +(@dfn{inode}) number on the disk. + +@menu +* Symbolic Links:: +* Hard Links:: +@end menu + +@node Symbolic Links +@subsection Symbolic Links + +Symbolic links are names that reference other files. GNU @code{find} +will handle symbolic links in one of two ways; firstly, it can +dereference the links for you - this means that if it comes across a +symbolic link, it examines the file that the link points to, in order +to see if it matches the criteria you have specified. Secondly, it +can check the link itself in case you might be looking for the actual +link. If the file that the symbolic link points to is also within the +directory hierarchy you are searching with the @code{find} command, +you may not see a great deal of difference between these two +alternatives. + +By default, @code{find} examines symbolic links themselves when it +finds them (and, if it later comes across the linked-to file, it will +examine that, too). If you would prefer @code{find} to dereference +the links and examine the file that each link points to, specify the +@samp{-L} option to @code{find}. You can explicitly specify the +default behaviour by using the @samp{-P} option. The @samp{-H} +option is a half-way-between option which ensures that any symbolic +links listed on the command line are dereferenced, but other symbolic +links are not. + +Symbolic links are different to ``hard links'' in the sense that you +need permission to search the directories +in the linked-to file name to +dereference the link. This can mean that even if you specify the +@samp{-L} option, @code{find} may not be able to determine the +properties of the file that the link points to (because you don't have +sufficient permission). In this situation, @code{find} uses the +properties of the link itself. This also occurs if a symbolic link +exists but points to a file that is missing. + +The options controlling the behaviour of @code{find} with respect to +links are as follows :- + +@table @samp +@item -P +@code{find} does not dereference symbolic links at all. This is the +default behaviour. This option must be specified before any of the +file names on the command line. +@item -H +@code{find} does not dereference symbolic links (except in the case of +file names on the command line, which are dereferenced). If a +symbolic link cannot be dereferenced, the information for the symbolic +link itself is used. This option must be specified before any of the +file names on the command line. +@item -L +@code{find} dereferences symbolic links where possible, and where this +is not possible it uses the properties of the symbolic link itself. +This option must be specified before any of the file names on the +command line. Use of this option also implies the same behaviour as +the @samp{-noleaf} option. If you later use the @samp{-H} or +@samp{-P} options, this does not turn off @samp{-noleaf}. + +@item -follow +This option forms part of the ``expression'' and must be specified +after the file names, but it is otherwise equivalent to @samp{-L}. +The @samp{-follow} option affects only those tests which appear after +it on the command line. This option is deprecated. Where possible, +you should use @samp{-L} instead. +@end table + +The following differences in behavior occur when the @samp{-L} option +is used: + +@itemize @bullet +@item +@code{find} follows symbolic links to directories when searching +directory trees. +@item +@samp{-lname} and @samp{-ilname} always return false (unless they +happen to match broken symbolic links). +@item +@samp{-type} reports the types of the files that symbolic links point +to. This means that in combination with @samp{-L}, @samp{-type l} +will be true only for broken symbolic links. To check for symbolic +links when @samp{-L} has been specified, use @samp{-xtype l}. +@item +Implies @samp{-noleaf} (@pxref{Directories}). +@end itemize + +If the @samp{-L} option or the @samp{-H} option is used, +the file names used as arguments to @samp{-newer}, @samp{-anewer}, and +@samp{-cnewer} are dereferenced and the timestamp from the pointed-to +file is used instead (if possible -- otherwise the timestamp from the +symbolic link is used). + +@deffn Test -lname pattern +@deffnx Test -ilname pattern +True if the file is a symbolic link whose contents match shell pattern +@var{pattern}. For @samp{-ilname}, the match is case-insensitive. +@xref{Shell Pattern Matching}, for details about the @var{pattern} +argument. If the @samp{-L} option is in effect, this test will always +return false for symbolic links unless they are broken. So, to list +any symbolic links to @file{sysdep.c} in the current directory and its +subdirectories, you can do: + +@example +find . -lname '*sysdep.c' +@end example +@end deffn + +@node Hard Links +@subsection Hard Links + +Hard links allow more than one name to refer to the same file. To +find all the names which refer to the same file as NAME, use +@samp{-samefile NAME}. If you are not using the @samp{-L} option, you +can confine your search to one filesystem using the @samp{-xdev} +option. This is useful because hard links cannot point outside a +single filesystem, so this can cut down on needless searching. + +If the @samp{-L} option is in effect, and NAME is in fact a symbolic +link, the symbolic link will be dereferenced. Hence you are searching +for other links (hard or symbolic) to the file pointed to by NAME. If +@samp{-L} is in effect but NAME is not itself a symbolic link, other +symbolic links to the file NAME will be matched. + +You can also search for files by inode number. This can occasionally +be useful in diagnosing problems with filesystems for example, because +@code{fsck} tends to print inode numbers. Inode numbers also +occasionally turn up in log messages for some types of software, and +are used to support the @code{ftok()} library function. + +You can learn a file's inode number and the number of links to it by +running @samp{ls -li} or @samp{find -ls}. + +You can search for hard links to inode number NUM by using @samp{-inum +NUM}. If there are any filesystem mount points below the directory +where you are starting the search, use the @samp{-xdev} option unless +you are also using the @samp{-L} option. Using @samp{-xdev} this +saves needless searching, since hard links to a file must be on the +same filesystem. @xref{Filesystems}. + +@deffn Test -samefile NAME +File is a hard link to the same inode as NAME. If the @samp{-L} +option is in effect, symbolic links to the same file as NAME points to +are also matched. +@end deffn + +@deffn Test -inum n +File has inode number @var{n}. The @samp{+} and @samp{-} qualifiers +also work, though these are rarely useful. Much of the time it is +easier to use @samp{-samefile} rather than this option. +@end deffn + +You can also search for files that have a certain number of links, +with @samp{-links}. Directories normally have at least two hard +links; their @file{.} entry is the second one. If they have +subdirectories, each of those also has a hard link called @file{..} to +its parent directory. The @file{.} and @file{..} directory entries +are not normally searched unless they are mentioned on the @code{find} +command line. + +@deffn Test -links n +File has @var{n} hard links. +@end deffn + +@deffn Test -links +n +File has more than @var{n} hard links. +@end deffn + +@deffn Test -links -n +File has fewer than @var{n} hard links. +@end deffn + +@node Time +@section Time + +Each file has three time stamps, which record the last time that +certain operations were performed on the file: + +@enumerate +@item +access (read the file's contents) +@item +change the status (modify the file or its attributes) +@item +modify (change the file's contents) +@end enumerate + +Some systems also provide a timestamp that indicates when a file was +@emph{created}. For example, the UFS2 fileystem under NetBSD-3.1 +records the @emph{birth time} of each file. This information is also +available under other versions of BSD and some versions of Cygwin. +However, even on systems which support file birth time, files may +exist for which this information was not recorded (for example, UFS1 +file systems simply do not contain this information). + +You can search for files whose time stamps are within a certain age +range, or compare them to other time stamps. + +@menu +* Age Ranges:: +* Comparing Timestamps:: +@end menu + +@node Age Ranges +@subsection Age Ranges + +These tests are mainly useful with ranges (@samp{+@var{n}} and +@samp{-@var{n}}). + +@deffn Test -atime n +@deffnx Test -ctime n +@deffnx Test -mtime n +True if the file was last accessed (or its status changed, or it was +modified) @var{n}*24 hours ago. The number of 24-hour periods since +the file's timestamp is always rounded down; therefore 0 means ``less +than 24 hours ago'', 1 means ``between 24 and 48 hours ago'', and so +forth. Fractional values are supported but this only really makes +sense for the case where ranges (@samp{+@var{n}} and @samp{-@var{n}}) +are used. +@end deffn + +@deffn Test -amin n +@deffnx Test -cmin n +@deffnx Test -mmin n +True if the file was last accessed (or its status changed, or it was +modified) @var{n} minutes ago. These tests provide finer granularity +of measurement than @samp{-atime} et al., but rounding is done in a +similar way (again, fractions are supported). For example, to list +files in @file{/u/bill} that were last read from 2 to 6 minutes ago: + +@example +find /u/bill -amin +2 -amin -6 +@end example +@end deffn + +@deffn Option -daystart +Measure times from the beginning of today rather than from 24 hours +ago. So, to list the regular files in your home directory that were +modified yesterday, do + +@example +find ~/ -daystart -type f -mtime 1 +@end example + +The @samp{-daystart} option is unlike most other options in that it +has an effect on the way that other tests are performed. The affected +tests are @samp{-amin}, @samp{-cmin}, @samp{-mmin}, @samp{-atime}, +@samp{-ctime} and @samp{-mtime}. The @samp{-daystart} option only +affects the behaviour of any tests which appear after it on the +command line. +@end deffn + +@node Comparing Timestamps +@subsection Comparing Timestamps + +@deffn Test -newerXY reference +Succeeds if timestamp @samp{X} of the file being considered is newer +than timestamp @samp{Y} of the file @file{reference}. The latters +@samp{X} and @samp{Y} can be any of the following letters: + +@table @samp +@item a +Last-access time of @file{reference} +@item B +Birth time of @file{reference} (when this is not known, the test cannot succeed) +@item c +Last-change time of @file{reference} +@item m +Last-modification time of @file{reference} +@item t +The @file{reference} argument is interpreted as a literal time, rather +than the name of a file. @xref{Date input formats}, for a description +of how the timestamp is understood. Tests of the form @samp{-newerXt} +are valid but tests of the form @samp{-newertY} are not. +@end table + +For example the test @code{-newerac /tmp/foo} succeeds for all files +which have been accessed more recently than @file{/tmp/foo} was +changed. Here @samp{X} is @samp{a} and @samp{Y} is @samp{c}. + +Not all files have a known birth time. If @samp{Y} is @samp{b} and +the birth time of @file{reference} is not available, @code{find} exits +with an explanatory error message. If @samp{X} is @samp{b} and we do +not know the birth time the file currently being considered, the test +simply fails (that is, it behaves like @code{-false} does). + +Some operating systems (for example, most implementations of Unix) do +not support file birth times. Some others, for example NetBSD-3.1, +do. Even on operating systems which support file birth times, the +information may not be available for specific files. For example, +under NetBSD, file birth times are supported on UFS2 file systems, but +not UFS1 file systems. + +@end deffn + + + +There are two ways to list files in @file{/usr} modified after +February 1 of the current year. One uses @samp{-newermt}: + +@example +find /usr -newermt "Feb 1" +@end example + +The other way of doing this works on the versions of find before 4.3.3: + +@c Idea from Rick Sladkey. +@example +touch -t 02010000 /tmp/stamp$$ +find /usr -newer /tmp/stamp$$ +rm -f /tmp/stamp$$ +@end example + +@deffn Test -anewer file +@deffnx Test -cnewer file +@deffnx Test -newer file +True if the file was last accessed (or its status changed, or it was +modified) more recently than @var{file} was modified. These tests are +affected by @samp{-follow} only if @samp{-follow} comes before them on +the command line. @xref{Symbolic Links}, for more information on +@samp{-follow}. As an example, to list any files modified since +@file{/bin/sh} was last modified: + +@example +find . -newer /bin/sh +@end example +@end deffn + +@deffn Test -used n +True if the file was last accessed @var{n} days after its status was +last changed. Useful for finding files that are not being used, and +could perhaps be archived or removed to save disk space. +@end deffn + +@node Size +@section Size + +@deffn Test -size n@r{[}bckwMG@r{]} +True if the file uses @var{n} units of space, rounding up. The units +are 512-byte blocks by default, but they can be changed by adding a +one-character suffix to @var{n}: + +@table @code +@item b +512-byte blocks (never 1024) +@item c +bytes +@item k +kilobytes (1024 bytes) +@item w +2-byte words +@item M +Megabytes (units of 1048576 bytes) +@item G +Gigabytes (units of 1073741824 bytes) +@end table + +The `b' suffix always considers blocks to be 512 bytes. This is not +affected by the setting (or non-setting) of the POSIXLY_CORRECT +environment variable. This behaviour is different to the behaviour of +the @samp{-ls} action). If you want to use 1024-byte units, use the +`k' suffix instead. + +The number can be prefixed with a `+' or a `-'. A plus sign indicates +that the test should succeed if the file uses at least @var{n} units +of storage (a common use of this test) and a minus sign +indicates that the test should succeed if the file uses less than +@var{n} units of storage. There is no `=' prefix, because that's the +default anyway. + +The size does not count indirect blocks, but it does count blocks in +sparse files that are not actually allocated. In other words, it's +consistent with the result you get for @samp{ls -l} or @samp{wc -c}. +This handling of sparse files differs from the output of the @samp{%k} +and @samp{%b} format specifiers for the @samp{-printf} predicate. + +@end deffn + +@deffn Test -empty +True if the file is empty and is either a regular file or a directory. +This might help determine good candidates for deletion. This test is +useful with @samp{-depth} (@pxref{Directories}) and @samp{-delete} +(@pxref{Single File}). +@end deffn + +@node Type +@section Type + +@deffn Test -type c +True if the file is of type @var{c}: + +@table @code +@item b +block (buffered) special +@item c +character (unbuffered) special +@item d +directory +@item p +named pipe (FIFO) +@item f +regular file +@item l +symbolic link; if @samp{-L} is in effect, this is true only for broken +symbolic links. If you want to search for symbolic links when +@samp{-L} is in effect, use @samp{-xtype} instead of @samp{-type}. +@item s +socket +@item D +door (Solaris) +@end table +@end deffn + +@deffn Test -xtype c +This test behaves the same as @samp{-type} unless the file is a +symbolic link. If the file is a symbolic link, the result is as +follows (in the table below, @samp{X} should be understood to +represent any letter except @samp{l}): + +@table @samp +@item @samp{-P -xtype l} +True if the symbolic link is broken +@item @samp{-P -xtype X} +True if the (ultimate) target file is of type @samp{X}. +@item @samp{-L -xtype l} +Always true +@item @samp{-L -xtype X} +False unless the symbolic link is broken +@end table + +In other words, for symbolic links, @samp{-xtype} checks the type of +the file that @samp{-type} does not check. + +The @samp{-H} option also affects the behaviour of @samp{-xtype}. +When @samp{-H} is in effect, @samp{-xtype} behaves as if @samp{-L} had +been specified when examining files listed on the command line, and as +if @samp{-P} had been specified otherwise. If neither @samp{-H} nor +@samp{-L} was specified, @samp{-xtype} behaves as if @samp{-P} had +been specified. + +@xref{Symbolic Links}, for more information on @samp{-follow} and +@samp{-L}. +@end deffn + +@node Owner +@section Owner + +@deffn Test -user uname +@deffnx Test -group gname +True if the file is owned by user @var{uname} (belongs to group +@var{gname}). A numeric ID is allowed. +@end deffn + +@deffn Test -uid n +@deffnx Test -gid n +True if the file's numeric user ID (group ID) is @var{n}. These tests +support ranges (@samp{+@var{n}} and @samp{-@var{n}}), unlike +@samp{-user} and @samp{-group}. +@end deffn + +@deffn Test -nouser +@deffnx Test -nogroup +True if no user corresponds to the file's numeric user ID (no group +corresponds to the numeric group ID). These cases usually mean that +the files belonged to users who have since been removed from the +system. You probably should change the ownership of such files to an +existing user or group, using the @code{chown} or @code{chgrp} +program. +@end deffn + +@node Mode Bits +@section File Mode Bits + +@xref{File Permissions}, for information on how file mode bits are +structured and how to specify them. + +Four tests determine what users can do with files. These are +@samp{-readable}, @samp{-writable}, @samp{-executable} and +@samp{-perm}. The first three tests ask the operating system if the +current user can perform the relevant operation on a file, while +@samp{-perm} just examines the file's mode. The file mode may give +a misleading impression of what the user can actually do, because the +file may have an access control list, or exist on a read-only +filesystem, for example. Of these four tests though, only +@samp{-perm} is specified by the POSIX standard. + +The @samp{-readable}, @samp{-writable} and @samp{-executable} tests +are implemented via the @code{access} system call. This is +implemented within the operating system itself. If the file being +considered is on an NFS filesystem, the remote system may allow or +forbid read or write operations for reasons of which the NFS client +cannot take account. This includes user-ID mapping, either in the +general sense or the more restricted sense in which remote superusers +are treated by the NFS server as if they are the local user +@samp{nobody} on the NFS server. + +None of the tests in this section should be used to verify that a user +is authorised to perform any operation (on the file being tested or +any other file) because of the possibility of a race condition. That +is, the situation may change between the test and an action being +taken on the basis of the result of that test. + + +@deffn Test -readable +True if the file can be read by the invoking user. +@end deffn + +@deffn Test -writable +True if the file can be written by the invoking user. This is an +in-principle check, and other things may prevent a successful write +operation; for example, the filesystem might be full. +@end deffn + +@deffn Test -executable +True if the file can be executed/searched by the invoking user. +@end deffn + +@deffn Test -perm pmode + +True if the file's mode bits match @var{pmode}, which can be +either a symbolic or numeric @var{mode} (@pxref{File Permissions}) +optionally prefixed by @samp{-} or @samp{/}. + +A @var{pmode} that starts with neither @samp{-} nor @samp{/} matches +if @var{mode} exactly matches the file mode bits. + +A @var{pmode} that starts with @samp{-} matches if +@emph{all} the file mode bits set in @var{mode} are set for the file; +bits not set in @var{mode} are ignored. + +A @var{pmode} that starts with @samp{/} matches if +@emph{any} of the file mode bits set in @var{mode} are set for the file; +bits not set in @var{mode} are ignored. +This is a GNU extension. + +If you don't use the @samp{/} or @samp{-} form with a symbolic mode +string, you may have to specify a rather complex mode string. For +example @samp{-perm g=w} will only match files that have mode 0020 +(that is, ones for which group write permission is the only file mode bit +set). It is more likely that you will want to use the @samp{/} or +@samp{-} forms, for example @samp{-perm -g=w}, which matches any file +with group write permission. + + +@table @samp +@item -perm 664 +Match files that have read and write permission for their owner, +and group, but that the rest of the world can read but not write to. +Do not match files that meet these criteria but have other file mode +bits set (for example if someone can execute/search the file). + +@item -perm -664 +Match files that have read and write permission for their owner, +and group, but that the rest of the world can read but not write to, +without regard to the presence of any extra file mode bits (for +example the executable bit). This matches a file with mode +0777, for example. + +@item -perm /222 +Match files that are writable by somebody (their owner, or +their group, or anybody else). + +@item -perm /022 +Match files that are writable by either their owner or their +group. The files don't have to be writable by both the owner and +group to be matched; either will do. + +@item -perm /g+w,o+w +As above. + +@item -perm /g=w,o=w +As above. + +@item -perm -022 +Match files that are writable by both their owner and their +group. + +@item -perm -444 -perm /222 ! -perm /111 +Match files that are readable for everybody, have at least one +write bit set (i.e., somebody can write to them), but that cannot be +executed/searched by anybody. Note that in some shells the @samp{!} must be +escaped;. + +@item -perm -a+r -perm /a+w ! -perm /a+x +As above. + + +@item -perm -g+w,o+w +As above. +@end table + +@quotation Warning +If you specify @samp{-perm /000} or @samp{-perm /mode} where the +symbolic mode @samp{mode} has no bits set, the test currently matches +no files. This differs from the behaviour of @samp{-perm -000}, which +matches all files. The behaviour of @samp{-perm /000} will be changed +to be consistent with the behaviour of @samp{-perm -000}. The change +will probably be made in early 2006. +@end quotation + +@end deffn + +@node Contents +@section Contents + +To search for files based on their contents, you can use the +@code{grep} program. For example, to find out which C source files in +the current directory contain the string @samp{thing}, you can do: + +@example +grep -l thing *.[ch] +@end example + +If you also want to search for the string in files in subdirectories, +you can combine @code{grep} with @code{find} and @code{xargs}, like +this: + +@example +find . -name '*.[ch]' | xargs grep -l thing +@end example + +The @samp{-l} option causes @code{grep} to print only the names of +files that contain the string, rather than the lines that contain it. +The string argument (@samp{thing}) is actually a regular expression, +so it can contain metacharacters. This method can be refined a little +by using the @samp{-r} option to make @code{xargs} not run @code{grep} +if @code{find} produces no output, and using the @code{find} action +@samp{-print0} and the @code{xargs} option @samp{-0} to avoid +misinterpreting files whose names contain spaces: + +@example +find . -name '*.[ch]' -print0 | xargs -r -0 grep -l thing +@end example + +For a fuller treatment of finding files whose contents match a +pattern, see the manual page for @code{grep}. + +@node Directories +@section Directories + +Here is how to control which directories @code{find} searches, and how +it searches them. These two options allow you to process a horizontal +slice of a directory tree. + +@deffn Option -maxdepth levels +Descend at most @var{levels} (a non-negative integer) levels of +directories below the command line arguments. @samp{-maxdepth 0} +means only apply the tests and actions to the command line arguments. +@end deffn + +@deffn Option -mindepth levels +Do not apply any tests or actions at levels less than @var{levels} (a +non-negative integer). @samp{-mindepth 1} means process all files +except the command line arguments. +@end deffn + +@deffn Option -depth +Process each directory's contents before the directory itself. Doing +this is a good idea when producing lists of files to archive with +@code{cpio} or @code{tar}. If a directory does not have write +permission for its owner, its contents can still be restored from the +archive since the directory's permissions are restored after its +contents. +@end deffn + +@deffn Option -d +This is a deprecated synonym for @samp{-depth}, for compatibility with +Mac OS X, FreeBSD and OpenBSD. The @samp{-depth} option is a POSIX +feature, so it is better to use that. +@end deffn + +@deffn Action -prune +If the file is a directory, do not descend into it. The result is +true. For example, to skip the directory @file{src/emacs} and all +files and directories under it, and print the names of the other files +found: + +@example +find . -wholename './src/emacs' -prune -o -print +@end example + +The above command will not print @file{./src/emacs} among its list of +results. This however is not due to the effect of the @samp{-prune} +action (which only prevents further descent, it doesn't make sure we +ignore that item). Instead, this effect is due to the use of +@samp{-o}. Since the left hand side of the ``or'' condition has +succeeded for @file{./src/emacs}, it is not necessary to evaluate the +right-hand-side (@samp{-print}) at all for this particular file. If +you wanted to print that directory name you could use either an extra +@samp{-print} action: + +@example +find . -wholename './src/emacs' -prune -print -o -print +@end example + +or use the comma operator: + +@example +find . -wholename './src/emacs' -prune , -print +@end example + +If the @samp{-depth} option is in effect, the subdirectories will have +already been visited in any case. Hence @samp{-prune} has no effect +and returns false. +@end deffn + + +@deffn Action -quit +Exit immediately (with return value zero if no errors have occurred). +No child processes will be left running, but no more files specified +on the command line will be processed. For example, @code{find +/tmp/foo /tmp/bar -print -quit} will print only @samp{/tmp/foo}. Any +command lines which have been built by @samp{-exec ... \+} or +@samp{-execdir ... \+} are invoked before the program is executed. +@end deffn + +@deffn Option -noleaf +Do not optimize by assuming that directories contain 2 fewer +subdirectories than their hard link count. This option is needed when +searching filesystems that do not follow the Unix directory-link +convention, such as CD-ROM or MS-DOS filesystems or AFS volume mount +points. Each directory on a normal Unix filesystem has at least 2 +hard links: its name and its @file{.} entry. Additionally, its +subdirectories (if any) each have a @file{..} entry linked to that +directory. When @code{find} is examining a directory, after it has +statted 2 fewer subdirectories than the directory's link count, it +knows that the rest of the entries in the directory are +non-directories (@dfn{leaf} files in the directory tree). If only the +files' names need to be examined, there is no need to stat them; this +gives a significant increase in search speed. +@end deffn + +@deffn Option -ignore_readdir_race +If a file disappears after its name has been read from a directory but +before @code{find} gets around to examining the file with @code{stat}, +don't issue an error message. If you don't specify this option, an +error message will be issued. This option can be useful in system +scripts (cron scripts, for example) that examine areas of the +filesystem that change frequently (mail queues, temporary directories, +and so forth), because this scenario is common for those sorts of +directories. Completely silencing error messages from @code{find} is +undesirable, so this option neatly solves the problem. There is no +way to search one part of the filesystem with this option on and part +of it with this option off, though. When this option is turned on and +find discovers that one of the start-point files specified on the +command line does not exist, no error message will be issued. + +@end deffn + +@deffn Option -noignore_readdir_race +This option reverses the effect of the @samp{-ignore_readdir_race} +option. +@end deffn + + +@node Filesystems +@section Filesystems + +A @dfn{filesystem} is a section of a disk, either on the local host or +mounted from a remote host over a network. Searching network +filesystems can be slow, so it is common to make @code{find} avoid +them. + +There are two ways to avoid searching certain filesystems. One way is +to tell @code{find} to only search one filesystem: + +@deffn Option -xdev +@deffnx Option -mount +Don't descend directories on other filesystems. These options are +synonyms. +@end deffn + +The other way is to check the type of filesystem each file is on, and +not descend directories that are on undesirable filesystem types: + +@deffn Test -fstype type +True if the file is on a filesystem of type @var{type}. The valid +filesystem types vary among different versions of Unix; an incomplete +list of filesystem types that are accepted on some version of Unix or +another is: +@example +ext2 ext3 proc sysfs ufs 4.2 4.3 nfs tmp mfs S51K S52K +@end example +You can use @samp{-printf} with the @samp{%F} directive to see the +types of your filesystems. The @samp{%D} directive shows the device +number. @xref{Print File Information}. @samp{-fstype} is usually +used with @samp{-prune} to avoid searching remote filesystems +(@pxref{Directories}). +@end deffn + +@node Combining Primaries With Operators +@section Combining Primaries With Operators + +Operators build a complex expression from tests and actions. +The operators are, in order of decreasing precedence: + +@table @code +@item @asis{( @var{expr} )} +@findex () +Force precedence. True if @var{expr} is true. + +@item @asis{! @var{expr}} +@itemx @asis{-not @var{expr}} +@findex ! +@findex -not +True if @var{expr} is false. In some shells, it is necessary to +protect the @samp{!} from shell interpretation by quoting it. + +@item @asis{@var{expr1 expr2}} +@itemx @asis{@var{expr1} -a @var{expr2}} +@itemx @asis{@var{expr1} -and @var{expr2}} +@findex -a +@findex -and +And; @var{expr2} is not evaluated if @var{expr1} is false. + +@item @asis{@var{expr1} -o @var{expr2}} +@itemx @asis{@var{expr1} -or @var{expr2}} +@findex -o +@findex -or +Or; @var{expr2} is not evaluated if @var{expr1} is true. + +@item @asis{@var{expr1} , @var{expr2}} +@findex , +List; both @var{expr1} and @var{expr2} are always evaluated. True if +@var{expr2} is true. The value of @var{expr1} is discarded. This +operator lets you do multiple independent operations on one traversal, +without depending on whether other operations succeeded. The two +operations @var{expr1} and @var{expr2} are not always fully +independent, since @var{expr1} might have side effects like touching +or deleting files, or it might use @samp{-prune} which would also +affect @var{expr2}. +@end table + +@code{find} searches the directory tree rooted at each file name by +evaluating the expression from left to right, according to the rules +of precedence, until the outcome is known (the left hand side is false +for @samp{-and}, true for @samp{-or}), at which point @code{find} +moves on to the next file name. + +There are two other tests that can be useful in complex expressions: + +@deffn Test -true +Always true. +@end deffn + +@deffn Test -false +Always false. +@end deffn + +@node Actions +@chapter Actions + +There are several ways you can print information about the files that +match the criteria you gave in the @code{find} expression. You can +print the information either to the standard output or to a file that +you name. You can also execute commands that have the file names as +arguments. You can use those commands as further filters to select +files. + +@menu +* Print File Name:: +* Print File Information:: +* Run Commands:: +* Delete Files:: +* Adding Tests:: +@end menu + +@node Print File Name +@section Print File Name + +@deffn Action -print +True; print the entire file name on the standard output, followed by a +newline. If there is the faintest possibility that one of the files +for which you are searching might contain a newline, you should use +@samp{-print0} instead. +@end deffn + +@deffn Action -fprint file +True; print the entire file name into file @var{file}, followed by a +newline. If @var{file} does not exist when @code{find} is run, it is +created; if it does exist, it is truncated to 0 bytes. The named +output file is always created, even if no output is sent to it. The +file names @file{/dev/stdout} and @file{/dev/stderr} are handled +specially; they refer to the standard output and standard error +output, respectively. + +If there is the faintest possibility that one of the files for which +you are searching might contain a newline, you should use +@samp{-fprint0} instead. +@end deffn + + +@c @deffn Option -show-control-chars how +@c This option affects how some of @code{find}'s actions treat +@c unprintable characters in file names. If @samp{how} is +@c @samp{literal}, any subsequent actions (i.e., actions further on in the +@c command line) print file names as-is. +@c +@c If this option is not specified, it currently defaults to @samp{safe}. +@c If @samp{how} is @samp{safe}, C-like backslash escapes are used to +@c indicate the non-printable characters for @samp{-ls} and @samp{-fls}. +@c On the other hand, @samp{-print}, @samp{-fprint}, @samp{-fprintf} and +@c @code{-printf} all quote unprintable characters if the data is going +@c to a tty, and otherwise the data is emitted literally. +@c +@c @table @code +@c @item -ls +@c Escaped if @samp{how} is @samp{safe} +@c @item -fls +@c Escaped if @samp{how} is @samp{safe} +@c @item -print +@c Always quoted if stdout is a tty, +@c @samp{-show-control-chars} is ignored +@c @item -print0 +@c Always literal, never escaped +@c @item -fprint +@c Always quoted if the destination is a tty; +@c @samp{-show-control-chars} is ignored +@c @item -fprint0 +@c Always literal, never escaped +@c @item -fprintf +@c If the destination is a tty, the @samp{%f}, +@c @samp{%F}, @samp{%h}, @samp{%l}, @samp{%p}, +@c and @samp{%P} directives produce quoted +@c strings if stdout is a tty and are treated +@c literally otherwise. +@c @item -printf +@c As for @code{-fprintf}. +@c @end table +@c @end deffn + + +@node Print File Information +@section Print File Information + +@deffn Action -ls +True; list the current file in @samp{ls -dils} format on the standard +output. The output looks like this: + +@smallexample +204744 17 -rw-r--r-- 1 djm staff 17337 Nov 2 1992 ./lwall-quotes +@end smallexample + +The fields are: + +@enumerate +@item +The inode number of the file. @xref{Hard Links}, for how to find +files based on their inode number. + +@item +the number of blocks in the file. The block counts are of 1K blocks, +unless the environment variable @code{POSIXLY_CORRECT} is set, in +which case 512-byte blocks are used. @xref{Size}, for how to find +files based on their size. + +@item +The file's type and file mode bits. The type is shown as a dash for a +regular file; for other file types, a letter like for @samp{-type} is +used (@pxref{Type}). The file mode bits are read, write, and execute/search for +the file's owner, its group, and other users, respectively; a dash +means the permission is not granted. @xref{File Permissions}, for +more details about file permissions. @xref{Mode Bits}, for how to +find files based on their file mode bits. + +@item +The number of hard links to the file. + +@item +The user who owns the file. + +@item +The file's group. + +@item +The file's size in bytes. + +@item +The date the file was last modified. + +@item +The file's name. @samp{-ls} quotes non-printable characters in the +file names using C-like backslash escapes. This may change soon, as +the treatment of unprintable characters is harmonised for @samp{-ls}, +@samp{-fls}, @samp{-print}, @samp{-fprint}, @samp{-printf} and +@samp{-fprintf}. +@end enumerate +@end deffn + +@deffn Action -fls file +True; like @samp{-ls} but write to @var{file} like @samp{-fprint} +(@pxref{Print File Name}). The named output file is always created, +even if no output is sent to it. +@end deffn + +@deffn Action -printf format +True; print @var{format} on the standard output, interpreting @samp{\} +escapes and @samp{%} directives. Field widths and precisions can be +specified as with the @code{printf} C function. Format flags (like +@samp{#} for example) may not work as you expect because many of the +fields, even numeric ones, are printed with %s. Numeric flags which +are affected in this way include G, U, b, D, k and n. This difference +in behaviour means though that the format flag @samp{-} will work; it +forces left-alignment of the field. Unlike @samp{-print}, +@samp{-printf} does not add a newline at the end of the string. If +you want a newline at the end of the string, add a @samp{\n}. +@end deffn + +@deffn Action -fprintf file format +True; like @samp{-printf} but write to @var{file} like @samp{-fprint} +(@pxref{Print File Name}). The output file is always created, even if +no output is ever sent to it. +@end deffn + +@menu +* Escapes:: +* Format Directives:: +* Time Formats:: +@end menu + +@node Escapes +@subsection Escapes + +The escapes that @samp{-printf} and @samp{-fprintf} recognise are: + +@table @code +@item \a +Alarm bell. +@item \b +Backspace. +@item \c +Stop printing from this format immediately and flush the output. +@item \f +Form feed. +@item \n +Newline. +@item \r +Carriage return. +@item \t +Horizontal tab. +@item \v +Vertical tab. +@item \\ +A literal backslash (@samp{\}). +@item \0 +ASCII NUL. +@item \NNN +The character whose ASCII code is NNN (octal). +@end table + +A @samp{\} character followed by any other character is treated as an +ordinary character, so they both are printed, and a warning message is +printed to the standard error output (because it was probably a typo). + +@node Format Directives +@subsection Format Directives + +@samp{-printf} and @samp{-fprintf} support the following format +directives to print information about the file being processed. The C +@code{printf} function, field width and precision specifiers are +supported, as applied to string (%s) types. That is, you can specify +"minimum field width"."maximum field width" for each directive. +Format flags (like @samp{#} for example) may not work as you expect +because many of the fields, even numeric ones, are printed with %s. +The format flag @samp{-} does work; it forces left-alignment of the +field. + +@samp{%%} is a literal percent sign. A @samp{%} character followed by +an unrecognised character (i.e., not a known directive or @code{printf} +field width and precision specifier), is discarded (but the +unrecognised character is printed), and a warning message is printed +to the standard error output (because it was probably a typo). Don't +rely on this behaviour, because other directives may be added in the +future. + +A @samp{%} at the end of the format argument causes undefined +behaviour since there is no following character. In some locales, it +may hide your door keys, while in others it may remove the final page +from the novel you are reading. + +@menu +* Name Directives:: +* Ownership Directives:: +* Size Directives:: +* Location Directives:: +* Time Directives:: +* Formatting Flags:: +@end menu + +@node Name Directives +@subsubsection Name Directives + +@table @code +@item %p +@c supports %-X.Yp +File's name (not the absolute path name, but the name of the file as +it was encountered by @code{find} - that is, as a relative path from +one of the starting points). +@item %f +File's name with any leading directories removed (only the last +element). +@c supports %-X.Yf +@item %h +Leading directories of file's name (all but the last element and the +slash before it). If the file's name contains no slashes (for example +because it was named on the command line and is in the current working +directory), then ``%h'' expands to ``.''. This prevents ``%h/%f'' +expanding to ``/foo'', which would be surprising and probably not +desirable. +@c supports %-X.Yh +@item %P +File's name with the name of the command line argument under which +it was found removed from the beginning. +@c supports %-X.YP +@item %H +Command line argument under which file was found. +@c supports %-X.YH +@end table + +@node Ownership Directives +@subsubsection Ownership Directives + +@table @code +@item %g +@c supports %-X.Yg +File's group name, or numeric group ID if the group has no name. +@item %G +@c supports %-X.Yg +@c TODO: Needs to support # flag and 0 flag +File's numeric group ID. +@item %u +@c supports %-X.Yu +File's user name, or numeric user ID if the user has no name. +@item %U +@c supports %-X.Yu +@c TODO: Needs to support # flag +File's numeric user ID. +@item %m +@c full support, including # and 0. +File's mode bits (in octal). If you always want to have a leading +zero on the number, use the '#' format flag, for example '%#m'. + +The file mode bit numbers used are the traditional Unix +numbers, which will be as expected on most systems, but if your +system's file mode bit layout differs from the traditional Unix +semantics, you will see a difference between the mode as printed by +@samp{%m} and the mode as it appears in @code{struct stat}. + +@item %M +File's type and mode bits (in symbolic form, as for @code{ls}). This +directive is supported in findutils 4.2.5 and later. +@end table + +@node Size Directives +@subsubsection Size Directives + +@table @code +@item %k +The amount of disk space used for this file in 1K blocks. Since disk +space is allocated in multiples of the filesystem block size this is +usually greater than %s/1024, but it can also be smaller if the file +is a sparse file (that is, it has ``holes''). +@item %b +The amount of disk space used for this file in 512-byte blocks. Since +disk space is allocated in multiples of the filesystem block size this +is usually greater than %s/512, but it can also be smaller if the +file is a sparse file (that is, it has ``holes''). +@item %s +File's size in bytes. +@item %S +File's sparseness. This is calculated as @code{(BLOCKSIZE*st_blocks / +st_size)}. The exact value you will get for an ordinary file of a +certain length is system-dependent. However, normally sparse files +will have values less than 1.0, and files which use indirect blocks +and have few holes may have a value which is greater than 1.0. The +value used for BLOCKSIZE is system-dependent, but is usually 512 +bytes. If the file size is zero, the value printed is undefined. On +systems which lack support for st_blocks, a file's sparseness is +assumed to be 1.0. +@end table + +@node Location Directives +@subsubsection Location Directives + +@table @code +@item %d +File's depth in the directory tree (depth below a file named on the +command line, not depth below the root directory). Files named on the +command line have a depth of 0. Subdirectories immediately below them +have a depth of 1, and so on. +@item %D +The device number on which the file exists (the @code{st_dev} field of +@code{struct stat}), in decimal. +@item %F +Type of the filesystem the file is on; this value can be used for +@samp{-fstype} (@pxref{Directories}). +@item %l +Object of symbolic link (empty string if file is not a symbolic link). +@item %i +File's inode number (in decimal). +@item %n +Number of hard links to file. +@item %y +Type of the file as used with @samp{-type}. If the file is a symbolic +link, @samp{l} will be printed. +@item %Y +Type of the file as used with @samp{-type}. If the file is a symbolic +link, it is dereferenced. If the file is a broken symbolic link, +@samp{N} is printed. + +@end table + +@node Time Directives +@subsubsection Time Directives + +Some of these directives use the C @code{ctime} function. Its output +depends on the current locale, but it typically looks like + +@example +Wed Nov 2 00:42:36 1994 +@end example + +@table @code +@item %a +File's last access time in the format returned by the C @code{ctime} +function. +@item %A@var{k} +File's last access time in the format specified by @var{k} +(@pxref{Time Formats}). +@item %c +File's last status change time in the format returned by the C +@code{ctime} function. +@item %C@var{k} +File's last status change time in the format specified by @var{k} +(@pxref{Time Formats}). +@item %t +File's last modification time in the format returned by the C +@code{ctime} function. +@item %T@var{k} +File's last modification time in the format specified by @var{k} +(@pxref{Time Formats}). +@end table + +@node Time Formats +@subsection Time Formats + +Below are the formats for the directives @samp{%A}, @samp{%C}, and +@samp{%T}, which print the file's timestamps. Some of these formats +might not be available on all systems, due to differences in the C +@code{strftime} function between systems. + +@menu +* Time Components:: +* Date Components:: +* Combined Time Formats:: +@end menu + +@node Time Components +@subsubsection Time Components + +The following format directives print single components of the time. + +@table @code +@item H +hour (00..23) +@item I +hour (01..12) +@item k +hour ( 0..23) +@item l +hour ( 1..12) +@item p +locale's AM or PM +@item Z +time zone (e.g., EDT), or nothing if no time zone is determinable +@item M +minute (00..59) +@item S +second (00..61) +@item @@ +seconds since Jan. 1, 1970, 00:00 GMT. +@end table + +@node Date Components +@subsubsection Date Components + +The following format directives print single components of the date. + +@table @code +@item a +locale's abbreviated weekday name (Sun..Sat) +@item A +locale's full weekday name, variable length (Sunday..Saturday) +@item b +@itemx h +locale's abbreviated month name (Jan..Dec) +@item B +locale's full month name, variable length (January..December) +@item m +month (01..12) +@item d +day of month (01..31) +@item w +day of week (0..6) +@item j +day of year (001..366) +@item U +week number of year with Sunday as first day of week (00..53) +@item W +week number of year with Monday as first day of week (00..53) +@item Y +year (1970@dots{}) +@item y +last two digits of year (00..99) +@end table + +@node Combined Time Formats +@subsubsection Combined Time Formats + +The following format directives print combinations of time and date +components. + +@table @code +@item r +time, 12-hour (hh:mm:ss [AP]M) +@item T +time, 24-hour (hh:mm:ss) +@item X +locale's time representation (H:M:S) +@item c +locale's date and time (Sat Nov 04 12:02:33 EST 1989) +@item D +date (mm/dd/yy) +@item x +locale's date representation (mm/dd/yy) +@item + +Date and time, separated by '+', for example `2004-04-28+22:22:05'. +The time is given in the current timezone (which may be affected by +setting the TZ environment variable). This is a GNU extension. +@end table + +@node Formatting Flags +@subsubsection Formatting Flags + +The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0} +and @samp{+} flags, but the other directives do not, even if they +print numbers. Numeric directives that do not support these flags +include + +@samp{G}, +@samp{U}, +@samp{b}, +@samp{D}, +@samp{k} and +@samp{n}. + +All fields support the format flag @samp{-}, which makes fields +left-aligned. That is, if the field width is greater than the actual +contents of the field, the requisite number of spaces are printed +after the field content instead of before it. + +@node Run Commands +@section Run Commands + +You can use the list of file names created by @code{find} or +@code{locate} as arguments to other commands. In this way you can +perform arbitrary actions on the files. + +@menu +* Single File:: +* Multiple Files:: +* Querying:: +@end menu + +@node Single File +@subsection Single File + +Here is how to run a command on one file at a time. + +@deffn Action -execdir command ; +Execute @var{command}; true if zero status is returned. @code{find} +takes all arguments after @samp{-exec} to be part of the command until +an argument consisting of @samp{;} is reached. It replaces the string +@samp{@{@}} by the current file name being processed everywhere it +occurs in the command. Both of these constructions need to be escaped +(with a @samp{\}) or quoted to protect them from expansion by the +shell. The command is executed in the directory in which @code{find} +was run. + +For example, to compare each C header file in or below the current +directory with the file @file{/tmp/master}: + +@example +find . -name '*.h' -execdir diff -u '@{@}' /tmp/master ';' +@end example +@end deffn + +If you use @samp{-execdir}, you must ensure that the current directory +is not on @var{$PATH}, because otherwise an attacker could make +@samp{find} run commands of their choice simply by leaving a +suitably-named file in the right directory. GNU find will refuse to +run if you use @samp{-execdir} and the current directory is in +@var{$PATH}. + +Another similar option, @samp{-exec} is supported, but is less secure. +@xref{Security Considerations}, for a discussion of the security +problems surrounding @samp{-exec}. + + +@deffn Action -exec command ; +This insecure variant of the @samp{-execdir} action is specified by +POSIX. The main difference is that the command is executed in the +directory from which @code{find} was invoked, meaning that @samp{@{@}} +is expanded to a relative path starting with the name of one of the +starting directories, rather than just the basename of the matched +file. + +While some implementations of @code{find} replace the @samp{@{@}} only +where it appears on its own in an argument, GNU @code{find} replaces +@samp{@{@}} wherever it appears. +@end deffn + + +@node Multiple Files +@subsection Multiple Files + +Sometimes you need to process files one at a time. But usually this +is not necessary, and, it is faster to run a command on as many files +as possible at a time, rather than once per file. Doing this saves on +the time it takes to start up the command each time. + +The @samp{-execdir} and @samp{-exec} actions have variants that build +command lines containing as many matched files as possible. + +@deffn Action -execdir command @{@} + +This works as for @samp{-execdir command ;}, except that the +@samp{@{@}} at the end of the command is expanded to a list of names +of matching files. This expansion is done in such a way as to avoid +exceeding the maximum command line length available on the system. +Only one @samp{@{@}} is allowed within the command, and it must appear +at the end, immediately before the @samp{+}. A @samp{+} appearing in +any position other than immediately after @samp{@{@}} is not +considered to be special (that is, it does not terminate the command). +@end deffn + + +@deffn Action -exec command @{@} + +This insecure variant of the @samp{-execdir} action is specified by +POSIX. The main difference is that the command is executed in the +directory from which @code{find} was invoked, meaning that @samp{@{@}} +is expanded to a relative path starting with the name of one of the +starting directories, rather than just the basename of the matched +file. +@end deffn + +Before @code{find} exits, any partially-built command lines are +executed. This happens even if the exit was caused by the +@samp{-quit} action. However, some types of error (for example not +being able to invoke @code{stat()} on the current directory) can cause +an immediate fatal exit. In this situation, any partially-built +command lines will not be invoked (this prevents possible infinite +loops). + +At first sight, it looks like the list of filenames to be processed +can only be at the end of the command line, and that this might be a +problem for some comamnds (@code{cp} and @code{rsync} for example). + +However, there is a slightly obscure but powerful workarouund for this +problem which takes advantage of the behaviour of @code{sh -c}:- + +@example +find startpoint -tests @dots{} -exec sh -c 'scp "$@@" remote:/dest' sh @{@} + +@end example + +In the example above, the filenames we want to work on need to occur +on the @code{scp} command line before the name of the destination. We +use the shell to invoke the command @code{scp "$@@" remote:/dest} and +the shell expands @code{"$@@"} to the list of filenames we want to +process. + +Another, but less secure, way to run a command on more than one file +at once, is to use the @code{xargs} command, which is invoked like +this: + +@example +xargs @r{[}@var{option}@dots{}@r{]} @r{[}@var{command} @r{[}@var{initial-arguments}@r{]}@r{]} +@end example + +@code{xargs} normally reads arguments from the standard input. These +arguments are delimited by blanks (which can be protected with double +or single quotes or a backslash) or newlines. It executes the +@var{command} (default is @file{/bin/echo}) one or more times with any +@var{initial-arguments} followed by arguments read from standard +input. Blank lines on the standard input are ignored. If the +@samp{-L} option is in use, trailing blanks indicate that @code{xargs} +should consider the following line to be part of this one. + +Instead of blank-delimited names, it is safer to use @samp{find +-print0} or @samp{find -fprint0} and process the output by giving the +@samp{-0} or @samp{--null} option to GNU @code{xargs}, GNU @code{tar}, +GNU @code{cpio}, or @code{perl}. The @code{locate} command also has a +@samp{-0} or @samp{--null} option which does the same thing. + +You can use shell command substitution (backquotes) to process a list +of arguments, like this: + +@example +grep -l sprintf `find $HOME -name '*.c' -print` +@end example + +However, that method produces an error if the length of the @samp{.c} +file names exceeds the operating system's command line length limit. +@code{xargs} avoids that problem by running the command as many times +as necessary without exceeding the limit: + +@example +find $HOME -name '*.c' -print | xargs grep -l sprintf +@end example + +However, if the command needs to have its standard input be a terminal +(@code{less}, for example), you have to use the shell command +substitution method or use the @samp{--arg-file} option of +@code{xargs}. + +The @code{xargs} command will process all its input, building command +lines and executing them, unless one of the commands exits with a +status of 255 (this will cause xargs to issue an error message and +stop) or it reads a line contains the end of file string specified +with the @samp{--eof} option. + +@menu +* Unsafe File Name Handling:: +* Safe File Name Handling:: +* Unusual Characters in File Names:: +* Limiting Command Size:: +* Interspersing File Names:: +@end menu + +@node Unsafe File Name Handling +@subsubsection Unsafe File Name Handling + +Because file names can contain quotes, backslashes, blank characters, +and even newlines, it is not safe to process them using @code{xargs} +in its default mode of operation. But since most files' names do not +contain blanks, this problem occurs only infrequently. If you are +only searching through files that you know have safe names, then you +need not be concerned about it. + +Error messages issued by @code{find} and @code{locate} quote unusual +characters in file names in order to prevent unwanted changes in the +terminal's state. + + +@c This example is adapted from: +@c From: pfalstad@stone.Princeton.EDU (Paul John Falstad) +@c Newsgroups: comp.unix.shell +@c Subject: Re: Beware xargs security holes +@c Date: 16 Oct 90 19:12:06 GMT +@c +In many applications, if @code{xargs} botches processing a file +because its name contains special characters, some data might be lost. +The importance of this problem depends on the importance of the data +and whether anyone notices the loss soon enough to correct it. +However, here is an extreme example of the problems that using +blank-delimited names can cause. If the following command is run +daily from @code{cron}, then any user can remove any file on the +system: + +@example +find / -name '#*' -atime +7 -print | xargs rm +@end example + +For example, you could do something like this: + +@example +eg$ echo > '# +vmunix' +@end example + +@noindent +and then @code{cron} would delete @file{/vmunix}, if it ran +@code{xargs} with @file{/} as its current directory. + +To delete other files, for example @file{/u/joeuser/.plan}, you could +do this: + +@example +eg$ mkdir '# +' +eg$ cd '# +' +eg$ mkdir u u/joeuser u/joeuser/.plan' +' +eg$ echo > u/joeuser/.plan' +/#foo' +eg$ cd .. +eg$ find . -name '#*' -print | xargs echo +./# ./# /u/joeuser/.plan /#foo +@end example + +@node Safe File Name Handling +@subsubsection Safe File Name Handling + +Here is how to make @code{find} output file names so that they can be +used by other programs without being mangled or misinterpreted. You +can process file names generated this way by giving the @samp{-0} or +@samp{--null} option to GNU @code{xargs}, GNU @code{tar}, GNU +@code{cpio}, or @code{perl}. + +@deffn Action -print0 +True; print the entire file name on the standard output, followed by a +null character. +@end deffn + +@deffn Action -fprint0 file +True; like @samp{-print0} but write to @var{file} like @samp{-fprint} +(@pxref{Print File Name}). The output file is always created. +@end deffn + +As of findutils version 4.2.4, the @code{locate} program also has a +@samp{--null} option which does the same thing. For similarity with +@code{xargs}, the short form of the option @samp{-0} can also be used. + +If you want to be able to handle file names safely but need to run +commands which want to be connected to a terminal on their input, you +can use the @samp{--arg-file} option to @code{xargs} like this: + +@example +find / -name xyzzy -print0 > list +xargs --null --arg-file=list munge +@end example + +The example above runs the @code{munge} program on all the files named +@file{xyzzy} that we can find, but @code{munge}'s input will still be +the terminal (or whatever the shell was using as standard input). If +your shell has the ``process substitution'' feature @samp{<(...)}, you +can do this in just one step: + +@example +xargs --null --arg-file=<(find / -name xyzzy -print0) munge +@end example + +@node Unusual Characters in File Names +@subsubsection Unusual Characters in File Names +As discussed above, you often need to be careful about how the names +of files are handled by @code{find} and other programs. If the output +of @code{find} is not going to another program but instead is being +shown on a terminal, this can still be a problem. For example, some +character sequences can reprogram the function keys on some terminals. +@xref{Security Considerations}, for a discussion of other security +problems relating to @code{find}. + +Unusual characters are handled differently by various +actions, as described below. + +@table @samp +@item -print0 +@itemx -fprint0 +Always print the exact file name, unchanged, even if the output is +going to a terminal. +@item -ok +@itemx -okdir +Always print the exact file name, unchanged. This will probably +change in a future release. +@item -ls +@itemx -fls +Unusual characters are always escaped. White space, backslash, and +double quote characters are printed using C-style escaping (for +example @samp{\f}, @samp{\"}). Other unusual characters are printed +using an octal escape. Other printable characters (for @samp{-ls} and +@samp{-fls} these are the characters between octal 041 and 0176) are +printed as-is. +@item -printf +@itemx -fprintf +If the output is not going to a terminal, it is printed as-is. +Otherwise, the result depends on which directive is in use: + +@table @asis +@item %D, %F, %H, %Y, %y +These expand to values which are not under control of files' owners, +and so are printed as-is. +@item %a, %b, %c, %d, %g, %G, %i, %k, %m, %M, %n, %s, %t, %u, %U +These have values which are under the control of files' owners but +which cannot be used to send arbitrary data to the terminal, and so +these are printed as-is. +@item %f, %h, %l, %p, %P +The output of these directives is quoted if the output is going to a +terminal. + +This quoting is performed in the same way as for GNU @code{ls}. This +is not the same quoting mechanism as the one used for @samp{-ls} and +@samp{fls}. If you are able to decide what format to use for the +output of @code{find} then it is normally better to use @samp{\0} as a +terminator than to use newline, as file names can contain white space +and newline characters. +@end table +@item -print +@itemx -fprint +Quoting is handled in the same way as for the @samp{%p} directive of +@samp{-printf} and @samp{-fprintf}. If you are using @code{find} in a +script or in a situation where the matched files might have arbitrary +names, you should consider using @samp{-print0} instead of +@samp{-print}. +@end table + + +The @code{locate} program quotes and escapes unusual characters in +file names in the same way as @code{find}'s @samp{-print} action. + +The behaviours described above may change soon, as the treatment of +unprintable characters is harmonised for @samp{-ls}, @samp{-fls}, +@samp{-print}, @samp{-fprint}, @samp{-printf} and @samp{-fprintf}. + +@node Limiting Command Size +@subsubsection Limiting Command Size + +@code{xargs} gives you control over how many arguments it passes to +the command each time it executes it. By default, it uses up to +@code{ARG_MAX} - 2k, or 128k, whichever is smaller, characters per +command. It uses as many lines and arguments as fit within that +limit. The following options modify those values. + +@table @code +@item --no-run-if-empty +@itemx -r +If the standard input does not contain any nonblanks, do not run the +command. By default, the command is run once even if there is no +input. This option is a GNU extension. + +@item --max-lines@r{[}=@var{max-lines}@r{]} +@itemx -L @var{max-lines} +@itemx -l@r{[}@var{max-lines}@r{]} +Use at most @var{max-lines} nonblank input lines per command line; +@var{max-lines} defaults to 1 if omitted; omitting the argument is not +allowed in the case of the @samp{-L} option. Trailing blanks cause an +input line to be logically continued on the next input line, for the +purpose of counting the lines. Implies @samp{-x}. The preferred name +for this option is @samp{-L} as this is specified by POSIX. + +@item --max-args=@var{max-args} +@itemx -n @var{max-args} +Use at most @var{max-args} arguments per command line. Fewer than +@var{max-args} arguments will be used if the size (see the @samp{-s} +option) is exceeded, unless the @samp{-x} option is given, in which +case @code{xargs} will exit. + +@item --max-chars=@var{max-chars} +@itemx -s @var{max-chars} +Use at most @var{max-chars} characters per command line, including the +command initial arguments and the terminating nulls at the ends of the +argument strings. If you specify a value for this option which is too +large or small, a warning message is printed and the appropriate upper +or lower limit is used instead. You can use @samp{--show-limits} +option to understand the command-line limits applying to @code{xargs} +and how this is affected by any other options. The POSIX limits shown +when you do this have already been adjusted to take into account the +size of your environment variables. + +The largest allowed value is system-dependent, and is calculated as +the argument length limit for exec, less the size of your environment, +less 2048 bytes of headroom. If this value is more than 128KiB, +128Kib is used as the default value; otherwise, the default value is +the maximum. + + +@item --max-procs=@var{max-procs} +@itemx -P @var{max-procs} +Run up to @var{max-procs} processes at a time; the default is 1. If +@var{max-procs} is 0, @code{xargs} will run as many processes as +possible at a time. Use the @samp{-n}, @samp{-s}, or @samp{-L} option +with @samp{-P}; otherwise chances are that the command will be run +only once. +@end table + +@node Interspersing File Names +@subsubsection Interspersing File Names + +@code{xargs} can insert the name of the file it is processing between +arguments you give for the command. Unless you also give options to +limit the command size (@pxref{Limiting Command Size}), this mode of +operation is equivalent to @samp{find -exec} (@pxref{Single File}). + +@table @code +@item --replace@r{[}=@var{replace-str}@r{]} +@itemx -I @var{replace-str} +@itemx -i @var{replace-str} +Replace occurrences of @var{replace-str} in the initial arguments with +names read from the input. Also, unquoted blanks do not terminate +arguments; instead, the input is split at newlines only. For the +@samp{-i} option, if @var{replace-str} is omitted for @samp{--replace} +or @samp{-i}, it defaults to @samp{@{@}} (like for @samp{find -exec}). +Implies @samp{-x} and @samp{-l 1}. @samp{-i} is deprecated in favour +of @samp{-I}. As an example, to sort each file in the @file{bills} +directory, leaving the output in that file name with @file{.sorted} +appended, you could do: + +@example +find bills -type f | xargs -I XX sort -o XX.sorted XX +@end example + +@noindent +The equivalent command using @samp{find -execdir} is: + +@example +find bills -type f -execdir sort -o '@{@}.sorted' '@{@}' ';' +@end example +@end table + + +When you use the @samp{-I} option, each line read from the input is +buffered internally. This means that there is an upper limit on the +length of input line that xargs will accept when used with the +@samp{-I} option. To work around this limitation, you can use the +@samp{-s} option to increase the amount of buffer space that xargs +uses, and you can also use an extra invocation of xargs to ensure that +very long lines do not occur. For example: + +@example +somecommand | xargs -s 50000 echo | xargs -I '@{@}' -s 100000 rm '@{@}' +@end example + +Here, the first invocation of @code{xargs} has no input line length +limit because it doesn't use the @samp{-I} option. The second +invocation of @code{xargs} does have such a limit, but we have ensured +that the it never encounters a line which is longer than it can +handle. + +This is not an ideal solution. Instead, the @samp{-I} option should +not impose a line length limit (apart from any limit imposed by the +operating system) and so one might consider this limitation to be a +bug. A better solution would be to allow @code{xargs -I} to +automatically move to a larger value for the @samp{-s} option when +this is needed. + +This sort of problem doesn't occur with the output of @code{find} +because it emits just one filename per line. + +@node Querying +@subsection Querying + +To ask the user whether to execute a command on a single file, you can +use the @code{find} primary @samp{-okdir} instead of @samp{-execdir}, +and the @code{find} primary @samp{-ok} instead of @samp{-exec}: + +@deffn Action -okdir command ; +Like @samp{-execdir} (@pxref{Single File}), but ask the user first (on +the standard input); if the response does not start with @samp{y} or +@samp{Y}, do not run the command, and return false. If the command is +run, its standard input is redirected from @file{/dev/null}. +@end deffn + +@deffn Action -ok command ; +This insecure variant of the @samp{-okdir} action is specified by +POSIX. The main difference is that the command is executed in the +directory from which @code{find} was invoked, meaning that @samp{@{@}} +is expanded to a relative path starting with the name of one of the +starting directories, rather than just the basename of the matched +file. If the command is run, its standard input is redirected from +@file{/dev/null}. +@end deffn + +When processing multiple files with a single command, to query the +user you give @code{xargs} the following option. When using this +option, you might find it useful to control the number of files +processed per invocation of the command (@pxref{Limiting Command +Size}). + +@table @code +@item --interactive +@itemx -p +Prompt the user about whether to run each command line and read a line +from the terminal. Only run the command line if the response starts +with @samp{y} or @samp{Y}. Implies @samp{-t}. +@end table + +@node Delete Files +@section Delete Files + +@deffn Action -delete +Delete files or directories; true if removal succeeded. If the +removal failed, an error message is issued. + +The use of the @samp{-delete} action on the command line automatically +turns on the @samp{-depth} option (@pxref{find Expressions}). +@end deffn + +@node Adding Tests +@section Adding Tests + +You can test for file attributes that none of the @code{find} builtin +tests check. To do this, use @code{xargs} to run a program that +filters a list of files printed by @code{find}. If possible, use +@code{find} builtin tests to pare down the list, so the program run by +@code{xargs} has less work to do. The tests builtin to @code{find} +will likely run faster than tests that other programs perform. + +For reasons of efficiency it is often useful to limit the number of +times an external program has to be run. For this reason, it is often +a good idea to implement ``extended'' tests by using @code{xargs}. + +For example, here is a way to print the names of all of the unstripped +binaries in the @file{/usr/local} directory tree. Builtin tests avoid +running @code{file} on files that are not regular files or are not +executable. + +@example +find /usr/local -type f -perm /a=x | xargs file | + grep 'not stripped' | cut -d: -f1 +@end example + +@noindent +The @code{cut} program removes everything after the file name from the +output of @code{file}. + +However, using @code{xargs} can present important security problems +(@pxref{Security Considerations}). These can be avoided by using +@samp{-execdir}. The @samp{-execdir} action is also a useful way of +putting your own test in the middle of a set of other tests or actions +for @code{find} (for example, you might want to use @samp{-prune}). + +@c Idea from Martin Weitzel. +To place a special test somewhere in the middle of a @code{find} +expression, you can use @samp{-execdir} (or, less securely, +@samp{-exec}) to run a program that performs the test. Because +@samp{-execdir} evaluates to the exit status of the executed program, +you can use a program (which can be a shell script) that tests for a +special attribute and make it exit with a true (zero) or false +(non-zero) status. It is a good idea to place such a special test +@emph{after} the builtin tests, because it starts a new process which +could be avoided if a builtin test evaluates to false. + +Here is a shell script called @code{unstripped} that checks whether +its argument is an unstripped binary file: + +@example +#! /bin/sh +file "$1" | grep -q "not stripped" +@end example + + +This script relies on the shell exiting with the status of +the last command in the pipeline, in this case @code{grep}. The +@code{grep} command exits with a true status if it found any matches, +false if not. Here is an example of using the script (assuming it is +in your search path). It lists the stripped executables (and shell +scripts) in the file @file{sbins} and the unstripped ones in +@file{ubins}. + +@example +find /usr/local -type f -perm /a=x \ + \( -execdir unstripped '@{@}' \; -fprint ubins -o -fprint sbins \) +@end example + + +@node Databases +@chapter File Name Databases + +The file name databases used by @code{locate} contain lists of files +that were in particular directory trees when the databases were last +updated. The file name of the default database is determined when +@code{locate} and @code{updatedb} are configured and installed. The +frequency with which the databases are updated and the directories for +which they contain entries depend on how often @code{updatedb} is run, +and with which arguments. + +You can obtain some statistics about the databases by using +@samp{locate --statistics}. + +@menu +* Database Locations:: +* Database Formats:: +* Newline Handling:: +@end menu + + +@node Database Locations +@section Database Locations + +There can be multiple file name databases. Users can select which +databases @code{locate} searches using the @code{LOCATE_PATH} +environment variable or a command line option. The system +administrator can choose the file name of the default database, the +frequency with which the databases are updated, and the directories +for which they contain entries. File name databases are updated by +running the @code{updatedb} program, typically nightly. + +In networked environments, it often makes sense to build a database at +the root of each filesystem, containing the entries for that +filesystem. @code{updatedb} is then run for each filesystem on the +fileserver where that filesystem is on a local disk, to prevent +thrashing the network. + +@xref{Invoking updatedb}, for the description of the options to +@code{updatedb}. These options can be used to specify which +directories are indexed by each database file. + +The default location for the locate database depends on how findutils +is built, but the findutils installation accompanying this manual uses +the default location @file{@value{LOCATE_DB}}. + +If no database exists at @file{@value{LOCATE_DB}} but the user did not +specify where to look (by using @samp{-d} or setting +@code{LOCATE_PATH}), then @code{locate} will also check for a +``secure'' database in @file{/var/lib/slocate/slocate.db}. + +@node Database Formats +@section Database Formats + +The file name databases contain lists of files that were in particular +directory trees when the databases were last updated. The file name +database format changed starting with GNU @code{locate} version 4.0 to +allow machines with different byte orderings to share the databases. + +GNU @code{locate} can read both the old and new database formats. +However, old versions of @code{locate} (on other Unix systems, or GNU +@code{locate} before version 4.0) produce incorrect results if run +against a database in something other than the old format. + +Support for the old database format will eventually be discontinued, +first in @code{updatedb} and later in @code{locate}. + +If you run @samp{locate --statistics}, the resulting summary indicates +the type of each @code{locate} database. You select which database +format @code{updatedb} will use with the @samp{--dbformat} option. + + +@menu +* LOCATE02 Database Format:: +* Sample LOCATE02 Database:: +* slocate Database Format:: +* Old Database Format:: +@end menu + +@node LOCATE02 Database Format +@subsection LOCATE02 Database Format + +@code{updatedb} runs a program called @code{frcode} to +@dfn{front-compress} the list of file names, which reduces the +database size by a factor of 4 to 5. Front-compression (also known as +incremental encoding) works as follows. + +The database entries are a sorted list (case-insensitively, for users' +convenience). Since the list is sorted, each entry is likely to share +a prefix (initial string) with the previous entry. Each database +entry begins with an offset-differential count byte, which is the +additional number of characters of prefix of the preceding entry to +use beyond the number that the preceding entry is using of its +predecessor. (The counts can be negative.) Following the count is a +null-terminated ASCII remainder---the part of the name that follows +the shared prefix. + +If the offset-differential count is larger than can be stored in a +byte (+/-127), the byte has the value 0x80 and the count follows in a +2-byte word, with the high byte first (network byte order). + +Every database begins with a dummy entry for a file called +@file{LOCATE02}, which @code{locate} checks for to ensure that the +database file has the correct format; it ignores the entry in doing +the search. + +Databases cannot be concatenated together, even if the first (dummy) +entry is trimmed from all but the first database. This is because the +offset-differential count in the first entry of the second and +following databases will be wrong. + +In the output of @samp{locate --statistics}, the new database format +is referred to as @samp{LOCATE02}. + +@node Sample LOCATE02 Database +@subsection Sample LOCATE02 Database + +Sample input to @code{frcode}: +@c with nulls changed to newlines: + +@example +/usr/src +/usr/src/cmd/aardvark.c +/usr/src/cmd/armadillo.c +/usr/tmp/zoo +@end example + +Length of the longest prefix of the preceding entry to share: + +@example +0 /usr/src +8 /cmd/aardvark.c +14 rmadillo.c +5 tmp/zoo +@end example + +Output from @code{frcode}, with trailing nulls changed to newlines +and count bytes made printable: + +@example +0 LOCATE02 +0 /usr/src +8 /cmd/aardvark.c +6 rmadillo.c +-9 tmp/zoo +@end example + +(6 = 14 - 8, and -9 = 5 - 14) + +@node slocate Database Format +@subsection slocate Database Format + +The @code{slocate} program uses a database format similar to, but not +quite the same as, GNU @code{locate}. The first byte of the database +specifies its @dfn{security level}. If the security level is 0, +@code{slocate} will read, match and print filenames on the basis of +the information in the database only. However, if the security level +byte is 1, @code{slocate} omits entries from its output if the +invoking user is unable to access them. The second byte of the +database is zero. The second byte is immediately followed by the +first database entry. The first entry in the database is not preceded +by any differential count or dummy entry. Instead the differential +count for the first item is assumed to be zero. +.P +Starting with the second entry (if any) in the database, data is +interpreted as for the GNU LOCATE02 format. + +@node Old Database Format +@subsection Old Database Format + +The old database format is used by Unix @code{locate} and @code{find} +programs and earlier releases of the GNU ones. @code{updatedb} +produces this format if given the @samp{--old-format} option. + +@code{updatedb} runs programs called @code{bigram} and @code{code} to +produce old-format databases. The old format differs from the new one +in the following ways. Instead of each entry starting with an +offset-differential count byte and ending with a null, byte values +from 0 through 28 indicate offset-differential counts from -14 through +14. The byte value indicating that a long offset-differential count +follows is 0x1e (30), not 0x80. The long counts are stored in host +byte order, which is not necessarily network byte order, and host +integer word size, which is usually 4 bytes. They also represent a +count 14 less than their value. The database lines have no +termination byte; the start of the next line is indicated by its first +byte having a value <= 30. + +In addition, instead of starting with a dummy entry, the old database +format starts with a 256 byte table containing the 128 most common +bigrams in the file list. A bigram is a pair of adjacent bytes. +Bytes in the database that have the high bit set are indexes (with the +high bit cleared) into the bigram table. The bigram and +offset-differential count coding makes these databases 20-25% smaller +than the new format, but makes them not 8-bit clean. Any byte in a +file name that is in the ranges used for the special codes is replaced +in the database by a question mark, which not coincidentally is the +shell wildcard to match a single character. + +The old format therefore cannot faithfully store entries with +non-ASCII characters. It therefore should not be used in +internationalised environments. That is, most installations should +not use it. + +Because the long counts are stored by the @code{code} program as +native-order machine words, the database format is not eaily used in +environments which differ in terms of byte order. If locate databases +are to be shared between machines, the LOCATE02 database format should +be used. This has other benefits as discussed above. However, the +length of the filename currently being processed can normally be used +to place reasonable limits on the long counts and so this information +is used by locate to help it guess the byte ordering of the old format +database. Unless it finds evidence to the contrary, @code{locate} +will assume that the byte order of the database is the same as the +native byte order of the machine running @code{locate}. The output of +@samp{locate --statistics} also includes information about the byte +order of old-format databases. + +The output of @samp{locate --statistics} will give an incorrect count +of the number of file names containing newlines or high-bit characters +for old-format databases. + +Old versions of GNU @code{locate} fail to correctly handle very long +file names, possibly leading to security problems relating to a heap +buffer overrun. @xref{Security Considerations for locate}, for a +detailed explanation. + +@node Newline Handling +@section Newline Handling + +Within the database, file names are terminated with a null character. +This is the case for both the old and the new format. + +When the new database format is being used, the compression technique +used to generate the database though relies on the ability to sort the +list of files before they are presented to @code{frcode}. + +If the system's sort command allows its input list of files to be +separated with null characters via the @samp{-z} option, this option +is used and therefore @code{updatedb} and @code{locate} will both +correctly handle file names containing newlines. If the @code{sort} +command lacks support for this, the list of files is delimited with +the newline character, meaning that parts of file names containing +newlines will be incorrectly sorted. This can result in both +incorrect matches and incorrect failures to match. + +On the other hand, if you are using the old database format, file +names with embedded newlines are not correctly handled. There is no +technical limitation which enforces this, it's just that the +@code{bigram} program has not been updated to support lists of file +names separated by nulls. + +So, if you are using the new database format (this is the default) and +your system uses GNU @code{sort}, newlines will be correctly handled +at all times. Otherwise, newlines may not be correctly handled. + +@node File Permissions +@chapter File Permissions + +@include perm.texi + +@include getdate.texi + +@node Reference +@chapter Reference + +Below are summaries of the command line syntax for the programs +discussed in this manual. + +@menu +* Invoking find:: +* Invoking locate:: +* Invoking updatedb:: +* Invoking xargs:: +* Regular Expressions:: +* Environment Variables:: +@end menu + +@node Invoking find +@section Invoking @code{find} + +@example +find @r{[-H] [-L] [-P] [-D @var{debugoptions}] [-O@var{level}]} @r{[}@var{file}@dots{}@r{]} @r{[}@var{expression}@r{]} +@end example + +@code{find} searches the directory tree rooted at each file name +@var{file} by evaluating the @var{expression} on each file it finds in +the tree. + +The command line may begin with the @samp{-H}, @samp{-L}, @samp{-P}, +@samp{-D} and @samp{-O} options. These are followed by a list of +files or directories that should be searched. If no files to search +are specified, the current directory (@file{.}) is used. + +This list of files to search is followed by a list of expressions +describing the files we wish to search for. The first part of the +expression is recognised by the fact that it begins with @samp{-} +followed by some other letters (for example @samp{-print}), or is +either @samp{(} or @samp{!}. Any arguments after it are the rest of +the expression. + +If no expression is given, the expression @samp{-print} is used. + +The @code{find} command exits with status zero if all files matched +are processed successfully, greater than zero if errors occur. + +The @code{find} program also recognises two options for administrative +use: + +@table @samp +@item --help +Print a summary of the command line usage and exit. +@item --version +Print the version number of @code{find} and exit. +@end table + +The @samp{-version} option is a synonym for @samp{--version} + + +@menu +* Filesystem Traversal Options:: +* Warning Messages:: +* Optimisation Options:: +* Debug Options:: +* Find Expressions:: +@end menu + +@node Filesystem Traversal Options +@subsection Filesystem Traversal Options + +The options @samp{-H}, @samp{-L} or @samp{-P} may be specified at the +start of the command line (if none of these is specified, @samp{-P} is +assumed). If you specify more than one of these options, the last one +specified takes effect (but note that the @samp{-follow} option is +equivalent to @samp{-L}). + +@table @code +@item -P +Never follow symbolic links (this is the default), except in the case +of the @samp{-xtype} predicate. +@item -L +Always follow symbolic links, except in the case of the @samp{-xtype} +predicate. +@item -H +Follow symbolic links specified in the list of files to search, or +which are otherwise specified on the command line. +@end table + +If @code{find} would follow a symbolic link, but cannot for any reason +(for example, because it has insufficient permissions or the link is +broken), it falls back on using the properties of the symbolic link +itself. @ref{Symbolic Links} for a more complete description of how +symbolic links are handled. + +@node Warning Messages +@subsection Warning Messages + +If there is an error on the @code{find} command line, an error message +is normally issued. However, there are some usages that are +inadvisable but which @code{find} should still accept. Under these +circumstances, @code{find} may issue a warning message. By default, +warnings are enabled only if @code{find} is being run interactively +(specifically, if the standard input is a terminal). Warning messages +can be controlled explicitly by the use of options on the command +line: + +@table @code +@item -warn +Issue warning messages where appropriate. +@item -nowarn +Do not issue warning messages. +@end table + +These options take effect at the point on the command line where they +are specified. Therefore it's not useful to specify @samp{-nowarn} at +the end of the command line. The warning messages affected by the +above options are triggered by: + +@itemize @minus +@item +Use of the @samp{-d} option which is deprecated; please use +@samp{-depth} instead, since the latter is POSIX-compliant. +@item +Use of the @samp{-ipath} option which is deprecated; please use +@samp{-iwholename} instead. +@item +Specifying an option (for example @samp{-mindepth}) after a non-option +(for example @samp{-type} or @samp{-print}) on the command line. +@end itemize + +The default behaviour above is designed to work in that way so that +existing shell scripts don't generate spurious errors, but people will +be made aware of the problem. + +Some warning messages are issued for less common or more serious +problems, and consequently cannot be turned off: + +@itemize @minus +@item +Use of an unrecognised backslash escape sequence with @samp{-fprintf} +@item +Use of an unrecognised formatting directive with @samp{-fprintf} +@end itemize + +@node Optimisation Options +@subsection Optimisation Options + +The @samp{-O@var{level}} option sets @code{find}'s optimisation level +to @var{level}. The default optimisation level is 1. + +At certain optimisation levels, @code{find} reorders tests to speed up +execution while preserving the overall effect; that is, predicates +with side effects are not reordered relative to each other. The +optimisations performed at each optimisation level are as follows. + +@table @samp +@item 0 +Currently equivalent to optimisation level 1. + +@item 1 +This is the default optimisation level and corresponds to the +traditional behaviour. Expressions are reordered so that tests based +only on the names of files (for example@samp{ -name} and +@samp{-regex}) are performed first. + +@item 2 +Any @samp{-type} or @samp{-xtype} tests are performed after any tests +based only on the names of files, but before any tests that require +information from the inode. On many modern versions of Unix, file +types are returned by @code{readdir()} and so these predicates are +faster to evaluate than predicates which need to stat the file first. + +@item 3 +At this optimisation level, the full cost-based query optimiser is +enabled. The order of tests is modified so that cheap (i.e., fast) +tests are performed first and more expensive ones are performed later, +if necessary. Within each cost band, predicates are evaluated earlier +or later according to whether they are likely to succeed or not. For +@samp{-o}, predicates which are likely to succeed are evaluated +earlier, and for @samp{-a}, predicates which are likely to fail are +evaluated earlier. +@end table + + +@node Debug Options +@subsection Debug Options + +The @samp{-D} option makes @code{find} produce diagnostic output. +Much of the information is useful only for diagnosing problems, and so +most people will not find this option helpful. + +The list of debug options should be comma separated. Compatibility of +the debug options is not guaranteed between releases of findutils. +For a complete list of valid debug options, see the output of +@code{find -D help}. Valid debug options include: +@table @samp +@item help +Explain the debugging options. +@item tree +Show the expression tree in its original and optimised form. +@item stat +Print messages as files are examined with the stat and lstat system +calls. The find program tries to minimise such calls. +@item opt +Prints diagnostic information relating to the optimisation of the +expression tree; see the @samp{-O} option. +@item rates +Prints a summary indicating how often each predicate succeeded or +failed. +@end table + +@node Find Expressions +@subsection Find Expressions + +The final part of the @code{find} command line is a list of +expressions. @xref{Primary Index}, for a summary of all of the tests, +actions, and options that the expression can contain. If the +expression is missing, @samp{-print} is assumed. + +@node Invoking locate +@section Invoking @code{locate} + +@example +locate @r{[}@var{option}@dots{}@r{]} @var{pattern}@dots{} +@end example + +For each @var{pattern} given @code{locate} searches one or more file +name databases returning each match of @var{pattern}. + +For each @var{pattern} given @code{locate} searches one or more file +name databases returning each match of @var{pattern}. + +@table @code +@item --all +@itemx -A +Print only names which match all non-option arguments, not those +matching one or more non-option arguments. + +@item --basename +@itemx -b +The specified pattern is matched against just the last component of +the name of a file in the @code{locate} database. This last +component is also called the ``base name''. For example, the base +name of @file{/tmp/mystuff/foo.old.c} is @file{foo.old.c}. If the +pattern contains metacharacters, it must match the base name exactly. +If not, it must match part of the base name. + +@item --count +@itemx -c +Instead of printing the matched file names, just print the total +number of matches found, unless @samp{--print} (@samp{-p}) is also +present. + + +@item --database=@var{path} +@itemx -d @var{path} +Instead of searching the default @code{locate} database +@file{@value{LOCATE_DB}}, @code{locate} searches the file +name databases in @var{path}, which is a colon-separated list of +database file names. You can also use the environment variable +@code{LOCATE_PATH} to set the list of database files to search. The +option overrides the environment variable if both are used. Empty +elements in @var{path} (that is, a leading or trailing colon, or two +colons in a row) are taken to stand for the default database. +A database can be supplied on stdin, using @samp{-} as an element +of @samp{path}. If more than one element of @samp{path} is @samp{-}, +later instances are ignored (but a warning message is printed). + +@item --existing +@itemx -e +Only print out such names which currently exist (instead of such names +which existed when the database was created). Note that this may slow +down the program a lot, if there are many matches in the database. +The way in which broken symbolic links are treated is affected by the +@samp{-L}, @samp{-P} and @samp{-H} options. Please note that it is +possible for the file to be deleted after @code{locate} has checked +that it exists, but before you use it. This option is automatically +turned on when reading an @code{slocate} database in secure mode +(@pxref{slocate Database Format}). + +@item --non-existing +@itemx -E +Only print out such names which currently do not exist (instead of +such names which existed when the database was created). Note that +this may slow down the program a lot, if there are many matches in the +database. The way in which broken symbolic links are treated is +affected by the @samp{-L}, @samp{-P} and @samp{-H} options. Please +note that @code{locate} checks that the file does not exist, but a +file of the same name might be created after @code{locate}'s check but +before you read @code{locate}'s output. + +@item --follow +@itemx -L +If testing for the existence of files (with the @samp{-e} or @samp{-E} +options), consider broken symbolic links to be non-existing. This is +the default behaviour. + +@item --nofollow +@itemx -P +@itemx -H +If testing for the existence of files (with the @samp{-e} or @samp{-E} +options), treat broken symbolic links as if they were existing files. +The @samp{-H} form of this option is provided purely for similarity +with @code{find}; the use of @samp{-P} is recommended over @samp{-H}. + +@item --ignore-case +@itemx -i +Ignore case distinctions in both the pattern and the file names. + +@item --limit=N +@itemx -l N +Limit the number of results printed to N. When used with the +@samp{--count} option, the value printed will never be larger than +this limit. +@item --max-database-age=D +Normally, @code{locate} will issue a warning message when it searches +a database which is more than 8 days old. This option changes that +value to something other than 8. The effect of specifying a negative +value is undefined. +@item --mmap +@itemx -m +Accepted but does nothing. The option is supported only to provide +compatibility with BSD's @code{locate}. + +@item --null +@itemx -0 +Results are separated with the ASCII NUL character rather than the +newline character. To get the full benefit of the use of this option, +use the new @code{locate} database format (that is the default +anyway). + +@item --print +@itemx -p +Print search results when they normally would not, because of the +presence of @samp{--statistics} (@samp{-S}) or @samp{--count} +(@samp{-c}). + +@item --wholename +@itemx -w +The specified pattern is matched against the whole name of the file in +the @code{locate} database. If the pattern contains metacharacters, +it must match exactly. If not, it must match part of the whole file +name. This is the default behaviour. + +@item --regex +@itemx -r +Instead of using substring or shell glob matching, the pattern +specified on the command line is understood to be a regular +expression. GNU Emacs-style regular expressions are assumed unless +the @samp{--regextype} option is also given. File names from the +@code{locate} database are matched using the specified regular +expression. If the @samp{-i} flag is also given, matching is +case-insensitive. Matches are performed against the whole path name, +and so by default a pathname will be matched if any part of it matches +the specified regular expression. The regular expression may use +@samp{^} or @samp{$} to anchor a match at the beginning or end of a +pathname. + +@item --regextype +This option changes the regular expression syntax and behaviour used +by the @samp{--regex} option. @ref{Regular Expressions} for more +information on the regular expression dialects understood by GNU +findutils. + +@item --stdio +@itemx -s +Accepted but does nothing. The option is supported only to provide +compatibility with BSD's @code{locate}. + +@item --statistics +@itemx -S +Print some summary information for each @code{locate} database. No +search is performed unless non-option arguments are given. +Although the BSD version of locate also has this option, the format of the +output is different. + +@item --help +Print a summary of the command line usage for @code{locate} and exit. + +@item --version +Print the version number of @code{locate} and exit. +@end table + +@node Invoking updatedb +@section Invoking @code{updatedb} + +@example +updatedb @r{[}@var{option}@dots{}@r{]} +@end example + +@code{updatedb} creates and updates the database of file names used by +@code{locate}. @code{updatedb} generates a list of files similar to +the output of @code{find} and then uses utilities for optimizing the +database for performance. @code{updatedb} is often run periodically +as a @code{cron} job and configured with environment variables or +command options. Typically, operating systems have a shell script +that ``exports'' configurations for variable definitions and uses +another shell script that ``sources'' the configuration file into the +environment and then executes @code{updatedb} in the environment. + +@code{updatedb} creates and updates the database of file names used by +@code{locate}. @code{updatedb} generates a list of files similar to +the output of @code{find} and then uses utilities for optimizing the +database for performance. @code{updatedb} is often run periodically +as a @code{cron} job and configured with environment variables or +command options. Typically, operating systems have a shell script +that ``exports'' configurations for variable definitions and uses +another shell script that ``sources'' the configuration file into the +environment and then executes @code{updatedb} in the environment. + +@table @code +@item --findoptions='@var{OPTION}@dots{}' +Global options to pass on to @code{find}. +The environment variable @code{FINDOPTIONS} also sets this value. +Default is none. + +@item --localpaths='@var{path}@dots{}' +Non-network directories to put in the database. +Default is @file{/}. + +@item --netpaths='@var{path}@dots{}' +Network (NFS, AFS, RFS, etc.) directories to put in the database. +The environment variable @code{NETPATHS} also sets this value. +Default is none. + +@item --prunepaths='@var{path}@dots{}' +Directories to omit from the database, which would otherwise be +included. The environment variable @code{PRUNEPATHS} also sets this +value. Default is @file{/tmp /usr/tmp /var/tmp /afs}. The paths are +used as regular expressions (with @code{find ... -regex}, so you need +to specify these paths in the same way that @code{find} will encounter +them. This means for example that the paths must not include trailing +slashes. + +@item --prunefs='@var{path}@dots{}' +Filesystems to omit from the database, which would otherwise be +included. Note that files are pruned when a filesystem is reached; +Any filesystem mounted under an undesired filesystem will be ignored. +The environment variable @code{PRUNEFS} also sets this value. Default +is @file{nfs NFS proc}. + +@item --output=@var{dbfile} +The database file to build. The default is system-dependent, but +when this document was formatted it was @file{@value{LOCATE_DB}}. + +@item --localuser=@var{user} +The user to search the non-network directories as, using @code{su}. +Default is to search the non-network directories as the current user. +You can also use the environment variable @code{LOCALUSER} to set this user. + +@item --netuser=@var{user} +The user to search network directories as, using @code{su}. Default +@code{user} is @code{daemon}. You can also use the environment variable +@code{NETUSER} to set this user. + +@item --old-format +Generate a @code{locate} database in the old format, for compatibility +with versions of @code{locate} other than GNU @code{locate}. Using +this option means that @code{locate} will not be able to properly +handle non-ASCII characters in file names (that is, file names +containing characters which have the eighth bit set, such as many of +the characters from the ISO-8859-1 character set). @xref{Database +Formats}, for a detailed description of the supported database +formats. + +@item --dbformat=@var{FORMAT} +Generate the locate database in format @code{FORMAT}. Supported +database formats include @code{LOCATE02} (which is the default), +@code{old} and @code{slocate}. The @code{old} format exists for +compatibility with implementations of @code{locate} on other Unix +systems. The @code{slocate} format exists for compatibility with +@code{slocate}. @xref{Database Formats}, for a detailed description +of each format. + +@item --help +Print a summary of the command line usage and exit. +@item --version +Print the version number of @code{updatedb} and exit. +@end table + +@node Invoking xargs +@section Invoking @code{xargs} + +@example +xargs @r{[}@var{option}@dots{}@r{]} @r{[}@var{command} @r{[}@var{initial-arguments}@r{]}@r{]} +@end example + +@code{xargs} exits with the following status: + +@table @asis +@item 0 +if it succeeds +@item 123 +if any invocation of the command exited with status 1-125 +@item 124 +if the command exited with status 255 +@item 125 +if the command is killed by a signal +@item 126 +if the command cannot be run +@item 127 +if the command is not found +@item 1 +if some other error occurred. +@end table + +Exit codes greater than 128 are used by the shell to indicate that +a program died due to a fatal signal. + +@table @code +@item --arg-file@r{=@var{inputfile}} +@itemx -a o@r{@var{inputfile}} +Read names from the file @var{inputfile} instead of standard input. +If you use this option, the standard input stream remains unchanged +when commands are run. Otherwise, stdin is redirected from +@file{/dev/null}. + +@item --null +@itemx -0 +Input file names are terminated by a null character instead of by +whitespace, and any quotes and backslash characters are not considered +special (every character is taken literally). Disables the end of +file string, which is treated like any other argument. + +@item --delimiter @var{delim} +@itemx -d @var{delim} + +Input file names are terminated by the specified character @var{delim} +instead of by whitespace, and any quotes and backslash characters are +not considered special (every character is taken literally). Disables +the end of file string, which is treated like any other argument. + +The specified delimiter may be a single character, a C-style character +escape such as @samp{\n}, or an octal or hexadecimal escape code. +Octal and hexadecimal escape codes are understood as for the +@code{printf} command. Multibyte characters are not supported. + + +@item -E @var{eof-str} +@itemx --eof@r{[}=@var{eof-str}@r{]} +@itemx -e@r{[}@var{eof-str}@r{]} +Set the end of file string to @var{eof-str}. If the end of file +string occurs as a line of input, the rest of the input is ignored. +If @var{eof-str} is omitted (@samp{-e}) or blank (either @samp{-e} or +@samp{-E}), there is no end of file string. The @samp{-e} form of +this option is deprecated in favour of the POSIX-compliant @samp{-E} +option, which you should use instead. As of GNU xargs version 4.2.9, +the default behaviour of xargs is not to have a logical end-of-file +marker. The POSIX standard (IEEE Std 1003.1, 2004 Edition) allows +this. + +@item --help +Print a summary of the options to @code{xargs} and exit. + +@item -I @var{replace-str} +@itemx --replace@r{[}=@var{replace-str}@r{]} +@itemx -i@r{[}@var{replace-str}@r{]} +Replace occurrences of @var{replace-str} in the initial arguments with +names read from standard input. Also, unquoted blanks do not +terminate arguments; instead, the input is split at newlines only. If +@var{replace-str} is omitted (omitting it is allowed only for +@samp{-i}), it defaults to @samp{@{@}} (like for @samp{find -exec}). +Implies @samp{-x} and @samp{-l 1}. The @samp{-i} option is deprecated +in favour of the @samp{-I} option. + +@item -L @var{max-lines} +@itemx --max-lines@r{[}=@var{max-lines}@r{]} +@itemx -l@r{[}@var{max-lines}@r{]} +Use at most @var{max-lines} non-blank input lines per command line. +For @samp{-l}, @var{max-lines} defaults to 1 if omitted. For +@samp{-L}, the argument is mandatory. Trailing blanks cause an input +line to be logically continued on the next input line, for the purpose +of counting the lines. Implies @samp{-x}. The @samp{-l} form of this +option is deprecated in favour of the POSIX-compliant @samp{-L} +option. + +@item --max-args=@var{max-args} +@itemx -n @var{max-args} +Use at most @var{max-args} arguments per command line. Fewer than +@var{max-args} arguments will be used if the size (see the @samp{-s} +option) is exceeded, unless the @samp{-x} option is given, in which +case @code{xargs} will exit. + +@item --interactive +@itemx -p +Prompt the user about whether to run each command line and read a line +from the terminal. Only run the command line if the response starts +with @samp{y} or @samp{Y}. Implies @samp{-t}. + +@item --no-run-if-empty +@itemx -r +If the standard input is completely empty, do not run the +command. By default, the command is run once even if there is no +input. + +@item --max-chars=@var{max-chars} +@itemx -s @var{max-chars} +Use at most @var{max-chars} characters per command line, including the +command, initial arguments and any terminating nulls at the ends of +the argument strings. + +@item --show-limits +Display the limits on the command-line length which are imposed by the +operating system, @code{xargs}' choice of buffer size and the +@samp{-s} option. Pipe the input from @file{/dev/null} (and perhaps +specify @samp{--no-run-if-empty}) if you don't want @code{xargs} to do +anything. + +@item --verbose +@itemx -t +Print the command line on the standard error output before executing +it. + +@item --version +Print the version number of @code{xargs} and exit. + +@item --exit +@itemx -x +Exit if the size (see the @samp{-s} option) is exceeded. + + +@item --max-procs=@var{max-procs} +@itemx -P @var{max-procs} +Run simultaneously up to @var{max-procs} processes at once; the default is 1. If +@var{max-procs} is 0, @code{xargs} will run as many processes as +possible simultaneously. +@end table + + +@node Regular Expressions +@section Regular Expressions + +The @samp{-regex} and @samp{-iregex} tests of @code{find} allow +matching by regular expression, as does the @samp{--regex} option of +@code{locate}. There are many different types of Regular Expression, +but the type used by @code{find} and @code{locate} is the same as is +used in GNU Emacs. Both programs provide an option which allows you +to select an alternative regular expression syntax; for @code{find} +this is the @samp{-regextype} option, and for @code{locate} this is +the @samp{--regextype} option. + +These options take a single argument, which indicates the specific +regular expression syntax and behaviour that should be used. This +should be one of the following: + +@include regexprops.texi + +@node Environment Variables +@section Environment Variables +@table @var +@item LANG +Provides a default value for the internationalisation variables that +are unset or null. +@item LC_ALL +If set to a non-empty string value, override the values of all the +other internationalisation variables. +@item LC_COLLATE +The POSIX standard specifies that this variable affects the pattern +matching to be used for the `\-name' option. GNU find uses the +GNU version of the @code{fnmatch} library function. + +POSIX also specifies that the `LC_COLLATE' environment +variable affects the interpretation of the user's response to the +query issued by `\-ok', but this is not the case for GNU find. +@item LC_CTYPE +This variable affects the treatment of character classes used with +the @samp{-name} test, if the system's +@code{fnmatch} library function supports this. It has no effect on the behaviour +of the @samp{-ok} expression. +@item LC_MESSAGES +Determines the locale to be used for internationalised messages. +@item NLSPATH +Determines the location of the internationalisation message catalogues. +@item PATH +Affects the directories which are searched to find the executables +invoked by @samp{-exec}, @samp{-execdir} @samp{-ok} and @samp{-okdir}. +If the @var{PATH} environment variable includes the current directory +(by explicitly including @samp{.} or by having an empty element), and +the find command line includes @samp{-execdir} or @samp{-okdir}, +@code{find} will refuse to run. @xref{Security Considerations}, for a +more detailed discussion of security matters. + +@item POSIXLY_CORRECT +Determines the block size used by @samp{-ls} and @samp{-fls}. +If @var{POSIXLY_CORRECT} is set, blocks are units of 512 bytes. Otherwise +they are units of 1024 bytes. + +@item TZ +Affects the time zone used for some of the time-related format +directives of @samp{-printf} and @samp{-fprintf}. +@end table + + + +@node Common Tasks +@chapter Common Tasks + +The sections that follow contain some extended examples that both give +a good idea of the power of these programs, and show you how to solve +common real-world problems. + +@menu +* Viewing And Editing:: +* Archiving:: +* Cleaning Up:: +* Strange File Names:: +* Fixing Permissions:: +* Classifying Files:: +@end menu + +@node Viewing And Editing +@section Viewing And Editing + +To view a list of files that meet certain criteria, simply run your +file viewing program with the file names as arguments. Shells +substitute a command enclosed in backquotes with its output, so the +whole command looks like this: + +@example +less `find /usr/include -name '*.h' | xargs grep -l mode_t` +@end example + +@noindent +You can edit those files by giving an editor name instead of a file +viewing program: + +@example +emacs `find /usr/include -name '*.h' | xargs grep -l mode_t` +@end example + +Because there is a limit to the length of any individual command line, +there is a limit to the number of files that can be handled in this +way. We can get around this difficulty by using xargs like this: + +@example +find /usr/include -name '*.h' | xargs grep -l mode_t > todo +xargs --arg-file=todo emacs +@end example + +Here, @code{xargs} will run @code{emacs} as many times as necessary to +visit all of the files listed in the file @file{todo}. + +@node Archiving +@section Archiving + +You can pass a list of files produced by @code{find} to a file +archiving program. GNU @code{tar} and @code{cpio} can both read lists +of file names from the standard input---either delimited by nulls (the +safe way) or by blanks (the lazy, risky default way). To use +null-delimited names, give them the @samp{--null} option. You can +store a file archive in a file, write it on a tape, or send it over a +network to extract on another machine. + +One common use of @code{find} to archive files is to send a list of +the files in a directory tree to @code{cpio}. Use @samp{-depth} so if +a directory does not have write permission for its owner, its contents +can still be restored from the archive since the directory's +permissions are restored after its contents. Here is an example of +doing this using @code{cpio}; you could use a more complex @code{find} +expression to archive only certain files. + +@example +find . -depth -print0 | + cpio --create --null --format=crc --file=/dev/nrst0 +@end example + +You could restore that archive using this command: + +@example +cpio --extract --null --make-dir --unconditional \ + --preserve --file=/dev/nrst0 +@end example + +Here are the commands to do the same things using @code{tar}: + +@example +find . -depth -print0 | + tar --create --null --files-from=- --file=/dev/nrst0 + +tar --extract --null --preserve-perm --same-owner \ + --file=/dev/nrst0 +@end example + +@c Idea from Rick Sladkey. +Here is an example of copying a directory from one machine to another: + +@example +find . -depth -print0 | cpio -0o -Hnewc | + rsh @var{other-machine} "cd `pwd` && cpio -i0dum" +@end example + +@node Cleaning Up +@section Cleaning Up + +@c Idea from Jim Meyering. +This section gives examples of removing unwanted files in various +situations. Here is a command to remove the CVS backup files created +when an update requires a merge: + +@example +find . -name '.#*' -print0 | xargs -0r rm -f +@end example + +The command above works, but the following is safer: + +@example +find . -name '.#*' -depth -delete +@end example + +@c Idea from Franc,ois Pinard. +You can run this command to clean out your clutter in @file{/tmp}. +You might place it in the file your shell runs when you log out +(@file{.bash_logout}, @file{.logout}, or @file{.zlogout}, depending on +which shell you use). + +@example +find /tmp -depth -user "$LOGNAME" -type f -delete +@end example + +If your @code{find} command removes directories, you may find that +you get a spurious error message when @code{find} tries to recurse +into a directory that has now been removed. Using the @samp{-depth} +option will normally resolve this problem. + +@c Idea from Noah Friedman. +To remove old Emacs backup and auto-save files, you can use a command +like the following. It is especially important in this case to use +null-terminated file names because Emacs packages like the VM mailer +often create temporary file names with spaces in them, like +@file{#reply to David J. MacKenzie<1>#}. + +@example +find ~ \( -name '*~' -o -name '#*#' \) -print0 | + xargs --no-run-if-empty --null rm -vf +@end example + +Removing old files from @file{/tmp} is commonly done from @code{cron}: + +@c Idea from Kaveh Ghazi. +@example +find /tmp /var/tmp -not -type d -mtime +3 -delete +find /tmp /var/tmp -depth -mindepth 1 -type d -empty -delete +@end example + +The second @code{find} command above uses @samp{-depth} so it cleans +out empty directories depth-first, hoping that the parents become +empty and can be removed too. It uses @samp{-mindepth} to avoid +removing @file{/tmp} itself if it becomes totally empty. + +@node Strange File Names +@section Strange File Names + +@c Idea from: +@c From: tmatimar@isgtec.com (Ted Timar) +@c Newsgroups: comp.unix.questions,comp.unix.shell,comp.answers,news.answers +@c Subject: Unix - Frequently Asked Questions (2/7) [Frequent posting] +@c Subject: How do I remove a file with funny characters in the filename ? +@c Date: Thu Mar 18 17:16:55 EST 1993 +@code{find} can help you remove or rename a file with strange +characters in its name. People are sometimes stymied by files whose +names contain characters such as spaces, tabs, control characters, or +characters with the high bit set. The simplest way to remove such +files is: + +@example +rm -i @var{some*pattern*that*matches*the*problem*file} +@end example + +@code{rm} asks you whether to remove each file matching the given +pattern. If you are using an old shell, this approach might not work +if the file name contains a character with the high bit set; the shell +may strip it off. A more reliable way is: + +@example +find . -maxdepth 1 @var{tests} -okdir rm '@{@}' \; +@end example + +@noindent +where @var{tests} uniquely identify the file. The @samp{-maxdepth 1} +option prevents @code{find} from wasting time searching for the file +in any subdirectories; if there are no subdirectories, you may omit +it. A good way to uniquely identify the problem file is to figure out +its inode number; use + +@example +ls -i +@end example + +Suppose you have a file whose name contains control characters, and +you have found that its inode number is 12345. This command prompts +you for whether to remove it: + +@example +find . -maxdepth 1 -inum 12345 -okdir rm -f '@{@}' \; +@end example + +If you don't want to be asked, perhaps because the file name may +contain a strange character sequence that will mess up your screen +when printed, then use @samp{-execdir} instead of @samp{-okdir}. + +If you want to rename the file instead, you can use @code{mv} instead +of @code{rm}: + +@example +find . -maxdepth 1 -inum 12345 -okdir mv '@{@}' @var{new-file-name} \; +@end example + +@node Fixing Permissions +@section Fixing Permissions + +Suppose you want to make sure that everyone can write to the +directories in a certain directory tree. Here is a way to find +directories lacking either user or group write permission (or both), +and fix their permissions: + +@example +find . -type d -not -perm -ug=w | xargs chmod ug+w +@end example + +@noindent +You could also reverse the operations, if you want to make sure that +directories do @emph{not} have world write permission. + +@node Classifying Files +@section Classifying Files + +@c Idea from: +@c From: martin@mwtech.UUCP (Martin Weitzel) +@c Newsgroups: comp.unix.wizards,comp.unix.questions +@c Subject: Advanced usage of 'find' (Re: Unix security automating script) +@c Date: 22 Mar 90 15:05:19 GMT +If you want to classify a set of files into several groups based on +different criteria, you can use the comma operator to perform multiple +independent tests on the files. Here is an example: + +@example +find / -type d \( -perm -o=w -fprint allwrite , \ + -perm -o=x -fprint allexec \) + +echo "Directories that can be written to by everyone:" +cat allwrite +echo "" +echo "Directories with search permissions for everyone:" +cat allexec +@end example + +@code{find} has only to make one scan through the directory tree +(which is one of the most time consuming parts of its work). + +@node Worked Examples +@chapter Worked Examples + +The tools in the findutils package, and in particular @code{find}, +have a large number of options. This means that quite often, +there is more than one way to do things. Some of the options +and facilities only exist for compatibility with other tools, and +findutils provides improved ways of doing things. + +This chapter describes a number of useful tasks that are commonly +performed, and compares the different ways of achieving them. + +@menu +* Deleting Files:: +* Updating A Timestamp File:: +@end menu + +@node Deleting Files +@section Deleting Files + +One of the most common tasks that @code{find} is used for is locating +files that can be deleted. This might include: + +@itemize +@item +Files last modified more than 3 years ago which haven't been accessed +for at least 2 years +@item +Files belonging to a certain user +@item +Temporary files which are no longer required +@end itemize + +This example concentrates on the actual deletion task rather than on +sophisticated ways of locating the files that need to be deleted. +We'll assume that the files we want to delete are old files underneath +@file{/var/tmp/stuff}. + +@subsection The Traditional Way + +The traditional way to delete files in @file{var/tmp/stuff} that have +not been modified in over 90 days would have been: + +@smallexample +find /var/tmp/stuff -mtime +90 -exec /bin/rm @{@} \; +@end smallexample + +The above command uses @samp{-exec} to run the @code{/bin/rm} command +to remove each file. This approach works and in fact would have +worked in Version 7 Unix in 1979. However, there are a number of +problems with this approach. + + +The most obvious problem with the approach above is that it causes +@code{find} to fork every time it finds a file that needs to delete, +and the child process then has to use the @code{exec} system call to +launch @code{/bin/rm}. All this is quite inefficient. If we are +going to use @code{/bin/rm} to do this job, it is better to make it +delete more than one file at a time. + +The most obvious way of doing this is to use the shell's command +expansion feature: + +@smallexample +/bin/rm `find /var/tmp/stuff -mtime +90 -print` +@end smallexample +or you could use the more modern form +@smallexample +/bin/rm $(find /var/tmp/stuff -mtime +90 -print) +@end smallexample + +The commands above are much more efficient than the first attempt. +However, there is a problem with them. The shell has a maximum +command length which is imposed by the operating system (the actual +limit varies between systems). This means that while the command +expansion technique will usually work, it will suddenly fail when +there are lots of files to delete. Since the task is to delete +unwanted files, this is precisely the time we don't want things to go +wrong. + +@subsection Making Use of xargs + +So, is there a way to be more efficient in the use of @code{fork()} +and @code{exec()} without running up against this limit? +Yes, we can be almost optimally efficient by making use +of the @code{xargs} command. The @code{xargs} command reads arguments +from its standard input and builds them into command lines. We can +use it like this: + +@smallexample +find /var/tmp/stuff -mtime +90 -print | xargs /bin/rm +@end smallexample + +For example if the files found by @code{find} are +@file{/var/tmp/stuff/A}, +@file{/var/tmp/stuff/B} and +@file{/var/tmp/stuff/C} then @code{xargs} might issue the commands + +@smallexample +/bin/rm /var/tmp/stuff/A /var/tmp/stuff/B +/bin/rm /var/tmp/stuff/C +@end smallexample + +The above assumes that @code{xargs} has a very small maximum command +line length. The real limit is much larger but the idea is that +@code{xargs} will run @code{/bin/rm} as many times as necessary to get +the job done, given the limits on command line length. + +This usage of @code{xargs} is pretty efficient, and the @code{xargs} +command is widely implemented (all modern versions of Unix offer it). +So far then, the news is all good. However, there is bad news too. + +@subsection Unusual characters in filenames + +Unix-like systems allow any characters to appear in file names with +the exception of the ASCII NUL character and the backslash. +Backslashes can occur in path names (as the directory separator) but +not in the names of actual directory entries. This means that the +list of files that @code{xargs} reads could in fact contain white space +characters --- spaces, tabs and newline characters. Since by default, +@code{xargs} assumes that the list of files it is reading uses white +space as an argument separator, it cannot correctly handle the case +where a filename actually includes white space. This makes the +default behaviour of @code{xargs} almost useless for handling +arbitrary data. + +To solve this problem, GNU findutils introduced the @samp{-print0} +action for @code{find}. This uses the ASCII NUL character to separate +the entries in the file list that it produces. This is the ideal +choice of separator since it is the only character that cannot appear +within a path name. The @samp{-0} option to @code{xargs} makes it +assume that arguments are separated with ASCII NUL instead of white +space. It also turns off another misfeature in the default behaviour +of @code{xargs}, which is that it pays attention to quote characters +in its input. Some versions of @code{xargs} also terminate when they +see a lone @samp{_} in the input, but GNU @code{find} no longer does +that (since it has become an optional behaviour in the Unix standard). + +So, putting @code{find -print0} together with @code{xargs -0} we get +this command: + +@smallexample +find /var/tmp/stuff -mtime +90 -print0 | xargs -0 /bin/rm +@end smallexample + +The result is an efficient way of proceeding that +correctly handles all the possible characters that could appear in the +list of files to delete. This is good news. However, there is, as +I'm sure you're expecting, also more bad news. The problem is that +this is not a portable construct; although other versions of Unix +(notable BSD-derived ones) support @samp{-print0}, it's not +universal. So, is there a more universal mechanism? + +@subsection Going back to -exec + +There is indeed a more universal mechanism, which is a slight +modification to the @samp{-exec} action. The normal @samp{-exec} +action assumes that the command to run is terminated with a semicolon +(the semicolon normally has to be quoted in order to protect it from +interpretation as the shell command separator). The SVR4 edition of +Unix introduced a slight variation, which involves terminating the +command with @samp{+} instead: + +@smallexample +find /var/tmp/stuff -mtime +90 -exec /bin/rm @{@} \+ +@end smallexample + +The above use of @samp{-exec} causes @code{find} to build up a long +command line and then issue it. This can be less efficient than some +uses of @code{xargs}; for example @code{xargs} allows new command +lines to be built up while the previous command is still executing, and +allows you to specify a number of commands to run in parallel. +However, the @code{find @dots{} -exec @dots{} +} construct has the advantage +of wide portability. GNU findutils did not support @samp{-exec @dots{} +} +until version 4.2.12; one of the reasons for this is that it already +had the @samp{-print0} action in any case. + + +@subsection A more secure version of -exec + +The command above seems to be efficient and portable. However, +within it lurks a security problem. The problem is shared with +all the commands we've tried in this worked example so far, too. The +security problem is a race condition; that is, if it is possible for +somebody to manipulate the filesystem that you are searching while you +are searching it, it is possible for them to persuade your @code{find} +command to cause the deletion of a file that you can delete but they +normally cannot. + +The problem occurs because the @samp{-exec} action is defined by the +@acronym{POSIX} standard to invoke its command with the same working directory +as @code{find} had when it was started. This means that the arguments +which replace the @{@} include a relative path from @code{find}'s +starting point down the file that needs to be deleted. For example, + +@smallexample +find /var/tmp/stuff -mtime +90 -exec /bin/rm @{@} \+ +@end smallexample + +might actually issue the command: + +@smallexample +/bin/rm /var/tmp/stuff/A /var/tmp/stuff/B /var/tmp/stuff/passwd +@end smallexample + +Notice the file @file{/var/tmp/stuff/passwd}. Likewise, the command: + +@smallexample +cd /var/tmp && find stuff -mtime +90 -exec /bin/rm @{@} \+ +@end smallexample + +might actually issue the command: + +@smallexample +/bin/rm stuff/A stuff/B stuff/passwd +@end smallexample + +If an attacker can rename @file{stuff} to something else (making use +of their write permissions in @file{/var/tmp}) they can replace it +with a symbolic link to @file{/etc}. That means that the +@code{/bin/rm} command will be invoked on @file{/etc/passwd}. If you +are running your @code{find} command as root, the attacker has just managed +to delete a vital file. All they needed to do to achieve this was +replace a subdirectory with a symbolic link at the vital moment. + +There is however, a simple solution to the problem. This is an action +which works a lot like @code{-exec} but doesn't need to traverse a +chain of directories to reach the file that it needs to work on. This +is the @samp{-execdir} action, which was introduced by the BSD family +of operating systems. The command, + +@smallexample +find /var/tmp/stuff -mtime +90 -execdir /bin/rm @{@} \+ +@end smallexample + +might delete a set of files by performing these actions: + +@enumerate +@item +Change directory to /var/tmp/stuff/foo +@item +Invoke @code{/bin/rm ./file1 ./file2 ./file3} +@item +Change directory to /var/tmp/stuff/bar +@item +Invoke @code{/bin/rm ./file99 ./file100 ./file101} +@end enumerate + +This is a much more secure method. We are no longer exposed to a race +condition. For many typical uses of @code{find}, this is the best +strategy. It's reasonably efficient, but the length of the command +line is limited not just by the operating system limits, but also by +how many files we actually need to delete from each directory. + +Is it possible to do any better? In the case of general file +processing, no. However, in the specific case of deleting files it is +indeed possible to do better. + +@subsection Using the -delete action + +The most efficient and secure method of solving this problem is to use +the @samp{-delete} action: + +@smallexample +find /var/tmp/stuff -mtime +90 -delete +@end smallexample + +This alternative is more efficient than any of the @samp{-exec} or +@samp{-execdir} actions, since it entirely avoids the overhead of +forking a new process and using @code{exec} to run @code{/bin/rm}. It +is also normally more efficient than @code{xargs} for the same +reason. The file deletion is performed from the directory containing +the entry to be deleted, so the @samp{-delete} action has the same +security advantages as the @samp{-execdir} action has. + +The @samp{-delete} action was introduced by the BSD family of +operating systems. + +@subsection Improving things still further + +Is it possible to improve things still further? Not without either +modifying the system library to the operating system or having more specific +knowledge of the layout of the filesystem and disk I/O subsystem, or +both. + +The @code{find} command traverses the filesystem, reading +directories. It then issues a separate system call for each file to +be deleted. If we could modify the operating system, there are +potential gains that could be made: + +@itemize +@item +We could have a system call to which we pass more than one filename +for deletion +@item +Alternatively, we could pass in a list of inode numbers (on GNU/Linux +systems, @code{readdir()} also returns the inode number of each +directory entry) to be deleted. +@end itemize + +The above possibilities sound interesting, but from the kernel's point +of view it is difficult to enforce standard Unix access controls for +such processing by inode number. Such a facility would probably +need to be restricted to the superuser. + +Another way of improving performance would be to increase the +parallelism of the process. For example if the directory hierarchy we +are searching is actually spread across a number of disks, we might +somehow be able to arrange for @code{find} to process each disk in +parallel. In practice GNU @code{find} doesn't have such an intimate +understanding of the system's filesystem layout and disk I/O +subsystem. + +However, since the system administrator can have such an understanding +they can take advantage of it like so: + +@smallexample +find /var/tmp/stuff1 -mtime +90 -delete & +find /var/tmp/stuff2 -mtime +90 -delete & +find /var/tmp/stuff3 -mtime +90 -delete & +find /var/tmp/stuff4 -mtime +90 -delete & +wait +@end smallexample + +In the example above, four separate instances of @code{find} are used +to search four subdirectories in parallel. The @code{wait} command +simply waits for all of these to complete. Whether this approach is +more or less efficient than a single instance of @code{find} depends +on a number of things: + +@itemize +@item +Are the directories being searched in parallel actually on separate +disks? If not, this parallel search might just result in a lot of +disk head movement and so the speed might even be slower. +@item +Other activity - are other programs also doing things on those disks? +@end itemize + + +@subsection Conclusion + +The fastest and most secure way to delete files with the help of +@code{find} is to use @samp{-delete}. Using @code{xargs -0 -P N} can +also make effective use of the disk, but it is not as secure. + +In the case where we're doing things other than deleting files, the +most secure alternative is @samp{-execdir @dots{} +}, but this is not as +portable as the insecure action @samp{-exec @dots{} +}. + +The @samp{-delete} action is not completely portable, but the only +other possibility which is as secure (@samp{-execdir}) is no more +portable. The most efficient portable alternative is @samp{-exec +@dots{}+}, but this is insecure and isn't supported by versions of GNU +findutils prior to 4.2.12. + + +@node Updating A Timestamp File +@section Updating A Timestamp File + +Suppose we have a directory full of files which is maintained with a +set of automated tools; perhaps one set of tools updates them and +another set of tools uses the result. In this situation, it might be +useful for the second set of tools to know if the files have recently +been changed. It might be useful, for example, to have a 'timestamp' +file which gives the timestamp on the newest file in the collection. + +We can use @code{find} to achieve this, but there are several +different ways to do it. + +@subsection Updating the Timestamp The Wrong Way + +The obvious but wrong answer is just to use @samp{-newer}:- + +@smallexample +find subdir -newer timestamp -exec touch -r @{@} timestamp \; +@end smallexample + +This does the right sort of thing but has a bug. Suppose that two +files in the subdirectory have been updated, and that these are called +@file{file1} and @file{file2}. The command above will update +@file{timestamp} with the modification time of @file{file1} or that of +@file{file2}, but we don't know which one. Since the timestamps on +@file{file1} and @file{file2} will in general be different, this could +well be the wrong value. + +One solution to this problem is to modify @code{find} to recheck the +modification time of @file{timestamp} every time a file is to be +compared against it, but that will reduce the performance of +@code{find}. + +@subsection Using the test utility to compare timestamps + +The @code{test} command can be used to compare timestamps: + +@smallexample +find subdir -exec test @{@} -nt timestamp \; -exec touch -r @{@} timestamp \; +@end smallexample + +This will ensure that any changes made to the modification time of +@file{timestamp} that take place during the execution of @code{find} +are taken into account. This resolves our earlier problem, but +unfortunately this runs much more slowly. + +@subsection A combined approach + +We can of course still use @samp{-newer} to cut down on the number of +calls to @code{test}: + +@smallexample +find subdir -newer timestamp -a \ + -exec test @{@} -nt timestamp \; -a \ + -exec touch -r @{@} timestamp \; +@end smallexample + +Here, the @samp{-newer} test excludes all the files which are +definitely older than the timestamp, but all the files which are newer +than the old value of the timestamp are compared against the current +updated timestamp. + +This is indeed faster in general, but the speed difference will depend +on how many updated files there are. + +@subsection Using -printf and sort to compare timestamps + +It is possible to use the @samp{-printf} action to abandon the use of +@code{test} entirely: + +@smallexample +newest=$(find subdir -newer timestamp -printf "%A@:%p\n" | + sort -n | + tail -1 | + cut -d: -f2- ) +touch -r "$@{newest:-timestamp@}" timestamp +@end smallexample + +The command above works by generating a list of the timestamps and +names of all the files which are newer than the timestamp. The +@code{sort}, @code{tail} and @code{cut} commands simply pull out the +name of the file with the largest timestamp value (that is, the latest +file). The @code{touch} command is then used to update the timestamp, + +The @code{"$@{newest:-timestamp@}"} expression simply expands to the +value of @code{$newest} if that variable is set, but to +@file{timestamp} otherwise. This ensures that an argument is always +given to the @samp{-r} option of the @code{touch} command. + +This approach seems quite efficient, but unfortunately it has a bug. +Many operating systems now keep file modification time information at +a granularity which is finer than one second. Unfortunately the +@samp{%A@@} format for @samp{-printf} only prints a whole-number value +currently; that is, these values are at a one-second granularity. +This means that in our example above, @samp{$newest} will be the name +of a file which is no more than one second older than the newest file, +but may indeed be older. + +It would be possible to solve this problem with some kind of loop: + +@smallexample +while true; do + newest=$(find subdir -newer timestamp -printf "%A@@:%p\n" | + sort -n | + tail -1 | + cut -d: -f2- ) + if test -z "$newest" ; then + break + else + touch -r "$newest" timestamp + fi +done +@end smallexample + +A better fix for this problem would be to allow the @samp{%A@@} format +to produce a result having a fractional part, too. While this is +planned for GNU @code{find}, it hasn't been done yet. + +@subsection Coping with sub-second timestamp resolution + +Another tool which often works with timestamps is @code{make}. We can +use @code{find} to generate a @file{Makefile} file on the fly and then +use @code{make} to update the timestamps: + +@smallexample +makefile=$(mktemp) +find subdir \ + \( \! -xtype l \) \ + -newer timestamp \ + -printf "timestamp:: %p\n\ttouch -r %p timestamp\n\n" > "$makefile" +make -f "$makefile" +rm -f "$makefile" +@end smallexample + +Unfortunately although the solution above is quite elegant, it fails +to cope with white space within file names, and adjusting it to do so +would require a rather complex shell script. + + +@subsection Coping with odd filenames too + +We can fix both of these problems (looping and problems with white +space), and do things more efficiently too. The following command +works with newlines and doesn't need to sort the list of filenames. + +@smallexample +find subdir -newer timestamp -printf "%A@@:%p\0" | + perl -0 newest.pl | + xargs --no-run-if-empty --null -i \ + find @{@} -maxdepth 0 -newer timestamp -exec touch -r @{@} timestamp \; +@end smallexample + +The first @code{find} command generates a list of files which are +newer than the original timestamp file, and prints a list of them with +their timestamps. The @file{newest.pl} script simply filters out all +the filenames which have timestamps which are older than whatever the +newest file is:- + +@smallexample +@verbatim +#! /usr/bin/perl -0 +my @newest = (); +my $latest_stamp = undef; +while (<>) { + my ($stamp, $name) = split(/:/); + if (!defined($latest_stamp) || ($tstamp > $latest_stamp)) { + $latest_stamp = $stamp; + @newest = (); + } + if ($tstamp >= $latest_stamp) { + push @newest, $name; + } +} +print join("\0", @newest); +@end verbatim +@end smallexample + +This prints a list of zero or more files, all of which are newer than +the original timestamp file, and which have the same timestamp as each +other, to the nearest second. The second @code{find} command takes +each resulting file one at a time, and if that is newer than the +timestamp file, the timestamp is updated. + +@node Security Considerations +@chapter Security Considerations + +Security considerations are important if you are using @code{find} or +@code{xargs} to search for or process files that don't belong to you +or which other people have control. Security considerations +relating to @code{locate} may also apply if you have files which you +do not want others to see. + +The most severe forms of security problems affecting +@code{find} and related programs are when third parties bring +about a situation allowing them to do something +they would normally not be able to accomplish. This is called @emph{privilege +elevation}. This might include deleting files they would not normally +be able to delete. It is common for the operating system to periodically +invoke @code{find} for self-maintenance purposes. These invocations of +@code{find} are particularly problematic from a security point of view +as these are often invoked by the superuser and search the entire +filesystem hierarchy. Generally, the severity of any associated problem depends +on what the system is going to do with the files found by @code{find}. + +@menu +* Levels of Risk:: What is your level of exposure to security problems? +* Security Considerations for find:: Security problems with find +* Security Considerations for xargs:: Security problems with xargs +* Security Considerations for locate:: Security problems with locate +* Security Summary:: That was all very complex, what does it boil down to? +@end menu + + +@node Levels of Risk +@section Levels of Risk + +There are some security risks inherent in the use of @code{find}, +@code{xargs} and (to a lesser extent) @code{locate}. The severity of +these risks depends on what sort of system you are using: + +@table @strong +@item High risk +Multi-user systems where you do not control (or trust) the other +users, and on which you execute @code{find}, including areas where +those other users can manipulate the filesystem (for example beneath +@file{/home} or @file{/tmp}). + +@item Medium Risk +Systems where the actions of other users can create file names chosen +by them, but to which they don't have access while @code{find} is +being run. This access might include leaving programs running (shell +background jobs, @code{at} or @code{cron} tasks, for example). On +these sorts of systems, carefully written commands (avoiding use of +@samp{-print} for example) should not expose you to a high degree of +risk. Most systems fall into this category. + +@item Low Risk +Systems to which untrusted parties do not have access, cannot create +file names of their own choice (even remotely) and which contain no +security flaws which might enable an untrusted third party to gain +access. Most systems do not fall into this category because there are +many ways in which external parties can affect the names of files that +are created on your system. The system on which I am writing this for +example automatically downloads software updates from the Internet; +the names of the files in which these updates exist are chosen by +third parties@footnote{Of course, I trust these parties to a large +extent anyway, because I install software provided by them; I choose +to trust them in this way, and that's a deliberate choice}. +@end table + +In the discussion above, ``risk'' denotes the likelihood that someone +can cause @code{find}, @code{xargs}, @code{locate} or some other +program which is controlled by them to do something you did not +intend. The levels of risk suggested do not take any account of the +consequences of this sort of event. That is, if you operate a ``low +risk'' type system, but the consequences of a security problem are +disastrous, then you should still give serious thought to all the +possible security problems, many of which of course will not be +discussed here -- this section of the manual is intended to be +informative but not comprehensive or exhaustive. + +If you are responsible for the operation of a system where the +consequences of a security problem could be very important, you should +do two things:- + +@enumerate +@item Define a security policy which defines who is allowed to do what +on your system. +@item Seek competent advice on how to enforce your policy, detect +breaches of that policy, and take account of any potential problems +that might fall outside the scope of your policy. +@end enumerate + + +@node Security Considerations for find +@section Security Considerations for @code{find} + + +Some of the actions @code{find} might take have a direct effect; +these include @code{-exec} and @code{-delete}. However, it is also +common to use @code{-print} explicitly or implicitly, and so if +@code{find} produces the wrong list of file names, that can also be a +security problem; consider the case for example where @code{find} is +producing a list of files to be deleted. + +We normally assume that the @code{find} command line expresses the +file selection criteria and actions that the user had in mind -- that +is, the command line is ``trusted'' data. + +From a security analysis point of view, the output of @code{find} +should be correct; that is, the output should contain only the names +of those files which meet the user's criteria specified on the command +line. This applies for the @code{-exec} and @code{-delete} actions; +one can consider these to be part of the output. + +On the other hand, the contents of the filesystem can be manipulated +by other people, and hence we regard this as ``untrusted'' data. This +implies that the @code{find} command line is a filter which converts +the untrusted contents of the filesystem into a correct list of output +files. + +The filesystem will in general change while @code{find} is searching +it; in fact, most of the potential security problems with @code{find} +relate to this issue in some way. + +@dfn{Race conditions} are a general class of security problem where the +relative ordering of actions taken by @code{find} (for example) and +something else are critically important in getting the correct and expected result@footnote{This is more or less the +definition of the term ``race condition''} . + +For @code{find}, an attacker might move or rename files or directories in +the hope that an action might be taken against a file which was not +normally intended to be affected. Alternatively, this sort of attack +might be intended to persuade @code{find} to search part of the +filesystem which would not normally be included in the search +(defeating the @code{-prune} action for example). + +@menu +* Problems with -exec and filenames:: +* Changing the Current Working Directory:: +* Race Conditions with -exec:: +* Race Conditions with -print and -print0:: +@end menu + +@node Problems with -exec and filenames +@subsection Problems with -exec and filenames + +It is safe in many cases to use the @samp{-execdir} action with any +file name. Because @samp{-execdir} prefixes the arguments it passes +to programs with @samp{./}, you will not accidentally pass an argument +which is interpreted as an option. For example the file @file{-f} +would be passed to @code{rm} as @file{./-f}, which is harmless. + +However, your degree of safety does depend on the nature of the +program you are running. For example constructs such as these two commands + +@example +# risky +find -exec sh -c "something @{@}" \; +find -execdir sh -c "something @{@}" \; +@end example + +are very dangerous. The reason for this is that the @samp{@{@}} is +expanded to a filename which might contain a semicolon or other +characters special to the shell. If for example someone creates the +file @file{/tmp/foo; rm -rf $HOME} then the two commands above could +delete someone's home directory. + +So for this reason do not run any command which will pass untrusted +data (such as the names of files) to commands which interpret +arguments as commands to be further interpreted (for example +@samp{sh}). + +In the case of the shell, there is a clever workaround for this +problem: + +@example +# safer +find -exec sh -c 'something "$@@"' @{@} \; +find -execdir sh -c 'something "$@@"' @{@}\; +@end example + +This approach is not guaranteed to avoid every problem, but it is much +safer than substituting data of an attacker's choice into the text of +a shell command. + +@node Changing the Current Working Directory +@subsection Changing the Current Working Directory + +As @code{find} searches the filesystem, it finds subdirectories and +then searches within them by changing its working directory. First, +@code{find} reaches and recognises a subdirectory. It then decides if that +subdirectory meets the criteria for being searched; that is, any +@samp{-xdev} or @samp{-prune} expressions are taken into account. The +@code{find} program will then change working directory and proceed to +search the directory. + +A race condition attack might take the form that once the checks +relevant to @samp{-xdev} and @samp{-prune} have been done, an attacker +might rename the directory that was being considered, and put in its +place a symbolic link that actually points somewhere else. + +The idea behind this attack is to fool @code{find} into going into the +wrong directory. This would leave @code{find} with a working +directory chosen by an attacker, bypassing any protection apparently +provided by @samp{-xdev} and @samp{-prune}, and any protection +provided by being able to @emph{not} list particular directories on +the @code{find} command line. This form of attack is particularly +problematic if the attacker can predict when the @code{find} command +will be run, as is the case with @code{cron} tasks for example. + +GNU @code{find} has specific safeguards to prevent this general class +of problem. The exact form of these safeguards depends on the +properties of your system. + +@menu +* O_NOFOLLOW:: Safely changing directory using fchdir(). +* Systems without O_NOFOLLOW:: Checking for symbolic links after chdir(). +@end menu + +@node O_NOFOLLOW +@subsubsection O_NOFOLLOW + +If your system supports the O_NOFOLLOW flag @footnote{GNU/Linux +(kernel version 2.1.126 and later) and FreeBSD (3.0-CURRENT and later) +support this} to the @code{open(2)} system call, @code{find} uses it +when safely changing directory. The target directory is first opened +and then @code{find} changes working directory with the +@code{fchdir()} system call. This ensures that symbolic links are not +followed, preventing the sort of race condition attack in which use +is made of symbolic links. + +If for any reason this approach does not work, @code{find} will fall +back on the method which is normally used if O_NOFOLLOW is not +supported. + +You can tell if your system supports O_NOFOLLOW by running + +@example +find --version +@end example + +This will tell you the version number and which features are enabled. +For example, if I run this on my system now, this gives: +@example +GNU find version 4.2.18-CVS +Features enabled: D_TYPE O_NOFOLLOW(enabled) +@end example + +Here, you can see that I am running a version of @code{find} which was +built from the development (CVS) code prior to the release of +findutils-4.2.18, and that the D_TYPE and O_NOFOLLOW features are +present. O_NOFOLLOW is qualified with ``enabled''. This simply means +that the current system seems to support O_NOFOLLOW. This check is +needed because it is possible to build @code{find} on a system that +defines O_NOFOLLOW and then run it on a system that ignores the +O_NOFOLLOW flag. We try to detect such cases at startup by checking +the operating system and version number; when this happens you will +see ``O_NOFOLLOW(disabled)'' instead. + +@node Systems without O_NOFOLLOW +@subsubsection Systems without O_NOFOLLOW + +The strategy for preventing this type of problem on systems that lack +support for the O_NOFOLLOW flag is more complex. Each time +@code{find} changes directory, it examines the directory it is about +to move to, issues the @code{chdir()} system call, and then checks +that it has ended up in the subdirectory it expected. If all is as +expected, processing continues as normal. However, there are two main +reasons why the directory might change: the use of an automounter and +the someone removing the old directory and replacing it with something +else while @code{find} is trying to descend into it. + +Where a filesystem ``automounter'' is in use it can be the case that +the use of the @code{chdir()} system call can itself cause a new +filesystem to be mounted at that point. On systems that do not +support O_NOFOLLOW, this will cause @code{find}'s security check to +fail. + +However, this does not normally represent a security problem, since +the automounter configuration is normally set up by the system +administrator. Therefore, if the @code{chdir()} sanity check fails, +@code{find} will make one more attempt@footnote{This may not be the +case for the fts-based executable}. If that succeeds, execution +carries on as normal. This is the usual case for automounters. + +Where an attacker is trying to exploit a race condition, the problem +may not have gone away on the second attempt. If this is the case, +@code{find} will issue a warning message and then ignore that +subdirectory. When this happens, actions such as @samp{-exec} or +@samp{-print} may already have taken place for the problematic +subdirectory. This is because @code{find} applies tests and actions +to directories before searching within them (unless @samp{-depth} was +specified). + +Because of the nature of the directory-change operation and security +check, in the worst case the only things that @code{find} would have +done with the directory are to move into it and back out to the +original parent. No operations would have been performed within that +directory. + +@node Race Conditions with -exec +@subsection Race Conditions with -exec + +The @samp{-exec} action causes another program to be run. It passes +to the program the name of the file which is being considered at the +time. The invoked program will typically then perform some action +on that file. Once again, there is a race condition which can be +exploited here. We shall take as a specific example the command + +@example +find /tmp -path /tmp/umsp/passwd -exec /bin/rm +@end example + +In this simple example, we are identifying just one file to be deleted +and invoking @code{/bin/rm} to delete it. A problem exists because +there is a time gap between the point where @code{find} decides that +it needs to process the @samp{-exec} action and the point where the +@code{/bin/rm} command actually issues the @code{unlink()} system +call to delete the file from the filesystem. Within this time period, an attacker can rename the +@file{/tmp/umsp} directory, replacing it with a symbolic link to +@file{/etc}. There is no way for @code{/bin/rm} to determine that it +is working on the same file that @code{find} had in mind. Once the +symbolic link is in place, the attacker has persuaded @code{find} to +cause the deletion of the @file{/etc/passwd} file, which is not the +effect intended by the command which was actually invoked. + +One possible defence against this type of attack is to modify the +behaviour of @samp{-exec} so that the @code{/bin/rm} command is run +with the argument @file{./passwd} and a suitable choice of working +directory. This would allow the normal sanity check that @code{find} +performs to protect against this form of attack too. Unfortunately, +this strategy cannot be used as the POSIX standard specifies that the +current working directory for commands invoked with @samp{-exec} must +be the same as the current working directory from which @code{find} +was invoked. This means that the @samp{-exec} action is inherently +insecure and can't be fixed. + +GNU @code{find} implements a more secure variant of the @samp{-exec} +action, @samp{-execdir}. The @samp{-execdir} action +ensures that it is not necessary to dereference subdirectories to +process target files. The current directory used to invoke programs +is the same as the directory in which the file to be processed exists +(@file{/tmp/umsp} in our example, and only the basename of the file to +be processed is passed to the invoked command, with a @samp{./} +prepended (giving @file{./passwd} in our example). + +The @samp{-execdir} action refuses to do anything if the current +directory is included in the @var{$PATH} environment variable. This +is necessary because @samp{-execdir} runs programs in the same +directory in which it finds files -- in general, such a directory +might be writable by untrusted users. For similar reasons, +@samp{-execdir} does not allow @samp{@{@}} to appear in the name of +the command to be run. + +@node Race Conditions with -print and -print0 +@subsection Race Conditions with -print and -print0 + +The @samp{-print} and @samp{-print0} actions can be used to produce a +list of files matching some criteria, which can then be used with some +other command, perhaps with @code{xargs}. Unfortunately, this means +that there is an unavoidable time gap between @code{find} deciding +that one or more files meet its criteria and the relevant command +being executed. For this reason, the @samp{-print} and @samp{-print0} +actions are just as insecure as @samp{-exec}. + +In fact, since the construction + +@example +find @dots{} -print | xargs @enddots{} +@end example + +does not cope correctly with newlines or other ``white space'' in +file names, and copes poorly with file names containing quotes, the +@samp{-print} action is less secure even than @samp{-print0}. + + +@comment node-name, next, previous, up +@comment @node Security Considerations for xargs +@node Security Considerations for xargs +@section Security Considerations for @code{xargs} + +The description of the race conditions affecting the @samp{-print} +action of @code{find} shows that @code{xargs} cannot be secure if it +is possible for an attacker to modify a filesystem after @code{find} +has started but before @code{xargs} has completed all its actions. + +However, there are other security issues that exist even if it is not +possible for an attacker to have access to the filesystem in real +time. Firstly, if it is possible for an attacker to create files with +names of their choice on the filesystem, then @code{xargs} is +insecure unless the @samp{-0} option is used. If a file with the name +@file{/home/someuser/foo/bar\n/etc/passwd} exists (assume that +@samp{\n} stands for a newline character), then @code{find @dots{} -print} +can be persuaded to print three separate lines: + +@example +/home/someuser/foo/bar + +/etc/passwd +@end example + +If it finds a blank line in the input, @code{xargs} will ignore it. +Therefore, if some action is to be taken on the basis of this list of +files, the @file{/etc/passwd} file would be included even if this was +not the intent of the person running find. There are circumstances in +which an attacker can use this to their advantage. The same +consideration applies to file names containing ordinary spaces rather +than newlines, except that of course the list of file names will no +longer contain an ``extra'' newline. + +This problem is an unavoidable consequence of the default behaviour of +the @code{xargs} command, which is specified by the POSIX standard. +The only ways to avoid this problem are either to avoid all use of +@code{xargs} in favour for example of @samp{find -exec} or (where +available) @samp{find -execdir}, or to use the @samp{-0} option, which +ensures that @code{xargs} considers file names to be separated by +ASCII NUL characters rather than whitespace. However, useful as this +option is, the POSIX standard does not make it mandatory. + +POSIX also specifies that @code{xargs} interprets quoting and trailing +whitespace specially in filenames, too. This means that using +@code{find ... -print | xargs ...} can cause the commands run by +@code{xargs} to receive a list of file names which is not the same as +the list printed by @code{find}. The interpretation of quotes and +trailing whitespace is turned off by the @samp{-0} argument to +@code{xargs}, which is another reason to use that option. + +@comment node-name, next, previous, up +@node Security Considerations for locate +@section Security Considerations for @code{locate} + +@subsection Race Conditions +It is fairly unusual for the output of @code{locate} to be fed into +another command. However, if this were to be done, this would raise +the same set of security issues as the use of @samp{find @dots{} -print}. +Although the problems relating to whitespace in file names can be +resolved by using @code{locate}'s @samp{-0} option, this still leaves +the race condition problems associated with @samp{find @dots{} -print0}. +There is no way to avoid these problems in the case of @code{locate}. + +@subsection Long File Name Bugs with Old-Format Databases +Old versions of @code{locate} have a bug in the way that old-format +databases are read. This bug affects the following versions of +@code{locate}: + +@enumerate +@item All releases prior to 4.2.31 +@item All 4.3.x releases prior to 4.3.7 +@end enumerate + +The affected versions of @code{locate} read file names into a +fixed-length 1026 byte buffer, allocated on the heap. This buffer is +not extended if file names are too long to fit into the buffer. No +range checking on the length of the filename is performed. This could +in theory lead to a privilege escalation attack. Findutils versions +4.3.0 to 4.3.6 are also affected. + +On systems using the old database format and affected versions of +@code{locate}, carefully-chosen long file names could in theory allow +malicious users to run code of their choice as any user invoking +locate. + +If remote users can choose the names of files stored on your system, +and these files are indexed by @code{updatedb}, this may be a remote +security vulnerability. Findutils version 4.2.31 and findutils +version 4.3.7 include fixes for this problem. The @code{updatedb}, +@code{bigram} and @code{code} programs do no appear to be affected. + +If you are also using GNU coreutils, you can use the following command +to determine the length of the longest file name on a given system: + +@example +find / -print0 | tr -c '\0' 'x' | tr '\0' '\n' | wc -L +@end example + +Although this problem is significant, the old database format is not +the default, and use of the old database format is not common. Most +installations and most users will not be affected by this problem. + + + +@node Security Summary +@section Summary + +Where untrusted parties can create files on the system, or affect the +names of files that are created, all uses for @code{find}, +@code{locate} and @code{xargs} have known security problems except the +following: + +@table @asis +@item Informational use only +Uses where the programs are used to prepare lists of file names upon +which no further action will ever be taken. + +@item @samp{-delete} +Use of the @samp{-delete} action with @code{find} to delete files +which meet specified criteria + +@item @samp{-execdir} +Use of the @samp{-execdir} action with @code{find} where the +@env{PATH} environment variable contains directories which contain +only trusted programs. +@end table + +@comment node-name, next, previous, up +@node Error Messages +@chapter Error Messages + +This section describes some of the error messages sometimes made by +@code{find}, @code{xargs}, or @code{locate}, explains them and in some +cases provides advice as to what you should do about this. + +This manual is written in English. The GNU findutils software +features translations of error messages for many languages. For this +reason the error messages produced by the programs are made to be as +self-explanatory as possible. This approach avoids leaving people to +figure out which test an English-language error message corresponds +to. Error messages which are self-explanatory will not normally be +mentioned in this document. For those messages mentioned in this +document, only the English-language version of the message will be +listed. + +@menu +* Error Messages From find:: +* Error Messages From xargs:: +* Error Messages From locate:: +* Error Messages From updatedb:: +@end menu + +@node Error Messages From find +@section Error Messages From @code{find} + +Most error messages produced by find are self-explanatory. Error +messages sometimes include a filename. When this happens, the +filename is quoted in order to prevent any unusual characters in the +filename making unwanted changes in the state of the terminal. + +@table @samp +@item invalid predicate `-foo' +This means that the @code{find} command line included something that +started with a dash or other special character. The @code{find} +program tried to interpret this as a test, action or option, but +didn't recognise it. If it was intended to be a test, check what was +specified against the documentation. If, on the other hand, the +string is the name of a file which has been expanded from a wildcard +(for example because you have a @samp{*} on the command line), +consider using @samp{./*} or just @samp{.} instead. + +@item unexpected extra predicate +This usually happens if you have an extra bracket on the command line +(for example @samp{find . -print \)}). + +@item Warning: filesystem /path/foo has recently been mounted +@itemx Warning: filesystem /path/foo has recently been unmounted +These messages might appear when @code{find} moves into a directory +and finds that the device number and inode are different to what it +expected them to be. If the directory @code{find} has moved into is +on an network filesystem (NFS), it will not issue this message, because +@code{automount} frequently mounts new filesystems on directories as +you move into them (that is how it knows you want to use the +filesystem). So, if you do see this message, be wary --- +@code{automount} may not have been responsible. Consider the +possibility that someone else is manipulating the filesystem while +@code{find} is running. Some people might do this in order to mislead +@code{find} or persuade it to look at one set of files when it thought +it was looking at another set. + +@item /path/foo changed during execution of find (old device number 12345, new device number 6789, filesystem type is ) [ref XXX] +This message is issued when @code{find} moves into a directory and ends up +somewhere it didn't expect to be. This happens in one of two +circumstances. Firstly, this happens when @code{automount} intervenes +on a system where @code{find} doesn't know how to determine what +the current set of mounted filesystems is. + +Secondly, this can happen when the device number of a directory +appears to change during a change of current directory, but +@code{find} is moving up the filesystem hierarchy rather than down into it. +In order to prevent @code{find} wandering off into some unexpected +part of the filesystem, we stop it at this point. + +@item Don't know how to use getmntent() to read `/etc/mtab'. This is a bug. +This message is issued when a problem similar to the above occurs on a +system where @code{find} doesn't know how to figure out the current +list of mount points. Ask for help on @email{bug-findutils@@gnu.org}. + +@item /path/foo/bar changed during execution of find (old inode number 12345, new inode number 67893, filesystem type is ) [ref XXX]"), +This message is issued when @code{find} moves into a directory and +discovers that the inode number of that directory +is different from the inode number that it obtained when it examined the +directory previously. This usually means that while +@code{find} was deep in a directory hierarchy doing a +time consuming operation, somebody has moved one of the parent directories to +another location in the same filesystem. This may or may not have been done +maliciously. In any case, @code{find} stops at this point +to avoid traversing parts of the filesystem that it wasn't +intended. You can use @code{ls -li} or @code{find /path -inum +12345 -o -inum 67893} to find out more about what has happened. + +@item sanity check of the fnmatch() library function failed. +Please submit a bug report. You may well be asked questions about +your system, and if you compiled the @code{findutils} code yourself, +you should keep your copy of the build tree around. The likely +explanation is that your system has a buggy implementation of +@code{fnmatch} that looks enough like the GNU version to fool +@code{configure}, but which doesn't work properly. + +@item cannot fork +This normally happens if you use the @code{-exec} action or +something similar (@code{-ok} and so forth) but the system has run out +of free process slots. This is either because the system is very busy +and the system has reached its maximum process limit, or because you +have a resource limit in place and you've reached it. Check the +system for runaway processes (with @code{ps}, if possible). Some process +slots are normally reserved for use by @samp{root}. + +@item some-program terminated by signal 99 +Some program which was launched with @code{-exec} or similar was killed +with a fatal signal. This is just an advisory message. +@end table + + +@node Error Messages From xargs +@section Error Messages From xargs + +@table @samp +@item environment is too large for exec +This message means that you have so many environment variables set (or +such large values for them) that there is no room within the +system-imposed limits on program command line argument length to +invoke any program. This is an unlikely situation and is more likely +result of an attempt to test the limits of @code{xargs}, or break it. +Please try unsetting some environment variables, or exiting the +current shell. You can also use @samp{xargs --show-limits} to +understand the relevant sizes. + +@item can not fit single argument within argument list size limit +You are using the @samp{-I} option and @code{xargs} doesn't have +enough space to build a command line because it has read a really +large item and it doesn't fit. You can probably work around this +problem with the @samp{-s} option, but the default size is pretty +large. This is a rare situation and is more likely an attempt to test +the limits of @code{xargs}, or break it. Otherwise, you will need to +try to shorten the problematic argument or not use @code{xargs}. + +@item cannot fork +See the description of the similar message for @code{find}. + +@item : exited with status 255; aborting +When a command run by @code{xargs} exits with status 255, @code{xargs} +is supposed to stop. If this is not what you intended, wrap the +program you are trying to invoke in a shell script which doesn't +return status 255. + +@item : terminated by signal 99 +See the description of the similar message for @code{find}. +@end table + +@node Error Messages From locate +@section Error Messages From @code{locate} + +@table @samp +@item warning: database @file{@value{LOCATE_DB}} is more than 8 days old +The @code{locate} program relies on a database which is periodically +built by the @code{updatedb} program. That hasn't happened in a long +time. To fix this problem, run @code{updatedb} manually. This can +often happen on systems that are generally not left on, so the +periodic ``cron'' task which normally does this doesn't get a chance +to run. + +@item locate database @file{@value{LOCATE_DB}} is corrupt or invalid +This should not happen. Re-run @code{updatedb}. If that works, but +@code{locate} still produces this error, run @code{locate --version} +and @code{updatedb --version}. These should produce the same output. +If not, you are using a mixed toolset; check your @samp{$PATH} +environment variable and your shell aliases (if you have any). If +both programs claim to be GNU versions, this is a bug; all versions of +these programs should interoperate without problem. Ask for help on +@email{bug-findutils@@gnu.org}. +@end table + + +@node Error Messages From updatedb +@section Error Messages From updatedb + +The @code{updatedb} program (and the programs it invokes) do issue +error messages, but none seem to be candidates for guidance. If +you are having a problem understanding one of these, ask for help on +@email{bug-findutils@@gnu.org}. + + +@node Primary Index +@unnumbered @code{find} Primary Index + +This is a list of all of the primaries (tests, actions, and options) +that make up @code{find} expressions for selecting files. @xref{find +Expressions}, for more information on expressions. + +@printindex fn + +@bye + +@comment texi related words used by Emacs' spell checker ispell.el + +@comment LocalWords: texinfo setfilename settitle setchapternewpage +@comment LocalWords: iftex finalout ifinfo DIR titlepage vskip pt +@comment LocalWords: filll dir samp dfn noindent xref pxref +@comment LocalWords: var deffn texi deffnx itemx emph asis +@comment LocalWords: findex smallexample subsubsection cindex +@comment LocalWords: dircategory direntry itemize + +@comment other words used by Emacs' spell checker ispell.el +@comment LocalWords: README fred updatedb xargs Plett Rendell akefile +@comment LocalWords: args grep Filesystems fo foo fOo wildcards iname +@comment LocalWords: ipath regex iregex expr fubar regexps +@comment LocalWords: metacharacters macs sr sc inode lname ilname +@comment LocalWords: sysdep noleaf ls inum xdev filesystems usr atime +@comment LocalWords: ctime mtime amin cmin mmin al daystart Sladkey rm +@comment LocalWords: anewer cnewer bckw rf xtype uname gname uid gid +@comment LocalWords: nouser nogroup chown chgrp perm ch maxdepth +@comment LocalWords: mindepth cpio src CD AFS statted stat fstype ufs +@comment LocalWords: nfs tmp mfs printf fprint dils rw djm Nov lwall +@comment LocalWords: POSIXLY fls fprintf strftime locale's EDT GMT AP +@comment LocalWords: EST diff perl backquotes sprintf Falstad Oct cron +@comment LocalWords: eg vmunix mkdir afs allexec allwrite ARG bigram +@comment LocalWords: bigrams cd chmod comp crc CVS dbfile dum eof +@comment LocalWords: fileserver filesystem fn frcode Ghazi Hnewc iXX +@comment LocalWords: joeuser Kaveh localpaths localuser LOGNAME +@comment LocalWords: Meyering mv netpaths netuser nonblank nonblanks +@comment LocalWords: ois ok Pinard printindex proc procs prunefs +@comment LocalWords: prunepaths pwd RFS rmadillo rmdir rsh sbins str +@comment LocalWords: su Timar ubins ug unstripped vf VM Weitzel +@comment LocalWords: wildcard zlogout basename execdir wholename iwholename +@comment LocalWords: timestamp timestamps Solaris FreeBSD OpenBSD POSIX diff --git a/doc/getdate.texi b/doc/getdate.texi new file mode 100644 index 0000000..eae4526 --- /dev/null +++ b/doc/getdate.texi @@ -0,0 +1,553 @@ +@c GNU date syntax documentation + +@c Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + +@c Permission is granted to copy, distribute and/or modify this document +@c under the terms of the GNU Free Documentation License, Version 1.2 or +@c any later version published by the Free Software Foundation; with no +@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +@c Texts. A copy of the license is included in the ``GNU Free +@c Documentation License'' file as part of this distribution. + +@node Date input formats +@chapter Date input formats + +@cindex date input formats +@findex get_date + +First, a quote: + +@quotation +Our units of temporal measurement, from seconds on up to months, are so +complicated, asymmetrical and disjunctive so as to make coherent mental +reckoning in time all but impossible. Indeed, had some tyrannical god +contrived to enslave our minds to time, to make it all but impossible +for us to escape subjection to sodden routines and unpleasant surprises, +he could hardly have done better than handing down our present system. +It is like a set of trapezoidal building blocks, with no vertical or +horizontal surfaces, like a language in which the simplest thought +demands ornate constructions, useless particles and lengthy +circumlocutions. Unlike the more successful patterns of language and +science, which enable us to face experience boldly or at least +level-headedly, our system of temporal calculation silently and +persistently encourages our terror of time. + +@dots{} It is as though architects had to measure length in feet, width +in meters and height in ells; as though basic instruction manuals +demanded a knowledge of five different languages. It is no wonder then +that we often look into our own immediate past or future, last Tuesday +or a week from Sunday, with feelings of helpless confusion. @dots{} + +--- Robert Grudin, @cite{Time and the Art of Living}. +@end quotation + +This section describes the textual date representations that @sc{gnu} +programs accept. These are the strings you, as a user, can supply as +arguments to the various programs. The C interface (via the +@code{get_date} function) is not described here. + +@menu +* General date syntax:: Common rules. +* Calendar date items:: 19 Dec 1994. +* Time of day items:: 9:20pm. +* Time zone items:: @sc{est}, @sc{pdt}, @sc{gmt}. +* Day of week items:: Monday and others. +* Relative items in date strings:: next tuesday, 2 years ago. +* Pure numbers in date strings:: 19931219, 1440. +* Seconds since the Epoch:: @@1078100502. +* Specifying time zone rules:: TZ="America/New_York", TZ="UTC0". +* Authors of get_date:: Bellovin, Eggert, Salz, Berets, et al. +@end menu + + +@node General date syntax +@section General date syntax + +@cindex general date syntax + +@cindex items in date strings +A @dfn{date} is a string, possibly empty, containing many items +separated by whitespace. The whitespace may be omitted when no +ambiguity arises. The empty string means the beginning of today (i.e., +midnight). Order of the items is immaterial. A date string may contain +many flavors of items: + +@itemize @bullet +@item calendar date items +@item time of day items +@item time zone items +@item day of the week items +@item relative items +@item pure numbers. +@end itemize + +@noindent We describe each of these item types in turn, below. + +@cindex numbers, written-out +@cindex ordinal numbers +@findex first @r{in date strings} +@findex next @r{in date strings} +@findex last @r{in date strings} +A few ordinal numbers may be written out in words in some contexts. This is +most useful for specifying day of the week items or relative items (see +below). Among the most commonly used ordinal numbers, the word +@samp{last} stands for @math{-1}, @samp{this} stands for 0, and +@samp{first} and @samp{next} both stand for 1. Because the word +@samp{second} stands for the unit of time there is no way to write the +ordinal number 2, but for convenience @samp{third} stands for 3, +@samp{fourth} for 4, @samp{fifth} for 5, +@samp{sixth} for 6, @samp{seventh} for 7, @samp{eighth} for 8, +@samp{ninth} for 9, @samp{tenth} for 10, @samp{eleventh} for 11 and +@samp{twelfth} for 12. + +@cindex months, written-out +When a month is written this way, it is still considered to be written +numerically, instead of being ``spelled in full''; this changes the +allowed strings. + +@cindex language, in dates +In the current implementation, only English is supported for words and +abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first}, +@samp{January}, @samp{Sunday}, @samp{tomorrow}, and @samp{year}. + +@cindex language, in dates +@cindex time zone item +The output of the @command{date} command +is not always acceptable as a date string, +not only because of the language problem, but also because there is no +standard meaning for time zone items like @samp{IST}. When using +@command{date} to generate a date string intended to be parsed later, +specify a date format that is independent of language and that does not +use time zone items other than @samp{UTC} and @samp{Z}. Here are some +ways to do this: + +@example +$ LC_ALL=C TZ=UTC0 date +Mon Mar 1 00:21:42 UTC 2004 +$ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ' +2004-03-01 00:21:42Z +$ date --iso-8601=ns | tr T ' ' # --iso-8601 is a GNU extension. +2004-02-29 16:21:42,692722128-0800 +$ date --rfc-2822 # a GNU extension +Sun, 29 Feb 2004 16:21:42 -0800 +$ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension. +2004-02-29 16:21:42 -0800 +$ date +'@@%s.%N' # %s and %N are GNU extensions. +@@1078100502.692722128 +@end example + +@cindex case, ignored in dates +@cindex comments, in dates +Alphabetic case is completely ignored in dates. Comments may be introduced +between round parentheses, as long as included parentheses are properly +nested. Hyphens not followed by a digit are currently ignored. Leading +zeros on numbers are ignored. + +Invalid dates like @samp{2005-02-29} or times like @samp{24:00} are +rejected. In the typical case of a host that does not support leap +seconds, a time like @samp{23:59:60} is rejected even if it +corresponds to a valid leap second. + + +@node Calendar date items +@section Calendar date items + +@cindex calendar date item + +A @dfn{calendar date item} specifies a day of the year. It is +specified differently, depending on whether the month is specified +numerically or literally. All these strings specify the same calendar date: + +@example +1972-09-24 # @sc{iso} 8601. +72-9-24 # Assume 19xx for 69 through 99, + # 20xx for 00 through 68. +72-09-24 # Leading zeros are ignored. +9/24/72 # Common U.S. writing. +24 September 1972 +24 Sept 72 # September has a special abbreviation. +24 Sep 72 # Three-letter abbreviations always allowed. +Sep 24, 1972 +24-sep-72 +24sep72 +@end example + +The year can also be omitted. In this case, the last specified year is +used, or the current year if none. For example: + +@example +9/24 +sep 24 +@end example + +Here are the rules. + +@cindex @sc{iso} 8601 date format +@cindex date format, @sc{iso} 8601 +For numeric months, the @sc{iso} 8601 format +@samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is +any positive number, @var{month} is a number between 01 and 12, and +@var{day} is a number between 01 and 31. A leading zero must be present +if a number is less than ten. If @var{year} is 68 or smaller, then 2000 +is added to it; otherwise, if @var{year} is less than 100, +then 1900 is added to it. The construct +@samp{@var{month}/@var{day}/@var{year}}, popular in the United States, +is accepted. Also @samp{@var{month}/@var{day}}, omitting the year. + +@cindex month names in date strings +@cindex abbreviations for months +Literal months may be spelled out in full: @samp{January}, +@samp{February}, @samp{March}, @samp{April}, @samp{May}, @samp{June}, +@samp{July}, @samp{August}, @samp{September}, @samp{October}, +@samp{November} or @samp{December}. Literal months may be abbreviated +to their first three letters, possibly followed by an abbreviating dot. +It is also permitted to write @samp{Sept} instead of @samp{September}. + +When months are written literally, the calendar date may be given as any +of the following: + +@example +@var{day} @var{month} @var{year} +@var{day} @var{month} +@var{month} @var{day} @var{year} +@var{day}-@var{month}-@var{year} +@end example + +Or, omitting the year: + +@example +@var{month} @var{day} +@end example + + +@node Time of day items +@section Time of day items + +@cindex time of day item + +A @dfn{time of day item} in date strings specifies the time on a given +day. Here are some examples, all of which represent the same time: + +@example +20:02:00.000000 +20:02 +8:02pm +20:02-0500 # In @sc{est} (U.S. Eastern Standard Time). +@end example + +More generally, the time of day may be given as +@samp{@var{hour}:@var{minute}:@var{second}}, where @var{hour} is +a number between 0 and 23, @var{minute} is a number between 0 and +59, and @var{second} is a number between 0 and 59 possibly followed by +@samp{.} or @samp{,} and a fraction containing one or more digits. +Alternatively, +@samp{:@var{second}} can be omitted, in which case it is taken to +be zero. On the rare hosts that support leap seconds, @var{second} +may be 60. + +@findex am @r{in date strings} +@findex pm @r{in date strings} +@findex midnight @r{in date strings} +@findex noon @r{in date strings} +If the time is followed by @samp{am} or @samp{pm} (or @samp{a.m.} +or @samp{p.m.}), @var{hour} is restricted to run from 1 to 12, and +@samp{:@var{minute}} may be omitted (taken to be zero). @samp{am} +indicates the first half of the day, @samp{pm} indicates the second +half of the day. In this notation, 12 is the predecessor of 1: +midnight is @samp{12am} while noon is @samp{12pm}. +(This is the zero-oriented interpretation of @samp{12am} and @samp{12pm}, +as opposed to the old tradition derived from Latin +which uses @samp{12m} for noon and @samp{12pm} for midnight.) + +@cindex time zone correction +@cindex minutes, time zone correction by +The time may alternatively be followed by a time zone correction, +expressed as @samp{@var{s}@var{hh}@var{mm}}, where @var{s} is @samp{+} +or @samp{-}, @var{hh} is a number of zone hours and @var{mm} is a number +of zone minutes. You can also separate @var{hh} from @var{mm} with a colon. +When a time zone correction is given this way, it +forces interpretation of the time relative to +Coordinated Universal Time (@sc{utc}), overriding any previous +specification for the time zone or the local time zone. For example, +@samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours +ahead of @sc{utc} (e.g., India). The @var{minute} +part of the time of day may not be elided when a time zone correction +is used. This is the best way to specify a time zone correction by +fractional parts of an hour. + +Either @samp{am}/@samp{pm} or a time zone correction may be specified, +but not both. + + +@node Time zone items +@section Time zone items + +@cindex time zone item + +A @dfn{time zone item} specifies an international time zone, indicated +by a small set of letters, e.g., @samp{UTC} or @samp{Z} +for Coordinated Universal +Time. Any included periods are ignored. By following a +non-daylight-saving time zone by the string @samp{DST} in a separate +word (that is, separated by some white space), the corresponding +daylight saving time zone may be specified. +Alternatively, a non-daylight-saving time zone can be followed by a +time zone correction, to add the two values. This is normally done +only for @samp{UTC}; for example, @samp{UTC+05:30} is equivalent to +@samp{+05:30}. + +Time zone items other than @samp{UTC} and @samp{Z} +are obsolescent and are not recommended, because they +are ambiguous; for example, @samp{EST} has a different meaning in +Australia than in the United States. Instead, it's better to use +unambiguous numeric time zone corrections like @samp{-0500}, as +described in the previous section. + +If neither a time zone item nor a time zone correction is supplied, +time stamps are interpreted using the rules of the default time zone +(@pxref{Specifying time zone rules}). + + +@node Day of week items +@section Day of week items + +@cindex day of week item + +The explicit mention of a day of the week will forward the date +(only if necessary) to reach that day of the week in the future. + +Days of the week may be spelled out in full: @samp{Sunday}, +@samp{Monday}, @samp{Tuesday}, @samp{Wednesday}, @samp{Thursday}, +@samp{Friday} or @samp{Saturday}. Days may be abbreviated to their +first three letters, optionally followed by a period. The special +abbreviations @samp{Tues} for @samp{Tuesday}, @samp{Wednes} for +@samp{Wednesday} and @samp{Thur} or @samp{Thurs} for @samp{Thursday} are +also allowed. + +@findex next @var{day} +@findex last @var{day} +A number may precede a day of the week item to move forward +supplementary weeks. It is best used in expression like @samp{third +monday}. In this context, @samp{last @var{day}} or @samp{next +@var{day}} is also acceptable; they move one week before or after +the day that @var{day} by itself would represent. + +A comma following a day of the week item is ignored. + + +@node Relative items in date strings +@section Relative items in date strings + +@cindex relative items in date strings +@cindex displacement of dates + +@dfn{Relative items} adjust a date (or the current date if none) forward +or backward. The effects of relative items accumulate. Here are some +examples: + +@example +1 year +1 year ago +3 years +2 days +@end example + +@findex year @r{in date strings} +@findex month @r{in date strings} +@findex fortnight @r{in date strings} +@findex week @r{in date strings} +@findex day @r{in date strings} +@findex hour @r{in date strings} +@findex minute @r{in date strings} +The unit of time displacement may be selected by the string @samp{year} +or @samp{month} for moving by whole years or months. These are fuzzy +units, as years and months are not all of equal duration. More precise +units are @samp{fortnight} which is worth 14 days, @samp{week} worth 7 +days, @samp{day} worth 24 hours, @samp{hour} worth 60 minutes, +@samp{minute} or @samp{min} worth 60 seconds, and @samp{second} or +@samp{sec} worth one second. An @samp{s} suffix on these units is +accepted and ignored. + +@findex ago @r{in date strings} +The unit of time may be preceded by a multiplier, given as an optionally +signed number. Unsigned numbers are taken as positively signed. No +number at all implies 1 for a multiplier. Following a relative item by +the string @samp{ago} is equivalent to preceding the unit by a +multiplier with value @math{-1}. + +@findex day @r{in date strings} +@findex tomorrow @r{in date strings} +@findex yesterday @r{in date strings} +The string @samp{tomorrow} is worth one day in the future (equivalent +to @samp{day}), the string @samp{yesterday} is worth +one day in the past (equivalent to @samp{day ago}). + +@findex now @r{in date strings} +@findex today @r{in date strings} +@findex this @r{in date strings} +The strings @samp{now} or @samp{today} are relative items corresponding +to zero-valued time displacement, these strings come from the fact +a zero-valued time displacement represents the current time when not +otherwise changed by previous items. They may be used to stress other +items, like in @samp{12:00 today}. The string @samp{this} also has +the meaning of a zero-valued time displacement, but is preferred in +date strings like @samp{this thursday}. + +When a relative item causes the resulting date to cross a boundary +where the clocks were adjusted, typically for daylight saving time, +the resulting date and time are adjusted accordingly. + +The fuzz in units can cause problems with relative items. For +example, @samp{2003-07-31 -1 month} might evaluate to 2003-07-01, +because 2003-06-31 is an invalid date. To determine the previous +month more reliably, you can ask for the month before the 15th of the +current month. For example: + +@example +$ date -R +Thu, 31 Jul 2003 13:02:39 -0700 +$ date --date='-1 month' +'Last month was %B?' +Last month was July? +$ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!' +Last month was June! +@end example + +Also, take care when manipulating dates around clock changes such as +daylight saving leaps. In a few cases these have added or subtracted +as much as 24 hours from the clock, so it is often wise to adopt +universal time by setting the @env{TZ} environment variable to +@samp{UTC0} before embarking on calendrical calculations. + +@node Pure numbers in date strings +@section Pure numbers in date strings + +@cindex pure numbers in date strings + +The precise interpretation of a pure decimal number depends +on the context in the date string. + +If the decimal number is of the form @var{yyyy}@var{mm}@var{dd} and no +other calendar date item (@pxref{Calendar date items}) appears before it +in the date string, then @var{yyyy} is read as the year, @var{mm} as the +month number and @var{dd} as the day of the month, for the specified +calendar date. + +If the decimal number is of the form @var{hh}@var{mm} and no other time +of day item appears before it in the date string, then @var{hh} is read +as the hour of the day and @var{mm} as the minute of the hour, for the +specified time of day. @var{mm} can also be omitted. + +If both a calendar date and a time of day appear to the left of a number +in the date string, but no relative item, then the number overrides the +year. + + +@node Seconds since the Epoch +@section Seconds since the Epoch + +If you precede a number with @samp{@@}, it represents an internal time +stamp as a count of seconds. The number can contain an internal +decimal point (either @samp{.} or @samp{,}); any excess precision not +supported by the internal representation is truncated toward minus +infinity. Such a number cannot be combined with any other date +item, as it specifies a complete time stamp. + +@cindex beginning of time, for @acronym{POSIX} +@cindex epoch, for @acronym{POSIX} +Internally, computer times are represented as a count of seconds since +an epoch---a well-defined point of time. On @acronym{GNU} and +@acronym{POSIX} systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so +@samp{@@0} represents this time, @samp{@@1} represents 1970-01-01 +00:00:01 @sc{utc}, and so forth. @acronym{GNU} and most other +@acronym{POSIX}-compliant systems support such times as an extension +to @acronym{POSIX}, using negative counts, so that @samp{@@-1} +represents 1969-12-31 23:59:59 @sc{utc}. + +Traditional Unix systems count seconds with 32-bit two's-complement +integers and can represent times from 1901-12-13 20:45:52 through +2038-01-19 03:14:07 @sc{utc}. More modern systems use 64-bit counts +of seconds with nanosecond subcounts, and can represent all the times +in the known lifetime of the universe to a resolution of 1 nanosecond. + +On most hosts, these counts ignore the presence of leap seconds. +For example, on most hosts @samp{@@915148799} represents 1998-12-31 +23:59:59 @sc{utc}, @samp{@@915148800} represents 1999-01-01 00:00:00 +@sc{utc}, and there is no way to represent the intervening leap second +1998-12-31 23:59:60 @sc{utc}. + +@node Specifying time zone rules +@section Specifying time zone rules + +@vindex TZ +Normally, dates are interpreted using the rules of the current time +zone, which in turn are specified by the @env{TZ} environment +variable, or by a system default if @env{TZ} is not set. To specify a +different set of default time zone rules that apply just to one date, +start the date with a string of the form @samp{TZ="@var{rule}"}. The +two quote characters (@samp{"}) must be present in the date, and any +quotes or backslashes within @var{rule} must be escaped by a +backslash. + +For example, with the @acronym{GNU} @command{date} command you can +answer the question ``What time is it in New York when a Paris clock +shows 6:30am on October 31, 2004?'' by using a date beginning with +@samp{TZ="Europe/Paris"} as shown in the following shell transcript: + +@example +$ export TZ="America/New_York" +$ date --date='TZ="Europe/Paris" 2004-10-31 06:30' +Sun Oct 31 01:30:00 EDT 2004 +@end example + +In this example, the @option{--date} operand begins with its own +@env{TZ} setting, so the rest of that operand is processed according +to @samp{Europe/Paris} rules, treating the string @samp{2004-10-31 +06:30} as if it were in Paris. However, since the output of the +@command{date} command is processed according to the overall time zone +rules, it uses New York time. (Paris was normally six hours ahead of +New York in 2004, but this example refers to a brief Halloween period +when the gap was five hours.) + +A @env{TZ} value is a rule that typically names a location in the +@uref{http://www.twinsun.com/tz/tz-link.htm, @samp{tz} database}. +A recent catalog of location names appears in the +@uref{http://twiki.org/cgi-bin/xtra/tzdate, TWiki Date and Time +Gateway}. A few non-@acronym{GNU} hosts require a colon before a +location name in a @env{TZ} setting, e.g., +@samp{TZ=":America/New_York"}. + +The @samp{tz} database includes a wide variety of locations ranging +from @samp{Arctic/Longyearbyen} to @samp{Antarctica/South_Pole}, but +if you are at sea and have your own private time zone, or if you are +using a non-@acronym{GNU} host that does not support the @samp{tz} +database, you may need to use a @acronym{POSIX} rule instead. Simple +@acronym{POSIX} rules like @samp{UTC0} specify a time zone without +daylight saving time; other rules can specify simple daylight saving +regimes. @xref{TZ Variable,, Specifying the Time Zone with @code{TZ}, +libc, The GNU C Library}. + +@node Authors of get_date +@section Authors of @code{get_date} + +@cindex authors of @code{get_date} + +@cindex Bellovin, Steven M. +@cindex Salz, Rich +@cindex Berets, Jim +@cindex MacKenzie, David +@cindex Meyering, Jim +@cindex Eggert, Paul +@code{get_date} was originally implemented by Steven M. Bellovin +(@email{smb@@research.att.com}) while at the University of North Carolina +at Chapel Hill. The code was later tweaked by a couple of people on +Usenet, then completely overhauled by Rich $alz (@email{rsalz@@bbn.com}) +and Jim Berets (@email{jberets@@bbn.com}) in August, 1990. Various +revisions for the @sc{gnu} system were made by David MacKenzie, Jim Meyering, +Paul Eggert and others. + +@cindex Pinard, F. +@cindex Berry, K. +This chapter was originally produced by Fran@,{c}ois Pinard +(@email{pinard@@iro.umontreal.ca}) from the @file{getdate.y} source code, +and then edited by K.@: Berry (@email{kb@@cs.umb.edu}). diff --git a/doc/mdate-sh b/doc/mdate-sh new file mode 100755 index 0000000..83d2700 --- /dev/null +++ b/doc/mdate-sh @@ -0,0 +1,205 @@ +#!/bin/sh +# Get modification time of a file or directory and pretty-print it. + +scriptversion=2007-03-30.02 + +# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software +# Foundation, Inc. +# written by Ulrich Drepper , June 1995 +# +# 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 file. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: mdate-sh [--help] [--version] FILE + +Pretty-print the modification time of FILE. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "mdate-sh $scriptversion" + exit $? + ;; +esac + +# Prevent date giving response in another language. +LANG=C +export LANG +LC_ALL=C +export LC_ALL +LC_TIME=C +export LC_TIME + +# GNU ls changes its time format in response to the TIME_STYLE +# variable. Since we cannot assume `unset' works, revert this +# variable to its documented default. +if test "${TIME_STYLE+set}" = set; then + TIME_STYLE=posix-long-iso + export TIME_STYLE +fi + +save_arg1=$1 + +# Find out how to get the extended ls output of a file or directory. +if ls -L /dev/null 1>/dev/null 2>&1; then + ls_command='ls -L -l -d' +else + ls_command='ls -l -d' +fi +# Avoid user/group names that might have spaces, when possible. +if ls -n /dev/null 1>/dev/null 2>&1; then + ls_command="$ls_command -n" +fi + +# A `ls -l' line looks as follows on OS/2. +# drwxrwx--- 0 Aug 11 2001 foo +# This differs from Unix, which adds ownership information. +# drwxrwx--- 2 root root 4096 Aug 11 2001 foo +# +# To find the date, we split the line on spaces and iterate on words +# until we find a month. This cannot work with files whose owner is a +# user named `Jan', or `Feb', etc. However, it's unlikely that `/' +# will be owned by a user whose name is a month. So we first look at +# the extended ls output of the root directory to decide how many +# words should be skipped to get the date. + +# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. +set x`$ls_command /` + +# Find which argument is the month. +month= +command= +until test $month +do + shift + # Add another shift to the command. + command="$command shift;" + case $1 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; + esac +done + +# Get the extended ls output of the file or directory. +set dummy x`eval "$ls_command \"\$save_arg1\""` + +# Remove all preceding arguments +eval $command + +# Because of the dummy argument above, month is in $2. +# +# On a POSIX system, we should have +# +# $# = 5 +# $1 = file size +# $2 = month +# $3 = day +# $4 = year or time +# $5 = filename +# +# On Darwin 7.7.0 and 7.6.0, we have +# +# $# = 4 +# $1 = day +# $2 = month +# $3 = year or time +# $4 = filename + +# Get the month. +case $2 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; +esac + +case $3 in + ???*) day=$1;; + *) day=$3; shift;; +esac + +# Here we have to deal with the problem that the ls output gives either +# the time of day or the year. +case $3 in + *:*) set `date`; eval year=\$$# + case $2 in + Jan) nummonthtod=1;; + Feb) nummonthtod=2;; + Mar) nummonthtod=3;; + Apr) nummonthtod=4;; + May) nummonthtod=5;; + Jun) nummonthtod=6;; + Jul) nummonthtod=7;; + Aug) nummonthtod=8;; + Sep) nummonthtod=9;; + Oct) nummonthtod=10;; + Nov) nummonthtod=11;; + Dec) nummonthtod=12;; + esac + # For the first six month of the year the time notation can also + # be used for files modified in the last year. + if (expr $nummonth \> $nummonthtod) > /dev/null; + then + year=`expr $year - 1` + fi;; + *) year=$3;; +esac + +# The result. +echo $day $month $year + +# 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: diff --git a/doc/perm.texi b/doc/perm.texi new file mode 100644 index 0000000..f519073 --- /dev/null +++ b/doc/perm.texi @@ -0,0 +1,592 @@ +Each file has a set of @dfn{file mode bits} that control the kinds of +access that users have to that file. They can be represented either in +symbolic form or as an octal number. + +@menu +* Mode Structure:: Structure of file mode bits. +* Symbolic Modes:: Mnemonic representation of file mode bits. +* Numeric Modes:: File mode bits as octal numbers. +* Directory Setuid and Setgid:: Set-user-ID and set-group-ID on directories. +@end menu + +@node Mode Structure +@section Structure of File Mode Bits + +The file mode bits have two parts: the @dfn{file permission bits}, +which control ordinary access to the file, and @dfn{special mode +bits}, which affect only some files. + +There are three kinds of permissions that a user can have for a file: + +@enumerate +@item +@cindex read permission +permission to read the file. For directories, this means permission to +list the contents of the directory. +@item +@cindex write permission +permission to write to (change) the file. For directories, this means +permission to create and remove files in the directory. +@item +@cindex execute/search permission +permission to execute the file (run it as a program). For directories, +this means permission to access files in the directory. +@end enumerate + +There are three categories of users who may have different permissions +to perform any of the above operations on a file: + +@enumerate +@item +the file's owner; +@item +other users who are in the file's group; +@item +everyone else. +@end enumerate + +@cindex owner, default +@cindex group owner, default +Files are given an owner and group when they are created. Usually the +owner is the current user and the group is the group of the directory +the file is in, but this varies with the operating system, the +file system the file is created on, and the way the file is created. You +can change the owner and group of a file by using the @command{chown} and +@command{chgrp} commands. + +In addition to the three sets of three permissions listed above, the +file mode bits have three special components, which affect only +executable files (programs) and, on most systems, directories: + +@enumerate +@item +@cindex set-user-ID +@cindex setuid +Set the process's effective user ID to that of the file upon execution +(called the @dfn{set-user-ID bit}, or sometimes the @dfn{setgid bit}). +For directories on a few systems, give files created in the directory +the same owner as the directory, no matter who creates them, and set +the set-user-ID bit of newly-created subdirectories. +@item +@cindex set-group-ID +@cindex setgid +Set the process's effective group ID to that of the file upon execution +(called the @dfn{set-group-ID bit}, or sometimes the @dfn{setgid bit}). +For directories on most systems, give files created in the directory +the same group as the directory, no matter what group the user who +creates them is in, and set the set-group-ID bit of newly-created +subdirectories. +@item +@cindex sticky +@cindex swap space, saving text image in +@cindex text image, saving in swap space +@cindex restricted deletion flag +Prevent unprivileged users from removing or renaming a file in a directory +unless they own the file or the directory; this is called the +@dfn{restricted deletion flag} for the directory, and is commonly +found on world-writable directories like @file{/tmp}. + +For regular files on some older systems, save the program's text image on the +swap device so it will load more quickly when run; this is called the +@dfn{sticky bit}. +@end enumerate + +In addition to the file mode bits listed above, there may be file attributes +specific to the file system, e.g., access control lists (ACLs), whether a +file is compressed, whether a file can be modified (immutability), and whether +a file can be dumped. These are usually set using programs +specific to the file system. For example: +@c should probably say a lot more about ACLs... someday + +@table @asis +@item ext2 +On @acronym{GNU} and @acronym{GNU}/Linux the file attributes specific to +the ext2 file system are set using @command{chattr}. + +@item FFS +On FreeBSD the file flags specific to the FFS +file system are set using @command{chflags}. +@end table + +Even if a file's mode bits allow an operation on that file, +that operation may still fail, because: + +@itemize +@item +the file-system-specific attributes or flags do not permit it; or + +@item +the file system is mounted as read-only. +@end itemize + +For example, if the immutable attribute is set on a file, +it cannot be modified, regardless of the fact that you +may have just run @code{chmod a+w FILE}. + +@node Symbolic Modes +@section Symbolic Modes + +@cindex symbolic modes +@dfn{Symbolic modes} represent changes to files' mode bits as +operations on single-character symbols. They allow you to modify either +all or selected parts of files' mode bits, optionally based on +their previous values, and perhaps on the current @code{umask} as well +(@pxref{Umask and Protection}). + +The format of symbolic modes is: + +@example +@r{[}ugoa@dots{}@r{][}+-=@r{]}@var{perms}@dots{}@r{[},@dots{}@r{]} +@end example + +@noindent +where @var{perms} is either zero or more letters from the set +@samp{rwxXst}, or a single letter from the set @samp{ugo}. + +The following sections describe the operators and other details of +symbolic modes. + +@menu +* Setting Permissions:: Basic operations on permissions. +* Copying Permissions:: Copying existing permissions. +* Changing Special Mode Bits:: Special mode bits. +* Conditional Executability:: Conditionally affecting executability. +* Multiple Changes:: Making multiple changes. +* Umask and Protection:: The effect of the umask. +@end menu + +@node Setting Permissions +@subsection Setting Permissions + +The basic symbolic operations on a file's permissions are adding, +removing, and setting the permission that certain users have to read, +write, and execute or search the file. These operations have the following +format: + +@example +@var{users} @var{operation} @var{permissions} +@end example + +@noindent +The spaces between the three parts above are shown for readability only; +symbolic modes cannot contain spaces. + +The @var{users} part tells which users' access to the file is changed. +It consists of one or more of the following letters (or it can be empty; +@pxref{Umask and Protection}, for a description of what happens then). When +more than one of these letters is given, the order that they are in does +not matter. + +@table @code +@item u +@cindex owner of file, permissions for +the user who owns the file; +@item g +@cindex group, permissions for +other users who are in the file's group; +@item o +@cindex other permissions +all other users; +@item a +all users; the same as @samp{ugo}. +@end table + +The @var{operation} part tells how to change the affected users' access +to the file, and is one of the following symbols: + +@table @code +@item + +@cindex adding permissions +to add the @var{permissions} to whatever permissions the @var{users} +already have for the file; +@item - +@cindex removing permissions +@cindex subtracting permissions +to remove the @var{permissions} from whatever permissions the +@var{users} already have for the file; +@item = +@cindex setting permissions +to make the @var{permissions} the only permissions that the @var{users} +have for the file. +@end table + +The @var{permissions} part tells what kind of access to the file should +be changed; it is normally zero or more of the following letters. As with the +@var{users} part, the order does not matter when more than one letter is +given. Omitting the @var{permissions} part is useful only with the +@samp{=} operation, where it gives the specified @var{users} no access +at all to the file. + +@table @code +@item r +@cindex read permission, symbolic +the permission the @var{users} have to read the file; +@item w +@cindex write permission, symbolic +the permission the @var{users} have to write to the file; +@item x +@cindex execute/search permission, symbolic +the permission the @var{users} have to execute the file, +or search it if it is a directory. +@end table + +For example, to give everyone permission to read and write a regular file, +but not to execute it, use: + +@example +a=rw +@end example + +To remove write permission for all users other than the file's +owner, use: + +@example +go-w +@end example + +@noindent +The above command does not affect the access that the owner of +the file has to it, nor does it affect whether other users can +read or execute the file. + +To give everyone except a file's owner no permission to do anything with +that file, use the mode below. Other users could still remove the file, +if they have write permission on the directory it is in. + +@example +go= +@end example + +@noindent +Another way to specify the same thing is: + +@example +og-rwx +@end example + +@node Copying Permissions +@subsection Copying Existing Permissions + +@cindex copying existing permissions +@cindex permissions, copying existing +You can base a file's permissions on its existing permissions. To do +this, instead of using a series of @samp{r}, @samp{w}, or @samp{x} +letters after the +operator, you use the letter @samp{u}, @samp{g}, or @samp{o}. For +example, the mode + +@example +o+g +@end example + +@noindent +adds the permissions for users who are in a file's group to the +permissions that other users have for the file. Thus, if the file +started out as mode 664 (@samp{rw-rw-r--}), the above mode would change +it to mode 666 (@samp{rw-rw-rw-}). If the file had started out as mode +741 (@samp{rwxr----x}), the above mode would change it to mode 745 +(@samp{rwxr--r-x}). The @samp{-} and @samp{=} operations work +analogously. + +@node Changing Special Mode Bits +@subsection Changing Special Mode Bits + +@cindex changing special mode bits +In addition to changing a file's read, write, and execute/search permissions, +you can change its special mode bits. @xref{Mode Structure}, for a +summary of these special mode bits. + +To change the file mode bits to set the user ID on execution, use +@samp{u} in the @var{users} part of the symbolic mode and +@samp{s} in the @var{permissions} part. + +To change the file mode bits to set the group ID on execution, use +@samp{g} in the @var{users} part of the symbolic mode and +@samp{s} in the @var{permissions} part. + +To set both user and group ID on execution, omit the @var{users} part +of the symbolic mode (or use @samp{a}) and use @samp{s} in the +@var{permissions} part. + +To change the file mode bits to set the restricted deletion flag or sticky bit, +omit the @var{users} part of the symbolic mode (or use @samp{a}) and use +@samp{t} in the @var{permissions} part. + +For example, to set the set-user-ID mode bit of a program, +you can use the mode: + +@example +u+s +@end example + +To remove both set-user-ID and set-group-ID mode bits from +it, you can use the mode: + +@example +a-s +@end example + +To set the restricted deletion flag or sticky bit, you can use +the mode: + +@example ++t +@end example + +The combination @samp{o+s} has no effect. On @acronym{GNU} systems +the combinations @samp{u+t} and @samp{g+t} have no effect, and +@samp{o+t} acts like plain @samp{+t}. + +The @samp{=} operator is not very useful with special mode bits. +For example, the mode: + +@example +o=t +@end example + +@noindent +does set the restricted deletion flag or sticky bit, but it also +removes all read, write, and execute/search permissions that users not in the +file's group might have had for it. + +@xref{Directory Setuid and Setgid}, for additional rules concerning +set-user-ID and set-group-ID bits and directories. + +@node Conditional Executability +@subsection Conditional Executability + +@cindex conditional executability +There is one more special type of symbolic permission: if you use +@samp{X} instead of @samp{x}, execute/search permission is affected only if the +file is a directory or already had execute permission. + +For example, this mode: + +@example +a+X +@end example + +@noindent +gives all users permission to search directories, or to execute files if +anyone could execute them before. + +@node Multiple Changes +@subsection Making Multiple Changes + +@cindex multiple changes to permissions +The format of symbolic modes is actually more complex than described +above (@pxref{Setting Permissions}). It provides two ways to make +multiple changes to files' mode bits. + +The first way is to specify multiple @var{operation} and +@var{permissions} parts after a @var{users} part in the symbolic mode. + +For example, the mode: + +@example +og+rX-w +@end example + +@noindent +gives users other than the owner of the file read permission and, if +it is a directory or if someone already had execute permission +to it, gives them execute/search permission; and it also denies them write +permission to the file. It does not affect the permission that the +owner of the file has for it. The above mode is equivalent to +the two modes: + +@example +og+rX +og-w +@end example + +The second way to make multiple changes is to specify more than one +simple symbolic mode, separated by commas. For example, the mode: + +@example +a+r,go-w +@end example + +@noindent +gives everyone permission to read the file and removes write +permission on it for all users except its owner. Another example: + +@example +u=rwx,g=rx,o= +@end example + +@noindent +sets all of the permission bits for the file explicitly. (It +gives users who are not in the file's group no permission at all for +it.) + +The two methods can be combined. The mode: + +@example +a+r,g+x-w +@end example + +@noindent +gives all users permission to read the file, and gives users who are in +the file's group permission to execute/search it as well, but not permission +to write to it. The above mode could be written in several different +ways; another is: + +@example +u+r,g+rx,o+r,g-w +@end example + +@node Umask and Protection +@subsection The Umask and Protection + +@cindex umask and modes +@cindex modes and umask +If the @var{users} part of a symbolic mode is omitted, it defaults to +@samp{a} (affect all users), except that any permissions that are +@emph{set} in the system variable @code{umask} are @emph{not affected}. +The value of @code{umask} can be set using the +@code{umask} command. Its default value varies from system to system. + +@cindex giving away permissions +Omitting the @var{users} part of a symbolic mode is generally not useful +with operations other than @samp{+}. It is useful with @samp{+} because +it allows you to use @code{umask} as an easily customizable protection +against giving away more permission to files than you intended to. + +As an example, if @code{umask} has the value 2, which removes write +permission for users who are not in the file's group, then the mode: + +@example ++w +@end example + +@noindent +adds permission to write to the file to its owner and to other users who +are in the file's group, but @emph{not} to other users. In contrast, +the mode: + +@example +a+w +@end example + +@noindent +ignores @code{umask}, and @emph{does} give write permission for +the file to all users. + +@node Numeric Modes +@section Numeric Modes + +@cindex numeric modes +@cindex file mode bits, numeric +@cindex octal numbers for file modes +As an +alternative to giving a symbolic mode, you can give an octal (base 8) +number that represents the mode. +This number is always interpreted in octal; you do not have to add a +leading @samp{0}, as you do in C. Mode @samp{0055} is the same as +mode @samp{55}. + +A numeric mode is usually shorter than the corresponding symbolic +mode, but it is limited in that normally it cannot take into account the +previous file mode bits; it can only set them absolutely. +(As discussed in the next section, the set-user-ID and set-group-ID +bits of directories are an exception to this general limitation.) + +The permissions granted to the user, +to other users in the file's group, +and to other users not in the file's group each require three +bits, which are represented as one octal digit. The three special +mode bits also require one bit each, and they are as a group +represented as another octal digit. Here is how the bits are arranged, +starting with the lowest valued bit: + +@example +Value in Corresponding +Mode Mode Bit + + Other users not in the file's group: + 1 Execute/search + 2 Write + 4 Read + + Other users in the file's group: + 10 Execute/search + 20 Write + 40 Read + + The file's owner: + 100 Execute/search + 200 Write + 400 Read + + Special mode bits: +1000 Restricted deletion flag or sticky bit +2000 Set group ID on execution +4000 Set user ID on execution +@end example + +For example, numeric mode @samp{4755} corresponds to symbolic mode +@samp{u=rwxs,go=rx}, and numeric mode @samp{664} corresponds to symbolic mode +@samp{ug=rw,o=r}. Numeric mode @samp{0} corresponds to symbolic mode +@samp{a=}. + +@node Directory Setuid and Setgid +@section Directories and the Set-User-ID and Set-Group-ID Bits + +On most systems, if a directory's set-group-ID bit is set, newly +created subfiles inherit the same group as the directory, and newly +created subdirectories inherit the set-group-ID bit of the parent +directory. On a few systems, a directory's set-user-ID bit has a +similar effect on the ownership of new subfiles and the set-user-ID +bits of new subdirectories. These mechanisms let users share files +more easily, by lessening the need to use @command{chmod} or +@command{chown} to share new files. + +These convenience mechanisms rely on the set-user-ID and set-group-ID +bits of directories. If commands like @command{chmod} and +@command{mkdir} routinely cleared these bits on directories, the +mechanisms would be less convenient and it would be harder to share +files. Therefore, a command like @command{chmod} does not affect the +set-user-ID or set-group-ID bits of a directory unless the user +specifically mentions them in a symbolic mode, or sets them in +a numeric mode. For example, on systems that support +set-group-ID inheritance: + +@example +# These commands leave the set-user-ID and +# set-group-ID bits of the subdirectories alone, +# so that they retain their default values. +mkdir A B C +chmod 755 A +chmod 0755 B +chmod u=rwx,go=rx C +mkdir -m 755 D +mkdir -m 0755 E +mkdir -m u=rwx,go=rx F +@end example + +If you want to try to set these bits, you must mention them +explicitly in the symbolic or numeric modes, e.g.: + +@example +# These commands try to set the set-user-ID +# and set-group-ID bits of the subdirectories. +mkdir G H +chmod 6755 G +chmod u=rwx,go=rx,a+s H +mkdir -m 6755 I +mkdir -m u=rwx,go=rx,a+s J +@end example + +If you want to try to clear these bits, you must mention them +explicitly in a symbolic mode, e.g.: + +@example +# This command tries to clear the set-user-ID +# and set-group-ID bits of the directory D. +chmod a-s D +@end example + +This behavior is a @acronym{GNU} extension. Portable scripts should +not rely on requests to set or clear these bits on directories, as +@acronym{POSIX} allows implementations to ignore these requests. diff --git a/doc/regexprops.texi b/doc/regexprops.texi new file mode 100644 index 0000000..e1910b0 --- /dev/null +++ b/doc/regexprops.texi @@ -0,0 +1,720 @@ +@menu +* findutils-default regular expression syntax:: +* awk regular expression syntax:: +* egrep regular expression syntax:: +* emacs regular expression syntax:: +* gnu-awk regular expression syntax:: +* grep regular expression syntax:: +* posix-awk regular expression syntax:: +* posix-basic regular expression syntax:: +* posix-egrep regular expression syntax:: +* posix-extended regular expression syntax:: +@end menu + +@node findutils-default regular expression syntax +@subsection @samp{findutils-default} regular expression syntax + + +The character @samp{.} matches any single character. + + +@table @samp + +@item + +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item ? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item \+ +matches a @samp{+} +@item \? +matches a @samp{?}. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}. + +GNU extensions are supported: +@enumerate + +@item @samp{\w} matches a character within a word + +@item @samp{\W} matches a character which is not within a word + +@item @samp{\<} matches the beginning of a word + +@item @samp{\>} matches the end of a word + +@item @samp{\b} matches a word boundary + +@item @samp{\B} matches characters which are not a word boundary + +@item @samp{\`} matches the beginning of the whole input + +@item @samp{\'} matches the end of the whole input + +@end enumerate + + +Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{\(}. + +The alternation operator is @samp{\|}. + +The character @samp{^} only represents the beginning of a string when it appears: +@enumerate + +@item +At the beginning of a regular expression + +@item After an open-group, signified by +@samp{\(} + +@item After the alternation operator @samp{\|} + +@end enumerate + + +The character @samp{$} only represents the end of a string when it appears: +@enumerate + +@item At the end of a regular expression + +@item Before a close-group, signified by +@samp{\)} +@item Before the alternation operator @samp{\|} + +@end enumerate + + +@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except: +@enumerate + +@item At the beginning of a regular expression + +@item After an open-group, signified by +@samp{\(} +@item After the alternation operator @samp{\|} + +@end enumerate + + + + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node awk regular expression syntax +@subsection @samp{awk} regular expression syntax + + +The character @samp{.} matches any single character except the null character. + + +@table @samp + +@item + +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item ? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item \+ +matches a @samp{+} +@item \? +matches a @samp{?}. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} can be used to quote the following character. Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}. + +GNU extensions are not supported and so @samp{\w}, @samp{\W}, @samp{\<}, @samp{\>}, @samp{\b}, @samp{\B}, @samp{\`}, and @samp{\'} match @samp{w}, @samp{W}, @samp{<}, @samp{>}, @samp{b}, @samp{B}, @samp{`}, and @samp{'} respectively. + +Grouping is performed with parentheses @samp{()}. An unmatched @samp{)} matches just itself. A backslash followed by a digit matches that digit. + +The alternation operator is @samp{|}. + +The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. + +@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except: +@enumerate + +@item At the beginning of a regular expression + +@item After an open-group, signified by +@samp{(} +@item After the alternation operator @samp{|} + +@end enumerate + + + + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node egrep regular expression syntax +@subsection @samp{egrep} regular expression syntax + + +The character @samp{.} matches any single character except newline. + + +@table @samp + +@item + +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item ? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item \+ +matches a @samp{+} +@item \? +matches a @samp{?}. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. Non-matching lists @samp{[^@dots{}]} do not ever match newline. + +GNU extensions are supported: +@enumerate + +@item @samp{\w} matches a character within a word + +@item @samp{\W} matches a character which is not within a word + +@item @samp{\<} matches the beginning of a word + +@item @samp{\>} matches the end of a word + +@item @samp{\b} matches a word boundary + +@item @samp{\B} matches characters which are not a word boundary + +@item @samp{\`} matches the beginning of the whole input + +@item @samp{\'} matches the end of the whole input + +@end enumerate + + +Grouping is performed with parentheses @samp{()}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}. + +The alternation operator is @samp{|}. + +The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. + +The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression. + + + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node emacs regular expression syntax +@subsection @samp{emacs} regular expression syntax + + +The character @samp{.} matches any single character except newline. + + +@table @samp + +@item + +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item ? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item \+ +matches a @samp{+} +@item \? +matches a @samp{?}. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}. + +GNU extensions are supported: +@enumerate + +@item @samp{\w} matches a character within a word + +@item @samp{\W} matches a character which is not within a word + +@item @samp{\<} matches the beginning of a word + +@item @samp{\>} matches the end of a word + +@item @samp{\b} matches a word boundary + +@item @samp{\B} matches characters which are not a word boundary + +@item @samp{\`} matches the beginning of the whole input + +@item @samp{\'} matches the end of the whole input + +@end enumerate + + +Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{\(}. + +The alternation operator is @samp{\|}. + +The character @samp{^} only represents the beginning of a string when it appears: +@enumerate + +@item +At the beginning of a regular expression + +@item After an open-group, signified by +@samp{\(} + +@item After the alternation operator @samp{\|} + +@end enumerate + + +The character @samp{$} only represents the end of a string when it appears: +@enumerate + +@item At the end of a regular expression + +@item Before a close-group, signified by +@samp{\)} +@item Before the alternation operator @samp{\|} + +@end enumerate + + +@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except: +@enumerate + +@item At the beginning of a regular expression + +@item After an open-group, signified by +@samp{\(} +@item After the alternation operator @samp{\|} + +@end enumerate + + + + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node gnu-awk regular expression syntax +@subsection @samp{gnu-awk} regular expression syntax + + +The character @samp{.} matches any single character. + + +@table @samp + +@item + +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item ? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item \+ +matches a @samp{+} +@item \? +matches a @samp{?}. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} can be used to quote the following character. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. + +GNU extensions are supported: +@enumerate + +@item @samp{\w} matches a character within a word + +@item @samp{\W} matches a character which is not within a word + +@item @samp{\<} matches the beginning of a word + +@item @samp{\>} matches the end of a word + +@item @samp{\b} matches a word boundary + +@item @samp{\B} matches characters which are not a word boundary + +@item @samp{\`} matches the beginning of the whole input + +@item @samp{\'} matches the end of the whole input + +@end enumerate + + +Grouping is performed with parentheses @samp{()}. An unmatched @samp{)} matches just itself. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}. + +The alternation operator is @samp{|}. + +The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. + +@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except: +@enumerate + +@item At the beginning of a regular expression + +@item After an open-group, signified by +@samp{(} +@item After the alternation operator @samp{|} + +@end enumerate + + + + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node grep regular expression syntax +@subsection @samp{grep} regular expression syntax + + +The character @samp{.} matches any single character except newline. + + +@table @samp + +@item \+ +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item \? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item + and ? +match themselves. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. Non-matching lists @samp{[^@dots{}]} do not ever match newline. + +GNU extensions are supported: +@enumerate + +@item @samp{\w} matches a character within a word + +@item @samp{\W} matches a character which is not within a word + +@item @samp{\<} matches the beginning of a word + +@item @samp{\>} matches the end of a word + +@item @samp{\b} matches a word boundary + +@item @samp{\B} matches characters which are not a word boundary + +@item @samp{\`} matches the beginning of the whole input + +@item @samp{\'} matches the end of the whole input + +@end enumerate + + +Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{\(}. + +The alternation operator is @samp{\|}. + +The character @samp{^} only represents the beginning of a string when it appears: +@enumerate + +@item +At the beginning of a regular expression + +@item After an open-group, signified by +@samp{\(} + +@item After a newline + +@item After the alternation operator @samp{\|} + +@end enumerate + + +The character @samp{$} only represents the end of a string when it appears: +@enumerate + +@item At the end of a regular expression + +@item Before a close-group, signified by +@samp{\)} +@item Before a newline + +@item Before the alternation operator @samp{\|} + +@end enumerate + + +@samp{\*}, @samp{\+} and @samp{\?} are special at any point in a regular expression except: +@enumerate + +@item At the beginning of a regular expression + +@item After an open-group, signified by +@samp{\(} +@item After a newline + +@item After the alternation operator @samp{\|} + +@end enumerate + + +Intervals are specified by @samp{\@{} and @samp{\@}}. Invalid intervals such as @samp{a\@{1z} are not accepted. + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node posix-awk regular expression syntax +@subsection @samp{posix-awk} regular expression syntax + + +The character @samp{.} matches any single character except the null character. + + +@table @samp + +@item + +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item ? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item \+ +matches a @samp{+} +@item \? +matches a @samp{?}. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} can be used to quote the following character. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. + +GNU extensions are not supported and so @samp{\w}, @samp{\W}, @samp{\<}, @samp{\>}, @samp{\b}, @samp{\B}, @samp{\`}, and @samp{\'} match @samp{w}, @samp{W}, @samp{<}, @samp{>}, @samp{b}, @samp{B}, @samp{`}, and @samp{'} respectively. + +Grouping is performed with parentheses @samp{()}. An unmatched @samp{)} matches just itself. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}. + +The alternation operator is @samp{|}. + +The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. + +@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except the following places, where they are not allowed: +@enumerate + +@item At the beginning of a regular expression + +@item After an open-group, signified by +@samp{(} +@item After the alternation operator @samp{|} + +@end enumerate + + +Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals such as @samp{a@{1z} are not accepted. + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node posix-basic regular expression syntax +@subsection @samp{posix-basic} regular expression syntax + + +The character @samp{.} matches any single character except the null character. + + +@table @samp + +@item \+ +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item \? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item + and ? +match themselves. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. + +GNU extensions are supported: +@enumerate + +@item @samp{\w} matches a character within a word + +@item @samp{\W} matches a character which is not within a word + +@item @samp{\<} matches the beginning of a word + +@item @samp{\>} matches the end of a word + +@item @samp{\b} matches a word boundary + +@item @samp{\B} matches characters which are not a word boundary + +@item @samp{\`} matches the beginning of the whole input + +@item @samp{\'} matches the end of the whole input + +@end enumerate + + +Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{\(}. + +The alternation operator is @samp{\|}. + +The character @samp{^} only represents the beginning of a string when it appears: +@enumerate + +@item +At the beginning of a regular expression + +@item After an open-group, signified by +@samp{\(} + +@item After the alternation operator @samp{\|} + +@end enumerate + + +The character @samp{$} only represents the end of a string when it appears: +@enumerate + +@item At the end of a regular expression + +@item Before a close-group, signified by +@samp{\)} +@item Before the alternation operator @samp{\|} + +@end enumerate + + +@samp{\*}, @samp{\+} and @samp{\?} are special at any point in a regular expression except: +@enumerate + +@item At the beginning of a regular expression + +@item After an open-group, signified by +@samp{\(} +@item After the alternation operator @samp{\|} + +@end enumerate + + +Intervals are specified by @samp{\@{} and @samp{\@}}. Invalid intervals such as @samp{a\@{1z} are not accepted. + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node posix-egrep regular expression syntax +@subsection @samp{posix-egrep} regular expression syntax + + +The character @samp{.} matches any single character except newline. + + +@table @samp + +@item + +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item ? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item \+ +matches a @samp{+} +@item \? +matches a @samp{?}. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. Non-matching lists @samp{[^@dots{}]} do not ever match newline. + +GNU extensions are supported: +@enumerate + +@item @samp{\w} matches a character within a word + +@item @samp{\W} matches a character which is not within a word + +@item @samp{\<} matches the beginning of a word + +@item @samp{\>} matches the end of a word + +@item @samp{\b} matches a word boundary + +@item @samp{\B} matches characters which are not a word boundary + +@item @samp{\`} matches the beginning of the whole input + +@item @samp{\'} matches the end of the whole input + +@end enumerate + + +Grouping is performed with parentheses @samp{()}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}. + +The alternation operator is @samp{|}. + +The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. + +The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression. + +Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals are treated as literals, for example @samp{a@{1} is treated as @samp{a\@{1} + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + + +@node posix-extended regular expression syntax +@subsection @samp{posix-extended} regular expression syntax + + +The character @samp{.} matches any single character except the null character. + + +@table @samp + +@item + +indicates that the regular expression should match one or more occurrences of the previous atom or regexp. +@item ? +indicates that the regular expression should match zero or one occurrence of the previous atom or regexp. +@item \+ +matches a @samp{+} +@item \? +matches a @samp{?}. +@end table + + +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. + +GNU extensions are supported: +@enumerate + +@item @samp{\w} matches a character within a word + +@item @samp{\W} matches a character which is not within a word + +@item @samp{\<} matches the beginning of a word + +@item @samp{\>} matches the end of a word + +@item @samp{\b} matches a word boundary + +@item @samp{\B} matches characters which are not a word boundary + +@item @samp{\`} matches the beginning of the whole input + +@item @samp{\'} matches the end of the whole input + +@end enumerate + + +Grouping is performed with parentheses @samp{()}. An unmatched @samp{)} matches just itself. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}. + +The alternation operator is @samp{|}. + +The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. + +@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except the following places, where they are not allowed: +@enumerate + +@item At the beginning of a regular expression + +@item After an open-group, signified by +@samp{(} +@item After the alternation operator @samp{|} + +@end enumerate + + +Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals such as @samp{a@{1z} are not accepted. + +The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. + diff --git a/doc/stamp-vti b/doc/stamp-vti new file mode 100644 index 0000000..55baa69 --- /dev/null +++ b/doc/stamp-vti @@ -0,0 +1,4 @@ +@set UPDATED 9 June 2007 +@set UPDATED-MONTH June 2007 +@set EDITION 4.3.8 +@set VERSION 4.3.8 diff --git a/doc/texinfo.tex b/doc/texinfo.tex new file mode 100644 index 0000000..0f3c750 --- /dev/null +++ b/doc/texinfo.tex @@ -0,0 +1,8641 @@ +% 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{2007-05-04.09} +% +% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007 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} + + +\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 + +% Since the category of space is not known, we have to be careful. +\chardef\spacecat = 10 +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dashChar = `\- +\chardef\dotChar = `\. +\chardef\exclamChar= `\! +\chardef\lquoteChar= `\` +\chardef\questChar = `\? +\chardef\rquoteChar= `\' +\chardef\semiChar = `\; +\chardef\underChar = `\_ + +% 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. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\tt \backslashcurfont }acronym} + \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 \oddfootingyyy.) + % The \baselineskip=24pt in plain's \makefootline has no effect. + \vskip 24pt + \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\argtorun{#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 + % Do not use \next, perhaps the caller of \parsearg uses it; 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 \argtorun. +% (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\argtorun\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`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\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 the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.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, +% 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 what we do). + +% double active backslashes. +% +{\catcode`\@=0 \catcode`\\=\active + @gdef@activebackslashdouble{% + @catcode`@\=@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, with minor +% changes for Texinfo. It is included here under the GPL by permission +% from the author, Heiko Oberdiek. +% +% #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{(}{\realbackslash(}{#1}% + \HyPsdSubst{)}{\realbackslash)}{#1}% +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + +\ifpdf + \input pdfcolor + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\dopdfimage#1#2#3{% + \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .png, .jpg, .pdf (among + % others). Let's try in that order. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{pdf}% + \fi + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \closein 1 + \endgroup + % + % 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 + \ifdim \wd0 >0pt width \imagewidth \fi + \ifdim \wd2 >0pt height \imageheight \fi + \ifnum\pdftexversion<13 + #1.\pdfimgext + \else + {#1.\pdfimgext}% + \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. + \indexnofonts + \turnoffactive + \activebackslashdouble + \makevalueexpandable + \def\pdfdestname{#1}% + \backslashparens\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1} + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. + % (Defined in pdfcolor.tex.) + \let\urlcolor = \BrickRed + \let\linkcolor = \BrickRed + \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 + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \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 + % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + \leavevmode\urlcolor + \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 + }% +} + +% +% PDF CMaps. See also LaTeX's t1.cmap. +% +% \cmapOT1 +\ifpdf + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\else + \expandafter\let\csname cmapOT1\endcsname\gobble + \expandafter\let\csname cmapOT1IT\endcsname\gobble + \expandafter\let\csname cmapOT1TT\endcsname\gobble +\fi + + +% 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, #5 is the CMap +% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass +% empty to omit). +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble + + +% 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} + +% Definitions for a main text size of 11pt. This is the default in +% Texinfo. +% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} +\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}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\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}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} +\let\chapbf=\chaprm +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} +\font\chapi=cmmi12 scaled \magstep2 +\font\chapsy=cmsy10 scaled \magstep3 + +% Section fonts (14.4pt). +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep2}{OT1} +\font\seci=cmmi12 scaled \magstep1 +\font\secsy=cmsy10 scaled \magstep2 + +% Subsection fonts (13.15pt). +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1315}{OT1} +\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}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 + +% reset the current fonts +\textfonts +\rm +} % end of 11pt text font size definitions + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\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}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\authorrm{\secrm} +\def\authortt{\sectt} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 + +% reduce space between paragraphs +\divide\parskip by 2 + +% reset the current fonts +\textfonts +\rm +} % end of 10pt text font size definitions + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xword{10} +\def\xiword{11} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + \wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + + +% 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. +% +\definetextfontsizexi + +% 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}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +%% 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}{OT1} +\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}}}} +\def\key #1{{\nohyphenation \uppercase{#1}}\null} +% 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 + \catcode`\'=\active \catcode`\`=\active + % + \global\def\code{\begingroup + \catcode\rquoteChar=\active \catcode\lquoteChar=\active + \let'\codequoteright \let`\codequoteleft + % + \catcode\dashChar=\active \catcode\underChar=\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}}% + }$% +} + +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + +% 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 -12pt + \global\advance\vsize by -12pt +} + +\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: + \obeylines + \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'. + \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. + \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. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\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 + % + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. + % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest + % + % The above is not enough to reproduce the bug, but it gives the flavor. + % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + % + % So: + \let\endinput = \empty + % + % 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 + \otherbackslash +} + +% 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 + \definedummyword\textdegree + % + % 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. +% +\def\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\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref +} + +% \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{=>}% + \def\textdegree{degrees}% + % + % 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}% + % + \safewhatsit\dosubindwrite + }% + \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/skips around a whatsit: +% +% 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 or \pdfdest 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} +% +\newskip\whatsitskip +\newcount\whatsitpenalty +% +% ..., ready, GO: +% +\def\safewhatsit#1{% +\ifhmode + #1% +\else + % \lastskip and \lastpenalty cannot both be nonzero simultaneously. + \whatsitskip = \lastskip + \edef\lastskipmacro{\the\lastskip}% + \whatsitpenalty = \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-\whatsitskip + \fi + % + #1% + % + \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\whatsitpenalty>9999 \penalty\whatsitpenalty \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\whatsitskip + \fi +\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 + \plainfrenchspacing + \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. + \setbox\boxA = \hbox{#1}% + \ifdim\wd\boxA = 0pt + \ % + \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 plain.tex's \dotfill, except uses up at least 1 em. +\def\indexdotfill{\cleaders + \hbox{$\mathsurround=0pt \mkern1.5mu.\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{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % + \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\thischapternum{}% + \gdef\thischapter{#1}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% + \gdef\thischapternum{}% + \gdef\thischapter{}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% + \xdef\thischapternum{\appendixletter}% + % 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\thischapternum{\the\chapno}% + \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 \chapmacro. + \writetocentry{\toctype\sectionlevel}{#1}{#4}% + % + % Write the node reference (= pdf destination for pdftex). + % Again, see comments in \chapmacro. + \donoderef{#3}% + % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % + % 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 \tocreadfilename +} + +\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 +} + +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} + +% Normal (long) toc. +% +\def\contents{% + \startcontents{\putwordTOC}% + \openin 1 \tocreadfilename\space + \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 \tocreadfilename\space + \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 \reducedsf 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 + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \ifnum \lastpenalty=10000 \else \endgraf \fi + \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\quoteexpand + \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} + +% Allow an option to not replace quotes with a regular directed right +% quote/apostrophe (char 0x27), but instead use the undirected quote +% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it +% the default, but it works for pasting with more pdf viewers (at least +% evince), the lilypond developers report. xpdf does work with the +% regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else + \char'15 + \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + `% + \else + \char'22 + \fi +} +% +\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 + }% + } + \catcode`\'=\active + \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}% + % + \catcode`\`=\active + \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}% + % + \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% +\endgroup + +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart + % Easiest (and conventionally used) font for verbatim + \tt + \def\par{\leavevmode\egroup\box0\endgraf}% + \catcode`\`=\active + \tabexpand + \quoteexpand + % 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 +\newcount\defunpenalty + +% Start the processing of @deffn: +\def\startdefun{% + \ifnum\lastpenalty<10000 + \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. + \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 \printdefunline, 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. + % + % As a minor refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \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 \else \defunpenalty=10002 \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\defunpenalty % 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\macnamexxx=#1\futurelet\nchar\braceorlinexxx} +\def\braceorlinexxx{% + \ifx\nchar\bgroup\else + \expandafter\parsearg + \fi \macnamexxx} + + +% @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. + \safewhatsit{\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}% + {\indexnofonts + \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{% + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref + % + % Was that xref control sequence that we just defined for a float? + \expandafter\iffloat\csname XR\safexrefname\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 + {\safexrefname}}% + \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 + \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 \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 floating, 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,} + +% @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.} + +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1 + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\parseargdef\documentencoding{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + \utfeightchardefs + % + \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} + +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{~} + \gdef^^a1{\exclamdown} + \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^ac{$\lnot$} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + % + \gdef^^b7{$^.$} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % + \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{~} + \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} + \gdef^^b2{\missingcharmsg{OGONEK}} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'\i} + \gdef^^ee{\^\i} + \gdef^^ef{\v d} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{t}} + \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0164}{\v{T}} + + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2261}{\equiv} +}% end of \utfeightchardefs + + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + +\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}% + {-.2in}{0in}% + {\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} + +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + +\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 + +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=\active +@def@normalbackslash{{@tt@backslashcurfont}} +% On startup, @fixbackslash assigns: +% @let \ = @normalbackslash + +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. +% +@def@normalturnoffactive{% + @let\=@normalbackslash + @let"=@normaldoublequote + @let~=@normaltilde + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let<=@normalless + @let>=@normalgreater + @let+=@normalplus + @let$=@normaldollar %$ font-lock fix + @unsepspaces +} + +% 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 diff --git a/doc/version.texi b/doc/version.texi new file mode 100644 index 0000000..55baa69 --- /dev/null +++ b/doc/version.texi @@ -0,0 +1,4 @@ +@set UPDATED 9 June 2007 +@set UPDATED-MONTH June 2007 +@set EDITION 4.3.8 +@set VERSION 4.3.8 diff --git a/find/Makefile.am b/find/Makefile.am new file mode 100644 index 0000000..23d8323 --- /dev/null +++ b/find/Makefile.am @@ -0,0 +1,38 @@ +AUTOMAKE_OPTIONS = std-options +localedir = $(datadir)/locale +# noinst_PROGRAMS = regexprops +# regexprops_SOURCES = regexprops.c + +noinst_LIBRARIES = libfindtools.a +libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c version.c + + +# We always build two versions of find, one with fts, one without. +# Their names depend on whether the user specified --with-fts. +# +# --with-fts find extra binary +# yes with fts 'oldfind', without fts +# no without fts 'ftsfind', with fts +# +if WITH_FTS +bin_PROGRAMS = find oldfind +find_SOURCES = ftsfind.c +oldfind_SOURCES = find.c +else +bin_PROGRAMS = find ftsfind +find_SOURCES = find.c +ftsfind_SOURCES = ftsfind.c +endif + +EXTRA_DIST = defs.h $(man_MANS) +INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\" +LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ +man_MANS = find.1 +SUBDIRS = testsuite + +#$(PROGRAMS): ../lib/libfind.a + +dist-hook: findutils-check-manpages + +findutils-check-manpages: + $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) diff --git a/find/Makefile.in b/find/Makefile.in new file mode 100644 index 0000000..ac161cd --- /dev/null +++ b/find/Makefile.in @@ -0,0 +1,984 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@WITH_FTS_FALSE@bin_PROGRAMS = find$(EXEEXT) ftsfind$(EXEEXT) +@WITH_FTS_TRUE@bin_PROGRAMS = find$(EXEEXT) oldfind$(EXEEXT) +subdir = find +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +libfindtools_a_AR = $(AR) $(ARFLAGS) +libfindtools_a_LIBADD = +am_libfindtools_a_OBJECTS = finddata.$(OBJEXT) fstype.$(OBJEXT) \ + parser.$(OBJEXT) pred.$(OBJEXT) tree.$(OBJEXT) util.$(OBJEXT) \ + version.$(OBJEXT) +libfindtools_a_OBJECTS = $(am_libfindtools_a_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am__find_SOURCES_DIST = find.c ftsfind.c +@WITH_FTS_FALSE@am_find_OBJECTS = find.$(OBJEXT) +@WITH_FTS_TRUE@am_find_OBJECTS = ftsfind.$(OBJEXT) +find_OBJECTS = $(am_find_OBJECTS) +find_LDADD = $(LDADD) +find_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \ + ../gnulib/lib/libgnulib.a +am__ftsfind_SOURCES_DIST = ftsfind.c +@WITH_FTS_FALSE@am_ftsfind_OBJECTS = ftsfind.$(OBJEXT) +ftsfind_OBJECTS = $(am_ftsfind_OBJECTS) +ftsfind_LDADD = $(LDADD) +ftsfind_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \ + ../gnulib/lib/libgnulib.a +am__oldfind_SOURCES_DIST = find.c +@WITH_FTS_TRUE@am_oldfind_OBJECTS = find.$(OBJEXT) +oldfind_OBJECTS = $(am_oldfind_OBJECTS) +oldfind_LDADD = $(LDADD) +oldfind_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \ + ../gnulib/lib/libgnulib.a +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = $(libfindtools_a_SOURCES) $(find_SOURCES) $(ftsfind_SOURCES) \ + $(oldfind_SOURCES) +DIST_SOURCES = $(libfindtools_a_SOURCES) $(am__find_SOURCES_DIST) \ + $(am__ftsfind_SOURCES_DIST) $(am__oldfind_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\" +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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 = $(datadir)/locale +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = std-options +# noinst_PROGRAMS = regexprops +# regexprops_SOURCES = regexprops.c +noinst_LIBRARIES = libfindtools.a +libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c version.c +@WITH_FTS_FALSE@find_SOURCES = find.c +@WITH_FTS_TRUE@find_SOURCES = ftsfind.c +@WITH_FTS_TRUE@oldfind_SOURCES = find.c +@WITH_FTS_FALSE@ftsfind_SOURCES = ftsfind.c +EXTRA_DIST = defs.h $(man_MANS) +LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ @LIB_CLOCK_GETTIME@ @FINDLIBS@ +man_MANS = find.1 +SUBDIRS = testsuite +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(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 find/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits find/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libfindtools.a: $(libfindtools_a_OBJECTS) $(libfindtools_a_DEPENDENCIES) + -rm -f libfindtools.a + $(libfindtools_a_AR) libfindtools.a $(libfindtools_a_OBJECTS) $(libfindtools_a_LIBADD) + $(RANLIB) libfindtools.a +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) + +installcheck-binPROGRAMS: $(bin_PROGRAMS) + bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err &2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad +find$(EXEEXT): $(find_OBJECTS) $(find_DEPENDENCIES) + @rm -f find$(EXEEXT) + $(LINK) $(find_OBJECTS) $(find_LDADD) $(LIBS) +ftsfind$(EXEEXT): $(ftsfind_OBJECTS) $(ftsfind_DEPENDENCIES) + @rm -f ftsfind$(EXEEXT) + $(LINK) $(ftsfind_OBJECTS) $(ftsfind_LDADD) $(LIBS) +oldfind$(EXEEXT): $(oldfind_OBJECTS) $(oldfind_DEPENDENCIES) + @rm -f oldfind$(EXEEXT) + $(LINK) $(oldfind_OBJECTS) $(oldfind_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/finddata.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstype.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftsfind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pred.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +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 + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(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) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-recursive +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(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-man + +install-dvi: install-dvi-recursive + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: installcheck-binPROGRAMS + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-noinstLIBRARIES ctags ctags-recursive \ + dist-hook distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man1 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installcheck-binPROGRAMS \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \ + uninstall-man1 + + +#$(PROGRAMS): ../lib/libfind.a + +dist-hook: findutils-check-manpages + +findutils-check-manpages: + $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) +# 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/find/defs.h b/find/defs.h new file mode 100644 index 0000000..9ddf43f --- /dev/null +++ b/find/defs.h @@ -0,0 +1,649 @@ +/* defs.h -- data types and declarations. + Copyright (C) 1990, 91, 92, 93, 94, 2000, 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 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. +*/ +#ifndef INC_DEFS_H +#define INC_DEFS_H 1 + +#if !defined(ALREADY_INCLUDED_CONFIG_H) +/* + * Savannah bug #20128: if we include some system header and it + * includes some othersecond system header, the second system header + * may in fact turn out to be a file provided by gnulib. For that + * situation, we need to have already included so that the + * Gnulib files have access to the information probed by their + * configure script fragments. So should be the first + * thing included. + */ +#error " should be #included before defs.h, and indeed before any other header" +Please stop compiling the program now +#endif + + +#include + +/* XXX: some of these includes probably don't belong in a common header file */ +#include +#include /* for FILE* */ +#include +#include +#include +#include +#include /* for CHAR_BIT */ +#include /* for bool/boolean */ +#include /* for uintmax_t */ +#include /* S_ISUID etc. */ + + + +#ifndef CHAR_BIT +# define CHAR_BIT 8 +#endif + +#if HAVE_INTTYPES_H +# include +#endif +typedef bool boolean; + +#include "regex.h" +#include "timespec.h" +#include "buildcmd.h" +#include "quotearg.h" + +/* These days we will assume ANSI/ISO C protootypes work on our compiler. */ +#define PARAMS(Args) Args + +#ifndef ATTRIBUTE_NORETURN +# if HAVE_ATTRIBUTE_NORETURN +# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# else +# define ATTRIBUTE_NORETURN /* nothing */ +# endif +#endif + +int optionl_stat PARAMS((const char *name, struct stat *p)); +int optionp_stat PARAMS((const char *name, struct stat *p)); +int optionh_stat PARAMS((const char *name, struct stat *p)); +int debug_stat PARAMS((const char *file, struct stat *bufp)); + +void set_stat_placeholders PARAMS((struct stat *p)); +int get_statinfo PARAMS((const char *pathname, const char *name, struct stat *p)); + + +#define MODE_WXUSR (S_IWUSR | S_IXUSR) +#define MODE_R (S_IRUSR | S_IRGRP | S_IROTH) +#define MODE_RW (S_IWUSR | S_IWGRP | S_IWOTH | MODE_R) +#define MODE_RWX (S_IXUSR | S_IXGRP | S_IXOTH | MODE_RW) +#define MODE_ALL (S_ISUID | S_ISGID | S_ISVTX | MODE_RWX) + + +struct predicate; +struct options; + +/* Pointer to a predicate function. */ +typedef boolean (*PRED_FUNC)(const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr); + +/* The number of seconds in a day. */ +#define DAYSECS 86400 + +/* Argument structures for predicates. */ + +enum comparison_type +{ + COMP_GT, + COMP_LT, + COMP_EQ +}; + +enum permissions_type +{ + PERM_AT_LEAST, + PERM_ANY, + PERM_EXACT +}; + +enum predicate_type +{ + NO_TYPE, + PRIMARY_TYPE, + UNI_OP, + BI_OP, + OPEN_PAREN, + CLOSE_PAREN +}; + +enum predicate_precedence +{ + NO_PREC, + COMMA_PREC, + OR_PREC, + AND_PREC, + NEGATE_PREC, + MAX_PREC +}; + +struct long_val +{ + enum comparison_type kind; + boolean negative; /* Defined only when representing time_t. */ + uintmax_t l_val; +}; + +struct perm_val +{ + enum permissions_type kind; + mode_t val[2]; +}; + +/* dir_id is used to support loop detection in find.c + */ +struct dir_id +{ + ino_t ino; + dev_t dev; +}; + +/* samefile_file_id is used to support the -samefile test. + */ +struct samefile_file_id +{ + ino_t ino; + dev_t dev; + int fd; +}; + +struct size_val +{ + enum comparison_type kind; + int blocksize; + uintmax_t size; +}; + + +enum xval + { + XVAL_ATIME, XVAL_BIRTHTIME, XVAL_CTIME, XVAL_MTIME, XVAL_TIME + }; + +struct time_val +{ + enum xval xval; + enum comparison_type kind; + struct timespec ts; +}; + + +struct exec_val +{ + boolean multiple; /* -exec {} \+ denotes multiple argument. */ + struct buildcmd_control ctl; + struct buildcmd_state state; + char **replace_vec; /* Command arguments (for ";" style) */ + int num_args; + boolean use_current_dir; /* If nonzero, don't chdir to start dir */ + boolean close_stdin; /* If true, close stdin in the child. */ + int dirfd; /* The directory to do the exec in. */ +}; + +/* The format string for a -printf or -fprintf is chopped into one or + more `struct segment', linked together into a list. + Each stretch of plain text is a segment, and + each \c and `%' conversion is a segment. */ + +/* Special values for the `kind' field of `struct segment'. */ +enum SegmentKind + { + KIND_PLAIN=0, /* Segment containing just plain text. */ + KIND_STOP=1, /* \c -- stop printing and flush output. */ + KIND_FORMAT, /* Regular format */ + }; + +struct segment +{ + enum SegmentKind segkind; /* KIND_FORMAT, KIND_PLAIN, KIND_STOP */ + char format_char[2]; /* Format chars if kind is KIND_FORMAT */ + char *text; /* Plain text or `%' format string. */ + int text_len; /* Length of `text'. */ + struct segment *next; /* Next segment for this predicate. */ +}; + +struct format_val +{ + struct segment *segment; /* Linked list of segments. */ + FILE *stream; /* Output stream to print on. */ + const char *filename; /* We need the filename for error messages. */ + boolean dest_is_tty; /* True if the destination is a terminal. */ + struct quoting_options *quote_opts; +}; + +/* Profiling information for a predicate */ +struct predicate_performance_info +{ + unsigned long visits; + unsigned long successes; +}; + +/* evaluation cost of a predicate */ +enum EvaluationCost +{ + NeedsNothing, + NeedsType, + NeedsStatInfo, + NeedsLinkName, + NeedsAccessInfo, + NeedsSyncDiskHit, + NeedsEventualExec, + NeedsImmediateExec, + NeedsUserInteraction, + NeedsUnknown, + NumEvaluationCosts +}; + +struct predicate +{ + /* Pointer to the function that implements this predicate. */ + PRED_FUNC pred_func; + + /* Only used for debugging, but defined unconditionally so individual + modules can be compiled with -DDEBUG. */ + char *p_name; + + /* The type of this node. There are two kinds. The first is real + predicates ("primaries") such as -perm, -print, or -exec. The + other kind is operators for combining predicates. */ + enum predicate_type p_type; + + /* The precedence of this node. Only has meaning for operators. */ + enum predicate_precedence p_prec; + + /* True if this predicate node produces side effects. + If side_effects are produced + then optimization will not be performed */ + boolean side_effects; + + /* True if this predicate node requires default print be turned off. */ + boolean no_default_print; + + /* True if this predicate node requires a stat system call to execute. */ + boolean need_stat; + + /* True if this predicate node requires knowledge of the file type. */ + boolean need_type; + + enum EvaluationCost p_cost; + + /* est_success_rate is a number between 0.0 and 1.0 */ + float est_success_rate; + + /* True if this predicate should display control characters literally */ + boolean literal_control_chars; + + /* True if this predicate didn't originate from the user. */ + boolean artificial; + + /* The raw text of the argument of this predicate. */ + char *arg_text; + + /* Information needed by the predicate processor. + Next to each member are listed the predicates that use it. */ + union + { + const char *str; /* fstype [i]lname [i]name [i]path */ + struct re_pattern_buffer *regex; /* regex */ + struct exec_val exec_vec; /* exec ok */ + struct long_val numinfo; /* gid inum links uid */ + struct size_val size; /* size */ + uid_t uid; /* user */ + gid_t gid; /* group */ + struct time_val reftime; /* newer newerXY anewer cnewer mtime atime ctime mmin amin cmin */ + struct perm_val perm; /* perm */ + struct samefile_file_id samefileid; /* samefile */ + mode_t type; /* type */ + struct format_val printf_vec; /* printf fprintf fprint ls fls print0 fprint0 print */ + } args; + + /* The next predicate in the user input sequence, + which represents the order in which the user supplied the + predicates on the command line. */ + struct predicate *pred_next; + + /* The right and left branches from this node in the expression + tree, which represents the order in which the nodes should be + processed. */ + struct predicate *pred_left; + struct predicate *pred_right; + + struct predicate_performance_info perf; + + const struct parser_table* parser_entry; +}; + +/* find.c, ftsfind.c */ +boolean is_fts_enabled(int *ftsoptions); +int get_start_dirfd(void); +int get_current_dirfd(void); + +/* find library function declarations. */ + +/* find global function declarations. */ + +/* find.c */ +/* SymlinkOption represents the choice of + * -P, -L or -P (default) on the command line. + */ +enum SymlinkOption + { + SYMLINK_NEVER_DEREF, /* Option -P */ + SYMLINK_ALWAYS_DEREF, /* Option -L */ + SYMLINK_DEREF_ARGSONLY /* Option -H */ + }; +extern enum SymlinkOption symlink_handling; /* defined in find.c. */ + +void set_follow_state PARAMS((enum SymlinkOption opt)); +void cleanup(void); + +/* fstype.c */ +char *filesystem_type PARAMS((const struct stat *statp, const char *path)); +char * get_mounted_filesystems (void); +dev_t * get_mounted_devices PARAMS((size_t *)); + + + +enum arg_type + { + ARG_OPTION, /* regular options like -maxdepth */ + ARG_NOOP, /* does nothing, returns true, internal use only */ + ARG_POSITIONAL_OPTION, /* options whose position is important (-follow) */ + ARG_TEST, /* a like -name */ + ARG_SPECIAL_PARSE, /* complex to parse, don't eat the test name before calling parse_xx(). */ + ARG_PUNCTUATION, /* like -o or ( */ + ARG_ACTION /* like -print */ + }; + + +struct parser_table; +/* Pointer to a parser function. */ +typedef boolean (*PARSE_FUNC)(const struct parser_table *p, + char *argv[], int *arg_ptr); +struct parser_table +{ + enum arg_type type; + char *parser_name; + PARSE_FUNC parser_func; + PRED_FUNC pred_func; +}; + +/* parser.c */ +const struct parser_table* find_parser PARAMS((char *search_name)); +boolean parse_print PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +void pred_sanity_check PARAMS((const struct predicate *predicates)); +void parse_begin_user_args PARAMS((char **args, int argno, const struct predicate *last, const struct predicate *predicates)); +void parse_end_user_args PARAMS((char **args, int argno, const struct predicate *last, const struct predicate *predicates)); +boolean parse_openparen PARAMS((const struct parser_table* entry, char *argv[], int *arg_ptr)); +boolean parse_closeparen PARAMS((const struct parser_table* entry, char *argv[], int *arg_ptr)); + +/* pred.c */ + +typedef boolean PREDICATEFUNCTION(const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr); +PREDICATEFUNCTION pred_amin; +PREDICATEFUNCTION pred_and; +PREDICATEFUNCTION pred_anewer; +PREDICATEFUNCTION pred_atime; +PREDICATEFUNCTION pred_closeparen; +PREDICATEFUNCTION pred_cmin; +PREDICATEFUNCTION pred_cnewer; +PREDICATEFUNCTION pred_comma; +PREDICATEFUNCTION pred_ctime; +PREDICATEFUNCTION pred_delete; +PREDICATEFUNCTION pred_empty; +PREDICATEFUNCTION pred_exec; +PREDICATEFUNCTION pred_execdir; +PREDICATEFUNCTION pred_executable; +PREDICATEFUNCTION pred_false; +PREDICATEFUNCTION pred_fls; +PREDICATEFUNCTION pred_fprint; +PREDICATEFUNCTION pred_fprint0; +PREDICATEFUNCTION pred_fprintf; +PREDICATEFUNCTION pred_fstype; +PREDICATEFUNCTION pred_gid; +PREDICATEFUNCTION pred_group; +PREDICATEFUNCTION pred_ilname; +PREDICATEFUNCTION pred_iname; +PREDICATEFUNCTION pred_inum; +PREDICATEFUNCTION pred_ipath; +PREDICATEFUNCTION pred_links; +PREDICATEFUNCTION pred_lname; +PREDICATEFUNCTION pred_ls; +PREDICATEFUNCTION pred_mmin; +PREDICATEFUNCTION pred_mtime; +PREDICATEFUNCTION pred_name; +PREDICATEFUNCTION pred_negate; +PREDICATEFUNCTION pred_newer; +PREDICATEFUNCTION pred_newerXY; +PREDICATEFUNCTION pred_nogroup; +PREDICATEFUNCTION pred_nouser; +PREDICATEFUNCTION pred_ok; +PREDICATEFUNCTION pred_okdir; +PREDICATEFUNCTION pred_openparen; +PREDICATEFUNCTION pred_or; +PREDICATEFUNCTION pred_path; +PREDICATEFUNCTION pred_perm; +PREDICATEFUNCTION pred_print; +PREDICATEFUNCTION pred_print0; +PREDICATEFUNCTION pred_prune; +PREDICATEFUNCTION pred_quit; +PREDICATEFUNCTION pred_readable; +PREDICATEFUNCTION pred_regex; +PREDICATEFUNCTION pred_samefile; +PREDICATEFUNCTION pred_size; +PREDICATEFUNCTION pred_true; +PREDICATEFUNCTION pred_type; +PREDICATEFUNCTION pred_uid; +PREDICATEFUNCTION pred_used; +PREDICATEFUNCTION pred_user; +PREDICATEFUNCTION pred_writable; +PREDICATEFUNCTION pred_xtype; + + + +int launch PARAMS((const struct buildcmd_control *ctl, + struct buildcmd_state *buildstate)); + + +char *find_pred_name PARAMS((PRED_FUNC pred_func)); + + + +void print_predicate PARAMS((FILE *fp, const struct predicate *p)); +void print_tree PARAMS((FILE*, struct predicate *node, int indent)); +void print_list PARAMS((FILE*, struct predicate *node)); +void print_optlist PARAMS((FILE *fp, const struct predicate *node)); +void show_success_rates(const struct predicate *node); + + +/* tree.c */ +struct predicate * build_expression_tree PARAMS((int argc, char *argv[], int end_of_leading_options)); +struct predicate * get_eval_tree PARAMS((void)); +struct predicate *get_new_pred PARAMS((const struct parser_table *entry)); +struct predicate *get_new_pred_chk_op PARAMS((const struct parser_table *entry)); +float calculate_derived_rates PARAMS((struct predicate *p)); + +/* util.c */ +struct predicate *insert_primary PARAMS((const struct parser_table *entry)); +struct predicate *insert_primary_withpred PARAMS((const struct parser_table *entry, PRED_FUNC fptr)); +void usage PARAMS((FILE *fp, int status, char *msg)); +extern boolean check_nofollow(void); +void complete_pending_execs(struct predicate *p); +void complete_pending_execdirs(int dirfd); /* Passing dirfd is an unpleasant CodeSmell. */ +const char *safely_quote_err_filename (int n, char const *arg); +void fatal_file_error(const char *name) ATTRIBUTE_NORETURN; +void nonfatal_file_error(const char *name); + +int process_leading_options PARAMS((int argc, char *argv[])); +void set_option_defaults PARAMS((struct options *p)); + +#if 0 +#define apply_predicate(pathname, stat_buf_ptr, node) \ + (*(node)->pred_func)((pathname), (stat_buf_ptr), (node)) +#else +boolean apply_predicate(const char *pathname, struct stat *stat_buf, struct predicate *p); +#endif + +#define pred_is(node, fn) ( ((node)->pred_func) == (fn) ) + + +/* find.c. */ +int get_info PARAMS((const char *pathname, struct stat *p, struct predicate *pred_ptr)); +int following_links PARAMS((void)); +int digest_mode PARAMS((mode_t mode, const char *pathname, const char *name, struct stat *pstat, boolean leaf)); +boolean default_prints PARAMS((struct predicate *pred)); +boolean looks_like_expression PARAMS((const char *arg, boolean leading)); + + +enum DebugOption + { + DebugNone = 0, + DebugExpressionTree = 1, + DebugStat = 2, + DebugSearch = 4, + DebugTreeOpt = 8, + DebugHelp = 16, + DebugExec = 32, + DebugSuccessRates = 64 + }; + +struct options +{ + /* If true, process directory before contents. True unless -depth given. */ + boolean do_dir_first; + + /* If >=0, don't descend more than this many levels of subdirectories. */ + int maxdepth; + + /* If >=0, don't process files above this level. */ + int mindepth; + + /* If true, do not assume that files in directories with nlink == 2 + are non-directories. */ + boolean no_leaf_check; + + /* If true, don't cross filesystem boundaries. */ + boolean stay_on_filesystem; + + /* If true, we ignore the problem where we find that a directory entry + * no longer exists by the time we get around to processing it. + */ + boolean ignore_readdir_race; + + /* If true, pass control characters through. If false, escape them + * or turn them into harmless things. + */ + boolean literal_control_chars; + + /* If true, we issue warning messages + */ + boolean warnings; + + struct timespec start_time; /* Time at start of execution. */ + + /* Seconds between 00:00 1/1/70 and either one day before now + (the default), or the start of today (if -daystart is given). */ + time_t cur_day_start; + + /* If true, cur_day_start has been adjusted to the start of the day. */ + boolean full_days; + + int output_block_size; /* Output block size. */ + + /* bitmask for debug options */ + unsigned long debug_options; + + enum SymlinkOption symlink_handling; + + + /* Pointer to the function used to stat files. */ + int (*xstat) (const char *name, struct stat *statbuf); + + + /* Indicate if we can implement safely_chdir() using the O_NOFOLLOW + * flag to open(2). + */ + boolean open_nofollow_available; + + /* The variety of regular expression that we support. + * The default is POSIX Basic Regular Expressions, but this + * can be changed with the positional option, -regextype. + */ + int regex_options; + + /* Optimisation level. One is the default. + */ + unsigned short optimisation_level; + + + /* How should we quote filenames in error messages and so forth? + */ + enum quoting_style err_quoting_style; +}; +extern struct options options; + + +struct state +{ + /* Current depth; 0 means current path is a command line arg. */ + int curdepth; + + /* If true, we have called stat on the current path. */ + boolean have_stat; + + /* If true, we know the type of the current path. */ + boolean have_type; + mode_t type; /* this is the actual type */ + + /* The file being operated on, relative to the current directory. + Used for stat, readlink, remove, and opendir. */ + char *rel_pathname; + /* The directory fd to which rel_pathname is relative. Thsi is relevant + * when we're navigating the hierarchy with fts() and using FTS_CWDFD. + */ + int cwd_dir_fd; + + /* Length of starting path. */ + int starting_path_length; + + /* If true, don't descend past current directory. + Can be set by -prune, -maxdepth, and -xdev/-mount. */ + boolean stop_at_current_level; + + /* Status value to return to system. */ + int exit_status; + + /* True if there are any execdirs. This saves us a pair of fchdir() + * calls for every directory we leave if it is false. This is just + * an optimisation. Set to true if you want to be conservative. + */ + boolean execdirs_outstanding; +}; + +/* finddata.c */ +extern struct state state; +extern char const *starting_dir; +extern int starting_desc; +extern char *program_name; + + +#endif diff --git a/find/find.1 b/find/find.1 new file mode 100644 index 0000000..92efd8e --- /dev/null +++ b/find/find.1 @@ -0,0 +1,1472 @@ +.TH FIND 1 \" -*- nroff -*- +.SH NAME +find \- search for files in a directory hierarchy +.SH SYNOPSIS +.B find +[\-H] [\-L] [\-P] [-D debugopts] [-Olevel] [path...] [expression] +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR find . +GNU +.B find +searches the directory tree rooted at each given file name by +evaluating the given expression from left to right, according to the +rules of precedence (see section OPERATORS), until the outcome is +known (the left hand side is false for \fIand\fR operations, true for +\fIor\fR), at which point +.B find +moves on to the next file name. +.PP +If you are using +.B find +in an environment where security is important (for example if you are +using it to seach directories that are writable by other users), you +should read the "Security Considerations" chapter of the findutils +documentation, which is called \fBFinding Files\fP and comes with +findutils. That document also includes a lot more detail +and discussion than this manual page, so you may find it a more useful +source of information. +.SH OPTIONS +The `\-H', `\-L' and `\-P' options control the treatment of symbolic +links. Command-line arguments following these are taken to be names +of files or directories to be examined, up to the first argument that +begins with `\-', or the argument `(' or `!'. That argument and any +following arguments are taken to be the expression describing what is +to be searched for. If no paths are given, the current directory is +used. If no expression is given, the expression `\-print' is used +(but you should probably consider using `\-print0' instead, anyway). +.PP +This manual page talks about `options' within the expression list. +These options control the behaviour of +.B find +but are specified immediately after the last path name. The three +`real' options `\-H', `\-L' and `\-P' must appear before the first +path name, if at all. +.IP \-P +Never follow symbolic links. This is the default behaviour. When +.B find +examines or prints information a file, and the file is a symbolic +link, the information used shall be taken from the properties of the +symbolic link itself. + +.IP \-L +Follow symbolic links. When +.B find +examines or prints information about files, the information used shall +be taken from the properties of the file to which the link points, not +from the link itself (unless it is a broken symbolic link or +.B find +is unable to examine the file to which the link points). Use of this +option implies \-noleaf. If you later use the \-P option, \-noleaf +will still be in effect. If \-L is in effect and +.B find +discovers a symbolic link to a subdirectory during its search, +the subdirectory pointed to by the symbolic link will be searched. +.IP +When the \-L option is in effect, the \-type predicate will always +match against the type of the file that a symbolic link points to +rather than the link itself (unless the symbolic link is broken). +Using \-L causes the \-lname and \-ilname predicates always to return +false. + +.IP \-H +Do not follow symbolic links, except while processing the command +line arguments. When +.B find +examines or prints information about files, the information used +shall be taken from the properties of the symbolic link itself. The +only exception to this behaviour is when a file specified on the +command line is a symbolic link, and the link can be resolved. For +that situation, the information used is taken from whatever the link +points to (that is, the link is followed). The information about the +link itself is used as a fallback if the file pointed to by the +symbolic link cannot be examined. If \-H is in effect and one of the +paths specified on the command line is a symbolic link to a directory, +the contents of that directory will be examined (though of course +\-maxdepth 0 would prevent this). +.P +If more than one of \-H, \-L and \-P is specified, each overrides the +others; the last one appearing on the command line takes effect. +Since it is the default, the \-P option should be considered to be in +effect unless either \-H or \-L is specified. + +GNU +.B find +frequently stats files during the processing of the command line +itself, before any searching has begun. These options also affect how +those arguments are processed. Specifically, there are a number of +tests that compare files listed on the command line against a file we +are currently considering. In each case, the file specified on the +command line will have been examined and some of its properties will +have been saved. If the named file is in fact a symbolic link, and +the \-P option is in effect (or if neither \-H nor \-L were +specified), the information used for the comparison will be taken from +the properties of the symbolic link. Otherwise, it will be taken from +the properties of the file the link points to. If +.B find +cannot follow the link (for example because it has insufficient +privileges or the link points to a nonexistent file) the properties of +the link itself will be used. +.P +When the \-H or \-L options are in effect, any symbolic links listed +as the argument of \-newer will be dereferenced, and the timestamp +will be taken from the file to which the symbolic link points. The +same consideration applies to \-newerXY, \-anewer and \-cnewer. + +The \-follow option has a similar effect to \-L, though it takes +effect at the point where it appears (that is, if \-L is not used but +\-follow is, any symbolic links appearing after \-follow on the +command line will be dereferenced, and those before it will not). + +.IP "\-D debugoptions" +Print diagnostic information; this can be helpful to diagnose problems +with why +.B find +is not doing what you want. The list of debug options should be comma +separated. Compatibility of the debug options is not guaranteed +between releases of findutils. For a complete list of valid debug +options, see the output of +.B find \-D +.BR help . +Valid debug options include +.RS +.IP help +Explain the debugging options +.IP tree +Show the expression tree in its original and optimised form. +.IP stat +Print messages as files are examined with the +.B stat +and +.B lstat +system calls. The +.B find +program tries to minimise such calls. +.IP opt +Prints diagnostic information relating to the optimisation of the +expression tree; see the \-O option. +.IP rates +Prints a summary indicating how often each predicate succeeded or +failed. +.RE +.IP \-Olevel +Enables query optimisation. The +.B find +program reorders tests to speed up execution while preserving the +overall effect; that is, predicates with side effects are not +reordered relative to each other. The optimisations performed at each +optimisation level are as follows. +.RS +.IP 0 +Equivalent to optimisation level 1. +.IP 1 +This is the default optimisation level and corresponds to the +traditional behaviour. Expressions are reordered so that tests based +only on the names of files (for example \-name +and \-regex) are performed first. +.IP 2 +Any \-type +or \-xtype +tests are performed after any tests based only on the names of files, +but before any tests that require information from the inode. On many +modern versions of Unix, file types are returned by +.B readdir() +and so these predicates are faster to evaluate than predicates which +need to stat the file first. +.IP 3 +At this optimisation level, the full cost-based query optimiser is +enabled. The order of tests is modified so that cheap (i.e. fast) +tests are performed first and more expensive ones are performed later, +if necessary. Within each cost band, predicates are evaluated earlier +or later according to whether they are likely to succeed or not. For \-o, +predicates which are likely to succeed are evaluated earlier, and for \-a, +predicates which are likely to fail are evaluated earlier. +.RE +.IP +The cost-based optimiser has a fixed idea of how likely any given test +is to succeed. In some cases the probability takes account of the +specific nature of the test (for example, \-type f +is assumed to be more likely to succeed than \-type c). +The cost-based optimiser is currently being evaluated. If it does +not actually improve the performance of +.BR find , +it will be removed again. Conversely, optimisations that prove to be +reliable, robust and effective may be enabled at lower optimisation +levels over time. However, the default behaviour (i.e. optimisation +level 1) will not be changed in the 4.3.x release series. The +findutils test suite runs all the tests on +.B find +at each optimisation level and ensures that the result is the same. +.P +.SH EXPRESSIONS +The expression is made up of options (which affect overall operation +rather than the processing of a specific file, and always return +true), tests (which return a true or false value), and actions (which +have side effects and return a true or false value), all separated by +operators. \-and is assumed where the operator is omitted. + +If the expression contains no actions other than \-prune, \-print is +performed on all files for which the expression is true. + +.SS OPTIONS +.P +All options always return true. Except for \-follow and \-daystart, +the options affect all tests, including tests specified before the +option. This is because the options are processed when the command +line is parsed, while the tests don't do anything until files are +examined. The \-follow and \-daystart options are different in this +respect, and have an effect only on tests which appear later in the +command line. Therefore, for clarity, it is best to place them at the +beginning of the expression. A warning is issued if you don't do +this. +.IP \-daystart +Measure times (for \-amin, \-atime, \-cmin, \-ctime, \-mmin, and \-mtime) +from the beginning of today rather than from 24 hours ago. This +option only affects tests which appear later on the command line. +.IP \-depth +Process each directory's contents before the directory itself. +.IP \-d +A synonym for \-depth, for compatibility with FreeBSD, NetBSD, MacOS X and OpenBSD. +.IP \-follow +Deprecated; use the \-L option instead. Dereference symbolic links. +Implies \-noleaf. The \-follow option affects only those tests which +appear after it on the command line. Unless the \-H or \-L option has +been specified, the position of the \-follow option changes the +behaviour of the \-newer predicate; any files listed as the argument +of \-newer will be dereferenced if they are symbolic links. The same +consideration applies to \-newerXY, \-anewer and \-cnewer. Similarly, +the \-type predicate will always match against the type of the file +that a symbolic link points to rather than the link itself. Using +\-follow causes the \-lname and \-ilname predicates always to return +false. +.IP "\-help, \-\-help" +Print a summary of the command-line usage of +.B find +and exit. +.IP \-ignore_readdir_race +Normally, \fBfind\fR will emit an error message when it fails to stat a file. +If you give this option and a file is deleted between the time \fBfind\fR +reads the name of the file from the directory and the time it tries to stat +the file, no error message will be issued. This also applies to files +or directories whose names are given on the command line. This option takes +effect at the time the command line is read, which means that you cannot search +one part of the filesystem with this option on and part of it with this option +off (if you need to do that, you will need to issue two \fBfind\fR commands +instead, one with the option and one without it). +.IP "\-maxdepth \fIlevels\fR" +Descend at most \fIlevels\fR (a non-negative integer) levels of +directories below the command line arguments. `\-maxdepth 0' means +only apply the tests and actions to the command line arguments. +.IP "\-mindepth \fIlevels\fR" +Do not apply any tests or actions at levels less than \fIlevels\fR (a +non-negative integer). `\-mindepth 1' means process all files except +the command line arguments. +.IP \-mount +Don't descend directories on other filesystems. An alternate name for +\-xdev, for compatibility with some other versions of +.BR find . +.IP \-noignore_readdir_race +Turns off the effect of \-ignore_readdir_race. +.IP "\-noleaf" +Do not optimize by assuming that directories contain 2 fewer +subdirectories than their hard link count. This option is needed when +searching filesystems that do not follow the Unix directory-link +convention, such as CD-ROM or MS-DOS filesystems or AFS volume mount +points. Each directory on a normal Unix filesystem has at least 2 +hard links: its name and its `.' entry. Additionally, its +subdirectories (if any) each have a `..' entry linked to that +directory. When +.B find +is examining a directory, after it has statted 2 fewer subdirectories +than the directory's link count, it knows that the rest of the entries +in the directory are non-directories (`leaf' files in the directory +tree). If only the files' names need to be examined, there is no need +to stat them; this gives a significant increase in search speed. +.IP "\-regextype \fItype\fR" +Changes the regular expression syntax understood by +.B \-regex +and +.B \-iregex +tests which occur later on the command line. Currently-implemented +types are emacs (this is the default), posix-awk, posix-basic, +posix-egrep and posix-extended. + +.IP "\-version, \-\-version" +Print the \fBfind\fR version number and exit. +.IP "\-warn, \-nowarn" +Turn warning messages on or off. These warnings apply only to the +command line usage, not to any conditions that +.B find +might encounter when it searches directories. The default behaviour +corresponds to \-warn if standard input is a tty, and to \-nowarn +otherwise. +.IP \-xdev +Don't descend directories on other filesystems. + +.SS TESTS +Some tests, for example +.B \-newerXY +and +.BR -samefile , +allow comparison between the file currently being examined and some +reference file specified on the command line. When these tests are +used, the interpretation of the reference file is determined by the +options +.BR \-H , +.B \-L +and +.B -P +and any previous +.BR \-follow , +but the reference file is only examined once, at the time the command +line is parsed. If the reference file cannot be examined (for +example, the +.BR stat (2) +system call fails for it), an error message is issued, and +.B find +exits with a nonzero status. +.P +Numeric arguments can be specified as +.IP \fI+n\fP +for greater than +.IR n , +.IP \fI\-n\fP +for less than +.IR n , +.IP \fIn\fP +for exactly +.IR n . +.P +.IP "\-amin \fIn\fR" +File was last accessed \fIn\fR minutes ago. +.IP "\-anewer \fIfile\fR" +File was last accessed more recently than \fIfile\fR was modified. If +\fIfile\fR is a symbolic link and the \-H option or the \-L option is +in effect, the access time of the file it points to is always +used. +.IP "\-atime \fIn\fR" +File was last accessed \fIn\fR*24 hours ago. +When find figures out how many 24-hour periods ago the file +was last accessed, any fractional part is ignored, so to match +.B \-atime +.BR +1 , +a file has to have been accessed at least +.I two +days ago. +.IP "\-cmin \fIn\fR" +File's status was last changed \fIn\fR minutes ago. +.IP "\-cnewer \fIfile\fR" +File's status was last changed more recently than \fIfile\fR was +modified. If \fIfile\fR is a symbolic link and the \-H option or the +\-L option is in effect, the status-change time of the file it points +to is always used. + +.IP "\-ctime \fIn\fR" +File's status was last changed \fIn\fR*24 hours ago. +See the comments for +.B \-atime +to understand how rounding affects the interpretation of file status +change times. +.IP \-empty +File is empty and is either a regular file or a directory. +.IP \-false +Always false. +.IP "\-fstype \fItype\fR" +File is on a filesystem of type \fItype\fR. The valid filesystem +types vary among different versions of Unix; an incomplete list of +filesystem types that are accepted on some version of Unix or another +is: ufs, 4.2, 4.3, nfs, tmp, mfs, S51K, S52K. You can use \-printf +with the %F directive to see the types of your filesystems. +.IP "\-gid \fIn\fR" +File's numeric group ID is \fIn\fR. +.IP "\-group \fIgname\fR" +File belongs to group \fIgname\fR (numeric group ID allowed). +.IP "\-ilname \fIpattern\fR" +Like \-lname, but the match is case insensitive. +If the \-L option or the \-follow option is in effect, this test +returns false unless the symbolic link is broken. +.IP "\-iname \fIpattern\fR" +Like \-name, but the match is case insensitive. For example, the +patterns `fo*' and `F??' match the file names `Foo', `FOO', `foo', +`fOo', etc. In these patterns, unlike filename expansion by the +shell, an initial '.' can be matched by '*'. That is, +.B find \-name *bar +will match the file `.foobar'. Please note that you should quote +patterns as a matter of course, otherwise the shell will expand any +wildcard characters in them. + +.IP "\-inum \fIn\fR" +File has inode number \fIn\fR. It is normally easier to use the +.B \-samefile +test instead. +.IP "\-ipath \fIpattern\fR" +Behaves in the same way as \-iwholename. This option is deprecated, +so please do not use it. +.IP "\-iregex \fIpattern\fR" +Like \-regex, but the match is case insensitive. +.IP "\-iwholename \fIpattern\fR" +Like \-wholename, but the match is case insensitive. +.IP "\-links \fIn\fR" +File has \fIn\fR links. +.IP "\-lname \fIpattern\fR" +File is a symbolic link whose contents match shell pattern +\fIpattern\fR. The metacharacters do not treat `/' or `.' specially. +If the \-L option or the \-follow option is in effect, this test +returns false unless the symbolic link is broken. +.IP "\-mmin \fIn\fR" +File's data was last modified \fIn\fR minutes ago. +.IP "\-mtime \fIn\fR" +File's data was last modified \fIn\fR*24 hours ago. +See the comments for +.B \-atime +to understand how rounding affects the interpretation of file +modification times. +.IP "\-name \fIpattern\fR" +Base of file name (the path with the leading directories removed) +matches shell pattern \fIpattern\fR. The metacharacters (`*', `?', +and `[]') match a `.' at the start of the base name (this is a change +in findutils-4.2.2; see section STANDARDS CONFORMANCE below). To ignore a +directory and the files under it, use \-prune; see an example in the +description of \-wholename. Braces are not recognised as being +special, despite the fact that some shells including Bash imbue braces +with a special meaning in shell patterns. The filename matching is +performed with the use of the +.BR fnmatch (3) +library function. Don't forget to enclose the pattern in quotes +in order to protect it from expansion by the shell. + +.IP "\-newer \fIfile\fR" +File was modified more recently than \fIfile\fR. If \fIfile\fR is a +symbolic link and the \-H option or the \-L option is in effect, the +modification time of the file it points to is always used. +.IP "\-newerXY \fIreference\fR" +Compares the timestamp of the current file with \fIreference\fR. +The +.I reference +argument is normally the name of a file (and one of its timestamps is +used for the comparison) but it may also be a string describing an +absolute time. +.I X +and +.I Y +are placeholders for other letters, and these letters select which +time belonging to +how +.I reference +is used for the comparison. +.TS +ll +ll +ll +ll +llw(2i). +a The access time of the file \fIreference\fR +B The birth time of the file \fIreference\fR +c The inode status change time of \fIreference\fR +m The modification time of the file \fIreference\fR +t \fIreference\fR is interpreted directly as a time +.TE + +Some combinations are invalid; for example, it is invalid for +.I X +to be +.IR t . +Some combinations are not implemented on all systems; for example +.I B +is not supported on all systems. If an invalid or unsupported +combination of +.I XY +is specified, a fatal error results. Time specifications are +interpreted as for the argument to the \-d option of GNU +.BR date . +If you try to use the birth time of a reference file, and the birth +time cannot be determined, a fatal error message results. If you +specify a test which refers to the birth time of files being examined, +this test will fail for any files where the birth time is unknown. +.IP \-nouser +No user corresponds to file's numeric user ID. +.IP \-nogroup +No group corresponds to file's numeric group ID. +.IP "\-path \fIpattern\fR" +See \-wholename. The predicate \-path is also supported by HP-UX +.BR find . +.IP "\-perm \fImode\fR" +File's permission bits are exactly \fImode\fR (octal or symbolic). +Since an exact match is required, if you want to use this form for +symbolic modes, you may have to specify a rather complex mode string. +For example '\-perm g=w' will only match files which have mode 0020 +(that is, ones for which group write permission is the only permission +set). It is more likely that you will want to use the '/' or '-' +forms, for example '\-perm \-g=w', which matches any file with group +write permission. See the +.B EXAMPLES +section for some illustrative examples. +.IP "\-perm \-\fImode\fR" +All of the permission bits \fImode\fR are set for the file. +Symbolic modes are accepted in this form, and this is usually the way +in which would want to use them. You must specify 'u', 'g' or 'o' if +you use a symbolic mode. See the +.B EXAMPLES +section for some illustrative examples. +.IP "\-perm /\fImode\fR" +Any of the permission bits \fImode\fR are set for the file. Symbolic +modes are accepted in this form. You must specify 'u', 'g' or 'o' if +you use a symbolic mode. See the +.B EXAMPLES +section for some illustrative examples. If no permission bits in +.I mode +are set, this test currently matches no files. However, it will soon +be changed to match any file (the idea is to be more consistent with +the behaviour of +.B perm +.BR \-000 ). +.IP "\-perm +\fImode\fR" +Deprecated, old way of searching for files with any of the permission +bits in \fImode\fR set. You should use +.B \-perm \fI/mode\fR +instead. Trying to use the '+' syntax with symbolic modes will yield +surprising results. For example, '+u+x' is a valid symbolic mode +(equivalent to +u,+x, i.e. 0111) and will therefore not be evaluated +as +.B \-perm +\fImode\fR +but instead as the exact mode specifier +.B \-perm \fImode\fR +and so it matches files with exact permissions 0111 instead of files with any +execute bit set. If you found this paragraph confusing, you're not +alone - just use +.B \-perm /\fImode\fR. +This form of the +.B \-perm +test is deprecated because the POSIX specification requires the +interpretation of a leading '+' as being part of a symbolic mode, and +so we switched to using '/' instead. +.IP "\-readable, \-writable, \-executable" +Matches files which are readable, writable and executable, +respectively. This takes into account access control lists and other +permissions artefacts which the +.B \-perm +test ignores. This test makes use of the +.BR access (2) +system call, and so can be fooled by NFS servers which do UID +mapping (or root-squashing), since many systems implement +.BR access (2) +in the client's kernel and so cannot make use of the UID mapping +information held on the server. +.IP "\-regex \fIpattern\fR" +File name matches regular expression \fIpattern\fR. This is a match +on the whole path, not a search. For example, to match a file named +`./fubar3', you can use the regular expression `.*bar.' or `.*b.*3', +but not `f.*r3'. The regular expressions understood by +.B find +are by default Emacs Regular Expressions, but this can be +changed with the +.B \-regextype +option. +.IP "\-samefile \fIname\fR" +File refers to the same inode as \fIname\fR. When \-L is in effect, +this can include symbolic links. +.IP "\-size \fIn\fR[cwbkMG]" +File uses \fIn\fP units of space. The following suffixes +can be used: +.RS +.IP `b' +for 512-byte blocks (this is the default if no suffix is used) +.IP `c' +for bytes +.IP `w' +for two-byte words +.IP `k' +for Kilobytes (units of 1024 bytes) +.IP `M' +for Megabytes (units of 1048576 bytes) +.IP `G' +for Gigabytes (units of 1073741824 bytes) +.RE +.IP +The size does not count indirect blocks, but it does count blocks in +sparse files that are not actually allocated. Bear in mind that the +`%k' and `%b' format specifiers of \-printf handle sparse files +differently. The `b' suffix always denotes 512-byte blocks and never +1 Kilobyte blocks, which is different to the behaviour of \-ls. + +.IP \-true +Always true. +.IP "\-type \fIc\fR" +File is of type \fIc\fR: +.RS +.IP b +block (buffered) special +.IP c +character (unbuffered) special +.IP d +directory +.IP p +named pipe (FIFO) +.IP f +regular file +.IP l +symbolic link; this is never true if the \-L option or the \-follow +option is in effect, unless the symbolic link is broken. If you want +to search for symbolic links when \-L is in effect, use \-xtype. +.IP s +socket +.IP D +door (Solaris) +.RE +.IP "\-uid \fIn\fR" +File's numeric user ID is \fIn\fR. +.IP "\-used \fIn\fR" +File was last accessed \fIn\fR days after its status was last changed. +.IP "\-user \fIuname\fR" +File is owned by user \fIuname\fR (numeric user ID allowed). +.IP "\-wholename \fIpattern\fR" +File name matches shell pattern \fIpattern\fR. The metacharacters do +not treat `/' or `.' specially; so, for example, +.br +.in +1i +find . \-wholename './sr*sc' +.br +.in -1i +will print an entry for a directory called './src/misc' (if one +exists). To ignore a whole directory tree, use \-prune rather than +checking every file in the tree. For example, to skip the +directory `src/emacs' and all files and directories under it, and +print the names of the other files found, do something like this: +.br +.in +1i +find . \-wholename './src/emacs' \-prune \-o \-print +.br +.in -1i +.IP "\-xtype \fIc\fR" +The same as \-type unless the file is a symbolic link. For symbolic +links: if the \-H or \-P option was specified, true if the file is a +link to a file of type \fIc\fR; if the \-L option has been given, true +if \fIc\fR is `l'. In other words, for symbolic links, \-xtype checks +the type of the file that \-type does not check. + +.SS ACTIONS +.IP "\-delete\fR" +Delete files; true if removal succeeded. If the removal failed, an +error message is issued. Use of this action automatically turns on +the '\-depth' option. + +.IP "\-exec \fIcommand\fR ;" +Execute \fIcommand\fR; true if 0 status is returned. All following +arguments to +.B find +are taken to be arguments to the command until an argument consisting +of `;' is encountered. The string `{}' is replaced by the current +file name being processed everywhere it occurs in the arguments to the +command, not just in arguments where it is alone, as in some versions +of +.BR find . +Both of these constructions might need to be escaped (with a `\e') or +quoted to protect them from expansion by the shell. See the +.B EXAMPLES +section for examples of the use of the `\-exec' option. The specified +command is run once for each matched file. +The command is executed in the starting directory. There are +unavoidable security problems surrounding use of the \-exec option; +you should use the \-execdir option instead. + +.IP "\-exec \fIcommand\fR {} +" +This variant of the \-exec option runs the specified command on the +selected files, but the command line is built by appending each +selected file name at the end; the total number of invocations of the +command will be much less than the number of matched files. The +command line is built in much the same way that +.B xargs +builds its command lines. Only one instance of '{}' is allowed within +the command. The command is executed in the starting directory. + +.IP "\-execdir \fIcommand\fR ;" +.IP "\-execdir \fIcommand\fR {} +" +Like \-exec, but the specified command is run from the subdirectory +containing the matched file, which is not normally the directory in +which you started +.BR find . +This a much more secure method for invoking commands, as it avoids +race conditions during resolution of the paths to the matched files. +As with the \-exec option, the '+' form of \-execdir will build a +command line to process more than one matched file, but any given +invocation of +.I command +will only list files that exist in the same subdirectory. If you use +this option, you must ensure that your +.B $PATH +environment variable does not reference the current directory; +otherwise, an attacker can run any commands they like by leaving an +appropriately-named file in a directory in which you will run +\-execdir. + +.IP "\-fls \fIfile\fR" +True; like \-ls but write to \fIfile\fR like \-fprint. +The output file is always created, even if the predicate is never +matched. +See the +.B UNUSUAL FILENAMES +section for information about how unusual characters in filenames are handled. + +.IP "\-fprint \fIfile\fR" +True; print the full file name into file \fIfile\fR. If \fIfile\fR +does not exist when \fBfind\fR is run, it is created; if it does +exist, it is truncated. The file names ``/dev/stdout'' and +``/dev/stderr'' are handled specially; they refer to the standard +output and standard error output, respectively. +The output file is always created, even if the predicate is never matched. +See the +.B UNUSUAL FILENAMES +section for information about how unusual characters in filenames are handled. +.IP "\-fprint0 \fIfile\fR" +True; like \-print0 but write to \fIfile\fR like \-fprint. +The output file is always created, even if the predicate is never matched. +See the +.B UNUSUAL FILENAMES +section for information about how unusual characters in filenames are handled. +.IP "\-fprintf \fIfile\fR \fIformat\fR" +True; like \-printf but write to \fIfile\fR like \-fprint. +The output file is always created, even if the predicate is never matched. +See the +.B UNUSUAL FILENAMES +section for information about how unusual characters in filenames are handled. +.IP "\-ok \fIcommand\fR ;" +Like \-exec but ask the user first (on the standard input); if the +response does not start with `y' or `Y', do not run the command, and +return false. If the command is run, its standard input is redirected +from +.BR /dev/null . + +.IP \-print +True; print the full file name on the standard output, followed by a +newline. If you are piping the output of +.B find +into another program and there is the faintest possibility that the files +which you are searching for might contain a newline, then you should +seriously consider using the `\-print0' option instead of `\-print'. +See the +.B UNUSUAL FILENAMES +section for information about how unusual characters in filenames are handled. +.IP "\-okdir \fIcommand\fR ;" +Like \-execdir but ask the user first (on the standard input); if the +response does not start with `y' or `Y', do not run the command, and +return false. If the command is run, its standard input is redirected +from +.BR /dev/null . +.IP \-print0 +True; print the full file name on the standard output, followed by a +null character (instead of the newline character that `\-print' uses). +This allows file names that contain newlines or other types of white +space to be correctly interpreted by programs that process the +\fBfind\fR output. This option corresponds to the `\-0' option of +.BR xargs . +.IP "\-printf \fIformat\fR" +True; print \fIformat\fR on the standard output, interpreting `\e' +escapes and `%' directives. Field widths and precisions can be +specified as with the `printf' C function. Please note that many of +the fields are printed as %s rather than %d, and this may mean that +flags don't work as you might expect. This also means that the `\-' +flag does work (it forces fields to be left-aligned). Unlike \-print, +\-printf does not add a newline at the end of the string. The escapes +and directives are: +.RS +.IP \ea +Alarm bell. +.IP \eb +Backspace. +.IP \ec +Stop printing from this format immediately and flush the output. +.IP \ef +Form feed. +.IP \en +Newline. +.IP \er +Carriage return. +.IP \et +Horizontal tab. +.IP \ev +Vertical tab. +.IP \e\0 +ASCII NUL. +.IP \e\e +A literal backslash (`\e'). +.IP \eNNN +The character whose ASCII code is NNN (octal). +.PP +A `\e' character followed by any other character is treated as an +ordinary character, so they both are printed. +.IP %% +A literal percent sign. +.IP %a +File's last access time in the format returned by the C `ctime' function. +.IP %A\fIk\fP +File's last access time in the format specified by \fIk\fR, which is +either `@' or a directive for the C `strftime' function. The possible +values for \fIk\fR are listed below; some of them might not be +available on all systems, due to differences in `strftime' between +systems. +.RS +.IP @ +seconds since Jan. 1, 1970, 00:00 GMT. +.PP +Time fields: +.IP H +hour (00..23) +.IP I +hour (01..12) +.IP k +hour ( 0..23) +.IP l +hour ( 1..12) +.IP M +minute (00..59) +.IP p +locale's AM or PM +.IP r +time, 12-hour (hh:mm:ss [AP]M) +.IP S +second (00..61) +.IP T +time, 24-hour (hh:mm:ss) +.IP + +Date and time, separated by '+', for example `2004\-04\-28+22:22:05'. +The time is given in the current timezone (which may be affected by +setting the TZ environment variable). This is a GNU extension. +.IP X +locale's time representation (H:M:S) +.IP Z +time zone (e.g., EDT), or nothing if no time zone is determinable +.PP +Date fields: +.IP a +locale's abbreviated weekday name (Sun..Sat) +.IP A +locale's full weekday name, variable length (Sunday..Saturday) +.IP b +locale's abbreviated month name (Jan..Dec) +.IP B +locale's full month name, variable length (January..December) +.IP c +locale's date and time (Sat Nov 04 12:02:33 EST 1989) +.IP d +day of month (01..31) +.IP D +date (mm/dd/yy) +.IP h +same as b +.IP j +day of year (001..366) +.IP m +month (01..12) +.IP U +week number of year with Sunday as first day of week (00..53) +.IP w +day of week (0..6) +.IP W +week number of year with Monday as first day of week (00..53) +.IP x +locale's date representation (mm/dd/yy) +.IP y +last two digits of year (00..99) +.IP Y +year (1970...) +.RE +.IP %b +The amount of disk space used for this file in 512-byte blocks. Since disk +space is allocated in multiples of the filesystem block size this is usually +greater than %s/512, but it can also be smaller if the file is a sparse file. +.IP %c +File's last status change time in the format returned by the C `ctime' +function. +.IP %C\fIk\fP +File's last status change time in the format specified by \fIk\fR, +which is the same as for %A. +.IP %d +File's depth in the directory tree; 0 means the file is a command line +argument. +.IP %D +The device number on which the file exists (the st_dev field of struct +stat), in decimal. +.IP %f +File's name with any leading directories removed (only the last element). +.IP %F +Type of the filesystem the file is on; this value can be used for +\-fstype. +.IP %g +File's group name, or numeric group ID if the group has no name. +.IP %G +File's numeric group ID. +.IP %h +Leading directories of file's name (all but the last element). +If the file name contains no slashes (since it is in the current +directory) the %h specifier expands to ".". +.IP %H +Command line argument under which file was found. +.IP %i +File's inode number (in decimal). +.IP %k +The amount of disk space used for this file in 1K blocks. Since disk space is +allocated in multiples of the filesystem block size this is usually greater +than %s/1024, but it can also be smaller if the file is a sparse file. +.IP %l +Object of symbolic link (empty string if file is not a symbolic link). +.IP %m +File's permission bits (in octal). This option uses the 'traditional' +numbers which most Unix implementations use, but if your particular +implementation uses an unusual ordering of octal permissions bits, you +will see a difference between the actual value of the file's mode and +the output of %m. Normally you will want to have a leading +zero on this number, and to do this, you should use the +.B # +flag (as in, for example, '%#m'). +.IP %M +File's permissions (in symbolic form, as for +.BR ls ). +This directive is supported in findutils 4.2.5 and later. +.IP %n +Number of hard links to file. +.IP %p +File's name. +.IP %P +File's name with the name of the command line argument under which +it was found removed. +.IP %s +File's size in bytes. +.IP %S +File's sparseness. This is calculated as (BLOCKSIZE*st_blocks / +st_size). The exact value you will get for an ordinary file of a +certain length is system-dependent. However, normally sparse files +will have values less than 1.0, and files which use indirect blocks +may have a value which is greater than 1.0. The value used for +BLOCKSIZE is system-dependent, but is usually 512 bytes. If the file +size is zero, the value printed is undefined. On systems which lack +support for st_blocks, a file's sparseness is assumed to be 1.0. +.IP %t +File's last modification time in the format returned by the C `ctime' +function. +.IP %T\fIk\fP +File's last modification time in the format specified by \fIk\fR, +which is the same as for %A. +.IP %u +File's user name, or numeric user ID if the user has no name. +.IP %U +File's numeric user ID. +.IP %y +File's type (like in ls \-l), U=unknown type (shouldn't happen) +.IP %Y +File's type (like %y), plus follow symlinks: L=loop, N=nonexistent +.PP +A `%' character followed by any other character is discarded, but the +other character is printed (don't rely on this, as further format +characters may be introduced). A `%' at the end of the format +argument causes undefined behaviour since there is no following +character. In some locales, it may hide your door keys, while in +others it may remove the final page from the novel you are reading. + +The %m and %d directives support the +.B # +, +.B 0 +and +.B + +flags, but the other directives do not, even if they +print numbers. Numeric directives that do not support these flags +include +.BR G , +.BR U , +.BR b , +.BR D , +.B k +and +.BR n . +The `\-' format flag is supported and changes the alignment of a field +from right-justified (which is the default) to left-justified. +.PP +See the +.B UNUSUAL FILENAMES +section for information about how unusual characters in filenames are handled. + + +.RE +.IP \-prune +If \-depth is not given, true; if the file is a directory, do not descend +into it. +.br +If \-depth is given, false; no effect. + +.IP "\-quit" +Exit immediately. No child processes will be left running, but no more +paths specified on the command line will be processed. For example, +.B find /tmp/foo /tmp/bar \-print \-quit +will print only +.BR /tmp/foo . +Any command lines which have been built up with +.B \-execdir ... {} + +will be invoked before +.B find +exits. The exit status may or may not be zero, depending on whether +an error has already occurred. + +.IP \-ls +True; list current file in `ls \-dils' format on standard output. +The block counts are of 1K blocks, unless the environment variable +POSIXLY_CORRECT is set, in which case 512-byte blocks are used. +See the +.B UNUSUAL FILENAMES +section for information about how unusual characters in filenames are handled. + + +.SS UNUSUAL FILENAMES +Many of the actions of +.B find +result in the printing of data which is under the control of other +users. This includes file names, sizes, modification times and so +forth. File names are a potential problem since they can contain any +character except '\\0' and '/'. Unusual characters in file names can +do unexpected and often undesirable things to your terminal (for +example, changing the settings of your function keys on some +terminals). Unusual characters are handled differently by various +actions, as described below. +.IP "\-print0, \-fprint0\" +Always print the exact filename, unchanged, even if the output is +going to a terminal. +.IP "\-ls, \-fls" +Unusual characters are always escaped. White space, backslash, and +double quote characters are printed using C-style escaping (for +example '\\f', '\\"'). Other unusual characters are printed using an +octal escape. Other printable characters (for \-ls and \-fls these are +the characters between octal 041 and 0176) are printed as-is. +.IP "\-printf, \-fprintf" +If the output is not going to a terminal, it is printed as-is. +Otherwise, the result depends on which directive is in use. The +directives %D, %F, %g, %G, %H, %Y, and %y expand to values which are +not under control of files' owners, and so are printed as-is. The +directives %a, %b, %c, %d, %i, %k, %m, %M, %n, %s, %t, %u and %U have +values which are under the control of files' owners but which cannot +be used to send arbitrary data to the terminal, and so these are +printed as-is. The directives %f, %h, %l, %p and %P are quoted. This +quoting is performed in the same way as for GNU +.BR ls . +This is not the same quoting mechanism as the one used for \-ls and +\-fls. If you are able to decide what format to use for the output +of +.B find +then it is normally better to use '\\0' as a terminator +than to use newline, as file names can contain white space and newline +characters. +.IP "\-print, \-fprint" +Quoting is handled in the same way as for \-printf and \-fprintf. +If you are using +.B find +in a script or in a situation where the matched files might have +arbitrary names, you should consider using \-print0 instead of +\-print. +.P +The \-ok and \-okdir actions print the current filename as-is. This +may change in a future release. +.SS OPERATORS +.P +Listed in order of decreasing precedence: +.IP "( \fIexpr\fR )" +Force precedence. +.IP "! \fIexpr\fR" +True if \fIexpr\fR is false. +.IP "\-not \fIexpr\fR" +Same as ! \fIexpr\fR, but not POSIX compliant. +.IP "\fIexpr1 expr2\fR" +Two expressions in a row are taken to be joined with an +implied "and"; \fIexpr2\fR is not evaluated if \fIexpr1\fR is false. +.IP "\fIexpr1\fR \-a \fIexpr2\fR" +Same as \fIexpr1 expr2\fR. +.IP "\fIexpr1\fR \-and \fIexpr2\fR" +Same as \fIexpr1 expr2\fR, but not POSIX compliant. +.IP "\fIexpr1\fR \-o \fIexpr2\fR" +Or; \fIexpr2\fR is not evaluated if \fIexpr1\fR is true. +.IP "\fIexpr1\fR \-or \fIexpr2\fR" +Same as \fIexpr1\fR \-o \fIexpr2\fR, but not POSIX compliant. +.IP "\fIexpr1\fR , \fIexpr2\fR" +List; both \fIexpr1\fR and \fIexpr2\fR are always evaluated. +The value of \fIexpr1\fR is discarded; the value of the list is the +value of \fIexpr2\fR. +The comma operator can be useful for searching for several +different types of thing, but traversing the filesystem hierarchy only +once. The +.B \-fprintf +action can be used to list the various matched items into several +different output files. + + +.SH "STANDARDS CONFORMANCE" +The following options are specified in the POSIX standard +(IEEE Std 1003.1, 2003 Edition): +.IP "\-H" +This option is supported. +.IP "\-L" +This option is supported. +.IP "\-name" +This option is supported, but POSIX conformance depends on the +POSIX conformance of the system's +.BR fnmatch (3) +library function. As of findutils-4.2.2, shell metacharacters +('*'. '?' or '[]' for example) will match a leading '.', because +IEEE PASC interpretation 126 requires this. This is a change from +previous versions of findutils. +.IP "\-type" +Supported. POSIX specifies `b', `c', `d', `l', `p', `f' and `s'. +GNU find also supports `D', representing a Door, where the OS provides these. + +.IP "\-ok" +Supported. Interpretation of the response is not locale-dependent +(see ENVIRONMENT VARIABLES). + +.IP "\-newer" +Supported. If the file specified is a symbolic link, it is always +dereferenced. This is a change from previous behaviour, which used to +take the relevant time from the symbolic link; see the HISTORY section +below. + +.IP "Other predicates" +The predicates +`\-atime', +`\-ctime', +`\-depth', +`\-group', +`\-links', +`\-mtime', +`\-nogroup', +`\-nouser', +`\-perm', +`\-print', +`\-prune', +`\-size', +`\-user' and +`\-xdev', +are all supported. + +.P +The POSIX standard specifies parentheses `(', `)', negation `!' and the +`and' and `or' operators (`\-a', `\-o'). +.P +All other options, predicates, expressions and so forth are extensions +beyond the POSIX standard. Many of these extensions are not unique to +GNU find, however. +.P +The POSIX standard requires that +.IP +The +.B find +utility shall detect infinite loops; that is, entering a +previously visited directory that is an ancestor of the last file +encountered. When it detects an infinite loop, find shall write a +diagnostic message to standard error and shall either recover its +position in the hierarchy or terminate. +.P +The link count of directories which contain entries which are hard +links to an ancestor will often be lower than they otherwise should +be. This can mean that GNU find will sometimes optimise away the +visiting of a subdirectory which is actually a link to an ancestor. +Since +.B find +does not actually enter such a subdirectory, it is allowed to avoid +emitting a diagnostic message. Although this behaviour may be +somewhat confusing, it is unlikely that anybody actually depends on +this behaviour. If the leaf optimisation has been turned off with +.BR \-noleaf , +the directory entry will always be examined and the diagnostic message +will be issued where it is appropriate. Symbolic links cannot be used +to create filesystem cycles as such, but if the \-L option or the +\-follow option is in use, a diagnostic message is issued when +.B find +encounters a loop of symbolic links. As with loops containing hard +links, the leaf optimisation will often mean that +.B find +knows that it doesn't need to call +.I stat() +or +.I chdir() +on the symbolic link, so this diagnostic is frequently not necessary. +.P +The \-d option is supported for compatibility with various BSD systems, +but you should use the POSIX-compliant option \-depth instead. +.P +The POSIXLY_CORRECT environment variable does not affect the behaviour +of the \-regex or \-iregex tests because those tests aren't specified in +the POSIX standard. +.SH "ENVIRONMENT VARIABLES" +.IP LANG +Provides a default value for the internationalization variables that +are unset or null. +.IP LC_ALL +If set to a non-empty string value, override the values of all the +other internationalization variables. +.IP LC_COLLATE +The POSIX standard specifies that this variable affects the pattern +matching to be used for the `\-name' option. GNU find uses the +.BR fnmatch (3) +library function, and so support for `LC_COLLATE' depends on the +system library. +.IP +POSIX also specifies that the `LC_COLLATE' environment +variable affects the interpretation of the user's response to the +query issued by `\-ok', but this is not the case for GNU find. +.IP LC_CTYPE +This variable affects the treatment of character classes used with +the `\-name' test, if the system's +.BR fnmatch (3) +library function supports this. It has no effect on the behaviour +of the `\-ok' expression. +.IP LC_MESSAGES +Determines the locale to be used for internationalised messages. +.IP NLSPATH +Determines the location of the internationalisation message catalogues. +.IP PATH +Affects the directories which are searched to find the executables +invoked by `\-exec', `\-execdir', `\-ok' and `\-okdir'. +.IP POSIXLY_CORRECT +Determines the block size used by `\-ls' and `\-fls'. +If `POSIXLY_CORRECT' is set, blocks are units of 512 bytes. Otherwise +they are units of 1024 bytes. +.IP TZ +Affects the time zone used for some of the time-related format +directives of \-printf and \-fprintf. +.SH "EXAMPLES" +.nf +.B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f + +.fi +Find files named +.B core +in or below the directory +.B /tmp +and delete them. Note that this will work incorrectly if there are +any filenames containing newlines, single or double quotes, or spaces. +.P +.B find /tmp \-name core \-type f \-print0 | xargs \-0 /bin/rm \-f + +.fi +Find files named +.B core +in or below the directory +.B /tmp +and delete them, processing filenames in such a way that file or +directory names containing single or double quotes, spaces or newlines +are correctly handled. The +.B \-name +test comes before the +.B \-type +test in order to avoid having to call +.B stat(2) +on every file. + +.P +.nf +.B find . \-type f \-exec file '{}' \e\; + +.fi +Runs `file' on every file in or below the current directory. Notice +that the braces are enclosed in single quote marks to protect them +from interpretation as shell script punctuation. The semicolon is +similarly protected by the use of a backslash, though ';' could have +been used in that case also. + +.P +.nf +.B find / \t\e( \-perm \-4000 \-fprintf /root/suid.txt '%#m %u %p\en' \e) , \e +.B \t\t\e( \-size +100M \-fprintf /root/big.txt '%\-10s %p\en' \e) + +.fi +Traverse the filesystem just once, listing setuid files and +directories into +.B /root/suid.txt +and large files into +.BR /root/big.txt . + +.P +.nf +.B find $HOME \-mtime 0 + +.fi +Search for files in your home directory which have been modified in +the last twenty-four hours. This command works this way because the +time since each file was last modified is divided by 24 hours and any +remainder is discarded. That means that to match +.B \-mtime +.BR 0 , +a file will have to have a modification in the past which is less than +24 hours ago. + +.P +.nf +.B find /sbin /usr/sbin -executable \e! -readable \-print + +.fi +Search for files which are executable but not readable. + +.P +.nf +.B find . \-perm 664 + +.fi +Search for files which have read and write permission for their owner, +and group, but which other users can read but not write to. Files +which meet these criteria but have other permissions bits set (for +example if someone can execute the file) will not be matched. + +.P +.nf +.B find . \-perm -664 + +.fi +Search for files which have read and write permission for their owner +and group, and which other users can read, without regard to the +presence of any extra permission bits (for example the executable +bit). This will match a file which has mode 0777, for example. + +.P +.nf +.B find . \-perm /222 + +.fi +Search for files which are writable by somebody (their owner, or +their group, or anybody else). + +.P +.nf +.B find . \-perm /220 +.B find . \-perm /u+w,g+w +.B find . \-perm /u=w,g=w + +.fi +All three of these commands do the same thing, but the first one uses +the octal representation of the file mode, and the other two use the +symbolic form. These commands all search for files which are +writable by either their owner or their group. The files don't have +to be writable by both the owner and group to be matched; either will +do. + +.P +.nf +.B find . \-perm -220 +.B find . \-perm \-g+w,u+w + +.fi +Both these commands do the same thing; search for files which are +writable by both their owner and their group. + +.P +.nf +.B find . \-perm \-444 \-perm /222 ! \-perm /111 +.B find . \-perm \-a+r \-perm /a+w ! \-perm /a+x + +.fi +These two commands both search for files that are readable for +everybody (\-perm \-444 or \-perm \-a+r), have at least on write bit +set (\-perm /222 or \-perm /a+w) but are not executable for anybody (! +\-perm /111 and ! \-perm /a+x respectively) + +.SH EXIT STATUS +.PP +.B find +exits with status 0 if all files are processed successfully, greater +than 0 if errors occur. This is deliberately a very broad +description, but if the return value is non-zero, you should not rely +on the correctness of the results of +.BR find . + +.SH "SEE ALSO" +\fBlocate\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), \fBxargs\fP(1), +\fBchmod\fP(1), \fBfnmatch\fP(3), \fBregex\fP(7), \fBstat\fP(2), +\fBlstat\fP(2), \fBls\fP(1), \fBprintf\fP(3), \fBstrftime\fP(3), +\fBctime\fP(3), \fBFinding Files\fP (on-line in Info, or printed). +.SH "HISTORY" +As of findutils-4.2.2, shell metacharacters ('*'. '?' or '[]' for +example) used in filename patterns will match a leading '.', because +IEEE POSIX interpretation 126 requires this. +.P +The syntax +\.B -perm +MODE +was deprecated in findutils-4.2.21, in favour of +\.B -perm +.BR /MODE . +As of findutils-4.3.3, +.B \-perm /000 +now matches all files instead of none. +.P +Nanosecond-resolution +timestamps were implemented in findutils-4.3.3. +.TS +l l l . +Feature Added in Also occurs in +\-newerXY 4.3.3 BSD +\-D 4.3.1 +\-O 4.3.1 +\-readable 4.3.0 +\-writable 4.3.0 +\-executable 4.3.0 +\-regextype 4.2.24 +\-exec ... + 4.2.12 POSIX +\-execdir 4.2.12 BSD +\-okdir 4.2.12 +\-samefile 4.2.11 +\-H 4.2.5 POSIX +\-L 4.2.5 POSIX +\-P 4.2.5 BSD +\-delete 4.2.3 +\-quit 4.2.3 +\-d 4.2.3 BSD +\-wholename 4.2.0 +-\iwholename 4.2.0 +\-ignore_readdir_race 4.2.0 +\-fls 4.0 +\-ilname 3.8 +\-iname 3.8 +\-ipath 3.8 +\-iregex 3.8 +.TE +.SH "NON-BUGS" +.nf +.B $ find . \-name *.c \-print +find: paths must precede expression +Usage: find [-H] [-L] [-P] [path...] [expression] +.fi +.P +This happens because +.I *.c +has been expanded by the shell +resulting in +.B find +actually receiving a command line like this: +.nf + +.B find . \-name bigram.c code.c frcode.c locate.c \-print + +.fi +That command is of course not going to work. Instead of doing things +this way, you should enclose the pattern in quotes or escape the wildcard: +.nf +.B $ find . \-name \e*.c \-print +.fi + +.SH "BUGS" +.P +There are security problems inherent in the behaviour that the POSIX +standard specifies for +.BR find , +which therefore cannot be fixed. For example, the \-exec action is +inherently insecure, and \-execdir should be used instead. +Please see \fBFinding Files\fP for more information. +.P +The environment variable +.B LC_COLLATE +has no effect on the +.B \-ok +action. +.P +The best way to report a bug is to use the form at +http://savannah.gnu.org/bugs/?group=findutils. +The reason for this is that you will then be able to track progress in +fixing the problem. Other comments about \fBfind\fP(1) and about +the findutils package in general can be sent to the +.I bug\-findutils +mailing list. To join the list, send email to +.IR bug\-findutils\-request@gnu.org . diff --git a/find/find.c b/find/find.c new file mode 100644 index 0000000..00f85e7 --- /dev/null +++ b/find/find.c @@ -0,0 +1,1514 @@ +/* find -- search for files in a directory hierarchy + Copyright (C) 1990, 91, 92, 93, 94, 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.*/ + +/* GNU find was written by Eric Decker , + with enhancements by David MacKenzie , + Jay Plett , + and Tim Wood . + The idea for -print0 and xargs -0 came from + Dan Bernstein . + Improvements have been made by James Youngman . +*/ + + +#include +#include "defs.h" + +#define USE_SAFE_CHDIR 1 +#undef STAT_MOUNTPOINTS + + +#include +#include + + +#ifdef HAVE_FCNTL_H +#include +#else +#include +#endif +#include + +#include "xalloc.h" +#include "human.h" +#include "canonicalize.h" +#include + +#include "closeout.h" +#include "savedirinfo.h" +#include "buildcmd.h" +#include "dirname.h" +#include "quote.h" +#include "quotearg.h" +#include "xgetcwd.h" +#include "error.h" + +#ifdef HAVE_LOCALE_H +#include +#endif + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + +#ifdef STAT_MOUNTPOINTS +static void init_mounted_dev_list(int mandatory); +#endif + +static void process_top_path PARAMS((char *pathname, mode_t mode)); +static int process_path PARAMS((char *pathname, char *name, boolean leaf, char *parent, mode_t type)); +static void process_dir PARAMS((char *pathname, char *name, int pathlen, const struct stat *statp, char *parent)); + + + +/* Name this program was run with. */ +char *program_name; + +/* A file descriptor open to the initial working directory. + Doing it this way allows us to work when the i.w.d. has + unreadable parents. */ +int starting_desc; + +/* The stat buffer of the initial working directory. */ +static struct stat starting_stat_buf; + +enum ChdirSymlinkHandling + { + SymlinkHandleDefault, /* Normally the right choice */ + SymlinkFollowOk /* see comment in process_top_path() */ + }; + + +enum TraversalDirection + { + TraversingUp, + TraversingDown + }; + +enum WdSanityCheckFatality + { + FATAL_IF_SANITY_CHECK_FAILS, + RETRY_IF_SANITY_CHECK_FAILS, + NON_FATAL_IF_SANITY_CHECK_FAILS + }; + + +int get_current_dirfd(void) +{ + return AT_FDCWD; +} + + +int +main (int argc, char **argv) +{ + int i; + int end_of_leading_options = 0; /* First arg after any -H/-L etc. */ + struct predicate *eval_tree; + + program_name = argv[0]; + state.exit_status = 0; + + /* Set the option defaults before we do the the locale + * initialisation as check_nofollow() needs to be executed in the + * POSIX locale. + */ + set_option_defaults(&options); + +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + atexit (close_stdout); + + /* Check for -P, -H or -L options. */ + end_of_leading_options = process_leading_options(argc, argv); + + if (options.debug_options & DebugStat) + options.xstat = debug_stat; + +#ifdef DEBUG + fprintf (stderr, "cur_day_start = %s", ctime (&options.cur_day_start)); +#endif /* DEBUG */ + + /* state.cwd_dir_fd has to be initialised before we call build_expression_tree() + * because command-line parsing may lead us to stat some files. + */ + state.cwd_dir_fd = AT_FDCWD; + + /* We are now processing the part of the "find" command line + * after the -H/-L options (if any). + */ + eval_tree = build_expression_tree(argc, argv, end_of_leading_options); + + + /* safely_chdir() needs to check that it has ended up in the right place. + * To avoid bailing out when something gets automounted, it checks if + * the target directory appears to have had a directory mounted on it as + * we chdir()ed. The problem with this is that in order to notice that + * a filesystem was mounted, we would need to lstat() all the mount points. + * That strategy loses if our machine is a client of a dead NFS server. + * + * Hence if safely_chdir() and wd_sanity_check() can manage without needing + * to know the mounted device list, we do that. + */ + if (!options.open_nofollow_available) + { +#ifdef STAT_MOUNTPOINTS + init_mounted_dev_list(0); +#endif + } + + + starting_desc = open (".", O_RDONLY +#if defined O_LARGEFILE + |O_LARGEFILE +#endif + ); + if (0 <= starting_desc && fchdir (starting_desc) != 0) + { + close (starting_desc); + starting_desc = -1; + } + assert(starting_desc >= 0); + + if (starting_desc < 0) + { + starting_dir = xgetcwd (); + if (! starting_dir) + error (1, errno, _("cannot get current directory")); + } + set_stat_placeholders(&starting_stat_buf); + if ((*options.xstat) (".", &starting_stat_buf) != 0) + error (1, errno, _("cannot stat current directory")); + + /* If no paths are given, default to ".". */ + for (i = end_of_leading_options; i < argc && !looks_like_expression(argv[i], true); i++) + { + process_top_path (argv[i], 0); + } + + /* If there were no path arguments, default to ".". */ + if (i == end_of_leading_options) + { + /* + * We use a temporary variable here because some actions modify + * the path temporarily. Hence if we use a string constant, + * we get a coredump. The best example of this is if we say + * "find -printf %H" (note, not "find . -printf %H"). + */ + char defaultpath[2] = "."; + process_top_path (defaultpath, 0); + } + + /* If "-exec ... {} +" has been used, there may be some + * partially-full command lines which have been built, + * but which are not yet complete. Execute those now. + */ + show_success_rates(eval_tree); + cleanup(); + return state.exit_status; +} + +boolean is_fts_enabled(int *ftsoptions) +{ + /* this version of find (i.e. this main()) does not use fts. */ + *ftsoptions = 0; + return false; +} + + +static char * +specific_dirname(const char *dir) +{ + char dirbuf[1024]; + + if (0 == strcmp(".", dir)) + { + /* OK, what's '.'? */ + if (NULL != getcwd(dirbuf, sizeof(dirbuf))) + { + return strdup(dirbuf); + } + else + { + return strdup(dir); + } + } + else + { + char *result = canonicalize_filename_mode(dir, CAN_EXISTING); + if (NULL == result) + return strdup(dir); + else + return result; + } +} + + + +/* Return non-zero if FS is the name of a filesystem that is likely to + * be automounted + */ +static int +fs_likely_to_be_automounted(const char *fs) +{ + return ( (0==strcmp(fs, "nfs")) || (0==strcmp(fs, "autofs")) || (0==strcmp(fs, "subfs"))); +} + + + +#ifdef STAT_MOUNTPOINTS +static dev_t *mounted_devices = NULL; +static size_t num_mounted_devices = 0u; + + +static void +init_mounted_dev_list(int mandatory) +{ + assert(NULL == mounted_devices); + assert(0 == num_mounted_devices); + mounted_devices = get_mounted_devices(&num_mounted_devices); + if (mandatory && (NULL == mounted_devices)) + { + error(1, 0, "Cannot read list of mounted devices."); + } +} + +static void +refresh_mounted_dev_list(void) +{ + if (mounted_devices) + { + free(mounted_devices); + mounted_devices = 0; + } + num_mounted_devices = 0u; + init_mounted_dev_list(1); +} + + +/* Search for device DEV in the array LIST, which is of size N. */ +static int +dev_present(dev_t dev, const dev_t *list, size_t n) +{ + if (list) + { + while (n-- > 0u) + { + if ( (*list++) == dev ) + return 1; + } + } + return 0; +} + +enum MountPointStateChange + { + MountPointRecentlyMounted, + MountPointRecentlyUnmounted, + MountPointStateUnchanged + }; + + + +static enum MountPointStateChange +get_mount_state(dev_t newdev) +{ + int new_is_present, new_was_present; + + new_was_present = dev_present(newdev, mounted_devices, num_mounted_devices); + refresh_mounted_dev_list(); + new_is_present = dev_present(newdev, mounted_devices, num_mounted_devices); + + if (new_was_present == new_is_present) + return MountPointStateUnchanged; + else if (new_is_present) + return MountPointRecentlyMounted; + else + return MountPointRecentlyUnmounted; +} + + + +/* We stat()ed a directory, chdir()ed into it (we know this + * since direction is TraversingDown), stat()ed it again, + * and noticed that the device numbers are different. Check + * if the filesystem was recently mounted. + * + * If it was, it looks like chdir()ing into the directory + * caused a filesystem to be mounted. Maybe automount is + * running. Anyway, that's probably OK - but it happens + * only when we are moving downward. + * + * We also allow for the possibility that a similar thing + * has happened with the unmounting of a filesystem. This + * is much rarer, as it relies on an automounter timeout + * occurring at exactly the wrong moment. + */ +static enum WdSanityCheckFatality +dirchange_is_fatal(const char *specific_what, + enum WdSanityCheckFatality isfatal, + int silent, + struct stat *newinfo) +{ + enum MountPointStateChange transition = get_mount_state(newinfo->st_dev); + switch (transition) + { + case MountPointRecentlyUnmounted: + isfatal = NON_FATAL_IF_SANITY_CHECK_FAILS; + if (!silent) + { + error (0, 0, + _("Warning: filesystem %s has recently been unmounted."), + safely_quote_err_filename(0, specific_what)); + } + break; + + case MountPointRecentlyMounted: + isfatal = NON_FATAL_IF_SANITY_CHECK_FAILS; + if (!silent) + { + error (0, 0, + _("Warning: filesystem %s has recently been mounted."), + safely_quote_err_filename(0, specific_what)); + } + break; + + case MountPointStateUnchanged: + /* leave isfatal as it is */ + break; + } + + return isfatal; +} + + +#endif + + + +/* Examine the results of the stat() of a directory from before we + * entered or left it, with the results of stat()ing it afterward. If + * these are different, the filesystem tree has been modified while we + * were traversing it. That might be an attempt to use a race + * condition to persuade find to do something it didn't intend + * (e.g. an attempt by an ordinary user to exploit the fact that root + * sometimes runs find on the whole filesystem). However, this can + * also happen if automount is running (certainly on Solaris). With + * automount, moving into a directory can cause a filesystem to be + * mounted there. + * + * To cope sensibly with this, we will raise an error if we see the + * device number change unless we are chdir()ing into a subdirectory, + * and the directory we moved into has been mounted or unmounted "recently". + * Here "recently" means since we started "find" or we last re-read + * the /etc/mnttab file. + * + * If the device number does not change but the inode does, that is a + * problem. + * + * If the device number and inode are both the same, we are happy. + * + * If a filesystem is (un)mounted as we chdir() into the directory, that + * may mean that we're now examining a section of the filesystem that might + * have been excluded from consideration (via -prune or -quit for example). + * Hence we print a warning message to indicate that the output of find + * might be inconsistent due to the change in the filesystem. + */ +static boolean +wd_sanity_check(const char *thing_to_stat, + const char *progname, + const char *what, + dev_t old_dev, + ino_t old_ino, + struct stat *newinfo, + int parent, + int line_no, + enum TraversalDirection direction, + enum WdSanityCheckFatality isfatal, + boolean *changed) /* output parameter */ +{ + const char *fstype; + char *specific_what = NULL; + int silent = 0; + const char *current_dir = "."; + + *changed = false; + + set_stat_placeholders(newinfo); + if ((*options.xstat) (current_dir, newinfo) != 0) + fatal_file_error(thing_to_stat); + + if (old_dev != newinfo->st_dev) + { + *changed = true; + specific_what = specific_dirname(what); + fstype = filesystem_type(newinfo, current_dir); + silent = fs_likely_to_be_automounted(fstype); + + /* This condition is rare, so once we are here it is + * reasonable to perform an expensive computation to + * determine if we should continue or fail. + */ + if (TraversingDown == direction) + { +#ifdef STAT_MOUNTPOINTS + isfatal = dirchange_is_fatal(specific_what,isfatal,silent,newinfo); +#else + isfatal = RETRY_IF_SANITY_CHECK_FAILS; +#endif + } + + switch (isfatal) + { + case FATAL_IF_SANITY_CHECK_FAILS: + { + fstype = filesystem_type(newinfo, current_dir); + error (1, 0, + _("%s%s changed during execution of %s (old device number %ld, new device number %ld, filesystem type is %s) [ref %ld]"), + safely_quote_err_filename(0, specific_what), + parent ? "/.." : "", + safely_quote_err_filename(1, progname), + (long) old_dev, + (long) newinfo->st_dev, + fstype, + (long)line_no); + /*NOTREACHED*/ + return false; + } + + case NON_FATAL_IF_SANITY_CHECK_FAILS: + { + /* Since the device has changed under us, the inode number + * will almost certainly also be different. However, we have + * already decided that this is not a problem. Hence we return + * without checking the inode number. + */ + free(specific_what); + return true; + } + + case RETRY_IF_SANITY_CHECK_FAILS: + return false; + } + } + + /* Device number was the same, check if the inode has changed. */ + if (old_ino != newinfo->st_ino) + { + *changed = true; + specific_what = specific_dirname(what); + fstype = filesystem_type(newinfo, current_dir); + + error ((isfatal == FATAL_IF_SANITY_CHECK_FAILS) ? 1 : 0, + 0, /* no relevant errno value */ + _("%s%s changed during execution of %s (old inode number %ld, new inode number %ld, filesystem type is %s) [ref %ld]"), + safely_quote_err_filename(0, specific_what), + parent ? "/.." : "", + safely_quote_err_filename(1, progname), + (long) old_ino, + (long) newinfo->st_ino, + fstype, + (long)line_no); + free(specific_what); + return false; + } + + return true; +} + +enum SafeChdirStatus + { + SafeChdirOK, + SafeChdirFailSymlink, + SafeChdirFailNotDir, + SafeChdirFailStat, + SafeChdirFailWouldBeUnableToReturn, + SafeChdirFailChdirFailed, + SafeChdirFailNonexistent, + SafeChdirFailDestUnreadable + }; + +/* Safely perform a change in directory. We do this by calling + * lstat() on the subdirectory, using chdir() to move into it, and + * then lstat()ing ".". We compare the results of the two stat calls + * to see if they are consistent. If not, we sound the alarm. + * + * If following_links() is true, we do follow symbolic links. + */ +static enum SafeChdirStatus +safely_chdir_lstat(const char *dest, + enum TraversalDirection direction, + struct stat *statbuf_dest, + enum ChdirSymlinkHandling symlink_follow_option, + boolean *did_stat) +{ + struct stat statbuf_arrived; + int rv, dotfd=-1; + int saved_errno; /* specific_dirname() changes errno. */ + boolean rv_set = false; + boolean statflag = false; + int tries = 0; + enum WdSanityCheckFatality isfatal = RETRY_IF_SANITY_CHECK_FAILS; + + saved_errno = errno = 0; + + dotfd = open(".", O_RDONLY +#if defined O_LARGEFILE + |O_LARGEFILE +#endif + ); + + /* We jump back to here if wd_sanity_check() + * recoverably triggers an alert. + */ + retry: + ++tries; + + if (dotfd >= 0) + { + /* Stat the directory we're going to. */ + set_stat_placeholders(statbuf_dest); + if (0 == options.xstat(dest, statbuf_dest)) + { + statflag = true; + +#ifdef S_ISLNK + /* symlink_follow_option might be set to SymlinkFollowOk, which + * would allow us to chdir() into a symbolic link. This is + * only useful for the case where the directory we're + * chdir()ing into is the basename of a command line + * argument, for example where "foo/bar/baz" is specified on + * the command line. When -P is in effect (the default), + * baz will not be followed if it is a symlink, but if bar + * is a symlink, it _should_ be followed. Hence we need the + * ability to override the policy set by following_links(). + */ + if (!following_links() && S_ISLNK(statbuf_dest->st_mode)) + { + /* We're not supposed to be following links, but this is + * a link. Check symlink_follow_option to see if we should + * make a special exception. + */ + if (symlink_follow_option == SymlinkFollowOk) + { + /* We need to re-stat() the file so that the + * sanity check can pass. + */ + if (0 != stat(dest, statbuf_dest)) + { + rv = SafeChdirFailNonexistent; + rv_set = true; + saved_errno = errno; + goto fail; + } + statflag = true; + } + else + { + /* Not following symlinks, so the attempt to + * chdir() into a symlink should be prevented. + */ + rv = SafeChdirFailSymlink; + rv_set = true; + saved_errno = 0; /* silence the error message */ + goto fail; + } + } +#endif +#ifdef S_ISDIR + /* Although the immediately following chdir() would detect + * the fact that this is not a directory for us, this would + * result in an extra system call that fails. Anybody + * examining the system-call trace should ideally not be + * concerned that something is actually failing. + */ + if (!S_ISDIR(statbuf_dest->st_mode)) + { + rv = SafeChdirFailNotDir; + rv_set = true; + saved_errno = 0; /* silence the error message */ + goto fail; + } +#endif + + if (options.debug_options & DebugSearch) + fprintf(stderr, "safely_chdir(): chdir(\"%s\")\n", dest); + + if (0 == chdir(dest)) + { + /* check we ended up where we wanted to go */ + boolean changed = false; + if (!wd_sanity_check(".", program_name, ".", + statbuf_dest->st_dev, + statbuf_dest->st_ino, + &statbuf_arrived, + 0, __LINE__, direction, + isfatal, + &changed)) + { + /* Only allow one failure. */ + if (RETRY_IF_SANITY_CHECK_FAILS == isfatal) + { + if (0 == fchdir(dotfd)) + { + isfatal = FATAL_IF_SANITY_CHECK_FAILS; + goto retry; + } + else + { + /* Failed to return to original directory, + * but we know that the current working + * directory is not the one that we intend + * to be in. Since fchdir() failed, we + * can't recover from this and so this error + * is fatal. + */ + error(1, errno, + "failed to return to parent directory"); + } + } + else + { + /* XXX: not sure what to use as an excuse here. */ + rv = SafeChdirFailNonexistent; + rv_set = true; + saved_errno = 0; + goto fail; + } + } + + close(dotfd); + return SafeChdirOK; + } + else + { + saved_errno = errno; + if (ENOENT == saved_errno) + { + rv = SafeChdirFailNonexistent; + rv_set = true; + if (options.ignore_readdir_race) + errno = 0; /* don't issue err msg */ + } + else if (ENOTDIR == saved_errno) + { + /* This can happen if the we stat a directory, + * and then filesystem activity changes it into + * a non-directory. + */ + saved_errno = 0; /* don't issue err msg */ + rv = SafeChdirFailNotDir; + rv_set = true; + } + else + { + rv = SafeChdirFailChdirFailed; + rv_set = true; + } + goto fail; + } + } + else + { + saved_errno = errno; + rv = SafeChdirFailStat; + rv_set = true; + + if ( (ENOENT == saved_errno) || (0 == state.curdepth)) + saved_errno = 0; /* don't issue err msg */ + goto fail; + } + } + else + { + /* We do not have read permissions on "." */ + rv = SafeChdirFailWouldBeUnableToReturn; + rv_set = true; + goto fail; + } + + /* This is the success path, so we clear errno. The caller probably + * won't be calling error() anyway. + */ + saved_errno = 0; + + /* We use the same exit path for success or failure. + * which has occurred is recorded in RV. + */ + fail: + /* We do not call error() as this would result in a duplicate error + * message when the caller does the same thing. + */ + if (saved_errno) + errno = saved_errno; + + if (dotfd >= 0) + { + close(dotfd); + dotfd = -1; + } + + *did_stat = statflag; + assert(rv_set); + return rv; +} + +#if defined(O_NOFOLLOW) +/* Safely change working directory to the specified subdirectory. If + * we are not allowed to follow symbolic links, we use open() with + * O_NOFOLLOW, followed by fchdir(). This ensures that we don't + * follow symbolic links (of course, we do follow them if the -L + * option is in effect). + */ +static enum SafeChdirStatus +safely_chdir_nofollow(const char *dest, + enum TraversalDirection direction, + struct stat *statbuf_dest, + enum ChdirSymlinkHandling symlink_follow_option, + boolean *did_stat) +{ + int extraflags, fd; + + (void) direction; + (void) statbuf_dest; + + extraflags = 0; + *did_stat = false; + + switch (symlink_follow_option) + { + case SymlinkFollowOk: + extraflags = 0; + break; + + case SymlinkHandleDefault: + if (following_links()) + extraflags = 0; + else + extraflags = O_NOFOLLOW; + break; + } + + errno = 0; + fd = open(dest, O_RDONLY +#if defined O_LARGEFILE + |O_LARGEFILE +#endif + |extraflags); + if (fd < 0) + { + switch (errno) + { + case ELOOP: + return SafeChdirFailSymlink; /* This is why we use O_NOFOLLOW */ + case ENOENT: + return SafeChdirFailNonexistent; + default: + return SafeChdirFailDestUnreadable; + } + } + + errno = 0; + if (0 == fchdir(fd)) + { + close(fd); + return SafeChdirOK; + } + else + { + int saved_errno = errno; + close(fd); + errno = saved_errno; + + switch (errno) + { + case ENOTDIR: + return SafeChdirFailNotDir; + + case EACCES: + case EBADF: /* Shouldn't happen */ + case EINTR: + case EIO: + default: + return SafeChdirFailChdirFailed; + } + } +} +#endif + +static enum SafeChdirStatus +safely_chdir(const char *dest, + enum TraversalDirection direction, + struct stat *statbuf_dest, + enum ChdirSymlinkHandling symlink_follow_option, + boolean *did_stat) +{ + enum SafeChdirStatus result; + + /* We're about to leave a directory. If there are any -execdir + * argument lists which have been built but have not yet been + * processed, do them now because they must be done in the same + * directory. + */ + complete_pending_execdirs(get_current_dirfd()); + +#if !defined(O_NOFOLLOW) + options.open_nofollow_available = false; +#endif + if (options.open_nofollow_available) + result = safely_chdir_nofollow(dest, direction, statbuf_dest, symlink_follow_option, did_stat); + else + result = safely_chdir_lstat(dest, direction, statbuf_dest, symlink_follow_option, did_stat); + return result; +} + + + +/* Safely go back to the starting directory. */ +static void +chdir_back (void) +{ + struct stat stat_buf; + boolean dummy; + + if (starting_desc < 0) + { + if (options.debug_options & DebugSearch) + fprintf(stderr, "chdir_back(): chdir(\"%s\")\n", starting_dir); + +#ifdef STAT_MOUNTPOINTS + /* We will need the mounted device list. Get it now if we don't + * already have it. + */ + if (NULL == mounted_devices) + init_mounted_dev_list(1); +#endif + + if (chdir (starting_dir) != 0) + fatal_file_error(starting_dir); + + wd_sanity_check(starting_dir, + program_name, + starting_dir, + starting_stat_buf.st_dev, + starting_stat_buf.st_ino, + &stat_buf, 0, __LINE__, + TraversingUp, + FATAL_IF_SANITY_CHECK_FAILS, + &dummy); + } + else + { + if (options.debug_options & DebugSearch) + fprintf(stderr, "chdir_back(): chdir()\n"); + + if (fchdir (starting_desc) != 0) + { + fatal_file_error(starting_dir); + } + } +} + +/* Move to the parent of a given directory and then call a function, + * restoring the cwd. Don't bother changing directory if the + * specified directory is a child of "." or is the root directory. + */ +static void +at_top (char *pathname, + mode_t mode, + struct stat *pstat, + void (*action)(char *pathname, + char *basename, + int mode, + struct stat *pstat)) +{ + int dirchange; + char *parent_dir = dir_name(pathname); + char *base = base_name(pathname); + + state.curdepth = 0; + state.starting_path_length = strlen (pathname); + + if (0 == strcmp(pathname, parent_dir) + || 0 == strcmp(parent_dir, ".")) + { + dirchange = 0; + base = pathname; + } + else + { + enum TraversalDirection direction; + enum SafeChdirStatus chdir_status; + struct stat st; + boolean did_stat = false; + + dirchange = 1; + if (0 == strcmp(base, "..")) + direction = TraversingUp; + else + direction = TraversingDown; + + /* We pass SymlinkFollowOk to safely_chdir(), which allows it to + * chdir() into a symbolic link. This is only useful for the + * case where the directory we're chdir()ing into is the + * basename of a command line argument, for example where + * "foo/bar/baz" is specified on the command line. When -P is + * in effect (the default), baz will not be followed if it is a + * symlink, but if bar is a symlink, it _should_ be followed. + * Hence we need the ability to override the policy set by + * following_links(). + */ + chdir_status = safely_chdir(parent_dir, direction, &st, SymlinkFollowOk, &did_stat); + if (SafeChdirOK != chdir_status) + { + const char *what = (SafeChdirFailWouldBeUnableToReturn == chdir_status) ? "." : parent_dir; + if (errno) + error (0, errno, "%s", + safely_quote_err_filename(0, what)); + else + error (0, 0, "Failed to safely change directory into %s", + safely_quote_err_filename(0, parent_dir)); + + /* We can't process this command-line argument. */ + state.exit_status = 1; + return; + } + } + + free (parent_dir); + parent_dir = NULL; + + action(pathname, base, mode, pstat); + + if (dirchange) + { + chdir_back(); + } +} + + +static void do_process_top_dir(char *pathname, + char *base, + int mode, + struct stat *pstat) +{ + (void) pstat; + + process_path (pathname, base, false, ".", mode); + complete_pending_execdirs(get_current_dirfd()); +} + +static void do_process_predicate(char *pathname, + char *base, + int mode, + struct stat *pstat) +{ + (void) mode; + + state.rel_pathname = base; /* cwd_dir_fd was already set by safely_chdir */ + apply_predicate (pathname, pstat, get_eval_tree()); +} + + + + +/* Descend PATHNAME, which is a command-line argument. + + Actions like -execdir assume that we are in the + parent directory of the file we're examining, + and on entry to this function our working directory + is whatever it was when find was invoked. Therefore + If PATHNAME is "." we just leave things as they are. + Otherwise, we figure out what the parent directory is, + and move to that. +*/ +static void +process_top_path (char *pathname, mode_t mode) +{ + at_top(pathname, mode, NULL, do_process_top_dir); +} + + +/* Info on each directory in the current tree branch, to avoid + getting stuck in symbolic link loops. */ +static struct dir_id *dir_ids = NULL; +/* Entries allocated in `dir_ids'. */ +static int dir_alloc = 0; +/* Index in `dir_ids' of directory currently being searched. + This is always the last valid entry. */ +static int dir_curr = -1; +/* (Arbitrary) number of entries to grow `dir_ids' by. */ +#define DIR_ALLOC_STEP 32 + + + +/* We've detected a filesystem loop. This is caused by one of + * two things: + * + * 1. Option -L is in effect and we've hit a symbolic link that + * points to an ancestor. This is harmless. We won't traverse the + * symbolic link. + * + * 2. We have hit a real cycle in the directory hierarchy. In this + * case, we issue a diagnostic message (POSIX requires this) and we + * skip that directory entry. + */ +static void +issue_loop_warning(const char *name, const char *pathname, int level) +{ + struct stat stbuf_link; + if (lstat(name, &stbuf_link) != 0) + stbuf_link.st_mode = S_IFREG; + + if (S_ISLNK(stbuf_link.st_mode)) + { + error(0, 0, + _("Symbolic link %s is part of a loop in the directory hierarchy; we have already visited the directory to which it points."), + safely_quote_err_filename(0, pathname)); + } + else + { + int distance = 1 + (dir_curr-level); + /* We have found an infinite loop. POSIX requires us to + * issue a diagnostic. Usually we won't get to here + * because when the leaf optimisation is on, it will cause + * the subdirectory to be skipped. If /a/b/c/d is a hard + * link to /a/b, then the link count of /a/b/c is 2, + * because the ".." entry of /b/b/c/d points to /a, not + * to /a/b/c. + */ + error(0, 0, + _("Filesystem loop detected; %s has the same device number and inode as a directory which is %d %s."), + safely_quote_err_filename(0, pathname), + distance, + (distance == 1 ? + _("level higher in the filesystem hierarchy") : + _("levels higher in the filesystem hierarchy"))); + } +} + + + +/* Recursively descend path PATHNAME, applying the predicates. + LEAF is true if PATHNAME is known to be in a directory that has no + more unexamined subdirectories, and therefore it is not a directory. + Knowing this allows us to avoid calling stat as long as possible for + leaf files. + + NAME is PATHNAME relative to the current directory. We access NAME + but print PATHNAME. + + PARENT is the path of the parent of NAME, relative to find's + starting directory. + + Return nonzero iff PATHNAME is a directory. */ + +static int +process_path (char *pathname, char *name, boolean leaf, char *parent, + mode_t mode) +{ + struct stat stat_buf; + static dev_t root_dev; /* Device ID of current argument pathname. */ + int i; + struct predicate *eval_tree; + + eval_tree = get_eval_tree(); + /* Assume it is a non-directory initially. */ + stat_buf.st_mode = 0; + state.rel_pathname = name; + state.type = 0; + state.have_stat = false; + state.have_type = false; + + if (!digest_mode(mode, pathname, name, &stat_buf, leaf)) + return 0; + + if (!S_ISDIR (state.type)) + { + if (state.curdepth >= options.mindepth) + apply_predicate (pathname, &stat_buf, eval_tree); + return 0; + } + + /* From here on, we're working on a directory. */ + + + /* Now we really need to stat the directory, even if we know the + * type, because we need information like struct stat.st_rdev. + */ + if (get_statinfo(pathname, name, &stat_buf) != 0) + return 0; + + state.have_stat = true; + mode = state.type = stat_buf.st_mode; /* use full info now that we have it. */ + state.stop_at_current_level = + options.maxdepth >= 0 + && state.curdepth >= options.maxdepth; + + /* If we've already seen this directory on this branch, + don't descend it again. */ + for (i = 0; i <= dir_curr; i++) + if (stat_buf.st_ino == dir_ids[i].ino && + stat_buf.st_dev == dir_ids[i].dev) + { + state.stop_at_current_level = true; + issue_loop_warning(name, pathname, i); + } + + if (dir_alloc <= ++dir_curr) + { + dir_alloc += DIR_ALLOC_STEP; + dir_ids = (struct dir_id *) + xrealloc ((char *) dir_ids, dir_alloc * sizeof (struct dir_id)); + } + dir_ids[dir_curr].ino = stat_buf.st_ino; + dir_ids[dir_curr].dev = stat_buf.st_dev; + + if (options.stay_on_filesystem) + { + if (state.curdepth == 0) + root_dev = stat_buf.st_dev; + else if (stat_buf.st_dev != root_dev) + state.stop_at_current_level = true; + } + + if (options.do_dir_first && state.curdepth >= options.mindepth) + apply_predicate (pathname, &stat_buf, eval_tree); + + if (options.debug_options & DebugSearch) + fprintf(stderr, "pathname = %s, stop_at_current_level = %d\n", + pathname, state.stop_at_current_level); + + if (state.stop_at_current_level == false) + { + /* Scan directory on disk. */ + process_dir (pathname, name, strlen (pathname), &stat_buf, parent); + } + + if (options.do_dir_first == false && state.curdepth >= options.mindepth) + { + /* The fields in 'state' are now out of date. Correct them. + */ + if (!digest_mode(mode, pathname, name, &stat_buf, leaf)) + return 0; + + if (0 == dir_curr) + { + at_top(pathname, mode, &stat_buf, do_process_predicate); + } + else + { + do_process_predicate(pathname, name, mode, &stat_buf); + } + } + + dir_curr--; + + return 1; +} + + +/* Scan directory PATHNAME and recurse through process_path for each entry. + + PATHLEN is the length of PATHNAME. + + NAME is PATHNAME relative to the current directory. + + STATP is the results of *options.xstat on it. + + PARENT is the path of the parent of NAME, relative to find's + starting directory. */ + +static void +process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, char *parent) +{ + int subdirs_left; /* Number of unexamined subdirs in PATHNAME. */ + boolean subdirs_unreliable; /* if true, cannot use dir link count as subdir limif (if false, it may STILL be unreliable) */ + unsigned int idx; /* Which entry are we on? */ + struct stat stat_buf; + size_t dircount = 0u; + struct savedir_dirinfo *dirinfo; +#if 0 + printf("process_dir: pathname=%s name=%s statp->st_nlink=%d st_ino=%d\n", + pathname, + name, + (int)statp->st_nlink, + (int)statp->st_ino); +#endif + if (statp->st_nlink < 2) + { + subdirs_unreliable = true; + subdirs_left = 0; + } + else + { + subdirs_unreliable = false; /* not necessarily right */ + subdirs_left = statp->st_nlink - 2; /* Account for name and ".". */ + } + + errno = 0; + dirinfo = xsavedir(name, 0); + + + if (dirinfo == NULL) + { + assert(errno != 0); + error (0, errno, "%s", safely_quote_err_filename(0, pathname)); + state.exit_status = 1; + } + else + { + register char *namep; /* Current point in `name_space'. */ + char *cur_path; /* Full path of each file to process. */ + char *cur_name; /* Base name of each file to process. */ + unsigned cur_path_size; /* Bytes allocated for `cur_path'. */ + register unsigned file_len; /* Length of each path to process. */ + register unsigned pathname_len; /* PATHLEN plus trailing '/'. */ + boolean did_stat = false; + + if (pathname[pathlen - 1] == '/') + pathname_len = pathlen + 1; /* For '\0'; already have '/'. */ + else + pathname_len = pathlen + 2; /* For '/' and '\0'. */ + cur_path_size = 0; + cur_path = NULL; + + /* We're about to leave the directory. If there are any + * -execdir argument lists which have been built but have not + * yet been processed, do them now because they must be done in + * the same directory. + */ + complete_pending_execdirs(get_current_dirfd()); + + if (strcmp (name, ".")) + { + enum SafeChdirStatus status = safely_chdir (name, TraversingDown, &stat_buf, SymlinkHandleDefault, &did_stat); + switch (status) + { + case SafeChdirOK: + /* If there had been a change but wd_sanity_check() + * accepted it, we need to accept that on the + * way back up as well, so modify our record + * of what we think we should see later. + * If there was no change, the assignments are a no-op. + * + * However, before performing the assignment, we need to + * check that we have the stat information. If O_NOFOLLOW + * is available, safely_chdir() will not have needed to use + * stat(), and so stat_buf will just contain random data. + */ + if (!did_stat) + { + /* If there is a link we need to follow it. Hence + * the direct call to stat() not through (options.xstat) + */ + set_stat_placeholders(&stat_buf); + if (0 != stat(".", &stat_buf)) + break; /* skip the assignment. */ + } + dir_ids[dir_curr].dev = stat_buf.st_dev; + dir_ids[dir_curr].ino = stat_buf.st_ino; + + break; + + case SafeChdirFailWouldBeUnableToReturn: + error (0, errno, "."); + state.exit_status = 1; + break; + + case SafeChdirFailNonexistent: + case SafeChdirFailDestUnreadable: + case SafeChdirFailStat: + case SafeChdirFailNotDir: + case SafeChdirFailChdirFailed: + error (0, errno, "%s", + safely_quote_err_filename(0, pathname)); + state.exit_status = 1; + return; + + case SafeChdirFailSymlink: + error (0, 0, + _("warning: not following the symbolic link %s"), + safely_quote_err_filename(0, pathname)); + state.exit_status = 1; + return; + } + } + + for (idx=0; idx < dirinfo->size; ++idx) + { + /* savedirinfo() may return dirinfo=NULL if extended information + * is not available. + */ + mode_t mode = (dirinfo->entries[idx].flags & SavedirHaveFileType) ? + dirinfo->entries[idx].type_info : 0; + namep = dirinfo->entries[idx].name; + + /* Append this directory entry's name to the path being searched. */ + file_len = pathname_len + strlen (namep); + if (file_len > cur_path_size) + { + while (file_len > cur_path_size) + cur_path_size += 1024; + if (cur_path) + free (cur_path); + cur_path = xmalloc (cur_path_size); + strcpy (cur_path, pathname); + cur_path[pathname_len - 2] = '/'; + } + cur_name = cur_path + pathname_len - 1; + strcpy (cur_name, namep); + + state.curdepth++; + if (!options.no_leaf_check && !subdirs_unreliable) + { + if (mode && S_ISDIR(mode) && (subdirs_left == 0)) + { + /* This is a subdirectory, but the number of directories we + * have found now exceeds the number we would expect given + * the hard link count on the parent. This is likely to be + * a bug in the filesystem driver (e.g. Linux's + * /proc filesystem) or may just be a fact that the OS + * doesn't really handle hard links with Unix semantics. + * In the latter case, -noleaf should be used routinely. + */ + error(0, 0, _("WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we already saw %d subdirectories): this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched."), + safely_quote_err_filename(0, pathname), + statp->st_nlink, + dircount); + state.exit_status = 1; /* We know the result is wrong, now */ + options.no_leaf_check = true; /* Don't make same + mistake again */ + subdirs_unreliable = 1; + subdirs_left = 1; /* band-aid for this iteration. */ + } + + /* Normal case optimization. On normal Unix + filesystems, a directory that has no subdirectories + has two links: its name, and ".". Any additional + links are to the ".." entries of its subdirectories. + Once we have processed as many subdirectories as + there are additional links, we know that the rest of + the entries are non-directories -- in other words, + leaf files. */ + { + int count; + count = process_path (cur_path, cur_name, + subdirs_left == 0, pathname, + mode); + subdirs_left -= count; + dircount += count; + } + } + else + { + /* There might be weird (e.g., CD-ROM or MS-DOS) filesystems + mounted, which don't have Unix-like directory link counts. */ + process_path (cur_path, cur_name, false, pathname, mode); + } + + state.curdepth--; + } + + + /* We're about to leave the directory. If there are any + * -execdir argument lists which have been built but have not + * yet been processed, do them now because they must be done in + * the same directory. + */ + complete_pending_execdirs(get_current_dirfd()); + + if (strcmp (name, ".")) + { + enum SafeChdirStatus status; + struct dir_id did; + + /* We could go back and do the next command-line arg + instead, maybe using longjmp. */ + char const *dir; + boolean deref = following_links() ? true : false; + + if ( (state.curdepth>0) && !deref) + dir = ".."; + else + { + chdir_back (); + dir = parent; + } + + did_stat = false; + status = safely_chdir (dir, TraversingUp, &stat_buf, SymlinkHandleDefault, &did_stat); + switch (status) + { + case SafeChdirOK: + break; + + case SafeChdirFailWouldBeUnableToReturn: + error (1, errno, "."); + return; + + case SafeChdirFailNonexistent: + case SafeChdirFailDestUnreadable: + case SafeChdirFailStat: + case SafeChdirFailSymlink: + case SafeChdirFailNotDir: + case SafeChdirFailChdirFailed: + error (1, errno, "%s", safely_quote_err_filename(0, pathname)); + return; + } + + if (dir_curr > 0) + { + did.dev = dir_ids[dir_curr-1].dev; + did.ino = dir_ids[dir_curr-1].ino; + } + else + { + did.dev = starting_stat_buf.st_dev; + did.ino = starting_stat_buf.st_ino; + } + } + + if (cur_path) + free (cur_path); + free_dirinfo(dirinfo); + } + + if (subdirs_unreliable) + { + /* Make sure we hasn't used the variable subdirs_left if we knew + * we shouldn't do so. + */ + assert(0 == subdirs_left || options.no_leaf_check); + } +} diff --git a/find/finddata.c b/find/finddata.c new file mode 100644 index 0000000..a77927a --- /dev/null +++ b/find/finddata.c @@ -0,0 +1,40 @@ +/* finddata.c -- global data for "find". + Copyright (C) 1990, 91, 92, 93, 94, 2000, + 2003, 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 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. +*/ + +#include + +#include "defs.h" + + +/* Name this program was run with. */ +char *program_name; + +struct options options; +struct state state; + +/* The full path of the initial working directory, or "." if + STARTING_DESC is nonnegative. */ +char const *starting_dir = "."; + +/* A file descriptor open to the initial working directory. + Doing it this way allows us to work when the i.w.d. has + unreadable parents. */ +int starting_desc; + diff --git a/find/fstype.c b/find/fstype.c new file mode 100644 index 0000000..0c4222d --- /dev/null +++ b/find/fstype.c @@ -0,0 +1,318 @@ +/* fstype.c -- determine type of filesystems that files are on + Copyright (C) 1990, 91, 92, 93, 94, 2000, 2004 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. +*/ + +/* Written by David MacKenzie . + * + * Converted to use gnulib's read_file_system_list() + * by James Youngman (which saves a lot + * of manual hacking of configure.in). + */ + + +#include +#include +#include +#include + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +/* The presence of unistd.h is assumed by gnulib these days, so we + * might as well assume it too. + */ +#include + +#ifdef HAVE_SYS_MNTIO_H +#ifdef HAVE_FCNTL_H +#include +#endif +#include +#endif +#ifdef HAVE_SYS_MKDEV_H +#include +#endif + +#ifdef STDC_HEADERS +#include +#else +extern int errno; +#endif + +#include "defs.h" +#include "../gnulib/lib/dirname.h" +#include "xalloc.h" +#include "modetype.h" + +/* Need declaration of function `xstrtoumax' */ +#include "../gnulib/lib/xstrtol.h" + +#include "extendbuf.h" +#include "mountlist.h" +#include "error.h" + + + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + +static char *filesystem_type_uncached PARAMS((const struct stat *statp, const char *path)); + + +/* Get MNTTYPE_IGNORE if it is available. */ +#if HAVE_MNTENT_H +# include +#endif +#if HAVE_SYS_MNTTAB_H +# include +# include +#endif + + + + + +static void +free_file_system_list(struct mount_entry *p) +{ + while (p) + { + struct mount_entry *pnext = p->me_next; + + free(p->me_devname); + free(p->me_mountdir); + + if(p->me_type_malloced) + free(p->me_type); + p->me_next = NULL; + free(p); + p = pnext; + } +} + + + + +#ifdef AFS +#include +#include +#if __STDC__ +/* On SunOS 4, afs/vice.h defines this to rely on a pre-ANSI cpp. */ +#undef _VICEIOCTL +#define _VICEIOCTL(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl)) +#endif +#ifndef _IOW +/* AFS on Solaris 2.3 doesn't get this definition. */ +#include +#endif + +static int +in_afs (char *path) +{ + static char space[2048]; + struct ViceIoctl vi; + + vi.in_size = 0; + vi.out_size = sizeof (space); + vi.out = space; + + if (pioctl (path, VIOC_FILE_CELL_NAME, &vi, 1) + && (errno == EINVAL || errno == ENOENT)) + return 0; + return 1; +} +#endif /* AFS */ + +/* Nonzero if the current filesystem's type is known. */ +static int fstype_known = 0; + +/* Return a static string naming the type of filesystem that the file PATH, + described by STATP, is on. + RELPATH is the file name relative to the current directory. + Return "unknown" if its filesystem type is unknown. */ + +char * +filesystem_type (const struct stat *statp, const char *path) +{ + static char *current_fstype = NULL; + static dev_t current_dev; + + if (current_fstype != NULL) + { + if (fstype_known && statp->st_dev == current_dev) + return current_fstype; /* Cached value. */ + free (current_fstype); + } + current_dev = statp->st_dev; + current_fstype = filesystem_type_uncached (statp, path); + return current_fstype; +} + +static int +set_fstype_devno(struct mount_entry *p) +{ + struct stat stbuf; + + if (p->me_dev == (dev_t)-1) + { + set_stat_placeholders(&stbuf); + if (0 == (options.xstat)(p->me_mountdir, &stbuf)) + { + p->me_dev = stbuf.st_dev; + return 0; + } + else + { + return -1; + } + } + return 0; /* not needed */ +} + +static struct mount_entry * +must_read_fs_list(bool need_fs_type) +{ + struct mount_entry *entries = read_file_system_list(need_fs_type); + if (NULL == entries) + { + /* We cannot determine for sure which file we were trying to + * use because gnulib has extracted all that stuff away. + * Hence we cannot issue a specific error message here. + */ + error(1, 0, "Cannot read mounted filesystem list"); + } + return entries; +} + + + +/* Return a newly allocated string naming the type of filesystem that the + file PATH, described by STATP, is on. + RELPATH is the file name relative to the current directory. + Return "unknown" if its filesystem type is unknown. */ + +static char * +filesystem_type_uncached (const struct stat *statp, const char *path) +{ + struct mount_entry *entries, *entry; + char *type; + + (void) path; + +#ifdef AFS + if (in_afs(path)) + { + fstype_known = 1; + return xstrdup("afs"); + } +#endif + + entries = must_read_fs_list(true); + for (type=NULL, entry=entries; entry; entry=entry->me_next) + { +#ifdef MNTTYPE_IGNORE + if (!strcmp (entry->me_type, MNTTYPE_IGNORE)) + continue; +#endif + set_fstype_devno(entry); + if (entry->me_dev == statp->st_dev) + { + type = xstrdup(entry->me_type); + break; + } + } + free_file_system_list(entries); + + /* Don't cache unknown values. */ + fstype_known = (type != NULL); + + return type ? type : xstrdup(_("unknown")); +} + + +char * +get_mounted_filesystems (void) +{ + char *result = NULL; + size_t alloc_size = 0u; + size_t used = 0u; + struct mount_entry *entries, *entry; + + entries = must_read_fs_list(false); + for (entry=entries; entry; entry=entry->me_next) + { + size_t len; + +#ifdef MNTTYPE_IGNORE + if (!strcmp (entry->me_type, MNTTYPE_IGNORE)) + continue; +#endif + set_fstype_devno(entry); + + len = strlen(entry->me_mountdir) + 1; + result = extendbuf(result, used+len, &alloc_size); + strcpy(&result[used], entry->me_mountdir); + used += len; /* len already includes one for the \0 */ + } + + free_file_system_list(entries); + return result; +} + + +dev_t * +get_mounted_devices (size_t *n) +{ + size_t alloc_size = 0u; + size_t used = 0u; + struct mount_entry *entries, *entry; + dev_t *result = NULL; + + /* Use read_file_system_list() rather than must_read_fs_list() + * because on some system this is always called at startup, + * and find should only exit fatally if it needs to use the + * result of this operation. If we can't get the fs list + * but we never need the information, there is no need to fail. + */ + for (entry = entries = read_file_system_list(false); + entry; + entry = entry->me_next) + { + result = extendbuf(result, sizeof(dev_t)*(used+1), &alloc_size); + set_fstype_devno(entry); + result[used] = entry->me_dev; + ++used; + } + free_file_system_list(entries); + *n = used; + return result; +} + + + diff --git a/find/ftsfind.c b/find/ftsfind.c new file mode 100644 index 0000000..71dbc56 --- /dev/null +++ b/find/ftsfind.c @@ -0,0 +1,756 @@ +/* find -- search for files in a directory hierarchy (fts version) + Copyright (C) 1990, 91, 92, 93, 94, 2000, + 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 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.*/ + +/* This file was written by James Youngman, based on find.c. + + GNU find was written by Eric Decker , + with enhancements by David MacKenzie , + Jay Plett , + and Tim Wood . + The idea for -print0 and xargs -0 came from + Dan Bernstein . +*/ + + +#include +#include "defs.h" + + +#define USE_SAFE_CHDIR 1 +#undef STAT_MOUNTPOINTS + + +#include +#include + +#ifdef HAVE_FCNTL_H +#include +#else +#include +#endif + +#include + +#include "xalloc.h" +#include "closeout.h" +#include +#include "quotearg.h" +#include "quote.h" +#include "fts_.h" +#include "openat.h" +#include "save-cwd.h" +#include "xgetcwd.h" +#include "error.h" +#include "dircallback.h" + +#ifdef HAVE_LOCALE_H +#include +#endif + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + + +static void set_close_on_exec(int fd) +{ +#if defined(F_GETFD) && defined(FD_CLOEXEC) + int flags; + flags = fcntl(fd, F_GETFD); + if (flags >= 0) + { + flags |= FD_CLOEXEC; + fcntl(fd, F_SETFD, flags); + } +#endif +} + + + +/* FTS_TIGHT_CYCLE_CHECK tries to work around Savannah bug #17877 + * (but actually using it doesn't fix the bug). + */ +static int ftsoptions = FTS_NOSTAT|FTS_TIGHT_CYCLE_CHECK; + +static int prev_depth = INT_MIN; /* fts_level can be < 0 */ +static int curr_fd = -1; + +int get_current_dirfd(void) +{ + if (ftsoptions & FTS_CWDFD) + { + assert(curr_fd != -1); + assert( (AT_FDCWD == curr_fd) || (curr_fd >= 0) ); + + if (AT_FDCWD == curr_fd) + return starting_desc; + else + return curr_fd; + } + else + { + return AT_FDCWD; + } +} + +static void left_dir(void) +{ + if (ftsoptions & FTS_CWDFD) + { + if (curr_fd >= 0) + { + close(curr_fd); + curr_fd = -1; + } + } + else + { + /* do nothing. */ + } +} + +/* + * Signal that we are now inside a directory pointed to by dirfd. + * The caller can't tell if this is the first time this happens, so + * we have to be careful not to call dup() more than once + */ +static void inside_dir(int dirfd) +{ + if (ftsoptions & FTS_CWDFD) + { + assert(dirfd == AT_FDCWD || dirfd >= 0); + + state.cwd_dir_fd = dirfd; + if (curr_fd < 0) + { + if (AT_FDCWD == dirfd) + { + curr_fd = AT_FDCWD; + } + else if (dirfd >= 0) + { + curr_fd = dup(dirfd); + set_close_on_exec(curr_fd); + } + else + { + /* curr_fd is invalid, but dirfd is also invalid. + * This should not have happened. + */ + assert(curr_fd >= 0 || dirfd >= 0); + } + } + } + else + { + /* FTS_CWDFD is not in use. We can always assume that + * AT_FDCWD refers to the directory we are currentl searching. + * + * Therefore there is nothing to do. + */ + } +} + + + +#ifdef STAT_MOUNTPOINTS +static void init_mounted_dev_list(void); +#endif + +/* We have encountered an error which should affect the exit status. + * This is normally used to change the exit status from 0 to 1. + * However, if the exit status is already 2 for example, we don't want to + * reduce it to 1. + */ +static void +error_severity(int level) +{ + if (state.exit_status < level) + state.exit_status = level; +} + + +#define STRINGIFY(X) #X +#define HANDLECASE(N) case N: return #N; + +static char * +get_fts_info_name(int info) +{ + static char buf[10]; + switch (info) + { + HANDLECASE(FTS_D); + HANDLECASE(FTS_DC); + HANDLECASE(FTS_DEFAULT); + HANDLECASE(FTS_DNR); + HANDLECASE(FTS_DOT); + HANDLECASE(FTS_DP); + HANDLECASE(FTS_ERR); + HANDLECASE(FTS_F); + HANDLECASE(FTS_INIT); + HANDLECASE(FTS_NS); + HANDLECASE(FTS_NSOK); + HANDLECASE(FTS_SL); + HANDLECASE(FTS_SLNONE); + HANDLECASE(FTS_W); + default: + sprintf(buf, "[%d]", info); + return buf; + } +} + +static void +visit(FTS *p, FTSENT *ent, struct stat *pstat) +{ + struct predicate *eval_tree; + + state.curdepth = ent->fts_level; + state.have_stat = (ent->fts_info != FTS_NS) && (ent->fts_info != FTS_NSOK); + state.rel_pathname = ent->fts_accpath; + state.cwd_dir_fd = p->fts_cwd_fd; + + /* Apply the predicates to this path. */ + eval_tree = get_eval_tree(); + apply_predicate(ent->fts_path, pstat, eval_tree); + + /* Deal with any side effects of applying the predicates. */ + if (state.stop_at_current_level) + { + fts_set(p, ent, FTS_SKIP); + } +} + +static const char* +partial_quotearg_n(int n, char *s, size_t len, enum quoting_style style) +{ + if (0 == len) + { + return quotearg_n_style(n, style, ""); + } + else + { + char saved; + const char *result; + + saved = s[len]; + s[len] = 0; + result = quotearg_n_style(n, style, s); + s[len] = saved; + return result; + } +} + + +/* We've detected a filesystem loop. This is caused by one of + * two things: + * + * 1. Option -L is in effect and we've hit a symbolic link that + * points to an ancestor. This is harmless. We won't traverse the + * symbolic link. + * + * 2. We have hit a real cycle in the directory hierarchy. In this + * case, we issue a diagnostic message (POSIX requires this) and we + * skip that directory entry. + */ +static void +issue_loop_warning(FTSENT * ent) +{ + if (S_ISLNK(ent->fts_statp->st_mode)) + { + error(0, 0, + _("Symbolic link %s is part of a loop in the directory hierarchy; we have already visited the directory to which it points."), + safely_quote_err_filename(0, ent->fts_path)); + } + else + { + /* We have found an infinite loop. POSIX requires us to + * issue a diagnostic. Usually we won't get to here + * because when the leaf optimisation is on, it will cause + * the subdirectory to be skipped. If /a/b/c/d is a hard + * link to /a/b, then the link count of /a/b/c is 2, + * because the ".." entry of /a/b/c/d points to /a, not + * to /a/b/c. + */ + error(0, 0, + _("Filesystem loop detected; " + "%s is part of the same filesystem loop as %s."), + safely_quote_err_filename(0, ent->fts_path), + partial_quotearg_n(1, + ent->fts_cycle->fts_path, + ent->fts_cycle->fts_pathlen, + options.err_quoting_style)); + } +} + +/* + * Return true if NAME corresponds to a file which forms part of a + * symbolic link loop. The command + * rm -f a b; ln -s a b; ln -s b a + * produces such a loop. + */ +static boolean +symlink_loop(const char *name) +{ + struct stat stbuf; + int rv; + if (following_links()) + rv = stat(name, &stbuf); + else + rv = lstat(name, &stbuf); + return (0 != rv) && (ELOOP == errno); +} + + +static int +complete_execdirs_cb(void *context) +{ + (void) context; + /* By the tme this callback is called, the current directory is correct. */ + complete_pending_execdirs(AT_FDCWD); + return 0; +} + +static void +show_outstanding_execdirs(FILE *fp) +{ + if (options.debug_options & DebugExec) + { + int seen=0; + struct predicate *p; + p = get_eval_tree(); + fprintf(fp, "Outstanding execdirs:"); + + while (p) + { + const char *pfx; + + if (pred_is(p, pred_execdir)) + pfx = "-execdir"; + else if (pred_is(p, pred_okdir)) + pfx = "-okdir"; + else + pfx = NULL; + if (pfx) + { + int i; + const struct exec_val *execp = &p->args.exec_vec; + ++seen; + + fprintf(fp, "%s ", pfx); + if (execp->multiple) + fprintf(fp, "multiple "); + fprintf(fp, "%d args: ", execp->state.cmd_argc); + for (i=0; istate.cmd_argc; ++i) + { + fprintf(fp, "%s ", execp->state.cmd_argv[i]); + } + fprintf(fp, "\n"); + } + p = p->pred_next; + } + if (!seen) + fprintf(fp, " none\n"); + } + else + { + /* No debug output is wanted. */ + } +} + + + + +static void +consider_visiting(FTS *p, FTSENT *ent) +{ + struct stat statbuf; + mode_t mode; + int ignore, isdir; + + if (options.debug_options & DebugSearch) + fprintf(stderr, + "consider_visiting: fts_info=%-6s, fts_level=%2d, prev_depth=%d " + "fts_path=%s, fts_accpath=%s\n", + get_fts_info_name(ent->fts_info), + (int)ent->fts_level, prev_depth, + quotearg_n_style(0, options.err_quoting_style, ent->fts_path), + quotearg_n_style(1, options.err_quoting_style, ent->fts_accpath)); + + if (ent->fts_info == FTS_DP) + { + left_dir(); + } + else if (ent->fts_level > prev_depth || ent->fts_level==0) + { + left_dir(); + } + inside_dir(p->fts_cwd_fd); + prev_depth = ent->fts_level; + + + /* Cope with various error conditions. */ + if (ent->fts_info == FTS_ERR + || ent->fts_info == FTS_DNR) + { + error(0, ent->fts_errno, "%s", + safely_quote_err_filename(0, ent->fts_path)); + error_severity(1); + return; + } + else if (ent->fts_info == FTS_DC) + { + issue_loop_warning(ent); + error_severity(1); + return; + } + else if (ent->fts_info == FTS_SLNONE) + { + /* fts_read() claims that ent->fts_accpath is a broken symbolic + * link. That would be fine, but if this is part of a symbolic + * link loop, we diagnose the problem and also ensure that the + * eventual return value is nonzero. Note that while the path + * we stat is local (fts_accpath), we print the fill path name + * of the file (fts_path) in the error message. + */ + if (symlink_loop(ent->fts_accpath)) + { + error(0, ELOOP, "%s", safely_quote_err_filename(0, ent->fts_path)); + error_severity(1); + return; + } + } + else if (ent->fts_info == FTS_NS) + { + if (ent->fts_level == 0) + { + /* e.g., nonexistent starting point */ + error(0, ent->fts_errno, "%s", + safely_quote_err_filename(0, ent->fts_path)); + error_severity(1); /* remember problem */ + return; + } + else + { + /* The following if statement fixes Savannah bug #19605 + * (failure to diagnose a symbolic link loop) + */ + if (symlink_loop(ent->fts_accpath)) + { + error(0, ELOOP, "%s", + safely_quote_err_filename(0, ent->fts_path)); + error_severity(1); + return; + } + } + } + + /* Cope with the usual cases. */ + if (ent->fts_info == FTS_NSOK + || ent->fts_info == FTS_NS /* e.g. symlink loop */) + { + assert(!state.have_stat); + assert(!state.have_type); + state.type = mode = 0; + } + else + { + state.have_stat = true; + state.have_type = true; + statbuf = *(ent->fts_statp); + state.type = mode = statbuf.st_mode; + + if (00000 == mode) + { + /* Savannah bug #16378. */ + error(0, 0, _("Warning: file %s appears to have mode 0000"), + quotearg_n_style(0, options.err_quoting_style, ent->fts_path)); + } + } + + if (mode) + { + if (!digest_mode(mode, ent->fts_path, ent->fts_name, &statbuf, 0)) + return; + } + + /* examine this item. */ + ignore = 0; + isdir = S_ISDIR(statbuf.st_mode) + || (FTS_D == ent->fts_info) + || (FTS_DP == ent->fts_info) + || (FTS_DC == ent->fts_info); + + if (isdir && (ent->fts_info == FTS_NSOK)) + { + /* This is a directory, but fts did not stat it, so + * presumably would not be planning to search its + * children. Force a stat of the file so that the + * children can be checked. + */ + fts_set(p, ent, FTS_AGAIN); + return; + } + + if (options.maxdepth >= 0) + { + if (ent->fts_level >= options.maxdepth) + { + fts_set(p, ent, FTS_SKIP); /* descend no further */ + + if (ent->fts_level > options.maxdepth) + ignore = 1; /* don't even look at this one */ + } + } + + if ( (ent->fts_info == FTS_D) && !options.do_dir_first ) + { + /* this is the preorder visit, but user said -depth */ + ignore = 1; + } + else if ( (ent->fts_info == FTS_DP) && options.do_dir_first ) + { + /* this is the postorder visit, but user didn't say -depth */ + ignore = 1; + } + else if (ent->fts_level < options.mindepth) + { + ignore = 1; + } + + if (!ignore) + { + visit(p, ent, &statbuf); + } + + /* XXX: if we allow a build-up of pending arguments for "-execdir foo {} +" + * we need to execute them in the same directory as we found the item. + * If we are trying to do "find a -execdir echo {} +", we will need to + * echo + * a while in the original working directory + * b while in a + * c while in b (just before leaving b) + * + * These restrictions are hard to satisfy while using fts(). The reason is + * that it doesn't tell us just before we leave a directory. For the moment, + * we punt and don't allow the arguments to build up. + */ + if (state.execdirs_outstanding) + { + show_outstanding_execdirs(stderr); + run_in_dir(p->fts_cwd_fd, complete_execdirs_cb, NULL); + } + + if (ent->fts_info == FTS_DP) + { + /* we're leaving a directory. */ + state.stop_at_current_level = false; + } +} + + + +static void +find(char *arg) +{ + char * arglist[2]; + FTS *p; + FTSENT *ent; + + + state.starting_path_length = strlen(arg); + inside_dir(AT_FDCWD); + + arglist[0] = arg; + arglist[1] = NULL; + + switch (options.symlink_handling) + { + case SYMLINK_ALWAYS_DEREF: + ftsoptions |= FTS_COMFOLLOW|FTS_LOGICAL; + break; + + case SYMLINK_DEREF_ARGSONLY: + ftsoptions |= FTS_COMFOLLOW|FTS_PHYSICAL; + break; + + case SYMLINK_NEVER_DEREF: + ftsoptions |= FTS_PHYSICAL; + break; + } + + if (options.stay_on_filesystem) + ftsoptions |= FTS_XDEV; + + p = fts_open(arglist, ftsoptions, NULL); + if (NULL == p) + { + error (0, errno, _("cannot search %s"), + safely_quote_err_filename(0, arg)); + } + else + { + while ( (ent=fts_read(p)) != NULL ) + { + state.have_stat = false; + state.have_type = false; + state.type = 0; + consider_visiting(p, ent); + } + fts_close(p); + p = NULL; + } +} + + +static void +process_all_startpoints(int argc, char *argv[]) +{ + int i; + + /* figure out how many start points there are */ + for (i = 0; i < argc && !looks_like_expression(argv[i], true); i++) + { + state.starting_path_length = strlen(argv[i]); /* TODO: is this redundant? */ + find(argv[i]); + } + + if (i == 0) + { + /* + * We use a temporary variable here because some actions modify + * the path temporarily. Hence if we use a string constant, + * we get a coredump. The best example of this is if we say + * "find -printf %H" (note, not "find . -printf %H"). + */ + char defaultpath[2] = "."; + find(defaultpath); + } +} + + + + +int +main (int argc, char **argv) +{ + int end_of_leading_options = 0; /* First arg after any -H/-L etc. */ + struct predicate *eval_tree; + + program_name = argv[0]; + state.exit_status = 0; + state.execdirs_outstanding = false; + state.cwd_dir_fd = AT_FDCWD; + + /* Set the option defaults before we do the the locale + * initialisation as check_nofollow() needs to be executed in the + * POSIX locale. + */ + set_option_defaults(&options); + +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + atexit (close_stdout); + + /* Check for -P, -H or -L options. Also -D and -O, which are + * both GNU extensions. + */ + end_of_leading_options = process_leading_options(argc, argv); + + if (options.debug_options & DebugStat) + options.xstat = debug_stat; + +#ifdef DEBUG + fprintf (stderr, "cur_day_start = %s", ctime (&options.cur_day_start)); +#endif /* DEBUG */ + + + /* We are now processing the part of the "find" command line + * after the -H/-L options (if any). + */ + eval_tree = build_expression_tree(argc, argv, end_of_leading_options); + + /* safely_chdir() needs to check that it has ended up in the right place. + * To avoid bailing out when something gets automounted, it checks if + * the target directory appears to have had a directory mounted on it as + * we chdir()ed. The problem with this is that in order to notice that + * a filesystem was mounted, we would need to lstat() all the mount points. + * That strategy loses if our machine is a client of a dead NFS server. + * + * Hence if safely_chdir() and wd_sanity_check() can manage without needing + * to know the mounted device list, we do that. + */ + if (!options.open_nofollow_available) + { +#ifdef STAT_MOUNTPOINTS + init_mounted_dev_list(); +#endif + } + + + starting_desc = open (".", O_RDONLY +#if defined O_LARGEFILE + |O_LARGEFILE +#endif + ); + if (0 <= starting_desc && fchdir (starting_desc) != 0) + { + close (starting_desc); + starting_desc = -1; + } + if (starting_desc < 0) + { + starting_dir = xgetcwd (); + if (! starting_dir) + error (1, errno, _("cannot get current directory")); + } + + + process_all_startpoints(argc-end_of_leading_options, argv+end_of_leading_options); + + /* If "-exec ... {} +" has been used, there may be some + * partially-full command lines which have been built, + * but which are not yet complete. Execute those now. + */ + show_success_rates(eval_tree); + cleanup(); + return state.exit_status; +} + +boolean +is_fts_enabled(int *fts_options) +{ + /* this version of find (i.e. this main()) uses fts. */ + *fts_options = ftsoptions; + return true; +} diff --git a/find/parser.c b/find/parser.c new file mode 100644 index 0000000..e8c1466 --- /dev/null +++ b/find/parser.c @@ -0,0 +1,3382 @@ +/* parser.c -- convert the command line args into an expression tree. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 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 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. +*/ + +#include + +#include "defs.h" +#include +#include +#include +#include +#include +#include +#include +#include "modechange.h" +#include "modetype.h" +#include "xstrtol.h" +#include "xalloc.h" +#include "quote.h" +#include "quotearg.h" +#include "buildcmd.h" +#include "nextelem.h" +#include "stdio-safer.h" +#include "regextype.h" +#include "stat-time.h" +#include "xstrtod.h" +#include "fts_.h" +#include "getdate.h" +#include "error.h" +#include "gnulib-version.h" + +#ifdef HAVE_FCNTL_H +#include +#else +#include +#endif + +/* The presence of unistd.h is assumed by gnulib these days, so we + * might as well assume it too. + */ +/* We need for isatty(). */ +#include + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + +#if !defined (isascii) || defined (STDC_HEADERS) +#ifdef isascii +#undef isascii +#endif +#define isascii(c) 1 +#endif + +#define ISDIGIT(c) (isascii ((unsigned char)c) && isdigit ((unsigned char)c)) +#define ISUPPER(c) (isascii ((unsigned char)c) && isupper ((unsigned char)c)) + +#ifndef HAVE_ENDGRENT +#define endgrent() +#endif +#ifndef HAVE_ENDPWENT +#define endpwent() +#endif + +static boolean parse_accesscheck PARAMS((const struct parser_table* entry, char **argv, int *arg_ptr)); +static boolean parse_amin PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_and PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_anewer PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_cmin PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_cnewer PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_comma PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_daystart PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_delete PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_d PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_depth PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_empty PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_exec PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_execdir PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_false PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_fls PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_fprintf PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_follow PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_fprint PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_fprint0 PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_fstype PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_gid PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_group PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_help PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_ilname PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_iname PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_inum PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_ipath PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_iregex PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_iwholename PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_links PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_lname PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_ls PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_maxdepth PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_mindepth PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_mmin PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_name PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_negate PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_newer PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_newerXY PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_noleaf PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_nogroup PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_nouser PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_nowarn PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_ok PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_okdir PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_or PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_path PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_perm PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_print0 PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_printf PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_prune PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_regex PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_regextype PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_samefile PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +#if 0 +static boolean parse_show_control_chars PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +#endif +static boolean parse_size PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_time PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_true PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_type PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_uid PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_used PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_user PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_version PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_wholename PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_xdev PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_ignore_race PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_noignore_race PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_warn PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_xtype PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); +static boolean parse_quit PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); + +boolean parse_print PARAMS((const struct parser_table*, char *argv[], int *arg_ptr)); + + +static boolean insert_type PARAMS((char **argv, int *arg_ptr, const struct parser_table *entry, PRED_FUNC which_pred)); +static boolean insert_regex PARAMS((char *argv[], int *arg_ptr, const struct parser_table *entry, int regex_options)); +static boolean insert_fprintf (struct format_val *vec, + const struct parser_table *entry, + PRED_FUNC func, + const char *format); + +static struct segment **make_segment PARAMS((struct segment **segment, char *format, int len, + int kind, char format_char, char aux_format_char, + struct predicate *pred)); +static boolean insert_exec_ok PARAMS((const char *action, const struct parser_table *entry, int dirfd, char *argv[], int *arg_ptr)); +static boolean get_comp_type PARAMS((const char **str, enum comparison_type *comp_type)); +static boolean get_relative_timestamp PARAMS((const char *str, struct time_val *tval, time_t origin, double sec_per_unit, const char *overflowmessage)); +static boolean get_num PARAMS((const char *str, uintmax_t *num, enum comparison_type *comp_type)); +static struct predicate* insert_num PARAMS((char *argv[], int *arg_ptr, const struct parser_table *entry)); +static void open_output_file (const char *path, struct format_val *p); +static void open_stdout (struct format_val *p); +static boolean stream_is_tty(FILE *fp); +static boolean parse_noop PARAMS((const struct parser_table* entry, char **argv, int *arg_ptr)); + +#define PASTE(x,y) x##y +#define STRINGIFY(s) #s + +#define PARSE_OPTION(what,suffix) \ + { (ARG_OPTION), (what), PASTE(parse_,suffix), NULL } + +#define PARSE_POSOPT(what,suffix) \ + { (ARG_POSITIONAL_OPTION), (what), PASTE(parse_,suffix), NULL } + +#define PARSE_TEST(what,suffix) \ + { (ARG_TEST), (what), PASTE(parse_,suffix), PASTE(pred_,suffix) } + +#define PARSE_TEST_NP(what,suffix) \ + { (ARG_TEST), (what), PASTE(parse_,suffix), NULL } + +#define PARSE_ACTION(what,suffix) \ + { (ARG_ACTION), (what), PASTE(parse_,suffix), PASTE(pred_,suffix) } + +#define PARSE_ACTION_NP(what,suffix) \ + { (ARG_ACTION), (what), PASTE(parse_,suffix), NULL } + +#define PARSE_PUNCTUATION(what,suffix) \ + { (ARG_PUNCTUATION), (what), PASTE(parse_,suffix), PASTE(pred_,suffix) } + + +/* Predicates we cannot handle in the usual way. If you add an entry + * to this table, double-check the switch statement in + * pred_sanity_check() to make sure that the new case is being + * correctly handled. + */ +static struct parser_table const parse_entry_newerXY = + { + ARG_SPECIAL_PARSE, "newerXY", parse_newerXY, pred_newerXY /* BSD */ + }; + +/* GNU find predicates that are not mentioned in POSIX.2 are marked `GNU'. + If they are in some Unix versions of find, they are marked `Unix'. */ + +static struct parser_table const parse_table[] = +{ + PARSE_PUNCTUATION("!", negate), + PARSE_PUNCTUATION("not", negate), /* GNU */ + PARSE_PUNCTUATION("(", openparen), + PARSE_PUNCTUATION(")", closeparen), + PARSE_PUNCTUATION(",", comma), /* GNU */ + PARSE_PUNCTUATION("a", and), + PARSE_TEST ("amin", amin), /* GNU */ + PARSE_PUNCTUATION("and", and), /* GNU */ + PARSE_TEST ("anewer", anewer), /* GNU */ + {ARG_TEST, "atime", parse_time, pred_atime}, + PARSE_TEST ("cmin", cmin), /* GNU */ + PARSE_TEST ("cnewer", cnewer), /* GNU */ + {ARG_TEST, "ctime", parse_time, pred_ctime}, + PARSE_POSOPT ("daystart", daystart), /* GNU */ + PARSE_ACTION ("delete", delete), /* GNU, Mac OS, FreeBSD */ + PARSE_OPTION ("d", d), /* Mac OS X, FreeBSD, NetBSD, OpenBSD, but deprecated in favour of -depth */ + PARSE_OPTION ("depth", depth), + PARSE_TEST ("empty", empty), /* GNU */ + {ARG_ACTION, "exec", parse_exec, pred_exec}, /* POSIX */ + {ARG_TEST, "executable", parse_accesscheck, pred_executable}, /* GNU, 4.3.0+ */ + PARSE_ACTION ("execdir", execdir), /* *BSD, GNU */ + PARSE_ACTION ("fls", fls), /* GNU */ + PARSE_POSOPT ("follow", follow), /* GNU, Unix */ + PARSE_ACTION ("fprint", fprint), /* GNU */ + PARSE_ACTION ("fprint0", fprint0), /* GNU */ + {ARG_ACTION, "fprintf", parse_fprintf, pred_fprintf}, /* GNU */ + PARSE_TEST ("fstype", fstype), /* GNU, Unix */ + PARSE_TEST ("gid", gid), /* GNU */ + PARSE_TEST ("group", group), + PARSE_OPTION ("ignore_readdir_race", ignore_race), /* GNU */ + PARSE_TEST ("ilname", ilname), /* GNU */ + PARSE_TEST ("iname", iname), /* GNU */ + PARSE_TEST ("inum", inum), /* GNU, Unix */ + PARSE_TEST ("ipath", ipath), /* GNU, deprecated in favour of iwholename */ + PARSE_TEST_NP ("iregex", iregex), /* GNU */ + PARSE_TEST_NP ("iwholename", iwholename), /* GNU */ + PARSE_TEST ("links", links), + PARSE_TEST ("lname", lname), /* GNU */ + PARSE_ACTION ("ls", ls), /* GNU, Unix */ + PARSE_OPTION ("maxdepth", maxdepth), /* GNU */ + PARSE_OPTION ("mindepth", mindepth), /* GNU */ + PARSE_TEST ("mmin", mmin), /* GNU */ + PARSE_OPTION ("mount", xdev), /* Unix */ + {ARG_TEST, "mtime", parse_time, pred_mtime}, + PARSE_TEST ("name", name), +#ifdef UNIMPLEMENTED_UNIX + PARSE(ARG_UNIMPLEMENTED, "ncpio", ncpio), /* Unix */ +#endif + PARSE_TEST ("newer", newer), + {ARG_TEST, "atime", parse_time, pred_atime}, + PARSE_OPTION ("noleaf", noleaf), /* GNU */ + PARSE_TEST ("nogroup", nogroup), + PARSE_TEST ("nouser", nouser), + PARSE_OPTION ("noignore_readdir_race", noignore_race), /* GNU */ + PARSE_POSOPT ("nowarn", nowarn), /* GNU */ + PARSE_PUNCTUATION("o", or), + PARSE_PUNCTUATION("or", or), /* GNU */ + PARSE_ACTION ("ok", ok), + PARSE_ACTION ("okdir", okdir), /* GNU (-execdir is BSD) */ + PARSE_TEST ("path", path), /* GNU, HP-UX, GNU prefers wholename */ + PARSE_TEST ("perm", perm), + PARSE_ACTION ("print", print), + PARSE_ACTION ("print0", print0), /* GNU */ + {ARG_ACTION, "printf", parse_printf, NULL}, /* GNU */ + PARSE_ACTION ("prune", prune), + PARSE_ACTION ("quit", quit), /* GNU */ + {ARG_TEST, "readable", parse_accesscheck, pred_readable}, /* GNU, 4.3.0+ */ + PARSE_TEST ("regex", regex), /* GNU */ + PARSE_OPTION ("regextype", regextype), /* GNU */ + PARSE_TEST ("samefile", samefile), /* GNU */ +#if 0 + PARSE_OPTION ("show-control-chars", show_control_chars), /* GNU, 4.3.0+ */ +#endif + PARSE_TEST ("size", size), + PARSE_TEST ("type", type), + PARSE_TEST ("uid", uid), /* GNU */ + PARSE_TEST ("used", used), /* GNU */ + PARSE_TEST ("user", user), + PARSE_OPTION ("warn", warn), /* GNU */ + PARSE_TEST_NP ("wholename", wholename), /* GNU, replaces -path */ + {ARG_TEST, "writable", parse_accesscheck, pred_writable}, /* GNU, 4.3.0+ */ + PARSE_OPTION ("xdev", xdev), + PARSE_TEST ("xtype", xtype), /* GNU */ +#ifdef UNIMPLEMENTED_UNIX + /* It's pretty ugly for find to know about archive formats. + Plus what it could do with cpio archives is very limited. + Better to leave it out. */ + PARSE(ARG_UNIMPLEMENTED, "cpio", cpio), /* Unix */ +#endif + /* gnulib's stdbool.h might have made true and false into macros, + * so we can't leave named 'true' and 'false' tokens, so we have + * to expeant the relevant entries longhand. + */ + {ARG_TEST, "false", parse_false, pred_false}, /* GNU */ + {ARG_TEST, "true", parse_true, pred_true }, /* GNU */ + {ARG_NOOP, "noop", NULL, pred_true }, /* GNU, internal use only */ + + /* Various other cases that don't fit neatly into our macro scheme. */ + {ARG_TEST, "help", parse_help, NULL}, /* GNU */ + {ARG_TEST, "-help", parse_help, NULL}, /* GNU */ + {ARG_TEST, "version", parse_version, NULL}, /* GNU */ + {ARG_TEST, "-version", parse_version, NULL}, /* GNU */ + {0, 0, 0, 0} +}; + + +static const char *first_nonoption_arg = NULL; +static const struct parser_table *noop = NULL; + + +static const struct parser_table* +get_noop(void) +{ + int i; + if (NULL == noop) + { + for (i = 0; parse_table[i].parser_name != 0; i++) + { + if (ARG_NOOP ==parse_table[i].type) + { + noop = &(parse_table[i]); + break; + } + } + } + return noop; +} + +static int +get_stat_Ytime(const struct stat *p, + char what, + struct timespec *ret) +{ + switch (what) + { + case 'a': + *ret = get_stat_atime(p); + return 1; + case 'B': + *ret = get_stat_birthtime(p); + return (ret->tv_nsec >= 0); + case 'c': + *ret = get_stat_ctime(p); + return 1; + case 'm': + *ret = get_stat_mtime(p); + return 1; + default: + assert(0); + abort(); + abort(); + } +} + +void +set_follow_state(enum SymlinkOption opt) +{ + if (options.debug_options & DebugStat) + { + /* For DebugStat, the choice is made at runtime within debug_stat() + * by checking the contents of the symlink_handling variable. + */ + options.xstat = debug_stat; + } + else + { + switch (opt) + { + case SYMLINK_ALWAYS_DEREF: /* -L */ + options.xstat = optionl_stat; + options.no_leaf_check = true; + break; + + case SYMLINK_NEVER_DEREF: /* -P (default) */ + options.xstat = optionp_stat; + /* Can't turn no_leaf_check off because the user might have specified + * -noleaf anyway + */ + break; + + case SYMLINK_DEREF_ARGSONLY: /* -H */ + options.xstat = optionh_stat; + options.no_leaf_check = true; + } + } + options.symlink_handling = opt; +} + + +void +parse_begin_user_args (char **args, int argno, const struct predicate *last, const struct predicate *predicates) +{ + (void) args; + (void) argno; + (void) last; + (void) predicates; + first_nonoption_arg = NULL; +} + +void +parse_end_user_args (char **args, int argno, const struct predicate *last, const struct predicate *predicates) +{ + /* does nothing */ + (void) args; + (void) argno; + (void) last; + (void) predicates; +} + + +/* Check that it is legal to fid the given primary in its + * position and return it. + */ +const struct parser_table* +found_parser(const char *original_arg, const struct parser_table *entry) +{ + /* If this is an option, but we have already had a + * non-option argument, the user may be under the + * impression that the behaviour of the option + * argument is conditional on some preceding + * tests. This might typically be the case with, + * for example, -maxdepth. + * + * The options -daystart and -follow are exempt + * from this treatment, since their positioning + * in the command line does have an effect on + * subsequent tests but not previous ones. That + * might be intentional on the part of the user. + */ + if (entry->type != ARG_POSITIONAL_OPTION) + { + /* Something other than -follow/-daystart. + * If this is an option, check if it followed + * a non-option and if so, issue a warning. + */ + if (entry->type == ARG_OPTION) + { + if ((first_nonoption_arg != NULL) + && options.warnings ) + { + /* option which follows a non-option */ + error (0, 0, + _("warning: you have specified the %s " + "option after a non-option argument %s, " + "but options are not positional (%s affects " + "tests specified before it as well as those " + "specified after it). Please specify options " + "before other arguments.\n"), + original_arg, + first_nonoption_arg, + original_arg); + } + } + else + { + /* Not an option or a positional option, + * so remember we've seen it in order to + * use it in a possible future warning message. + */ + if (first_nonoption_arg == NULL) + { + first_nonoption_arg = original_arg; + } + } + } + + return entry; +} + + +/* Return a pointer to the parser function to invoke for predicate + SEARCH_NAME. + Return NULL if SEARCH_NAME is not a valid predicate name. */ + +const struct parser_table* +find_parser (char *search_name) +{ + int i; + const char *original_arg = search_name; + + /* Ugh. Special case -newerXY. */ + if (0 == strncmp("-newer", search_name, 6) + && (8 == strlen(search_name))) + { + return found_parser(original_arg, &parse_entry_newerXY); + } + + if (*search_name == '-') + search_name++; + + for (i = 0; parse_table[i].parser_name != 0; i++) + { + if (strcmp (parse_table[i].parser_name, search_name) == 0) + { + return found_parser(original_arg, &parse_table[i]); + } + } + return NULL; +} + +static float +estimate_file_age_success_rate(float num_days) +{ + if (num_days < 0.1) + { + /* Assume 1% of files have timestamps in the future */ + return 0.01f; + } + else if (num_days < 1) + { + /* Assume 30% of files have timestamps today */ + return 0.3f; + } + else if (num_days > 100) + { + /* Assume 30% of files are very old */ + return 0.3f; + } + else + { + /* Assume 39% of files are between 1 and 100 days old. */ + return 0.39f; + } +} + +static float +estimate_timestamp_success_rate(time_t when) +{ + int num_days = (options.cur_day_start - when) / 86400; + return estimate_file_age_success_rate(num_days); +} + +/* Collect an argument from the argument list, or + * return false. + */ +static boolean +collect_arg(char **argv, int *arg_ptr, const char **collected_arg) +{ + if ((argv == NULL) || (argv[*arg_ptr] == NULL)) + { + *collected_arg = NULL; + return false; + } + else + { + *collected_arg = argv[*arg_ptr]; + (*arg_ptr)++; + return true; + } +} + +static boolean +collect_arg_stat_info(char **argv, int *arg_ptr, struct stat *p) +{ + const char *filename; + if (collect_arg(argv, arg_ptr, &filename)) + { + if (0 == (options.xstat)(filename, p)) + { + return true; + } + else + { + fatal_file_error(filename); + } + } + else + { + return false; + } +} + +/* The parsers are responsible to continue scanning ARGV for + their arguments. Each parser knows what is and isn't + allowed for itself. + + ARGV is the argument array. + *ARG_PTR is the index to start at in ARGV, + updated to point beyond the last element consumed. + + The predicate structure is updated with the new information. */ + + +static boolean +parse_and (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = get_new_pred (entry); + our_pred->pred_func = pred_and; + our_pred->p_type = BI_OP; + our_pred->p_prec = AND_PREC; + our_pred->need_stat = our_pred->need_type = false; + return true; +} + +static boolean +parse_anewer (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct stat stat_newer; + + set_stat_placeholders(&stat_newer); + if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->args.reftime.xval = XVAL_ATIME; + our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); + our_pred->args.reftime.kind = COMP_GT; + our_pred->est_success_rate = estimate_timestamp_success_rate(stat_newer.st_mtime); + return true; + } + return false; +} + +boolean +parse_closeparen (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = get_new_pred (entry); + our_pred->pred_func = pred_closeparen; + our_pred->p_type = CLOSE_PAREN; + our_pred->p_prec = NO_PREC; + our_pred->need_stat = our_pred->need_type = false; + return true; +} + +static boolean +parse_cnewer (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct stat stat_newer; + + set_stat_placeholders(&stat_newer); + if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->args.reftime.xval = XVAL_CTIME; /* like -newercm */ + our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); + our_pred->args.reftime.kind = COMP_GT; + our_pred->est_success_rate = estimate_timestamp_success_rate(stat_newer.st_mtime); + return true; + } + return false; +} + +static boolean +parse_comma (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = get_new_pred (entry); + our_pred->pred_func = pred_comma; + our_pred->p_type = BI_OP; + our_pred->p_prec = COMMA_PREC; + our_pred->need_stat = our_pred->need_type = false; + our_pred->est_success_rate = 1.0f; + return true; +} + +static boolean +parse_daystart (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct tm *local; + + (void) entry; + (void) argv; + (void) arg_ptr; + + if (options.full_days == false) + { + options.cur_day_start += DAYSECS; + local = localtime (&options.cur_day_start); + options.cur_day_start -= (local + ? (local->tm_sec + local->tm_min * 60 + + local->tm_hour * 3600) + : options.cur_day_start % DAYSECS); + options.full_days = true; + } + return true; +} + +static boolean +parse_delete (const struct parser_table* entry, char *argv[], int *arg_ptr) +{ + struct predicate *our_pred; + (void) argv; + (void) arg_ptr; + + our_pred = insert_primary (entry); + our_pred->side_effects = our_pred->no_default_print = true; + /* -delete implies -depth */ + options.do_dir_first = false; + + /* We do not need stat information because we check for the case + * (errno==EISDIR) in pred_delete. + */ + our_pred->need_stat = our_pred->need_type = false; + + our_pred->est_success_rate = 1.0f; + return true; +} + +static boolean +parse_depth (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + (void) entry; + (void) argv; + + options.do_dir_first = false; + return parse_noop(entry, argv, arg_ptr); +} + +static boolean +parse_d (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + if (options.warnings) + { + error (0, 0, + _("warning: the -d option is deprecated; please use -depth instead, because the latter is a POSIX-compliant feature.")); + } + return parse_depth(entry, argv, arg_ptr); +} + +static boolean +parse_empty (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + (void) argv; + (void) arg_ptr; + + our_pred = insert_primary (entry); + our_pred->est_success_rate = 0.01f; /* assume 1% of files are empty. */ + return true; +} + +static boolean +parse_exec (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_exec_ok ("-exec", entry, get_start_dirfd(), argv, arg_ptr); +} + +static boolean +parse_execdir (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_exec_ok ("-execdir", entry, -1, argv, arg_ptr); +} + +static boolean +parse_false (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = insert_primary (entry); + our_pred->need_stat = our_pred->need_type = false; + our_pred->side_effects = our_pred->no_default_print = false; + our_pred->est_success_rate = 0.0f; + return true; +} + +static boolean +insert_fls (const struct parser_table* entry, const char *filename) +{ + struct predicate *our_pred = insert_primary (entry); + if (filename) + open_output_file (filename, &our_pred->args.printf_vec); + else + open_stdout (&our_pred->args.printf_vec); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->est_success_rate = 1.0f; + return true; +} + + +static boolean +parse_fls (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *filename; + return collect_arg(argv, arg_ptr, &filename) + && insert_fls(entry, filename); +} + +static boolean +parse_follow (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + set_follow_state(SYMLINK_ALWAYS_DEREF); + return parse_noop(entry, argv, arg_ptr); +} + +static boolean +parse_fprint (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + const char *filename; + if (collect_arg(argv, arg_ptr, &filename)) + { + our_pred = insert_primary (entry); + open_output_file (filename, &our_pred->args.printf_vec); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->need_stat = our_pred->need_type = false; + our_pred->est_success_rate = 1.0f; + return true; + } + else + { + return false; + } +} + +static boolean +insert_fprint(const struct parser_table* entry, const char *filename) +{ + struct predicate *our_pred = insert_primary (entry); + if (filename) + open_output_file (filename, &our_pred->args.printf_vec); + else + open_stdout (&our_pred->args.printf_vec); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->need_stat = our_pred->need_type = false; + our_pred->est_success_rate = 1.0f; + return true; +} + + +static boolean +parse_fprint0 (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *filename; + if (collect_arg(argv, arg_ptr, &filename)) + return insert_fprint(entry, filename); + else + return false; +} + +static float estimate_fstype_success_rate(const char *fsname) +{ + struct stat dir_stat; + const char *dir = "/"; + if (0 == stat(dir, &dir_stat)) + { + const char *fstype = filesystem_type(&dir_stat, dir); + /* Assume most files are on the same filesystem type as the root fs. */ + if (0 == strcmp(fsname, fstype)) + return 0.7f; + else + return 0.3f; + } + return 1.0f; +} + + +static boolean +parse_fstype (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *typename; + if (collect_arg(argv, arg_ptr, &typename)) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->args.str = typename; + + /* This is an expensive operation, so although there are + * circumstances where it is selective, we ignore this fact + * because we probably don't want to promote this test to the + * front anyway. + */ + our_pred->est_success_rate = estimate_fstype_success_rate(typename); + return true; + } + else + { + return false; + } +} + +static boolean +parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *p = insert_num (argv, arg_ptr, entry); + if (p) + { + p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2; + return true; + } + else + { + return false; + } +} + + +static int +safe_atoi (const char *s) +{ + long lval; + char *end; + + errno = 0; + lval = strtol(s, &end, 10); + if ( (LONG_MAX == lval) || (LONG_MIN == lval) ) + { + /* max/min possible value, or an error. */ + if (errno == ERANGE) + { + /* too big, or too small. */ + error(1, errno, "%s", s); + } + else + { + /* not a valid number */ + error(1, errno, "%s", s); + } + /* Otherwise, we do a range chack against INT_MAX and INT_MIN + * below. + */ + } + + if (lval > INT_MAX || lval < INT_MIN) + { + /* The number was in range for long, but not int. */ + errno = ERANGE; + error(1, errno, "%s", s); + } + else if (*end) + { + error(1, errno, "Unexpected suffix %s on %s", + quotearg_n_style(0, options.err_quoting_style, end), + quotearg_n_style(1, options.err_quoting_style, s)); + } + else if (end == s) + { + error(1, errno, "Expected an integer: %s", + quotearg_n_style(0, options.err_quoting_style, s)); + } + return (int)lval; +} + + +static boolean +parse_group (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *groupname; + + if (collect_arg(argv, arg_ptr, &groupname)) + { + gid_t gid; + struct predicate *our_pred; + struct group *cur_gr = getgrnam(groupname); + endgrent(); + if (cur_gr) + { + gid = cur_gr->gr_gid; + } + else + { + const int gid_len = strspn (groupname, "0123456789"); + if (gid_len) + { + if (groupname[gid_len] == 0) + { + gid = safe_atoi (groupname); + } + else + { + /* XXX: no test in test suite for this */ + error(1, 0, _("%s is not the name of an existing group and" + " it does not look like a numeric group ID " + "because it has the unexpected suffix %s"), + quotearg_n_style(0, options.err_quoting_style, groupname), + quotearg_n_style(1, options.err_quoting_style, groupname+gid_len)); + return false; + } + } + else + { + if (*groupname) + { + /* XXX: no test in test suite for this */ + error(1, 0, _("%s is not the name of an existing group"), + quotearg_n_style(0, options.err_quoting_style, groupname)); + } + else + { + error(1, 0, _("argument to -group is empty, but should be a group name")); + } + return false; + } + } + our_pred = insert_primary (entry); + our_pred->args.gid = gid; + our_pred->est_success_rate = (our_pred->args.numinfo.l_val < 100) ? 0.99 : 0.2; + return true; + } + return false; +} + +static boolean +parse_help (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + (void) entry; + (void) argv; + (void) arg_ptr; + + usage(stdout, 0, NULL); + puts (_("\n\ +default path is the current directory; default expression is -print\n\ +expression may consist of: operators, options, tests, and actions:\n")); + puts (_("\ +operators (decreasing precedence; -and is implicit where no others are given):\n\ + ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n\ + EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n")); + puts (_("\ +positional options (always true): -daystart -follow -regextype\n\n\ +normal options (always true, specified before other expressions):\n\ + -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n\ + --version -xdev -ignore_readdir_race -noignore_readdir_race\n")); + puts (_("\ +tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n\ + -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n\ + -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex PATTERN\n\ + -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE")); + puts (_("\ + -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n\ + -readable -writable -executable\n\ + -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n\ + -used N -user NAME -xtype [bcdpfls]\n")); + puts (_("\ +actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n\ + -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n\ + -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n\ + -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n\ +")); + puts (_("Report (and track progress on fixing) bugs via the findutils bug-reporting\n\ +page at http://savannah.gnu.org/ or, if you have no web access, by sending\n\ +email to .")); + exit (0); +} + +static float +estimate_pattern_match_rate(const char *pattern, int is_regex) +{ + if (strpbrk(pattern, "*?[") || (is_regex && strpbrk(pattern, "."))) + { + /* A wildcard; assume the pattern matches most files. */ + return 0.8f; + } + else + { + return 0.1f; + } +} + +static boolean +parse_ilname (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *name; + if (collect_arg(argv, arg_ptr, &name)) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->args.str = name; + /* Use the generic glob pattern estimator to figure out how many + * links will match, but bear in mind that most files won't be links. + */ + our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0); + return true; + } + else + { + return false; + } +} + + +/* sanity check the fnmatch() function to make sure that case folding + * is supported (as opposed to just having the flag ignored). + */ +static boolean +fnmatch_sanitycheck(void) +{ + static boolean checked = false; + if (!checked) + { + if (0 != fnmatch("foo", "foo", 0) + || 0 == fnmatch("Foo", "foo", 0) + || 0 != fnmatch("Foo", "foo", FNM_CASEFOLD)) + { + error (1, 0, _("sanity check of the fnmatch() library function failed.")); + return false; + } + checked = true; + } + return checked; +} + + +static boolean +check_name_arg(const char *pred, const char *arg) +{ + if (strchr(arg, '/')) + { + error(0, 0,_("warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '%s %s' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ %s'."), + pred, + safely_quote_err_filename(0, arg), + safely_quote_err_filename(1, arg)); + } + return true; /* allow it anyway */ +} + + + +static boolean +parse_iname (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *name; + fnmatch_sanitycheck(); + if (collect_arg(argv, arg_ptr, &name)) + { + if (check_name_arg("-iname", name)) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->need_stat = our_pred->need_type = false; + our_pred->args.str = name; + our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); + return true; + } + } + return false; +} + +static boolean +parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *p = insert_num (argv, arg_ptr, entry); + if (p) + { + /* inode number is exact match only, so very low proportions of + * files match + */ + p->est_success_rate = 1e-6; + return true; + } + else + { + return false; + } +} + +/* -ipath is deprecated (at RMS's request) in favour of + * -iwholename. See the node "GNU Manuals" in standards.texi + * for the rationale for this (basically, GNU prefers the use + * of the phrase "file name" to "path name" + */ +static boolean +parse_ipath (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + error (0, 0, + _("warning: the predicate -ipath is deprecated; please use -iwholename instead.")); + + return parse_iwholename(entry, argv, arg_ptr); +} + +static boolean +parse_iwholename (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *name; + + fnmatch_sanitycheck(); + if (collect_arg(argv, arg_ptr, &name)) + { + struct predicate *our_pred = insert_primary_withpred (entry, pred_ipath); + our_pred->need_stat = our_pred->need_type = false; + our_pred->args.str = name; + our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); + return true; + } + return false; +} + +static boolean +parse_iregex (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_regex (argv, arg_ptr, entry, RE_ICASE|options.regex_options); +} + +static boolean +parse_links (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *p = insert_num (argv, arg_ptr, entry); + if (p) + { + if (p->args.numinfo.l_val == 1) + p->est_success_rate = 0.99; + else if (p->args.numinfo.l_val == 2) + p->est_success_rate = 0.01; + else + p->est_success_rate = 1e-3; + return true; + } + else + { + return false; + } +} + +static boolean +parse_lname (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *name; + fnmatch_sanitycheck(); + if (collect_arg(argv, arg_ptr, &name)) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->args.str = name; + our_pred->est_success_rate = 0.1 * estimate_pattern_match_rate(name, 0); + return true; + } + return false; +} + +static boolean +parse_ls (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + (void) &argv; + (void) &arg_ptr; + return insert_fls(entry, NULL); +} + +static boolean +insert_depthspec(const struct parser_table* entry, char **argv, int *arg_ptr, + int *limitptr) +{ + const char *depthstr; + int depth_len; + const char *predicate = argv[(*arg_ptr)-1]; + if (collect_arg(argv, arg_ptr, &depthstr)) + { + depth_len = strspn (depthstr, "0123456789"); + if ((depth_len > 0) && (depthstr[depth_len] == 0)) + { + (*limitptr) = safe_atoi (depthstr); + if (*limitptr >= 0) + { + return parse_noop(entry, argv, arg_ptr); + } + } + error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"), + predicate, + quotearg_n_style(0, options.err_quoting_style, depthstr)); + return false; + } + /* missing argument */ + return false; +} + + +static boolean +parse_maxdepth (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_depthspec(entry, argv, arg_ptr, &options.maxdepth); +} + +static boolean +parse_mindepth (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_depthspec(entry, argv, arg_ptr, &options.mindepth); +} + + +static boolean +do_parse_xmin (const struct parser_table* entry, char **argv, int *arg_ptr, enum xval xv) +{ + const char *minutes; + + if (collect_arg(argv, arg_ptr, &minutes)) + { + struct time_val tval; + tval.xval = xv; + if (get_relative_timestamp(minutes, &tval, + options.cur_day_start + DAYSECS, 60, + "arithmetic overflow while converting %s " + "minutes to a number of seconds")) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->args.reftime = tval; + our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec); + return true; + } + } + return false; +} +static boolean +parse_amin (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return do_parse_xmin(entry, argv, arg_ptr, XVAL_ATIME); +} + +static boolean +parse_cmin (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return do_parse_xmin(entry, argv, arg_ptr, XVAL_CTIME); +} + + +static boolean +parse_mmin (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return do_parse_xmin(entry, argv, arg_ptr, XVAL_MTIME); +} + +static boolean +parse_name (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *name; + if (collect_arg(argv, arg_ptr, &name)) + { + fnmatch_sanitycheck(); + if (check_name_arg("-name", name)) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->need_stat = our_pred->need_type = false; + our_pred->args.str = name; + our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); + return true; + } + } + return false; +} + +static boolean +parse_negate (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) &argv; + (void) &arg_ptr; + + our_pred = get_new_pred_chk_op (entry); + our_pred->pred_func = pred_negate; + our_pred->p_type = UNI_OP; + our_pred->p_prec = NEGATE_PREC; + our_pred->need_stat = our_pred->need_type = false; + return true; +} + +static boolean +parse_newer (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + struct stat stat_newer; + + set_stat_placeholders(&stat_newer); + if (collect_arg_stat_info(argv, arg_ptr, &stat_newer)) + { + our_pred = insert_primary (entry); + our_pred->args.reftime.ts = get_stat_mtime(&stat_newer); + our_pred->args.reftime.xval = XVAL_MTIME; + our_pred->args.reftime.kind = COMP_GT; + our_pred->est_success_rate = estimate_timestamp_success_rate(stat_newer.st_mtime); + return true; + } + return false; +} + + +static boolean +parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + (void) argv; + (void) arg_ptr; + + if ((argv == NULL) || (argv[*arg_ptr] == NULL)) + { + return false; + } + else if (8u != strlen(argv[*arg_ptr])) + { + return false; + } + else + { + char x, y; + const char validchars[] = "aBcmt"; + + assert(0 == strncmp("-newer", argv[*arg_ptr], 6)); + x = argv[*arg_ptr][6]; + y = argv[*arg_ptr][7]; + + +#if !defined(HAVE_STRUCT_STAT_ST_BIRTHTIME) && !defined(HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) && !defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC) + if ('B' == x || 'B' == y) + { + error(0, 0, + _("This system does not provide a way to find the birth time of a file.")); + return 0; + } +#endif + + /* -newertY (for any Y) is invalid. */ + if (x == 't' + || 0 == strchr(validchars, x) + || 0 == strchr( validchars, y)) + { + return false; + } + else + { + struct predicate *our_pred; + + /* Because this item is ARG_SPECIAL_PARSE, we have to advance arg_ptr + * past the test name (for most other tests, this is already done) + */ + (*arg_ptr)++; + + our_pred = insert_primary (entry); + + + switch (x) + { + case 'a': + our_pred->args.reftime.xval = XVAL_ATIME; + break; + case 'B': + our_pred->args.reftime.xval = XVAL_BIRTHTIME; + break; + case 'c': + our_pred->args.reftime.xval = XVAL_CTIME; + break; + case 'm': + our_pred->args.reftime.xval = XVAL_MTIME; + break; + default: + assert(strchr(validchars, x)); + assert(0); + } + + if ('t' == y) + { + if (!get_date(&our_pred->args.reftime.ts, + argv[*arg_ptr], + &options.start_time)) + { + error(1, 0, + _("I cannot figure out how to interpret %s as a date or time"), + quotearg_n_style(0, options.err_quoting_style, argv[*arg_ptr])); + } + } + else + { + struct stat stat_newer; + + /* Stat the named file. */ + set_stat_placeholders(&stat_newer); + if ((*options.xstat) (argv[*arg_ptr], &stat_newer)) + fatal_file_error(argv[*arg_ptr]); + + if (!get_stat_Ytime(&stat_newer, y, &our_pred->args.reftime.ts)) + { + /* We cannot extract a timestamp from the struct stat. */ + error(1, 0, _("Cannot obtain birth time of file %s"), + safely_quote_err_filename(0, argv[*arg_ptr])); + } + } + our_pred->args.reftime.kind = COMP_GT; + our_pred->est_success_rate = estimate_timestamp_success_rate(our_pred->args.reftime.ts.tv_sec); + (*arg_ptr)++; + + assert(our_pred->pred_func != NULL); + assert(our_pred->pred_func == pred_newerXY); + assert(our_pred->need_stat); + return true; + } + } +} + + +static boolean +parse_noleaf (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + options.no_leaf_check = true; + return parse_noop(entry, argv, arg_ptr); +} + +#ifdef CACHE_IDS +/* Arbitrary amount by which to increase size + of `uid_unused' and `gid_unused'. */ +#define ALLOC_STEP 2048 + +/* Boolean: if uid_unused[n] is nonzero, then UID n has no passwd entry. */ +char *uid_unused = NULL; + +/* Number of elements in `uid_unused'. */ +unsigned uid_allocated; + +/* Similar for GIDs and group entries. */ +char *gid_unused = NULL; +unsigned gid_allocated; +#endif + +static boolean +parse_nogroup (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) &argv; + (void) &arg_ptr; + + our_pred = insert_primary (entry); + our_pred->est_success_rate = 1e-4; +#ifdef CACHE_IDS + if (gid_unused == NULL) + { + struct group *gr; + + gid_allocated = ALLOC_STEP; + gid_unused = xmalloc (gid_allocated); + memset (gid_unused, 1, gid_allocated); + setgrent (); + while ((gr = getgrent ()) != NULL) + { + if ((unsigned) gr->gr_gid >= gid_allocated) + { + unsigned new_allocated = (unsigned) gr->gr_gid + ALLOC_STEP; + gid_unused = xrealloc (gid_unused, new_allocated); + memset (gid_unused + gid_allocated, 1, + new_allocated - gid_allocated); + gid_allocated = new_allocated; + } + gid_unused[(unsigned) gr->gr_gid] = 0; + } + endgrent (); + } +#endif + return true; +} + +static boolean +parse_nouser (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + (void) argv; + (void) arg_ptr; + + + our_pred = insert_primary (entry); + our_pred->est_success_rate = 1e-3; +#ifdef CACHE_IDS + if (uid_unused == NULL) + { + struct passwd *pw; + + uid_allocated = ALLOC_STEP; + uid_unused = xmalloc (uid_allocated); + memset (uid_unused, 1, uid_allocated); + setpwent (); + while ((pw = getpwent ()) != NULL) + { + if ((unsigned) pw->pw_uid >= uid_allocated) + { + unsigned new_allocated = (unsigned) pw->pw_uid + ALLOC_STEP; + uid_unused = xrealloc (uid_unused, new_allocated); + memset (uid_unused + uid_allocated, 1, + new_allocated - uid_allocated); + uid_allocated = new_allocated; + } + uid_unused[(unsigned) pw->pw_uid] = 0; + } + endpwent (); + } +#endif + return true; +} + +static boolean +parse_nowarn (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + options.warnings = false; + return parse_noop(entry, argv, arg_ptr); +} + +static boolean +parse_ok (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_exec_ok ("-ok", entry, get_start_dirfd(), argv, arg_ptr); +} + +static boolean +parse_okdir (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_exec_ok ("-okdir", entry, -1, argv, arg_ptr); +} + +boolean +parse_openparen (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = get_new_pred_chk_op (entry); + our_pred->pred_func = pred_openparen; + our_pred->p_type = OPEN_PAREN; + our_pred->p_prec = NO_PREC; + our_pred->need_stat = our_pred->need_type = false; + return true; +} + +static boolean +parse_or (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = get_new_pred (entry); + our_pred->pred_func = pred_or; + our_pred->p_type = BI_OP; + our_pred->p_prec = OR_PREC; + our_pred->need_stat = our_pred->need_type = false; + return true; +} + +/* -path is deprecated (at RMS's request) in favour of + * -iwholename. See the node "GNU Manuals" in standards.texi + * for the rationale for this (basically, GNU prefers the use + * of the phrase "file name" to "path name". + * + * We do not issue a warning that this usage is deprecated + * since HPUX find supports this predicate also. + */ +static boolean +parse_path (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return parse_wholename(entry, argv, arg_ptr); +} + +static boolean +parse_wholename (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *name; + if (collect_arg(argv, arg_ptr, &name)) + { + struct predicate *our_pred = insert_primary_withpred (entry, pred_path); + our_pred->need_stat = our_pred->need_type = false; + our_pred->args.str = name; + our_pred->est_success_rate = estimate_pattern_match_rate(name, 0); + return true; + } + return false; +} + +static boolean +parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + mode_t perm_val[2]; + float rate; + int mode_start = 0; + boolean havekind = false; + enum permissions_type kind = PERM_EXACT; + struct mode_change *change = NULL; + struct predicate *our_pred; + const char *perm_expr; + + if (!collect_arg(argv, arg_ptr, &perm_expr)) + return false; + + switch (perm_expr[0]) + { + case '-': + mode_start = 1; + kind = PERM_AT_LEAST; + havekind = true; + rate = 0.2; + break; + + case '+': + change = mode_compile (perm_expr); + if (NULL == change) + { + /* Most likely the caller is an old script that is still + * using the obsolete GNU syntax '-perm +MODE'. This old + * syntax was withdrawn in favor of '-perm /MODE' because + * it is incompatible with POSIX in some cases, but we + * still support uses of it that are not incompatible with + * POSIX. + */ + mode_start = 1; + kind = PERM_ANY; + rate = 0.3; + } + else + { + /* This is a POSIX-compatible usage */ + mode_start = 0; + kind = PERM_EXACT; + rate = 0.1; + } + havekind = true; + break; + + case '/': /* GNU extension */ + mode_start = 1; + kind = PERM_ANY; + havekind = true; + rate = 0.3; + break; + + default: + /* For example, '-perm 0644', which is valid and matches + * only files whose mode is exactly 0644. + */ + mode_start = 0; + kind = PERM_EXACT; + havekind = true; + rate = 0.01; + break; + } + + if (NULL == change) + { + change = mode_compile (perm_expr + mode_start); + if (NULL == change) + error (1, 0, _("invalid mode %s"), + quotearg_n_style(0, options.err_quoting_style, perm_expr)); + } + perm_val[0] = mode_adjust (0, false, 0, change, NULL); + perm_val[1] = mode_adjust (0, true, 0, change, NULL); + free (change); + + if (('/' == perm_expr[0]) && (0 == perm_val[0]) && (0 == perm_val[1])) + { + /* The meaning of -perm /000 will change in the future. It + * currently matches no files, but like -perm -000 it should + * match all files. + * + * Starting in 2005, we used to issue a warning message + * informing the user that the behaviour would change in the + * future. We have now changed the behaviour and issue a + * warning message that the behaviour recently changed. + */ + error (0, 0, + _("warning: you have specified a mode pattern %s (which is " + "equivalent to /000). The meaning of -perm /000 has now been " + "changed to be consistent with -perm -000; that is, while it " + "used to match no files, it now matches all files."), + perm_expr); + + kind = PERM_AT_LEAST; + havekind = true; + + /* The "magic" number below is just the fraction of files on my + * own system that "-type l -xtype l" fails for (i.e. unbroken symlinks). + * Actual totals are 1472 and 1073833. + */ + rate = 0.9986; /* probably matches anything but a broken symlink */ + } + + our_pred = insert_primary (entry); + our_pred->est_success_rate = rate; + if (havekind) + { + our_pred->args.perm.kind = kind; + } + else + { + + switch (perm_expr[0]) + { + case '-': + our_pred->args.perm.kind = PERM_AT_LEAST; + break; + case '+': + our_pred->args.perm.kind = PERM_ANY; + break; + default: + our_pred->args.perm.kind = PERM_EXACT; + break; + } + } + memcpy (our_pred->args.perm.val, perm_val, sizeof perm_val); + return true; +} + +boolean +parse_print (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = insert_primary (entry); + /* -print has the side effect of printing. This prevents us + from doing undesired multiple printing when the user has + already specified -print. */ + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->need_stat = our_pred->need_type = false; + open_stdout(&our_pred->args.printf_vec); + return true; +} + +static boolean +parse_print0 (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_fprint(entry, NULL); +} + +static boolean +parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *format; + if (collect_arg(argv, arg_ptr, &format)) + { + struct format_val fmt; + open_stdout(&fmt); + return insert_fprintf (&fmt, entry, pred_fprintf, format); + } + return false; +} + +static boolean +parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *format, *filename; + if (collect_arg(argv, arg_ptr, &filename)) + { + if (collect_arg(argv, arg_ptr, &format)) + { + struct format_val fmt; + open_output_file (filename, &fmt); + return insert_fprintf (&fmt, entry, pred_fprintf, format); + } + } + return false; +} + +static boolean +parse_prune (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = insert_primary (entry); + our_pred->need_stat = our_pred->need_type = false; + /* -prune has a side effect that it does not descend into + the current directory. */ + our_pred->side_effects = true; + our_pred->no_default_print = false; + return true; +} + +static boolean +parse_quit (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred = insert_primary (entry); + (void) argv; + (void) arg_ptr; + our_pred->need_stat = our_pred->need_type = false; + our_pred->side_effects = true; /* Exiting is a side effect... */ + our_pred->no_default_print = false; /* Don't inhibit the default print, though. */ + our_pred->est_success_rate = 1.0f; + return true; +} + + +static boolean +parse_regextype (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *type_name; + if (collect_arg(argv, arg_ptr, &type_name)) + { + /* collect the regex type name */ + options.regex_options = get_regex_type(type_name); + return parse_noop(entry, argv, arg_ptr); + } + return false; +} + + +static boolean +parse_regex (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_regex (argv, arg_ptr, entry, options.regex_options); +} + +static boolean +insert_regex (char **argv, int *arg_ptr, const struct parser_table *entry, int regex_options) +{ + const char *rx; + if (collect_arg(argv, arg_ptr, &rx)) + { + struct re_pattern_buffer *re; + const char *error_message; + struct predicate *our_pred = insert_primary_withpred (entry, pred_regex); + our_pred->need_stat = our_pred->need_type = false; + re = (struct re_pattern_buffer *) + xmalloc (sizeof (struct re_pattern_buffer)); + our_pred->args.regex = re; + re->allocated = 100; + re->buffer = (unsigned char *) xmalloc (re->allocated); + re->fastmap = NULL; + + re_set_syntax(regex_options); + re->syntax = regex_options; + re->translate = NULL; + + error_message = re_compile_pattern (rx, strlen(rx), re); + if (error_message) + error (1, 0, "%s", error_message); + our_pred->est_success_rate = estimate_pattern_match_rate(rx, 1); + return true; + } + return false; +} + +static boolean +parse_size (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + uintmax_t num; + char suffix; + enum comparison_type c_type; + + int blksize = 512; + int len; + + /* XXX: cannot (yet) convert to ue collect_arg() as this + * function modifies the args in-place. + */ + if ((argv == NULL) || (argv[*arg_ptr] == NULL)) + return false; + + len = strlen (argv[*arg_ptr]); + if (len == 0) + error (1, 0, _("invalid null argument to -size")); + + suffix = argv[*arg_ptr][len - 1]; + switch (suffix) + { + case 'b': + blksize = 512; + argv[*arg_ptr][len - 1] = '\0'; + break; + + case 'c': + blksize = 1; + argv[*arg_ptr][len - 1] = '\0'; + break; + + case 'k': + blksize = 1024; + argv[*arg_ptr][len - 1] = '\0'; + break; + + case 'M': /* Megabytes */ + blksize = 1024*1024; + argv[*arg_ptr][len - 1] = '\0'; + break; + + case 'G': /* Gigabytes */ + blksize = 1024*1024*1024; + argv[*arg_ptr][len - 1] = '\0'; + break; + + case 'w': + blksize = 2; + argv[*arg_ptr][len - 1] = '\0'; + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + break; + + default: + error (1, 0, _("invalid -size type `%c'"), argv[*arg_ptr][len - 1]); + } + /* TODO: accept fractional megabytes etc. ? */ + if (!get_num (argv[*arg_ptr], &num, &c_type)) + { + error(1, 0, _("Invalid argument `%s%c' to -size"), argv[*arg_ptr], (int)suffix); + return false; + } + our_pred = insert_primary (entry); + our_pred->args.size.kind = c_type; + our_pred->args.size.blocksize = blksize; + our_pred->args.size.size = num; + our_pred->need_stat = true; + our_pred->need_type = false; + + if (COMP_GT == c_type) + our_pred->est_success_rate = (num*blksize > 20480) ? 0.1 : 0.9; + else if (COMP_LT == c_type) + our_pred->est_success_rate = (num*blksize > 20480) ? 0.9 : 0.1; + else + our_pred->est_success_rate = 0.01; + + (*arg_ptr)++; + return true; +} + + +static boolean +parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + /* General idea: stat the file, remember device and inode numbers. + * If a candidate file matches those, it's the same file. + */ + struct predicate *our_pred; + struct stat st, fst; + int fd, openflags; + + set_stat_placeholders(&st); + if (!collect_arg_stat_info(argv, arg_ptr, &st)) + return false; + + set_stat_placeholders(&fst); + /* POSIX systems are free to re-use the inode number of a deleted + * file. To ensure that we are not fooled by inode reuse, we hold + * the file open if we can. This would prevent the system reusing + * the file. + */ + fd = -3; /* means, uninitialised */ + openflags = O_RDONLY; + + if (options.symlink_handling == SYMLINK_NEVER_DEREF) + { + if (options.open_nofollow_available) + { + assert(O_NOFOLLOW != 0); + openflags |= O_NOFOLLOW; + fd = -1; /* safe to open it. */ + } + else + { + if (S_ISLNK(st.st_mode)) + { + /* no way to ensure that a symlink will not be followed + * by open(2), so fall back on using lstat(). Accept + * the risk that the named file will be deleted and + * replaced with another having the same inode. + * + * Avoid opening the file. + */ + fd = -2; /* Do not open it */ + } + else + { + fd = -1; + /* Race condition here: the file might become a symlink here. */ + } + } + } + else + { + /* We want to dereference the symlink anyway */ + fd = -1; /* safe to open it without O_NOFOLLOW */ + } + + assert(fd != -3); /* check we made a decision */ + if (fd == -1) + { + /* Race condition here. The file might become a + * symbolic link in between out call to stat and + * the call to open. + */ + fd = open(argv[*arg_ptr], openflags); + + if (fd >= 0) + { + /* We stat the file again here to prevent a race condition + * between the first stat and the call to open(2). + */ + if (0 != fstat(fd, &fst)) + { + fatal_file_error(argv[*arg_ptr]); + } + else + { + /* Worry about the race condition. If the file became a + * symlink after our first stat and before our call to + * open, fst may contain the stat information for the + * destination of the link, not the link itself. + */ + if ((*options.xstat) (argv[*arg_ptr], &st)) + fatal_file_error(argv[*arg_ptr]); + + if ((options.symlink_handling == SYMLINK_NEVER_DEREF) + && (!options.open_nofollow_available)) + { + if (S_ISLNK(st.st_mode)) + { + /* We lost the race. Leave the data in st. The + * file descriptor points to the wrong thing. + */ + close(fd); + fd = -1; + } + else + { + /* Several possibilities here: + * 1. There was no race + * 2. The file changed into a symlink after the stat and + * before the open, and then back into a non-symlink + * before the second stat. + * + * In case (1) there is no problem. In case (2), + * the stat() and fstat() calls will have returned + * different data. O_NOFOLLOW was not available, + * so the open() call may have followed a symlink + * even if the -P option is in effect. + */ + if ((st.st_dev == fst.st_dev) + && (st.st_ino == fst.st_ino)) + { + /* No race. No need to copy fst to st, + * since they should be identical (modulo + * differences in padding bytes). + */ + } + else + { + /* We lost the race. Leave the data in st. The + * file descriptor points to the wrong thing. + */ + close(fd); + fd = -1; + } + } + } + else + { + st = fst; + } + } + } + } + + our_pred = insert_primary (entry); + our_pred->args.samefileid.ino = st.st_ino; + our_pred->args.samefileid.dev = st.st_dev; + our_pred->args.samefileid.fd = fd; + our_pred->need_type = false; + our_pred->need_stat = true; + our_pred->est_success_rate = 0.01f; + return true; +} + +#if 0 +/* This function is commented out partly because support for it is + * uneven. + */ +static boolean +parse_show_control_chars (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *arg; + const char *errmsg = _("The -show-control-chars option takes a single argument which " + "must be 'literal' or 'safe'"); + + if ((argv == NULL) || (argv[*arg_ptr] == NULL)) + { + error (1, errno, "%s", errmsg); + return false; + } + else + { + arg = argv[*arg_ptr]; + + if (0 == strcmp("literal", arg)) + { + options.literal_control_chars = true; + } + else if (0 == strcmp("safe", arg)) + { + options.literal_control_chars = false; + } + else + { + error (1, errno, "%s", errmsg); + return false; + } + (*arg_ptr)++; /* consume the argument. */ + return true; + } +} +#endif + + +static boolean +parse_true (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + + (void) argv; + (void) arg_ptr; + + our_pred = insert_primary (entry); + our_pred->need_stat = our_pred->need_type = false; + our_pred->est_success_rate = 1.0f; + return true; +} + +static boolean +parse_noop (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + (void) entry; + return parse_true(get_noop(), argv, arg_ptr); +} + +static boolean +parse_accesscheck (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + (void) argv; + (void) arg_ptr; + our_pred = insert_primary (entry); + our_pred->need_stat = our_pred->need_type = false; + our_pred->side_effects = our_pred->no_default_print = false; + if (pred_is(our_pred, pred_executable)) + our_pred->est_success_rate = 0.2; + else + our_pred->est_success_rate = 0.9; + return true; +} + +static boolean +parse_type (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_type (argv, arg_ptr, entry, pred_type); +} + +static boolean +parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *p = insert_num (argv, arg_ptr, entry); + if (p) + { + p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2; + return true; + } + else + { + return false; + } +} + +static boolean +parse_used (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + struct predicate *our_pred; + struct time_val tval; + const char *offset_str; + const char *errmsg = "arithmetic overflow while converting %s days to a number of seconds"; + + if (collect_arg(argv, arg_ptr, &offset_str)) + { + /* The timespec is actually a delta value, so we use an origin of 0. */ + if (get_relative_timestamp(offset_str, &tval, 0, DAYSECS, errmsg)) + { + our_pred = insert_primary (entry); + our_pred->args.reftime = tval; + our_pred->est_success_rate = estimate_file_age_success_rate(tval.ts.tv_sec / DAYSECS); + return true; + } + else + { + error(1, 0, _("Invalid argument %s to -used"), offset_str); + return false; + } + } + else + { + return false; /* missing argument */ + } +} + +static boolean +parse_user (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + const char *username; + + if (collect_arg(argv, arg_ptr, &username)) + { + struct predicate *our_pred; + uid_t uid; + struct passwd *cur_pwd = getpwnam(username); + endpwent(); + if (cur_pwd != NULL) + { + uid = cur_pwd->pw_uid; + } + else + { + int uid_len = strspn (username, "0123456789"); + if (uid_len && (username[uid_len]==0)) + uid = safe_atoi (username); + else + return false; + } + our_pred = insert_primary (entry); + our_pred->args.uid = uid; + our_pred->est_success_rate = (our_pred->args.uid < 100) ? 0.99 : 0.2; + return true; + } + return false; +} + +static boolean +parse_version (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + extern char *version_string; + int features = 0; + int flags; + + (void) argv; + (void) arg_ptr; + (void) entry; + + fflush (stderr); + printf (_("GNU find version %s\n"), version_string); + printf (_("Built using GNU gnulib version %s\n"), gnulib_version); + printf (_("Features enabled: ")); + +#if CACHE_IDS + printf("CACHE_IDS "); + ++features; +#endif +#if DEBUG + printf("DEBUG "); + ++features; +#endif +#if DEBUG_STAT + printf("DEBUG_STAT "); + ++features; +#endif +#if defined(USE_STRUCT_DIRENT_D_TYPE) && defined(HAVE_STRUCT_DIRENT_D_TYPE) + printf("D_TYPE "); + ++features; +#endif +#if defined(O_NOFOLLOW) + printf("O_NOFOLLOW(%s) ", + (options.open_nofollow_available ? "enabled" : "disabled")); + ++features; +#endif +#if defined(LEAF_OPTIMISATION) + printf("LEAF_OPTIMISATION "); + ++features; +#endif + + flags = 0; + if (is_fts_enabled(&flags)) + { + int nflags = 0; + printf("FTS("); + ++features; + + if (flags & FTS_CWDFD) + { + if (nflags) + { + printf(","); + } + printf("FTS_CWDFD"); + ++nflags; + } + printf(") "); + } + + printf("CBO(level=%d) ", (int)(options.optimisation_level)); + ++features; + + if (0 == features) + { + /* For the moment, leave this as English in case someone wants + to parse these strings. */ + printf("none"); + } + printf("\n"); + + exit (0); +} + +static boolean +parse_xdev (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + options.stay_on_filesystem = true; + return parse_noop(entry, argv, arg_ptr); +} + +static boolean +parse_ignore_race (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + options.ignore_readdir_race = true; + return parse_noop(entry, argv, arg_ptr); +} + +static boolean +parse_noignore_race (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + options.ignore_readdir_race = false; + return parse_noop(entry, argv, arg_ptr); +} + +static boolean +parse_warn (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + options.warnings = true; + return parse_noop(entry, argv, arg_ptr); +} + +static boolean +parse_xtype (const struct parser_table* entry, char **argv, int *arg_ptr) +{ + return insert_type (argv, arg_ptr, entry, pred_xtype); +} + +static boolean +insert_type (char **argv, int *arg_ptr, const struct parser_table *entry, PRED_FUNC which_pred) +{ + mode_t type_cell; + struct predicate *our_pred; + float rate = 0.5; + const char *typeletter; + + if (collect_arg(argv, arg_ptr, &typeletter)) + { + if (strlen(typeletter) != 1u) + { + error(1, 0, _("Arguments to -type should contain only one letter")); + return false; + } + + switch (typeletter[0]) + { + case 'b': /* block special */ + type_cell = S_IFBLK; + rate = 0.01f; + break; + case 'c': /* character special */ + type_cell = S_IFCHR; + rate = 0.01f; + break; + case 'd': /* directory */ + type_cell = S_IFDIR; + rate = 0.4f; + break; + case 'f': /* regular file */ + type_cell = S_IFREG; + rate = 0.95f; + break; +#ifdef S_IFLNK + case 'l': /* symbolic link */ + type_cell = S_IFLNK; + rate = 0.1f; + break; +#endif +#ifdef S_IFIFO + case 'p': /* pipe */ + type_cell = S_IFIFO; + rate = 0.01f; + break; +#endif +#ifdef S_IFSOCK + case 's': /* socket */ + type_cell = S_IFSOCK; + rate = 0.01f; + break; +#endif +#ifdef S_IFDOOR + case 'D': /* Solaris door */ + type_cell = S_IFDOOR; + rate = 0.01f; + break; +#endif + default: /* None of the above ... nuke 'em. */ + error(1, 0, _("Unknown argument to -type: %c"), (*typeletter)); + return false; + } + our_pred = insert_primary_withpred (entry, which_pred); + our_pred->est_success_rate = rate; + + /* Figure out if we will need to stat the file, because if we don't + * need to follow symlinks, we can avoid a stat call by using + * struct dirent.d_type. + */ + if (which_pred == pred_xtype) + { + our_pred->need_stat = true; + our_pred->need_type = false; + } + else + { + our_pred->need_stat = false; /* struct dirent is enough */ + our_pred->need_type = true; + } + our_pred->args.type = type_cell; + return true; + } + return false; +} + + +/* Return true if the file accessed via FP is a terminal. + */ +static boolean +stream_is_tty(FILE *fp) +{ + int fd = fileno(fp); + if (-1 == fd) + { + return false; /* not a valid stream */ + } + else + { + return isatty(fd) ? true : false; + } + +} + + + + +/* XXX: do we need to pass FUNC to this function? */ +static boolean +insert_fprintf (struct format_val *vec, + const struct parser_table *entry, PRED_FUNC func, + const char *format_const) +{ + char *format = (char*)format_const; /* XXX: casting away constness */ + register char *scan; /* Current address in scanning `format'. */ + register char *scan2; /* Address inside of element being scanned. */ + struct segment **segmentp; /* Address of current segment. */ + struct predicate *our_pred; + + our_pred = insert_primary_withpred (entry, func); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->args.printf_vec = *vec; + our_pred->need_type = false; + our_pred->need_stat = false; + our_pred->p_cost = NeedsNothing; + + segmentp = &our_pred->args.printf_vec.segment; + *segmentp = NULL; + + for (scan = format; *scan; scan++) + { + if (*scan == '\\') + { + scan2 = scan + 1; + if (*scan2 >= '0' && *scan2 <= '7') + { + register int n, i; + + for (i = n = 0; i < 3 && (*scan2 >= '0' && *scan2 <= '7'); + i++, scan2++) + n = 8 * n + *scan2 - '0'; + scan2--; + *scan = n; + } + else + { + switch (*scan2) + { + case 'a': + *scan = 7; + break; + case 'b': + *scan = '\b'; + break; + case 'c': + make_segment (segmentp, format, scan - format, + KIND_STOP, 0, 0, + our_pred); + if (our_pred->need_stat && (our_pred->p_cost < NeedsStatInfo)) + our_pred->p_cost = NeedsStatInfo; + return true; + case 'f': + *scan = '\f'; + break; + case 'n': + *scan = '\n'; + break; + case 'r': + *scan = '\r'; + break; + case 't': + *scan = '\t'; + break; + case 'v': + *scan = '\v'; + break; + case '\\': + /* *scan = '\\'; * it already is */ + break; + default: + error (0, 0, + _("warning: unrecognized escape `\\%c'"), *scan2); + scan++; + continue; + } + } + segmentp = make_segment (segmentp, format, scan - format + 1, + KIND_PLAIN, 0, 0, + our_pred); + format = scan2 + 1; /* Move past the escape. */ + scan = scan2; /* Incremented immediately by `for'. */ + } + else if (*scan == '%') + { + if (scan[1] == 0) + { + /* Trailing %. We don't like those. */ + error (1, 0, _("error: %s at end of format string"), scan); + } + else if (scan[1] == '%') + { + segmentp = make_segment (segmentp, format, scan - format + 1, + KIND_PLAIN, 0, 0, + our_pred); + scan++; + format = scan + 1; + continue; + } + /* Scan past flags, width and precision, to verify kind. */ + for (scan2 = scan; *++scan2 && strchr ("-+ #", *scan2);) + /* Do nothing. */ ; + while (ISDIGIT (*scan2)) + scan2++; + if (*scan2 == '.') + for (scan2++; ISDIGIT (*scan2); scan2++) + /* Do nothing. */ ; + if (strchr ("abcdDfFgGhHiklmMnpPsStuUyY", *scan2)) + { + segmentp = make_segment (segmentp, format, scan2 - format, + KIND_FORMAT, *scan2, 0, + our_pred); + scan = scan2; + format = scan + 1; + } + else if (strchr ("ABCT", *scan2) && scan2[1]) + { + segmentp = make_segment (segmentp, format, scan2 - format, + KIND_FORMAT, scan2[0], scan2[1], + our_pred); + scan = scan2 + 1; + format = scan + 1; + continue; + } + else + { + /* An unrecognized % escape. Print the char after the %. */ + error (0, 0, _("warning: unrecognized format directive `%%%c'"), + *scan2); + segmentp = make_segment (segmentp, format, scan - format, + KIND_PLAIN, 0, 0, + our_pred); + format = scan + 1; + continue; + } + } + } + + if (scan > format) + make_segment (segmentp, format, scan - format, KIND_PLAIN, 0, 0, + our_pred); + return true; +} + +/* Create a new fprintf segment in *SEGMENT, with type KIND, + from the text in FORMAT, which has length LEN. + Return the address of the `next' pointer of the new segment. */ + +static struct segment ** +make_segment (struct segment **segment, + char *format, + int len, + int kind, + char format_char, + char aux_format_char, + struct predicate *pred) +{ + enum EvaluationCost mycost = NeedsNothing; + char *fmt; + + *segment = (struct segment *) xmalloc (sizeof (struct segment)); + + (*segment)->segkind = kind; + (*segment)->format_char[0] = format_char; + (*segment)->format_char[1] = aux_format_char; + (*segment)->next = NULL; + (*segment)->text_len = len; + + fmt = (*segment)->text = xmalloc (len + sizeof "d"); + strncpy (fmt, format, len); + fmt += len; + + switch (kind) + { + case KIND_PLAIN: /* Plain text string, no % conversion. */ + case KIND_STOP: /* Terminate argument, no newline. */ + assert(0 == format_char); + assert(0 == aux_format_char); + *fmt = '\0'; + if (mycost > pred->p_cost) + pred->p_cost = NeedsNothing; + return &(*segment)->next; + break; + } + + assert(kind == KIND_FORMAT); + switch (format_char) + { + case 'l': /* object of symlink */ + pred->need_stat = true; + mycost = NeedsLinkName; + *fmt++ = 's'; + break; + + case 'y': /* file type */ + pred->need_type = true; + mycost = NeedsType; + *fmt++ = 's'; + break; + + case 'a': /* atime in `ctime' format */ + case 'A': /* atime in user-specified strftime format */ + case 'B': /* birth time in user-specified strftime format */ + case 'c': /* ctime in `ctime' format */ + case 'C': /* ctime in user-specified strftime format */ + case 'F': /* filesystem type */ + case 'g': /* group name */ + case 'i': /* inode number */ + case 'M': /* mode in `ls -l' format (eg., "drwxr-xr-x") */ + case 's': /* size in bytes */ + case 't': /* mtime in `ctime' format */ + case 'T': /* mtime in user-specified strftime format */ + case 'u': /* user name */ + pred->need_stat = true; + mycost = NeedsStatInfo; + *fmt++ = 's'; + break; + + case 'S': /* sparseness */ + pred->need_stat = true; + mycost = NeedsStatInfo; + *fmt++ = 'g'; + break; + + case 'Y': /* symlink pointed file type */ + pred->need_stat = true; + mycost = NeedsType; /* true for amortised effect */ + *fmt++ = 's'; + break; + + case 'f': /* basename of path */ + case 'h': /* leading directories part of path */ + case 'p': /* pathname */ + case 'P': /* pathname with ARGV element stripped */ + *fmt++ = 's'; + break; + + case 'H': /* ARGV element file was found under */ + *fmt++ = 's'; + break; + + /* Numeric items that one might expect to honour + * #, 0, + flags but which do not. + */ + case 'G': /* GID number */ + case 'U': /* UID number */ + case 'b': /* size in 512-byte blocks (NOT birthtime in ctime fmt)*/ + case 'D': /* Filesystem device on which the file exits */ + case 'k': /* size in 1K blocks */ + case 'n': /* number of links */ + pred->need_stat = true; + mycost = NeedsStatInfo; + *fmt++ = 's'; + break; + + /* Numeric items that DO honour #, 0, + flags. + */ + case 'd': /* depth in search tree (0 = ARGV element) */ + *fmt++ = 'd'; + break; + + case 'm': /* mode as octal number (perms only) */ + *fmt++ = 'o'; + pred->need_stat = true; + mycost = NeedsStatInfo; + break; + + case '{': + case '[': + case '(': + error (1, 0, + _("error: the format directive `%%%c' is reserved for future use"), + (int)kind); + /*NOTREACHED*/ + break; + } + *fmt = '\0'; + + if (mycost > pred->p_cost) + pred->p_cost = mycost; + return &(*segment)->next; +} + +static void +check_path_safety(const char *action, char **argv) +{ + const char *path = getenv("PATH"); + char *s; + + (void)argv; + + s = next_element(path, 1); + while ((s = next_element ((char *) NULL, 1)) != NULL) + { + if (0 == strcmp(s, ".")) + { + error(1, 0, _("The current directory is included in the PATH environment variable, which is insecure in combination with the %s action of find. Please remove the current directory from your $PATH (that is, remove \".\" or leading or trailing colons)"), + action); + } + else if ('/' != s[0]) + { + /* Relative paths are also dangerous in $PATH. */ + error(1, 0, _("The relative path %s is included in the PATH " + "environment variable, which is insecure in " + "combination with the %s action of find. " + "Please remove that entry from $PATH"), + safely_quote_err_filename(0, s), + action); + } + } +} + + +/* handles both exec and ok predicate */ +static boolean +new_insert_exec_ok (const char *action, + const struct parser_table *entry, + int dirfd, + char **argv, + int *arg_ptr) +{ + int start, end; /* Indexes in ARGV of start & end of cmd. */ + int i; /* Index into cmd args */ + int saw_braces; /* True if previous arg was '{}'. */ + boolean allow_plus; /* True if + is a valid terminator */ + int brace_count; /* Number of instances of {}. */ + PRED_FUNC func = entry->pred_func; + enum BC_INIT_STATUS bcstatus; + + struct predicate *our_pred; + struct exec_val *execp; /* Pointer for efficiency. */ + + if ((argv == NULL) || (argv[*arg_ptr] == NULL)) + return false; + + our_pred = insert_primary_withpred (entry, func); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->need_type = our_pred->need_stat = false; + + execp = &our_pred->args.exec_vec; + + if ((func != pred_okdir) && (func != pred_ok)) + { + allow_plus = true; + execp->close_stdin = false; + } + else + { + allow_plus = false; + /* If find reads stdin (i.e. for -ok and similar), close stdin + * in the child to prevent some script from consiming the output + * intended for find. + */ + execp->close_stdin = true; + } + + + if ((func == pred_execdir) || (func == pred_okdir)) + { + options.ignore_readdir_race = false; + check_path_safety(action, argv); + execp->use_current_dir = true; + } + else + { + execp->use_current_dir = false; + } + + our_pred->args.exec_vec.multiple = 0; + + /* Count the number of args with path replacements, up until the ';'. + * Also figure out if the command is terminated by ";" or by "+". + */ + start = *arg_ptr; + for (end = start, saw_braces=0, brace_count=0; + (argv[end] != NULL) + && ((argv[end][0] != ';') || (argv[end][1] != '\0')); + end++) + { + /* For -exec and -execdir, "{} +" can terminate the command. */ + if ( allow_plus + && argv[end][0] == '+' && argv[end][1] == 0 + && saw_braces) + { + our_pred->args.exec_vec.multiple = 1; + break; + } + + saw_braces = 0; + if (mbsstr (argv[end], "{}")) + { + saw_braces = 1; + ++brace_count; + + if (0 == end && (func == pred_execdir || func == pred_okdir)) + { + /* The POSIX standard says that {} replacement should + * occur even in the utility name. This is insecure + * since it means we will be executing a command whose + * name is chosen according to whatever find finds in + * the filesystem. That can be influenced by an + * attacker. Hence for -execdir and -okdir this is not + * allowed. We can specify this as those options are + * not defined by POSIX. + */ + error(1, 0, _("You may not use {} within the utility name for -execdir and -okdir, because this is a potential security problem.")); + } + } + } + + /* Fail if no command given or no semicolon found. */ + if ((end == start) || (argv[end] == NULL)) + { + *arg_ptr = end; + free(our_pred); + return false; + } + + if (our_pred->args.exec_vec.multiple && brace_count > 1) + { + + const char *suffix; + if (func == pred_execdir) + suffix = "dir"; + else + suffix = ""; + + error(1, 0, + _("Only one instance of {} is supported with -exec%s ... +"), + suffix); + } + + /* We use a switch statement here so that the compiler warns us when + * we forget to handle a newly invented enum value. + * + * Like xargs, we allow 2KiB of headroom for the launched utility to + * export its own environment variables before calling something + * else. + */ + bcstatus = bc_init_controlinfo(&execp->ctl, 2048u); + switch (bcstatus) + { + case BC_INIT_ENV_TOO_BIG: + case BC_INIT_CANNOT_ACCOMODATE_HEADROOM: + error(1, 0, + _("The environment is too large for exec().")); + break; + case BC_INIT_OK: + /* Good news. Carry on. */ + break; + } + bc_use_sensible_arg_max(&execp->ctl); + + + execp->ctl.exec_callback = launch; + + if (our_pred->args.exec_vec.multiple) + { + /* "+" terminator, so we can just append our arguments after the + * command and initial arguments. + */ + execp->replace_vec = NULL; + execp->ctl.replace_pat = NULL; + execp->ctl.rplen = 0; + execp->ctl.lines_per_exec = 0; /* no limit */ + execp->ctl.args_per_exec = 0; /* no limit */ + + /* remember how many arguments there are */ + execp->ctl.initial_argc = (end-start) - 1; + + /* execp->state = xmalloc(sizeof struct buildcmd_state); */ + bc_init_state(&execp->ctl, &execp->state, execp); + + /* Gather the initial arguments. Skip the {}. */ + for (i=start; ictl, &execp->state, + argv[i], strlen(argv[i])+1, + NULL, 0, + 1); + } + } + else + { + /* Semicolon terminator - more than one {} is supported, so we + * have to do brace-replacement. + */ + execp->num_args = end - start; + + execp->ctl.replace_pat = "{}"; + execp->ctl.rplen = strlen(execp->ctl.replace_pat); + execp->ctl.lines_per_exec = 0; /* no limit */ + execp->ctl.args_per_exec = 0; /* no limit */ + execp->replace_vec = xmalloc(sizeof(char*)*execp->num_args); + + + /* execp->state = xmalloc(sizeof(*(execp->state))); */ + bc_init_state(&execp->ctl, &execp->state, execp); + + /* Remember the (pre-replacement) arguments for later. */ + for (i=0; inum_args; ++i) + { + execp->replace_vec[i] = argv[i+start]; + } + } + + if (argv[end] == NULL) + *arg_ptr = end; + else + *arg_ptr = end + 1; + + return true; +} + + + +static boolean +insert_exec_ok (const char *action, const struct parser_table *entry, int dirfd, char **argv, int *arg_ptr) +{ + return new_insert_exec_ok(action, entry, dirfd, argv, arg_ptr); +} + + + +/* Get a timestamp and comparison type. + + STR is the ASCII representation. + Set *NUM_DAYS to the number of days/minutes/whatever, taken as being + relative to ORIGIN (usually the current moment or midnight). + Thus the sense of the comparison type appears to be reversed. + Set *COMP_TYPE to the kind of comparison that is requested. + Issue OVERFLOWMESSAGE if overflow occurs. + Return true if all okay, false if input error. + + Used by -atime, -ctime and -mtime (parsers) to + get the appropriate information for a time predicate processor. */ + +static boolean +get_relative_timestamp (const char *str, + struct time_val *result, + time_t origin, + double sec_per_unit, + const char *overflowmessage) +{ + uintmax_t checkval; + double offset, seconds, f; + + if (get_comp_type(&str, &result->kind)) + { + /* Invert the sense of the comparison */ + switch (result->kind) + { + case COMP_LT: result->kind = COMP_GT; break; + case COMP_GT: result->kind = COMP_LT; break; + default: break; + } + + /* Convert the ASCII number into floating-point. */ + if (xstrtod(str, NULL, &offset, strtod)) + { + /* Separate the floating point number the user specified + * (which is a number of days, or minutes, etc) into an + * integral number of seconds (SECONDS) and a fraction (F). + */ + f = modf(offset * sec_per_unit, &seconds); + + result->ts.tv_sec = origin - seconds; + result->ts.tv_nsec = fabs(f * 1e9); + + /* Check for overflow. */ + checkval = (uintmax_t)origin - seconds; + if (checkval != result->ts.tv_sec) + { + /* an overflow has occurred. */ + error (1, 0, overflowmessage, str); + } + return true; + } + else + { + /* Conversion from ASCII to double failed. */ + return false; + } + } + else + { + return false; + } +} + +/* Insert a time predicate based on the information in ENTRY. + ARGV is a pointer to the argument array. + ARG_PTR is a pointer to an index into the array, incremented if + all went well. + + Return true if input is valid, false if not. + + A new predicate node is assigned, along with an argument node + obtained with malloc. + + Used by -atime, -ctime, and -mtime parsers. */ + +static boolean +parse_time (const struct parser_table* entry, char *argv[], int *arg_ptr) +{ + struct predicate *our_pred; + struct time_val tval; + enum comparison_type comp; + const char *timearg, *orig_timearg; + const char *errmsg = "arithmetic overflow while converting %s days to a number of seconds"; + time_t origin; + + if (!collect_arg(argv, arg_ptr, &timearg)) + return false; + orig_timearg = timearg; + + /* Decide the origin by previewing the comparison type. */ + origin = options.cur_day_start; + + if (get_comp_type(&timearg, &comp)) + { + /* Remember, we invert the sense of the comparison, so this tests + * against COMP_LT instead of COMP_GT... + */ + if (COMP_LT == tval.kind) + { + uintmax_t expected = origin + (DAYSECS-1); + origin += (DAYSECS-1); + if (origin != expected) + { + error(1, 0, + _("arithmetic overflow when trying to calculate the end of today")); + } + } + } + /* We discard the value of comp here, as get_relative_timestamp + * will set tval.kind. For that to work, we have to restore + * timearg so that it points to the +/- prefix, if any. get_comp_type() + * will have advanced timearg, so we restore it. + */ + timearg = orig_timearg; + + if (!get_relative_timestamp(timearg, &tval, origin, DAYSECS, errmsg)) + return false; + + our_pred = insert_primary (entry); + our_pred->args.reftime = tval; + our_pred->est_success_rate = estimate_timestamp_success_rate(tval.ts.tv_sec); + + if (options.debug_options & DebugExpressionTree) + { + time_t t; + + fprintf (stderr, "inserting %s\n", our_pred->p_name); + fprintf (stderr, " type: %s %s ", + (tval.kind == COMP_GT) ? "gt" : + ((tval.kind == COMP_LT) ? "lt" : ((tval.kind == COMP_EQ) ? "eq" : "?")), + (tval.kind == COMP_GT) ? " >" : + ((tval.kind == COMP_LT) ? " <" : ((tval.kind == COMP_EQ) ? ">=" : " ?"))); + t = our_pred->args.reftime.ts.tv_sec; + fprintf (stderr, "%ju %s", (uintmax_t) our_pred->args.reftime.ts.tv_sec, ctime (&t)); + if (tval.kind == COMP_EQ) + { + t = our_pred->args.reftime.ts.tv_sec + DAYSECS; + fprintf (stderr, " < %ju %s", + (uintmax_t) t, ctime (&t)); + } + } + + return true; +} + +/* Get the comparison type prefix (if any) from a number argument. + The prefix is at *STR. + Set *COMP_TYPE to the kind of comparison that is requested. + Advance *STR beyond any initial comparison prefix. + + Return true if all okay, false if input error. */ +static boolean +get_comp_type(const char **str, enum comparison_type *comp_type) +{ + switch (**str) + { + case '+': + *comp_type = COMP_GT; + (*str)++; + break; + case '-': + *comp_type = COMP_LT; + (*str)++; + break; + default: + *comp_type = COMP_EQ; + break; + } + return true; +} + + + + + +/* Get a number with comparison information. + The sense of the comparison information is 'normal'; that is, + '+' looks for a count > than the number and '-' less than. + + STR is the ASCII representation of the number. + Set *NUM to the number. + Set *COMP_TYPE to the kind of comparison that is requested. + + Return true if all okay, false if input error. */ + +static boolean +get_num (const char *str, + uintmax_t *num, + enum comparison_type *comp_type) +{ + char *pend; + + if (str == NULL) + return false; + + /* Figure out the comparison type if the caller accepts one. */ + if (comp_type) + { + if (!get_comp_type(&str, comp_type)) + return false; + } + + return xstrtoumax (str, &pend, 10, num, "") == LONGINT_OK; +} + +/* Insert a number predicate. + ARGV is a pointer to the argument array. + *ARG_PTR is an index into ARGV, incremented if all went well. + *PRED is the predicate processor to insert. + + Return true if input is valid, false if error. + + A new predicate node is assigned, along with an argument node + obtained with malloc. + + Used by -inum and -links parsers. */ + +static struct predicate * +insert_num (char **argv, int *arg_ptr, const struct parser_table *entry) +{ + const char *numstr; + + if (collect_arg(argv, arg_ptr, &numstr)) + { + uintmax_t num; + enum comparison_type c_type; + + if (get_num (numstr, &num, &c_type)) + { + struct predicate *our_pred = insert_primary (entry); + our_pred->args.numinfo.kind = c_type; + our_pred->args.numinfo.l_val = num; + + if (options.debug_options & DebugExpressionTree) + { + fprintf (stderr, "inserting %s\n", our_pred->p_name); + fprintf (stderr, " type: %s %s ", + (c_type == COMP_GT) ? "gt" : + ((c_type == COMP_LT) ? "lt" : ((c_type == COMP_EQ) ? "eq" : "?")), + (c_type == COMP_GT) ? " >" : + ((c_type == COMP_LT) ? " <" : ((c_type == COMP_EQ) ? " =" : " ?"))); + fprintf (stderr, "%ju\n", our_pred->args.numinfo.l_val); + } + return our_pred; + } + } + return NULL; +} + +static void +open_output_file (const char *path, struct format_val *p) +{ + p->segment = NULL; + p->quote_opts = clone_quoting_options (NULL); + + if (!strcmp (path, "/dev/stderr")) + { + p->stream = stderr; + p->filename = _("standard error"); + } + else if (!strcmp (path, "/dev/stdout")) + { + p->stream = stdout; + p->filename = _("standard output"); + } + else + { + p->stream = fopen_safer (path, "w"); + p->filename = path; + + if (p->stream == NULL) + { + fatal_file_error(path); + } + } + + p->dest_is_tty = stream_is_tty(p->stream); +} + +static void +open_stdout (struct format_val *p) +{ + open_output_file("/dev/stdout", p); +} + diff --git a/find/pred.c b/find/pred.c new file mode 100644 index 0000000..7a4c3fe --- /dev/null +++ b/find/pred.c @@ -0,0 +1,2368 @@ +/* pred.c -- execute the expression tree. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 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 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. +*/ + +#include +#include "defs.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "xalloc.h" +#include "dirname.h" +#include "human.h" +#include "modetype.h" +#include "filemode.h" +#include "wait.h" +#include "printquoted.h" +#include "buildcmd.h" +#include "yesno.h" +#include "listfile.h" +#include "stat-time.h" +#include "dircallback.h" +#include "error.h" + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + +#if !defined(SIGCHLD) && defined(SIGCLD) +#define SIGCHLD SIGCLD +#endif + + + +#if HAVE_DIRENT_H +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + +#ifdef CLOSEDIR_VOID +/* Fake a return value. */ +#define CLOSEDIR(d) (closedir (d), 0) +#else +#define CLOSEDIR(d) closedir (d) +#endif + + + + +/* Get or fake the disk device blocksize. + Usually defined by sys/param.h (if at all). */ +#ifndef DEV_BSIZE +# ifdef BSIZE +# define DEV_BSIZE BSIZE +# else /* !BSIZE */ +# define DEV_BSIZE 4096 +# endif /* !BSIZE */ +#endif /* !DEV_BSIZE */ + +/* Extract or fake data from a `struct stat'. + ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes. + ST_NBLOCKS: Number of blocks in the file, including indirect blocks. + ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS. */ +#ifndef HAVE_STRUCT_STAT_ST_BLOCKS +# define ST_BLKSIZE(statbuf) DEV_BSIZE +# if defined(_POSIX_SOURCE) || !defined(BSIZE) /* fileblocks.c uses BSIZE. */ +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) \ + || S_ISDIR ((statbuf).st_mode) \ + ? (statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0) : 0) +# else /* !_POSIX_SOURCE && BSIZE */ +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) \ + || S_ISDIR ((statbuf).st_mode) \ + ? st_blocks ((statbuf).st_size) : 0) +# endif /* !_POSIX_SOURCE && BSIZE */ +#else /* HAVE_STRUCT_STAT_ST_BLOCKS */ +/* Some systems, like Sequents, return st_blksize of 0 on pipes. */ +# define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \ + ? (statbuf).st_blksize : DEV_BSIZE) +# if defined(hpux) || defined(__hpux__) || defined(__hpux) +/* HP-UX counts st_blocks in 1024-byte units. + This loses when mixing HP-UX and BSD filesystems with NFS. */ +# define ST_NBLOCKSIZE 1024 +# else /* !hpux */ +# if defined(_AIX) && defined(_I386) +/* AIX PS/2 counts st_blocks in 4K units. */ +# define ST_NBLOCKSIZE (4 * 1024) +# else /* not AIX PS/2 */ +# if defined(_CRAY) +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) \ + || S_ISDIR ((statbuf).st_mode) \ + ? (statbuf).st_blocks * ST_BLKSIZE(statbuf)/ST_NBLOCKSIZE : 0) +# endif /* _CRAY */ +# endif /* not AIX PS/2 */ +# endif /* !hpux */ +#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */ + +#ifndef ST_NBLOCKS +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) \ + || S_ISDIR ((statbuf).st_mode) \ + ? (statbuf).st_blocks : 0) +#endif + +#ifndef ST_NBLOCKSIZE +# define ST_NBLOCKSIZE 512 +#endif + + +#undef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +static boolean match_lname PARAMS((const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr, boolean ignore_case)); + +static char *format_date PARAMS((struct timespec ts, int kind)); +static char *ctime_format PARAMS((struct timespec ts)); + +#ifdef DEBUG +struct pred_assoc +{ + PRED_FUNC pred_func; + char *pred_name; +}; + +struct pred_assoc pred_table[] = +{ + {pred_amin, "amin "}, + {pred_and, "and "}, + {pred_anewer, "anewer "}, + {pred_atime, "atime "}, + {pred_closeparen, ") "}, + {pred_cmin, "cmin "}, + {pred_cnewer, "cnewer "}, + {pred_comma, ", "}, + {pred_ctime, "ctime "}, + {pred_delete, "delete "}, + {pred_empty, "empty "}, + {pred_exec, "exec "}, + {pred_execdir, "execdir "}, + {pred_executable, "executable "}, + {pred_false, "false "}, + {pred_fprint, "fprint "}, + {pred_fprint0, "fprint0 "}, + {pred_fprintf, "fprintf "}, + {pred_fstype, "fstype "}, + {pred_gid, "gid "}, + {pred_group, "group "}, + {pred_ilname, "ilname "}, + {pred_iname, "iname "}, + {pred_inum, "inum "}, + {pred_ipath, "ipath "}, + {pred_links, "links "}, + {pred_lname, "lname "}, + {pred_ls, "ls "}, + {pred_mmin, "mmin "}, + {pred_mtime, "mtime "}, + {pred_name, "name "}, + {pred_negate, "not "}, + {pred_newer, "newer "}, + {pred_newerXY, "newerXY "}, + {pred_nogroup, "nogroup "}, + {pred_nouser, "nouser "}, + {pred_ok, "ok "}, + {pred_okdir, "okdir "}, + {pred_openparen, "( "}, + {pred_or, "or "}, + {pred_path, "path "}, + {pred_perm, "perm "}, + {pred_print, "print "}, + {pred_print0, "print0 "}, + {pred_prune, "prune "}, + {pred_quit, "quit "}, + {pred_readable, "readable "}, + {pred_regex, "regex "}, + {pred_samefile,"samefile "}, + {pred_size, "size "}, + {pred_true, "true "}, + {pred_type, "type "}, + {pred_uid, "uid "}, + {pred_used, "used "}, + {pred_user, "user "}, + {pred_writable, "writable "}, + {pred_xtype, "xtype "}, + {0, "none "} +}; +#endif + +/* Returns ts1 - ts2 */ +static double ts_difference(struct timespec ts1, + struct timespec ts2) +{ + double d = difftime(ts1.tv_sec, ts2.tv_sec) + + (1.0e-9 * (ts1.tv_nsec - ts2.tv_nsec)); + return d; +} + + +static int +compare_ts(struct timespec ts1, + struct timespec ts2) +{ + if ((ts1.tv_sec == ts2.tv_sec) && + (ts1.tv_nsec == ts2.tv_nsec)) + { + return 0; + } + else + { + double diff = ts_difference(ts1, ts2); + return diff < 0.0 ? -1 : +1; + } +} + +/* Predicate processing routines. + + PATHNAME is the full pathname of the file being checked. + *STAT_BUF contains information about PATHNAME. + *PRED_PTR contains information for applying the predicate. + + Return true if the file passes this predicate, false if not. */ + + +/* pred_timewindow + * + * Returns true if THE_TIME is + * COMP_GT: after the specified time + * COMP_LT: before the specified time + * COMP_EQ: less than WINDOW seconds after the specified time. + */ +static boolean +pred_timewindow(struct timespec ts, struct predicate const *pred_ptr, int window) +{ + switch (pred_ptr->args.reftime.kind) + { + case COMP_GT: + return compare_ts(ts, pred_ptr->args.reftime.ts) > 0; + + case COMP_LT: + return compare_ts(ts, pred_ptr->args.reftime.ts) < 0; + + case COMP_EQ: + { + double delta = ts_difference(ts, pred_ptr->args.reftime.ts); + return (delta >= 0.0 && delta < window); + } + } +} + + +boolean +pred_amin (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) &pathname; + return pred_timewindow(get_stat_atime(stat_buf), pred_ptr, 60); +} + +boolean +pred_and (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + if (pred_ptr->pred_left == NULL + || apply_predicate(pathname, stat_buf, pred_ptr->pred_left)) + { + return apply_predicate(pathname, stat_buf, pred_ptr->pred_right); + } + else + return false; +} + +boolean +pred_anewer (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) &pathname; + assert(COMP_GT == pred_ptr->args.reftime.kind); + return compare_ts(get_stat_atime(stat_buf), pred_ptr->args.reftime.ts) > 0; +} + +boolean +pred_atime (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) &pathname; + return pred_timewindow(get_stat_atime(stat_buf), pred_ptr, DAYSECS); +} + +boolean +pred_closeparen (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) &pathname; + (void) &stat_buf; + (void) &pred_ptr; + + return true; +} + +boolean +pred_cmin (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + return pred_timewindow(get_stat_ctime(stat_buf), pred_ptr, 60); +} + +boolean +pred_cnewer (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + + assert(COMP_GT == pred_ptr->args.reftime.kind); + return compare_ts(get_stat_ctime(stat_buf), pred_ptr->args.reftime.ts) > 0; +} + +boolean +pred_comma (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + if (pred_ptr->pred_left != NULL) + { + apply_predicate(pathname, stat_buf,pred_ptr->pred_left); + } + return apply_predicate(pathname, stat_buf, pred_ptr->pred_right); +} + +boolean +pred_ctime (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) &pathname; + return pred_timewindow(get_stat_ctime(stat_buf), pred_ptr, DAYSECS); +} + +static boolean +perform_delete(int flags) +{ + return 0 == unlinkat(state.cwd_dir_fd, state.rel_pathname, flags); +} + + +boolean +pred_delete (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pred_ptr; + (void) stat_buf; + if (strcmp (state.rel_pathname, ".")) + { + int flags=0; + if (state.have_stat && S_ISDIR(stat_buf->st_mode)) + flags |= AT_REMOVEDIR; + if (perform_delete(flags)) + { + return true; + } + else + { + if (EISDIR == errno) + { + if ((flags & AT_REMOVEDIR) == 0) + { + /* unlink() operation failed because we should have done rmdir(). */ + flags |= AT_REMOVEDIR; + if (perform_delete(flags)) + return true; + } + } + } + error (0, errno, "cannot delete %s", + safely_quote_err_filename(0, pathname)); + return false; + } + else + { + /* nothing to do. */ + return true; + } +} + +boolean +pred_empty (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) pred_ptr; + + if (S_ISDIR (stat_buf->st_mode)) + { + int fd; + DIR *d; + struct dirent *dp; + boolean empty = true; + + errno = 0; + if ((fd = openat(state.cwd_dir_fd, state.rel_pathname, O_RDONLY +#if defined O_LARGEFILE + |O_LARGEFILE +#endif + )) < 0) + { + error (0, errno, "%s", safely_quote_err_filename(0, pathname)); + state.exit_status = 1; + return false; + } + d = fdopendir (fd); + if (d == NULL) + { + error (0, errno, "%s", safely_quote_err_filename(0, pathname)); + state.exit_status = 1; + return false; + } + for (dp = readdir (d); dp; dp = readdir (d)) + { + if (dp->d_name[0] != '.' + || (dp->d_name[1] != '\0' + && (dp->d_name[1] != '.' || dp->d_name[2] != '\0'))) + { + empty = false; + break; + } + } + if (CLOSEDIR (d)) + { + error (0, errno, "%s", safely_quote_err_filename(0, pathname)); + state.exit_status = 1; + return false; + } + return (empty); + } + else if (S_ISREG (stat_buf->st_mode)) + return (stat_buf->st_size == 0); + else + return (false); +} + +static boolean +new_impl_pred_exec (int dirfd, const char *pathname, + struct stat *stat_buf, + struct predicate *pred_ptr, + const char *prefix, size_t pfxlen) +{ + struct exec_val *execp = &pred_ptr->args.exec_vec; + size_t len = strlen(pathname); + + (void) stat_buf; + execp->dirfd = dirfd; + if (execp->multiple) + { + /* Push the argument onto the current list. + * The command may or may not be run at this point, + * depending on the command line length limits. + */ + bc_push_arg(&execp->ctl, + &execp->state, + pathname, len+1, + prefix, pfxlen, + 0); + + /* remember that there are pending execdirs. */ + state.execdirs_outstanding = true; + + /* POSIX: If the primary expression is punctuated by a plus + * sign, the primary shall always evaluate as true + */ + return true; + } + else + { + int i; + + for (i=0; inum_args; ++i) + { + bc_do_insert(&execp->ctl, + &execp->state, + execp->replace_vec[i], + strlen(execp->replace_vec[i]), + prefix, pfxlen, + pathname, len, + 0); + } + + /* Actually invoke the command. */ + return execp->ctl.exec_callback(&execp->ctl, + &execp->state); + } +} + + +boolean +pred_exec (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + return new_impl_pred_exec(get_start_dirfd(), + pathname, stat_buf, pred_ptr, NULL, 0); +} + +boolean +pred_execdir (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + const char *prefix = (state.rel_pathname[0] == '/') ? NULL : "./"; + (void) &pathname; + return new_impl_pred_exec (get_current_dirfd(), + state.rel_pathname, stat_buf, pred_ptr, + prefix, (prefix ? 2 : 0)); +} + +boolean +pred_false (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) &pathname; + (void) &stat_buf; + (void) &pred_ptr; + + + return (false); +} + +boolean +pred_fls (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + FILE * stream = pred_ptr->args.printf_vec.stream; + list_file (pathname, state.cwd_dir_fd, state.rel_pathname, stat_buf, + options.start_time.tv_sec, + options.output_block_size, + pred_ptr->literal_control_chars, stream); + return true; +} + +boolean +pred_fprint (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) &pathname; + (void) &stat_buf; + + print_quoted(pred_ptr->args.printf_vec.stream, + pred_ptr->args.printf_vec.quote_opts, + pred_ptr->args.printf_vec.dest_is_tty, + "%s\n", + pathname); + return true; +} + +boolean +pred_fprint0 (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + FILE * fp = pred_ptr->args.printf_vec.stream; + + (void) &stat_buf; + + fputs (pathname, fp); + putc (0, fp); + return true; +} + + + +static char* +mode_to_filetype(mode_t m) +{ +#define HANDLE_TYPE(t,letter) if (m==t) { return letter; } +#ifdef S_IFREG + HANDLE_TYPE(S_IFREG, "f"); /* regular file */ +#endif +#ifdef S_IFDIR + HANDLE_TYPE(S_IFDIR, "d"); /* directory */ +#endif +#ifdef S_IFLNK + HANDLE_TYPE(S_IFLNK, "l"); /* symbolic link */ +#endif +#ifdef S_IFSOCK + HANDLE_TYPE(S_IFSOCK, "s"); /* Unix domain socket */ +#endif +#ifdef S_IFBLK + HANDLE_TYPE(S_IFBLK, "b"); /* block device */ +#endif +#ifdef S_IFCHR + HANDLE_TYPE(S_IFCHR, "c"); /* character device */ +#endif +#ifdef S_IFIFO + HANDLE_TYPE(S_IFIFO, "p"); /* FIFO */ +#endif +#ifdef S_IFDOOR + HANDLE_TYPE(S_IFDOOR, "D"); /* Door (e.g. on Solaris) */ +#endif + return "U"; /* Unknown */ +} + +static double +file_sparseness(const struct stat *p) +{ +#if defined(HAVE_STRUCT_STAT_ST_BLOCKS) + if (0 == p->st_size) + { + if (0 == p->st_blocks) + return 1.0; + else + return p->st_blocks < 0 ? -HUGE_VAL : HUGE_VAL; + } + else + { + double blklen = file_blocksize(p) * (double)p->st_blocks; + return blklen / p->st_size; + } +#else + return 1.0; +#endif +} + + + +static void +checked_fprintf(struct format_val *dest, const char *fmt, ...) +{ + int rv; + va_list ap; + + va_start(ap, fmt); + rv = vfprintf(dest->stream, fmt, ap); + if (rv < 0) + nonfatal_file_error(dest->filename); +} + + +static void +checked_print_quoted (struct format_val *dest, + const char *format, const char *s) +{ + int rv = print_quoted(dest->stream, dest->quote_opts, dest->dest_is_tty, + format, s); + if (rv < 0) + nonfatal_file_error(dest->filename); +} + + +static void +checked_fwrite(void *p, size_t siz, size_t nmemb, struct format_val *dest) +{ + int items_written = fwrite(p, siz, nmemb, dest->stream); + if (items_written < nmemb) + nonfatal_file_error(dest->filename); +} + +static void +checked_fflush(struct format_val *dest) +{ + if (0 != fflush(dest->stream)) + { + nonfatal_file_error(dest->filename); + } +} + +static void +do_fprintf(struct format_val *dest, + struct segment *segment, + const char *pathname, + const struct stat *stat_buf) +{ + char hbuf[LONGEST_HUMAN_READABLE + 1]; + const char *cp; + + switch (segment->segkind) + { + case KIND_PLAIN: /* Plain text string (no % conversion). */ + /* trusted */ + checked_fwrite(segment->text, 1, segment->text_len, dest); + break; + + case KIND_STOP: /* Terminate argument and flush output. */ + /* trusted */ + checked_fwrite(segment->text, 1, segment->text_len, dest); + checked_fflush(dest); + break; + + case KIND_FORMAT: + switch (segment->format_char[0]) + { + case 'a': /* atime in `ctime' format. */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, ctime_format (get_stat_atime(stat_buf))); + break; + case 'b': /* size in 512-byte blocks */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf), + hbuf, human_ceiling, + ST_NBLOCKSIZE, 512)); + break; + case 'c': /* ctime in `ctime' format */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, ctime_format (get_stat_ctime(stat_buf))); + break; + case 'd': /* depth in search tree */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, state.curdepth); + break; + case 'D': /* Device on which file exists (stat.st_dev) */ + /* trusted */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_dev, hbuf, + human_ceiling, 1, 1)); + break; + case 'f': /* base name of path */ + /* sanitised */ + checked_print_quoted (dest, segment->text, base_name (pathname)); + break; + case 'F': /* filesystem type */ + /* trusted */ + checked_print_quoted (dest, segment->text, filesystem_type (stat_buf, pathname)); + break; + case 'g': /* group name */ + /* trusted */ + /* (well, the actual group is selected by the user but + * its name was selected by the system administrator) + */ + { + struct group *g; + + g = getgrgid (stat_buf->st_gid); + if (g) + { + segment->text[segment->text_len] = 's'; + checked_fprintf (dest, segment->text, g->gr_name); + break; + } + else + { + /* Do nothing. */ + /*FALLTHROUGH*/ + } + } + /*FALLTHROUGH*/ /*...sometimes, so 'G' case.*/ + + case 'G': /* GID number */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_gid, hbuf, + human_ceiling, 1, 1)); + break; + case 'h': /* leading directories part of path */ + /* sanitised */ + { + cp = strrchr (pathname, '/'); + if (cp == NULL) /* No leading directories. */ + { + /* If there is no slash in the pathname, we still + * print the string because it contains characters + * other than just '%s'. The %h expands to ".". + */ + checked_print_quoted (dest, segment->text, "."); + } + else + { + char *s = strdup(pathname); + s[cp - pathname] = 0; + checked_print_quoted (dest, segment->text, s); + free(s); + } + } + break; + + case 'H': /* ARGV element file was found under */ + /* trusted */ + { + char *s = xmalloc(state.starting_path_length+1); + memcpy(s, pathname, state.starting_path_length); + s[state.starting_path_length] = 0; + checked_fprintf (dest, segment->text, s); + free(s); + } + break; + + case 'i': /* inode number */ + /* UNTRUSTED, but not exploitable I think */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_ino, hbuf, + human_ceiling, + 1, 1)); + break; + case 'k': /* size in 1K blocks */ + /* UNTRUSTED, but not exploitable I think */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf), + hbuf, human_ceiling, + ST_NBLOCKSIZE, 1024)); + break; + case 'l': /* object of symlink */ + /* sanitised */ +#ifdef S_ISLNK + { + char *linkname = 0; + + if (S_ISLNK (stat_buf->st_mode)) + { + linkname = get_link_name_at (pathname, state.cwd_dir_fd, state.rel_pathname); + if (linkname == 0) + state.exit_status = 1; + } + if (linkname) + { + checked_print_quoted (dest, segment->text, linkname); + free (linkname); + } + else + { + /* We still need to honour the field width etc., so this is + * not a no-op. + */ + checked_print_quoted (dest, segment->text, ""); + } + } +#endif /* S_ISLNK */ + break; + + case 'M': /* mode as 10 chars (eg., "-rwxr-x--x" */ + /* UNTRUSTED, probably unexploitable */ + { + char modestring[16] ; + filemodestring (stat_buf, modestring); + modestring[10] = '\0'; + checked_fprintf (dest, segment->text, modestring); + } + break; + + case 'm': /* mode as octal number (perms only) */ + /* UNTRUSTED, probably unexploitable */ + { + /* Output the mode portably using the traditional numbers, + even if the host unwisely uses some other numbering + scheme. But help the compiler in the common case where + the host uses the traditional numbering scheme. */ + mode_t m = stat_buf->st_mode; + boolean traditional_numbering_scheme = + (S_ISUID == 04000 && S_ISGID == 02000 && S_ISVTX == 01000 + && S_IRUSR == 00400 && S_IWUSR == 00200 && S_IXUSR == 00100 + && S_IRGRP == 00040 && S_IWGRP == 00020 && S_IXGRP == 00010 + && S_IROTH == 00004 && S_IWOTH == 00002 && S_IXOTH == 00001); + checked_fprintf (dest, segment->text, + (traditional_numbering_scheme + ? m & MODE_ALL + : ((m & S_ISUID ? 04000 : 0) + | (m & S_ISGID ? 02000 : 0) + | (m & S_ISVTX ? 01000 : 0) + | (m & S_IRUSR ? 00400 : 0) + | (m & S_IWUSR ? 00200 : 0) + | (m & S_IXUSR ? 00100 : 0) + | (m & S_IRGRP ? 00040 : 0) + | (m & S_IWGRP ? 00020 : 0) + | (m & S_IXGRP ? 00010 : 0) + | (m & S_IROTH ? 00004 : 0) + | (m & S_IWOTH ? 00002 : 0) + | (m & S_IXOTH ? 00001 : 0)))); + } + break; + + case 'n': /* number of links */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_nlink, + hbuf, + human_ceiling, + 1, 1)); + break; + + case 'p': /* pathname */ + /* sanitised */ + checked_print_quoted (dest, segment->text, pathname); + break; + + case 'P': /* pathname with ARGV element stripped */ + /* sanitised */ + if (state.curdepth > 0) + { + cp = pathname + state.starting_path_length; + if (*cp == '/') + /* Move past the slash between the ARGV element + and the rest of the pathname. But if the ARGV element + ends in a slash, we didn't add another, so we've + already skipped past it. */ + cp++; + } + else + { + cp = ""; + } + checked_print_quoted (dest, segment->text, cp); + break; + + case 's': /* size in bytes */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_size, + hbuf, human_ceiling, 1, 1)); + break; + + case 'S': /* sparseness */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, file_sparseness(stat_buf));; + break; + + case 't': /* mtime in `ctime' format */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + ctime_format (get_stat_mtime(stat_buf))); + break; + + case 'u': /* user name */ + /* trusted */ + /* (well, the actual user is selected by the user on systems + * where chown is not restricted, but the user name was + * selected by the system administrator) + */ + { + struct passwd *p; + + p = getpwuid (stat_buf->st_uid); + if (p) + { + segment->text[segment->text_len] = 's'; + checked_fprintf (dest, segment->text, p->pw_name); + break; + } + /* else fallthru */ + } + /* FALLTHROUGH*/ /* .. to case U */ + + case 'U': /* UID number */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_uid, hbuf, + human_ceiling, 1, 1)); + break; + + /* %Y: type of filesystem entry like `ls -l`: + * (d,-,l,s,p,b,c,n) n=nonexistent(symlink) + */ + case 'Y': /* in case of symlink */ + /* trusted */ + { +#ifdef S_ISLNK + if (S_ISLNK (stat_buf->st_mode)) + { + struct stat sbuf; + /* If we would normally follow links, do not do so. + * If we would normally not follow links, do so. + */ + if ((following_links() ? lstat : stat) + (state.rel_pathname, &sbuf) != 0) + { + if ( errno == ENOENT ) + { + checked_fprintf (dest, segment->text, "N"); + break; + } + else if ( errno == ELOOP ) + { + checked_fprintf (dest, segment->text, "L"); + break; + } + else + { + checked_fprintf (dest, segment->text, "?"); + error (0, errno, "%s", + safely_quote_err_filename(0, pathname)); + /* exit_status = 1; + return ; */ + break; + } + } + checked_fprintf (dest, segment->text, + mode_to_filetype(sbuf.st_mode & S_IFMT)); + } +#endif /* S_ISLNK */ + else + { + checked_fprintf (dest, segment->text, + mode_to_filetype(stat_buf->st_mode & S_IFMT)); + } + } + break; + + case 'y': + /* trusted */ + { + checked_fprintf (dest, segment->text, + mode_to_filetype(stat_buf->st_mode & S_IFMT)); + } + break; + } + /* end of KIND_FORMAT case */ + break; + } +} + +boolean +pred_fprintf (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + struct format_val *dest = &pred_ptr->args.printf_vec; + struct segment *segment; + + for (segment = dest->segment; segment; segment = segment->next) + { + if ( (KIND_FORMAT == segment->segkind) && segment->format_char[1]) /* Component of date. */ + { + struct timespec ts; + int valid = 0; + + switch (segment->format_char[0]) + { + case 'A': + ts = get_stat_atime(stat_buf); + valid = 1; + break; + case 'B': + ts = get_stat_birthtime(stat_buf); + if ('@' == segment->format_char[1]) + valid = 1; + else + valid = (ts.tv_nsec >= 0); + break; + case 'C': + ts = get_stat_ctime(stat_buf); + valid = 1; + break; + case 'T': + ts = get_stat_mtime(stat_buf); + valid = 1; + break; + default: + assert(0); + abort (); + } + /* We trust the output of format_date not to contain + * nasty characters, though the value of the date + * is itself untrusted data. + */ + if (valid) + { + /* trusted */ + checked_fprintf (dest, segment->text, + format_date (ts, segment->format_char[1])); + } + else + { + /* The specified timestamp is not available, output + * nothing for the timestamp, but use the rest (so that + * for example find foo -printf '[%Bs] %p\n' can print + * "[] foo"). + */ + /* trusted */ + checked_fprintf (dest, segment->text, ""); + } + } + else + { + /* Print a segment which is not a date. */ + do_fprintf(dest, segment, pathname, stat_buf); + } + } + return true; +} + +boolean +pred_fstype (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + + if (strcmp (filesystem_type (stat_buf, pathname), pred_ptr->args.str) == 0) + return true; + else + return false; +} + +boolean +pred_gid (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + + switch (pred_ptr->args.numinfo.kind) + { + case COMP_GT: + if (stat_buf->st_gid > pred_ptr->args.numinfo.l_val) + return (true); + break; + case COMP_LT: + if (stat_buf->st_gid < pred_ptr->args.numinfo.l_val) + return (true); + break; + case COMP_EQ: + if (stat_buf->st_gid == pred_ptr->args.numinfo.l_val) + return (true); + break; + } + return (false); +} + +boolean +pred_group (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + + if (pred_ptr->args.gid == stat_buf->st_gid) + return (true); + else + return (false); +} + +boolean +pred_ilname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + return match_lname (pathname, stat_buf, pred_ptr, true); +} + +boolean +pred_iname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + const char *base; + + (void) stat_buf; + + /* FNM_PERIOD is not used here because POSIX requires that it not be. + * See http://standards.ieee.org/reading/ieee/interp/1003-2-92_int/pasc-1003.2-126.html + */ + base = base_name (pathname); + if (fnmatch (pred_ptr->args.str, base, FNM_CASEFOLD) == 0) + return (true); + return (false); +} + +boolean +pred_inum (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + + switch (pred_ptr->args.numinfo.kind) + { + case COMP_GT: + if (stat_buf->st_ino > pred_ptr->args.numinfo.l_val) + return (true); + break; + case COMP_LT: + if (stat_buf->st_ino < pred_ptr->args.numinfo.l_val) + return (true); + break; + case COMP_EQ: + if (stat_buf->st_ino == pred_ptr->args.numinfo.l_val) + return (true); + break; + } + return (false); +} + +boolean +pred_ipath (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) stat_buf; + + if (fnmatch (pred_ptr->args.str, pathname, FNM_CASEFOLD) == 0) + return (true); + return (false); +} + +boolean +pred_links (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + + switch (pred_ptr->args.numinfo.kind) + { + case COMP_GT: + if (stat_buf->st_nlink > pred_ptr->args.numinfo.l_val) + return (true); + break; + case COMP_LT: + if (stat_buf->st_nlink < pred_ptr->args.numinfo.l_val) + return (true); + break; + case COMP_EQ: + if (stat_buf->st_nlink == pred_ptr->args.numinfo.l_val) + return (true); + break; + } + return (false); +} + +boolean +pred_lname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + return match_lname (pathname, stat_buf, pred_ptr, false); +} + +static boolean +match_lname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr, boolean ignore_case) +{ + boolean ret = false; +#ifdef S_ISLNK + if (S_ISLNK (stat_buf->st_mode)) + { + char *linkname = get_link_name_at (pathname, state.cwd_dir_fd, state.rel_pathname); + if (linkname) + { + if (fnmatch (pred_ptr->args.str, linkname, + ignore_case ? FNM_CASEFOLD : 0) == 0) + ret = true; + free (linkname); + } + } +#endif /* S_ISLNK */ + return ret; +} + +boolean +pred_ls (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + return pred_fls(pathname, stat_buf, pred_ptr); +} + +boolean +pred_mmin (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) &pathname; + return pred_timewindow(get_stat_mtime(stat_buf), pred_ptr, 60); +} + +boolean +pred_mtime (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + return pred_timewindow(get_stat_mtime(stat_buf), pred_ptr, DAYSECS); +} + +boolean +pred_name (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + const char *base; + + (void) stat_buf; + base = base_name (pathname); + + /* FNM_PERIOD is not used here because POSIX requires that it not be. + * See http://standards.ieee.org/reading/ieee/interp/1003-2-92_int/pasc-1003.2-126.html + */ + if (fnmatch (pred_ptr->args.str, base, 0) == 0) + return (true); + return (false); +} + +boolean +pred_negate (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + return !apply_predicate(pathname, stat_buf, pred_ptr->pred_right); +} + +boolean +pred_newer (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + + assert(COMP_GT == pred_ptr->args.reftime.kind); + return compare_ts(get_stat_mtime(stat_buf), pred_ptr->args.reftime.ts) > 0; +} + +boolean +pred_newerXY (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + struct timespec ts; + boolean collected = false; + + assert(COMP_GT == pred_ptr->args.reftime.kind); + + switch (pred_ptr->args.reftime.xval) + { + case XVAL_TIME: + assert(pred_ptr->args.reftime.xval != XVAL_TIME); + return false; + + case XVAL_ATIME: + ts = get_stat_atime(stat_buf); + collected = true; + break; + + case XVAL_BIRTHTIME: + ts = get_stat_birthtime(stat_buf); + collected = true; + if (ts.tv_nsec < 0); + { + /* XXX: Cannot determine birth time. Warn once. */ + error(0, 0, _("Warning: cannot determine birth time of file %s"), + safely_quote_err_filename(0, pathname)); + return false; + } + break; + + case XVAL_CTIME: + ts = get_stat_ctime(stat_buf); + collected = true; + break; + + case XVAL_MTIME: + ts = get_stat_mtime(stat_buf); + collected = true; + break; + } + + assert(collected); + return compare_ts(ts, pred_ptr->args.reftime.ts) > 0; +} + +boolean +pred_nogroup (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) pred_ptr; + +#ifdef CACHE_IDS + extern char *gid_unused; + + return gid_unused[(unsigned) stat_buf->st_gid]; +#else + return getgrgid (stat_buf->st_gid) == NULL; +#endif +} + +boolean +pred_nouser (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ +#ifdef CACHE_IDS + extern char *uid_unused; +#endif + + (void) pathname; + (void) pred_ptr; + +#ifdef CACHE_IDS + return uid_unused[(unsigned) stat_buf->st_uid]; +#else + return getpwuid (stat_buf->st_uid) == NULL; +#endif +} + + +static boolean +is_ok(const char *program, const char *arg) +{ + fflush (stdout); + /* The draft open standard requires that, in the POSIX locale, + the last non-blank character of this prompt be '?'. + The exact format is not specified. + This standard does not have requirements for locales other than POSIX + */ + /* XXX: printing UNTRUSTED data here. */ + fprintf (stderr, _("< %s ... %s > ? "), program, arg); + fflush (stderr); + return yesno(); +} + +boolean +pred_ok (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + if (is_ok(pred_ptr->args.exec_vec.replace_vec[0], pathname)) + return new_impl_pred_exec (get_start_dirfd(), + pathname, stat_buf, pred_ptr, NULL, 0); + else + return false; +} + +boolean +pred_okdir (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + const char *prefix = (state.rel_pathname[0] == '/') ? NULL : "./"; + if (is_ok(pred_ptr->args.exec_vec.replace_vec[0], pathname)) + return new_impl_pred_exec (get_current_dirfd(), + state.rel_pathname, stat_buf, pred_ptr, + prefix, (prefix ? 2 : 0)); + else + return false; +} + +boolean +pred_openparen (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) stat_buf; + (void) pred_ptr; + return true; +} + +boolean +pred_or (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + if (pred_ptr->pred_left == NULL + || !apply_predicate(pathname, stat_buf, pred_ptr->pred_left)) + { + return apply_predicate(pathname, stat_buf, pred_ptr->pred_right); + } + else + return true; +} + +boolean +pred_path (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) stat_buf; + if (fnmatch (pred_ptr->args.str, pathname, 0) == 0) + return (true); + return (false); +} + +boolean +pred_perm (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + mode_t mode = stat_buf->st_mode; + mode_t perm_val = pred_ptr->args.perm.val[S_ISDIR (mode) != 0]; + (void) pathname; + switch (pred_ptr->args.perm.kind) + { + case PERM_AT_LEAST: + return (mode & perm_val) == perm_val; + break; + + case PERM_ANY: + /* True if any of the bits set in the mask are also set in the file's mode. + * + * + * Otherwise, if onum is prefixed by a hyphen, the primary shall + * evaluate as true if at least all of the bits specified in + * onum that are also set in the octal mask 07777 are set. + * + * Eric Blake's interpretation is that the mode argument is zero, + + */ + if (0 == perm_val) + return true; /* Savannah bug 14748; we used to return false */ + else + return (mode & perm_val) != 0; + break; + + case PERM_EXACT: + return (mode & MODE_ALL) == perm_val; + break; + + default: + abort (); + break; + } +} + + +struct access_check_args +{ + const char *filename; + int access_type; + int cb_errno; +}; + + +static int +access_callback(void *context) +{ + int rv; + struct access_check_args *args = context; + if ((rv = access(args->filename, args->access_type)) < 0) + args->cb_errno = errno; + return rv; +} + +static int +can_access(int access_type) +{ + struct access_check_args args; + args.filename = state.rel_pathname; + args.access_type = access_type; + args.cb_errno = 0; + return 0 == run_in_dir(state.cwd_dir_fd, access_callback, &args); +} + + +boolean +pred_executable (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) stat_buf; + (void) pred_ptr; + + return can_access(X_OK); +} + +boolean +pred_readable (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) stat_buf; + (void) pred_ptr; + + return can_access(R_OK); +} + +boolean +pred_writable (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) stat_buf; + (void) pred_ptr; + + return can_access(W_OK); +} + +boolean +pred_print (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) stat_buf; + (void) pred_ptr; + + print_quoted(pred_ptr->args.printf_vec.stream, + pred_ptr->args.printf_vec.quote_opts, + pred_ptr->args.printf_vec.dest_is_tty, + "%s\n", pathname); + return true; +} + +boolean +pred_print0 (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + return pred_fprint0(pathname, stat_buf, pred_ptr); +} + +boolean +pred_prune (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) pred_ptr; + + if (options.do_dir_first == true && + stat_buf != NULL && + S_ISDIR(stat_buf->st_mode)) + state.stop_at_current_level = true; + + return (options.do_dir_first); /* This is what SunOS find seems to do. */ +} + +boolean +pred_quit (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) stat_buf; + (void) pred_ptr; + + /* Run any cleanups. This includes executing any command lines + * we have partly built but not executed. + */ + cleanup(); + + /* Since -exec and friends don't leave child processes running in the + * background, there is no need to wait for them here. + */ + exit(state.exit_status); /* 0 for success, etc. */ +} + +boolean +pred_regex (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + int len = strlen (pathname); +(void) stat_buf; + if (re_match (pred_ptr->args.regex, pathname, len, 0, + (struct re_registers *) NULL) == len) + return (true); + return (false); +} + +boolean +pred_size (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + uintmax_t f_val; + + (void) pathname; + f_val = ((stat_buf->st_size / pred_ptr->args.size.blocksize) + + (stat_buf->st_size % pred_ptr->args.size.blocksize != 0)); + switch (pred_ptr->args.size.kind) + { + case COMP_GT: + if (f_val > pred_ptr->args.size.size) + return (true); + break; + case COMP_LT: + if (f_val < pred_ptr->args.size.size) + return (true); + break; + case COMP_EQ: + if (f_val == pred_ptr->args.size.size) + return (true); + break; + } + return (false); +} + +boolean +pred_samefile (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + /* Potential optimisation: because of the loop protection, we always + * know the device of the current directory, hence the device number + * of the file we're currently considering. If -L is not in effect, + * and the device number of the file we're looking for is not the + * same as the device number of the current directory, this + * predicate cannot return true. Hence there would be no need to + * stat the file we're looking at. + */ + (void) pathname; + + /* We will often still have an fd open on the file under consideration, + * but that's just to ensure inode number stability by maintaining + * a reference to it; we don't need the file for anything else. + */ + return stat_buf->st_ino == pred_ptr->args.samefileid.ino + && stat_buf->st_dev == pred_ptr->args.samefileid.dev; +} + +boolean +pred_true (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + (void) stat_buf; + (void) pred_ptr; + return true; +} + +boolean +pred_type (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + mode_t mode; + mode_t type = pred_ptr->args.type; + + assert(state.have_type); + + if (0 == state.type) + { + /* This can sometimes happen with broken NFS servers. + * See Savannah bug #16378. + */ + return false; + } + + (void) pathname; + + if (state.have_stat) + mode = stat_buf->st_mode; + else + mode = state.type; + +#ifndef S_IFMT + /* POSIX system; check `mode' the slow way. */ + if ((S_ISBLK (mode) && type == S_IFBLK) + || (S_ISCHR (mode) && type == S_IFCHR) + || (S_ISDIR (mode) && type == S_IFDIR) + || (S_ISREG (mode) && type == S_IFREG) +#ifdef S_IFLNK + || (S_ISLNK (mode) && type == S_IFLNK) +#endif +#ifdef S_IFIFO + || (S_ISFIFO (mode) && type == S_IFIFO) +#endif +#ifdef S_IFSOCK + || (S_ISSOCK (mode) && type == S_IFSOCK) +#endif +#ifdef S_IFDOOR + || (S_ISDOOR (mode) && type == S_IFDOOR) +#endif + ) +#else /* S_IFMT */ + /* Unix system; check `mode' the fast way. */ + if ((mode & S_IFMT) == type) +#endif /* S_IFMT */ + return (true); + else + return (false); +} + +boolean +pred_uid (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + switch (pred_ptr->args.numinfo.kind) + { + case COMP_GT: + if (stat_buf->st_uid > pred_ptr->args.numinfo.l_val) + return (true); + break; + case COMP_LT: + if (stat_buf->st_uid < pred_ptr->args.numinfo.l_val) + return (true); + break; + case COMP_EQ: + if (stat_buf->st_uid == pred_ptr->args.numinfo.l_val) + return (true); + break; + } + return (false); +} + +boolean +pred_used (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + struct timespec delta, at, ct; + + (void) pathname; + + /* TODO: this needs to be retested carefully (manually, if necessary) */ + at = get_stat_atime(stat_buf); + ct = get_stat_ctime(stat_buf); + delta.tv_sec = at.tv_sec - ct.tv_sec; + delta.tv_nsec = at.tv_nsec - ct.tv_nsec; + if (delta.tv_nsec < 0) + { + delta.tv_nsec += 1000000000; + delta.tv_sec -= 1; + } + return pred_timewindow(delta, pred_ptr, DAYSECS); +} + +boolean +pred_user (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + (void) pathname; + if (pred_ptr->args.uid == stat_buf->st_uid) + return (true); + else + return (false); +} + +boolean +pred_xtype (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + struct stat sbuf; /* local copy, not stat_buf because we're using a different stat method */ + int (*ystat) (const char*, struct stat *p); + + /* If we would normally stat the link itself, stat the target instead. + * If we would normally follow the link, stat the link itself instead. + */ + if (following_links()) + ystat = optionp_stat; + else + ystat = optionl_stat; + + set_stat_placeholders(&sbuf); + if ((*ystat) (state.rel_pathname, &sbuf) != 0) + { + if (following_links() && errno == ENOENT) + { + /* If we failed to follow the symlink, + * fall back on looking at the symlink itself. + */ + /* Mimic behavior of ls -lL. */ + return (pred_type (pathname, stat_buf, pred_ptr)); + } + else + { + error (0, errno, "%s", safely_quote_err_filename(0, pathname)); + state.exit_status = 1; + } + return false; + } + /* Now that we have our stat() information, query it in the same + * way that -type does. + */ + return (pred_type (pathname, &sbuf, pred_ptr)); +} + +/* 1) fork to get a child; parent remembers the child pid + 2) child execs the command requested + 3) parent waits for child; checks for proper pid of child + + Possible returns: + + ret errno status(h) status(l) + + pid x signal# 0177 stopped + pid x exit arg 0 term by _exit + pid x 0 signal # term by signal + -1 EINTR parent got signal + -1 other some other kind of error + + Return true only if the pid matches, status(l) is + zero, and the exit arg (status high) is 0. + Otherwise return false, possibly printing an error message. */ + + +static boolean +prep_child_for_exec (boolean close_stdin, int dirfd) +{ + boolean ok = true; + if (close_stdin) + { + const char inputfile[] = "/dev/null"; + + if (close(0) < 0) + { + error(0, errno, _("Cannot close standard input")); + ok = false; + } + else + { + if (open(inputfile, O_RDONLY +#if defined O_LARGEFILE + |O_LARGEFILE +#endif + ) < 0) + { + /* This is not entirely fatal, since + * executing the child with a closed + * stdin is almost as good as executing it + * with its stdin attached to /dev/null. + */ + error (0, errno, "%s", safely_quote_err_filename(0, inputfile)); + /* do not set ok=false, it is OK to continue anyway. */ + } + } + } + + /* Even if DebugSearch is set, don't announce our change of + * directory, since we're not going to emit a subsequent + * announcement of a call to stat() anyway, as we're about to exec + * something. + */ + if (dirfd != AT_FDCWD) + { + assert(dirfd >= 0); + if (0 != fchdir(dirfd)) + { + /* If we cannot execute our command in the correct directory, + * we should not execute it at all. + */ + error(0, errno, _("Failed to change directory")); + ok = false; + } + } + return ok; +} + + + +int +launch (const struct buildcmd_control *ctl, + struct buildcmd_state *buildstate) +{ + int wait_status; + pid_t child_pid; + static int first_time = 1; + const struct exec_val *execp = buildstate->usercontext; + + if (!execp->use_current_dir) + { + assert(starting_desc >= 0); + assert(execp->dirfd == starting_desc); + } + + + /* Null terminate the arg list. */ + bc_push_arg (ctl, buildstate, (char *) NULL, 0, NULL, 0, false); + + /* Make sure output of command doesn't get mixed with find output. */ + fflush (stdout); + fflush (stderr); + + /* Make sure to listen for the kids. */ + if (first_time) + { + first_time = 0; + signal (SIGCHLD, SIG_DFL); + } + + child_pid = fork (); + if (child_pid == -1) + error (1, errno, _("cannot fork")); + if (child_pid == 0) + { + /* We are the child. */ + assert(starting_desc >= 0); + if (!prep_child_for_exec(execp->close_stdin, execp->dirfd)) + { + _exit(1); + } + + execvp (buildstate->cmd_argv[0], buildstate->cmd_argv); + error (0, errno, "%s", + safely_quote_err_filename(0, buildstate->cmd_argv[0])); + _exit (1); + } + + + /* In parent; set up for next time. */ + bc_clear_args(ctl, buildstate); + + + while (waitpid (child_pid, &wait_status, 0) == (pid_t) -1) + { + if (errno != EINTR) + { + error (0, errno, _("error waiting for %s"), + safely_quote_err_filename(0, buildstate->cmd_argv[0])); + state.exit_status = 1; + return 0; /* FAIL */ + } + } + + if (WIFSIGNALED (wait_status)) + { + error (0, 0, _("%s terminated by signal %d"), + quotearg_n_style(0, options.err_quoting_style, + buildstate->cmd_argv[0]), + WTERMSIG (wait_status)); + + if (execp->multiple) + { + /* -exec \; just returns false if the invoked command fails. + * -exec {} + returns true if the invoked command fails, but + * sets the program exit status. + */ + state.exit_status = 1; + } + + return 1; /* OK */ + } + + if (0 == WEXITSTATUS (wait_status)) + { + return 1; /* OK */ + } + else + { + if (execp->multiple) + { + /* -exec \; just returns false if the invoked command fails. + * -exec {} + returns true if the invoked command fails, but + * sets the program exit status. + */ + state.exit_status = 1; + } + return 0; /* FAIL */ + } + +} + + +/* Return a static string formatting the time WHEN according to the + * strftime format character KIND. + * + * This function contains a number of assertions. These look like + * runtime checks of the results of computations, which would be a + * problem since external events should not be tested for with + * "assert" (instead you should use "if"). However, they are not + * really runtime checks. The assertions actually exist to verify + * that the various buffers are correctly sized. + */ +static char * +format_date (struct timespec ts, int kind) +{ + /* In theory, we use an extra 10 characters for 9 digits of + * nanoseconds and 1 for the decimal point. However, the real + * world is more complex than that. + * + * For example, some systems return junk in the tv_nsec part of + * st_birthtime. An example of this is the NetBSD-4.0-RELENG kernel + * (at Sat Mar 24 18:46:46 2007) running a NetBSD-3.1-RELEASE + * runtime and examining files on an msdos filesytem. So for that + * reason we set NS_BUF_LEN to 32, which is simply "long enough" as + * opposed to "exactly the right size". Note that the behaviour of + * NetBSD appears to be a result of the use of uninitialised data, + * as it's not 100% reproducible (more like 25%). + */ + enum { + NS_BUF_LEN = 32, + DATE_LEN_PERCENT_APLUS=21 /* length of result of %A+ (it's longer than %c)*/ + }; + static char buf[128u+10u + MAX(DATE_LEN_PERCENT_APLUS, + MAX (LONGEST_HUMAN_READABLE + 2, NS_BUF_LEN+64+200))]; + char ns_buf[NS_BUF_LEN]; /* -.9999999990 (- sign can happen!)*/ + int charsprinted, need_ns_suffix; + struct tm *tm; + char fmt[6]; + + /* human_readable() assumes we pass a buffer which is at least as + * long as LONGEST_HUMAN_READABLE. We use an assertion here to + * ensure that no nasty unsigned overflow happend in our calculation + * of the size of buf. Do the assertion here rather than in the + * code for %@ so that we find the problem quickly if it exists. If + * you want to submit a patch to move this into the if statement, go + * ahead, I'll apply it. But include performance timings + * demonstrating that the performance difference is actually + * measurable. + */ + assert(sizeof(buf) >= LONGEST_HUMAN_READABLE); + + charsprinted = 0; + need_ns_suffix = 0; + + /* Format the main part of the time. */ + if (kind == '+') + { + strcpy (fmt, "%F+%T"); + need_ns_suffix = 1; + } + else + { + fmt[0] = '%'; + fmt[1] = kind; + fmt[2] = '\0'; + + /* %a, %c, and %t are handled in ctime_format() */ + switch (kind) + { + case 'S': + case 'T': + case 'X': + case '@': + need_ns_suffix = 1; + break; + default: + need_ns_suffix = 0; + break; + } + } + + if (need_ns_suffix) + { + /* Format the nanoseconds part. Leave a trailing zero to + * discourage people from writing scripts which extract the + * fractional part of the timestamp by using column offsets. + * The reason for discouraging this is that in the future, the + * granularity may not be nanoseconds. + */ + ns_buf[0] = 0; + charsprinted = snprintf(ns_buf, NS_BUF_LEN, ".%09ld0", (long int)ts.tv_nsec); + assert(charsprinted < NS_BUF_LEN); + } + + if (kind != '@' + && (tm = localtime (&ts.tv_sec)) + && strftime (buf, sizeof buf, fmt, tm)) + { + /* For %AS, %CS, %TS, add the fractional part of the seconds + * information. + */ + if (need_ns_suffix) + { + assert((sizeof buf - strlen(buf)) > strlen(ns_buf)); + strcat(buf, ns_buf); + } + return buf; + } + else + { + uintmax_t w = ts.tv_sec; + size_t used, len, remaining; + + /* XXX: note that we are negating an unsigned type which is the + * widest possible unsigned type. + */ + char *p = human_readable (ts.tv_sec < 0 ? -w : w, buf + 1, + human_ceiling, 1, 1); + assert(p > buf); + assert(p < (buf + (sizeof buf))); + if (ts.tv_sec < 0) + *--p = '-'; /* XXX: Ugh, relying on internal details of human_readable(). */ + + /* Add the nanoseconds part. Because we cannot enforce a + * particlar implementation of human_readable, we cannot assume + * any particular value for (p-buf). So we need to be careful + * that there is enough space remaining in the buffer. + */ + if (need_ns_suffix) + { + len = strlen(p); + used = (p-buf) + len; /* Offset into buf of current end */ + assert(sizeof buf > used); /* Ensure we can perform subtraction safely. */ + remaining = sizeof buf - used - 1u; /* allow space for NUL */ + + if (strlen(ns_buf) >= remaining) + { + error(0, 0, + "charsprinted=%ld but remaining=%lu: ns_buf=%s", + (long)charsprinted, (unsigned long)remaining, ns_buf); + } + assert(strlen(ns_buf) < remaining); + strcat(p, ns_buf); + } + return p; + } +} + +static const char *weekdays[] = + { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + }; +static char * months[] = + { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + + +static char * +ctime_format (struct timespec ts) +{ + const struct tm * ptm; +#define TIME_BUF_LEN 1024u + static char resultbuf[TIME_BUF_LEN]; + int nout; + + ptm = localtime(&ts.tv_sec); + if (ptm) + { + assert(ptm->tm_wday >= 0); + assert(ptm->tm_wday < 7); + assert(ptm->tm_mon >= 0); + assert(ptm->tm_mon < 12); + assert(ptm->tm_hour >= 0); + assert(ptm->tm_hour < 24); + assert(ptm->tm_min < 60); + assert(ptm->tm_sec <= 61); /* allows 2 leap seconds. */ + + /* wkday mon mday hh:mm:ss.nnnnnnnnn yyyy */ + nout = snprintf(resultbuf, TIME_BUF_LEN, + "%3s %3s %2d %02d:%02d:%02d.%010ld %04d", + weekdays[ptm->tm_wday], + months[ptm->tm_mon], + ptm->tm_mday, + ptm->tm_hour, + ptm->tm_min, + ptm->tm_sec, + (long int)ts.tv_nsec, + 1900 + ptm->tm_year); + + assert(nout < TIME_BUF_LEN); + return resultbuf; + } + else + { + /* The time cannot be represented as a struct tm. + Output it as an integer. */ + return format_date (ts, '@'); + } +} + +/* Copy STR into BUF and trim blanks from the end of BUF. + Return BUF. */ + +static char * +blank_rtrim (str, buf) + char *str; + char *buf; +{ + int i; + + if (str == NULL) + return (NULL); + strcpy (buf, str); + i = strlen (buf) - 1; + while ((i >= 0) && ((buf[i] == ' ') || buf[i] == '\t')) + i--; + buf[++i] = '\0'; + return (buf); +} + +/* Print out the predicate list starting at NODE. */ +void +print_list (FILE *fp, struct predicate *node) +{ + struct predicate *cur; + char name[256]; + + cur = node; + while (cur != NULL) + { + fprintf (fp, "[%s] ", blank_rtrim (cur->p_name, name)); + cur = cur->pred_next; + } + fprintf (fp, "\n"); +} + +/* Print out the predicate list starting at NODE. */ +static void +print_parenthesised(FILE *fp, struct predicate *node) +{ + int parens = 0; + + if (node) + { + if ((pred_is(node, pred_or) || pred_is(node, pred_and)) + && node->pred_left == NULL) + { + /* We print " or X" as just "X" + * We print " and X" as just "X" + */ + print_parenthesised(fp, node->pred_right); + } + else + { + if (node->pred_left || node->pred_right) + parens = 1; + + if (parens) + fprintf(fp, "%s", " ( "); + print_optlist(fp, node); + if (parens) + fprintf(fp, "%s", " ) "); + } + } +} + +void +print_optlist (FILE *fp, const struct predicate *p) +{ + if (p) + { + print_parenthesised(fp, p->pred_left); + fprintf (fp, + "%s%s", + p->need_stat ? "[call stat] " : "", + p->need_type ? "[need type] " : ""); + print_predicate(fp, p); + fprintf(fp, " [%g] ", p->est_success_rate); + if (options.debug_options & DebugSuccessRates) + { + fprintf(fp, "[%ld/%ld", p->perf.successes, p->perf.visits); + if (p->perf.visits) + { + double real_rate = (double)p->perf.successes / (double)p->perf.visits; + fprintf(fp, "=%g] ", real_rate); + } + else + { + fprintf(fp, "=_] "); + } + } + print_parenthesised(fp, p->pred_right); + } +} + +void show_success_rates(const struct predicate *p) +{ + if (options.debug_options & DebugSuccessRates) + { + fprintf(stderr, "Predicate success rates after completion:\n"); + print_optlist(stderr, p); + fprintf(stderr, "\n"); + } +} + + + + +#ifdef _NDEBUG +/* If _NDEBUG is defined, the assertions will do nothing. Hence + * there is no point in having a function body for pred_sanity_check() + * if that preprocessor macro is defined. + */ +void +pred_sanity_check(const struct predicate *predicates) +{ + /* Do nothing, since assert() is a no-op with _NDEBUG set */ + return; +} +#else +void +pred_sanity_check(const struct predicate *predicates) +{ + const struct predicate *p; + + for (p=predicates; p != NULL; p=p->pred_next) + { + /* All predicates must do something. */ + assert(p->pred_func != NULL); + + /* All predicates must have a parser table entry. */ + assert(p->parser_entry != NULL); + + /* If the parser table tells us that just one predicate function is + * possible, verify that that is still the one that is in effect. + * If the parser has NULL for the predicate function, that means that + * the parse_xxx function fills it in, so we can't check it. + */ + if (p->parser_entry->pred_func) + { + assert(p->parser_entry->pred_func == p->pred_func); + } + + switch (p->parser_entry->type) + { + /* Options all take effect during parsing, so there should + * be no predicate entries corresponding to them. Hence we + * should not see any ARG_OPTION or ARG_POSITIONAL_OPTION + * items. + * + * This is a silly way of coding this test, but it prevents + * a compiler warning (i.e. otherwise it would think that + * there would be case statements missing). + */ + case ARG_OPTION: + case ARG_POSITIONAL_OPTION: + assert(p->parser_entry->type != ARG_OPTION); + assert(p->parser_entry->type != ARG_POSITIONAL_OPTION); + break; + + case ARG_ACTION: + assert(p->side_effects); /* actions have side effects. */ + if (!pred_is(p, pred_prune) && !pred_is(p, pred_quit)) + { + /* actions other than -prune and -quit should + * inhibit the default -print + */ + assert(p->no_default_print); + } + break; + + /* We happen to know that the only user of ARG_SPECIAL_PARSE + * is a test, so handle it like ARG_TEST. + */ + case ARG_SPECIAL_PARSE: + case ARG_TEST: + case ARG_PUNCTUATION: + case ARG_NOOP: + /* Punctuation and tests should have no side + * effects and not inhibit default print. + */ + assert(!p->no_default_print); + assert(!p->side_effects); + break; + } + } +} +#endif diff --git a/find/testsuite/Makefile.am b/find/testsuite/Makefile.am new file mode 100644 index 0000000..02d4c75 --- /dev/null +++ b/find/testsuite/Makefile.am @@ -0,0 +1,224 @@ +AUTOMAKE_OPTIONS=dejagnu +FIND = ../find +FINDFLAGS = + +DEJATOOL = find + +EXTRA_DIST_XO = \ +find.gnu/access.xo \ +find.gnu/comma.xo \ +find.gnu/delete.xo \ +find.gnu/deletedir.xo \ +find.gnu/deletefile.xo \ +find.gnu/depth.xo \ +find.gnu/depth-d.xo \ +find.gnu/empty.xo \ +find.gnu/execdir-hier.xo \ +find.gnu/execdir-one.xo \ +find.gnu/execdir-root-only.xo \ +find.gnu/exec-many-rtn-failure.xo \ +find.gnu/exec-many-rtn-success.xo \ +find.gnu/exec-one-rtn-fail.xo \ +find.gnu/exec-one-rtn-success.xo \ +find.gnu/false.xo \ +find.gnu/follow-arg-parent-symlink.xo \ +find.gnu/follow-basic.xo \ +find.gnu/fprint0_stdout.xo \ +find.gnu/gnuand.xo \ +find.gnu/gnunot.xo \ +find.gnu/gnu-or.xo \ +find.gnu/ilname.xo \ +find.gnu/iname.xo \ +find.gnu/inum.xo \ +find.gnu/ipath.xo \ +find.gnu/iregex1.xo \ +find.gnu/iwholename.xo \ +find.gnu/lname.xo \ +find.gnu/mindepth-arg.xo \ +find.gnu/name-opt.xo \ +find.gnu/name-period.xo \ +find.gnu/path.xo \ +find.gnu/print_stdout.xo \ +find.gnu/perm.xo \ +find.gnu/perm000.xo \ +find.gnu/perm-slash.xo \ +find.gnu/posix-dflt.xo \ +find.gnu/posix-h.xo \ +find.gnu/posix-l.xo \ +find.gnu/printfHdfl.xo \ +find.gnu/printf-symlink.xo \ +find.gnu/printf-h.xo \ +find.gnu/printf.xo \ +find.gnu/print0.xo \ +find.gnu/prune-default-print.xo \ +find.gnu/regex1.xo \ +find.gnu/regex2.xo \ +find.gnu/samefile-copy.xo \ +find.gnu/samefile-link.xo \ +find.gnu/samefile-p-brokenlink.xo \ +find.gnu/samefile-same.xo \ +find.gnu/samefile-symlink.xo \ +find.gnu/sv-bug-17782.xo \ +find.gnu/sv-bug-18222.xo \ +find.gnu/true.xo \ +find.gnu/wholename.xo \ +find.gnu/xtype-symlink.xo \ +find.gnu/quit.xo \ +find.gnu/xtype.xo \ +find.posix/and.xo \ +find.posix/depth1.xo \ +find.posix/exec-one.xo \ +find.posix/files-not-expressions1.xo \ +find.posix/files-not-expressions2.xo \ +find.posix/files-not-expressions3.xo \ +find.posix/grouping.xo \ +find.posix/links.xo \ +find.posix/sv-bug-11175.xo \ +find.posix/sv-bug-12181.xo \ +find.posix/depth1.xo \ +find.posix/sizes.xo \ +find.posix/name.xo \ +find.posix/perm-X.xo \ +find.posix/perm-vanilla.xo \ +find.posix/posixnot.xo \ +find.posix/prune.xo \ +find.posix/sizes.xo \ +find.posix/sizetype.xo \ +find.posix/sv-bug-11175.xo \ +find.posix/sv-bug-12181.xo \ +find.posix/sv-bug-15235.xo \ +find.posix/sv-bug-19613.xo \ +find.posix/typesize.xo \ +find.posix/posixnot.xo \ +find.posix/grouping.xo \ +find.posix/and.xo \ +find.posix/exec-one.xo \ +find.gnu/follow-arg-parent-symlink.xo + +EXTRA_DIST_EXP = \ +config/unix.exp \ +find.gnu/access.exp \ +find.gnu/comma.exp \ +find.gnu/delete.exp \ +find.gnu/deletedir.exp \ +find.gnu/deletefile.exp \ +find.gnu/depth.exp \ +find.gnu/depth-d.exp \ +find.gnu/empty.exp \ +find.gnu/execdir-hier.exp \ +find.gnu/execdir-in-unreadable.exp \ +find.gnu/execdir-one.exp \ +find.gnu/execdir-pwd.exp \ +find.gnu/execdir-root-only.exp \ +find.gnu/exec-many-rtn-failure.exp \ +find.gnu/exec-many-rtn-success.exp \ +find.gnu/exec-one-rtn-fail.exp \ +find.gnu/exec-one-rtn-success.exp \ +find.gnu/false.exp \ +find.gnu/follow-arg-parent-symlink.exp \ +find.gnu/follow-basic.exp \ +find.gnu/fprint0_stdout.exp \ +find.gnu/fprint-unwritable.exp \ +find.gnu/gnuand.exp \ +find.gnu/gnunot.exp \ +find.gnu/gnu-or.exp \ +find.gnu/ilname.exp \ +find.gnu/iname.exp \ +find.gnu/inum.exp \ +find.gnu/ipath.exp \ +find.gnu/iregex1.exp \ +find.gnu/iwholename.exp \ +find.gnu/lname.exp \ +find.gnu/mindepth-arg.exp \ +find.gnu/mindepth-badarg.exp \ +find.gnu/name-opt.exp \ +find.gnu/name-period.exp \ +find.gnu/path.exp \ +find.gnu/print_stdout.exp \ +find.gnu/print0.exp \ +find.gnu/perm.exp \ +find.gnu/perm000.exp \ +find.gnu/perm-slash.exp \ +find.gnu/posix-dflt.exp \ +find.gnu/posix-h.exp \ +find.gnu/posix-l.exp \ +find.gnu/printfHdfl.exp \ +find.gnu/printf.exp \ +find.gnu/printf.exp \ +find.gnu/printf-symlink.exp \ +find.gnu/printf-h.exp \ +find.gnu/prune-default-print.exp \ +find.gnu/regex1.exp \ +find.gnu/regex2.exp \ +find.gnu/samefile-copy.exp \ +find.gnu/samefile-link.exp \ +find.gnu/samefile-missing.exp \ +find.gnu/samefile-p-brokenlink.exp \ +find.gnu/samefile-same.exp \ +find.gnu/samefile-symlink.exp \ +find.gnu/true.exp \ +find.gnu/wholename.exp \ +find.gnu/xtype-symlink.exp \ +find.gnu/sv-bug-12230.exp \ +find.gnu/sv-bug-17477.exp \ +find.gnu/sv-bug-17490.exp \ +find.gnu/sv-bug-17782.exp \ +find.gnu/sv-bug-18222.exp \ +find.gnu/quit.exp \ +find.gnu/used-invarg.exp \ +find.gnu/used-missing.exp \ +find.gnu/user-invalid.exp \ +find.gnu/xtype.exp \ +find.posix/and.exp \ +find.posix/bracket-depth.exp \ +find.posix/depth1.exp \ +find.posix/empty-parens.exp \ +find.posix/exec-one.exp \ +find.posix/files-not-expressions1.exp \ +find.posix/files-not-expressions2.exp \ +find.posix/files-not-expressions3.exp \ +find.posix/grouping.exp \ +find.posix/group-empty.exp \ +find.posix/group-missing.exp \ +find.posix/links.exp \ +find.posix/sv-bug-11175.exp \ +find.posix/sv-bug-12181.exp \ +find.posix/depth1.exp \ +find.posix/sizes.exp \ +find.posix/name.exp \ +find.posix/name-missing.exp \ +find.posix/perm-X.exp \ +find.posix/perm-vanilla.exp \ +find.posix/posixnot.exp \ +find.posix/prune.exp \ +find.posix/size-invalid.exp \ +find.posix/size-missing.exp \ +find.posix/sizes.exp \ +find.posix/sizetype.exp \ +find.posix/typearg.exp \ +find.posix/sv-bug-11175.exp \ +find.posix/sv-bug-12181.exp \ +find.posix/sv-bug-15235.exp \ +find.posix/sv-bug-19605.exp \ +find.posix/sv-bug-19613.exp \ +find.posix/sv-bug-19617.exp \ +find.posix/typesize.exp \ +find.posix/grouping.exp \ +find.posix/and.exp \ +find.posix/exec-one.exp \ +find.posix/user-empty.exp \ +find.posix/user-missing.exp + +EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) + +CLEANFILES = *.log *.sum site.exp site.bak + +#DIST_SUBDIRS = config + + +checklists: + cd $(srcdir) && \ + ( find config find.gnu find.posix \( -name "*.exp" -o -name "*.xo" \) -print ; \ + ls $(EXTRA_DIST_XO) ; \ + ls $(EXTRA_DIST_EXP) ; ) | \ + sort | uniq -c | awk '$$1 != 2 { print; }' diff --git a/find/testsuite/Makefile.in b/find/testsuite/Makefile.in new file mode 100644 index 0000000..5610f19 --- /dev/null +++ b/find/testsuite/Makefile.in @@ -0,0 +1,873 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = find/testsuite +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXPECT = expect +RUNTEST = runtest +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = dejagnu +FIND = ../find +FINDFLAGS = +DEJATOOL = find +EXTRA_DIST_XO = \ +find.gnu/access.xo \ +find.gnu/comma.xo \ +find.gnu/delete.xo \ +find.gnu/deletedir.xo \ +find.gnu/deletefile.xo \ +find.gnu/depth.xo \ +find.gnu/depth-d.xo \ +find.gnu/empty.xo \ +find.gnu/execdir-hier.xo \ +find.gnu/execdir-one.xo \ +find.gnu/execdir-root-only.xo \ +find.gnu/exec-many-rtn-failure.xo \ +find.gnu/exec-many-rtn-success.xo \ +find.gnu/exec-one-rtn-fail.xo \ +find.gnu/exec-one-rtn-success.xo \ +find.gnu/false.xo \ +find.gnu/follow-arg-parent-symlink.xo \ +find.gnu/follow-basic.xo \ +find.gnu/fprint0_stdout.xo \ +find.gnu/gnuand.xo \ +find.gnu/gnunot.xo \ +find.gnu/gnu-or.xo \ +find.gnu/ilname.xo \ +find.gnu/iname.xo \ +find.gnu/inum.xo \ +find.gnu/ipath.xo \ +find.gnu/iregex1.xo \ +find.gnu/iwholename.xo \ +find.gnu/lname.xo \ +find.gnu/mindepth-arg.xo \ +find.gnu/name-opt.xo \ +find.gnu/name-period.xo \ +find.gnu/path.xo \ +find.gnu/print_stdout.xo \ +find.gnu/perm.xo \ +find.gnu/perm000.xo \ +find.gnu/perm-slash.xo \ +find.gnu/posix-dflt.xo \ +find.gnu/posix-h.xo \ +find.gnu/posix-l.xo \ +find.gnu/printfHdfl.xo \ +find.gnu/printf-symlink.xo \ +find.gnu/printf-h.xo \ +find.gnu/printf.xo \ +find.gnu/print0.xo \ +find.gnu/prune-default-print.xo \ +find.gnu/regex1.xo \ +find.gnu/regex2.xo \ +find.gnu/samefile-copy.xo \ +find.gnu/samefile-link.xo \ +find.gnu/samefile-p-brokenlink.xo \ +find.gnu/samefile-same.xo \ +find.gnu/samefile-symlink.xo \ +find.gnu/sv-bug-17782.xo \ +find.gnu/sv-bug-18222.xo \ +find.gnu/true.xo \ +find.gnu/wholename.xo \ +find.gnu/xtype-symlink.xo \ +find.gnu/quit.xo \ +find.gnu/xtype.xo \ +find.posix/and.xo \ +find.posix/depth1.xo \ +find.posix/exec-one.xo \ +find.posix/files-not-expressions1.xo \ +find.posix/files-not-expressions2.xo \ +find.posix/files-not-expressions3.xo \ +find.posix/grouping.xo \ +find.posix/links.xo \ +find.posix/sv-bug-11175.xo \ +find.posix/sv-bug-12181.xo \ +find.posix/depth1.xo \ +find.posix/sizes.xo \ +find.posix/name.xo \ +find.posix/perm-X.xo \ +find.posix/perm-vanilla.xo \ +find.posix/posixnot.xo \ +find.posix/prune.xo \ +find.posix/sizes.xo \ +find.posix/sizetype.xo \ +find.posix/sv-bug-11175.xo \ +find.posix/sv-bug-12181.xo \ +find.posix/sv-bug-15235.xo \ +find.posix/sv-bug-19613.xo \ +find.posix/typesize.xo \ +find.posix/posixnot.xo \ +find.posix/grouping.xo \ +find.posix/and.xo \ +find.posix/exec-one.xo \ +find.gnu/follow-arg-parent-symlink.xo + +EXTRA_DIST_EXP = \ +config/unix.exp \ +find.gnu/access.exp \ +find.gnu/comma.exp \ +find.gnu/delete.exp \ +find.gnu/deletedir.exp \ +find.gnu/deletefile.exp \ +find.gnu/depth.exp \ +find.gnu/depth-d.exp \ +find.gnu/empty.exp \ +find.gnu/execdir-hier.exp \ +find.gnu/execdir-in-unreadable.exp \ +find.gnu/execdir-one.exp \ +find.gnu/execdir-pwd.exp \ +find.gnu/execdir-root-only.exp \ +find.gnu/exec-many-rtn-failure.exp \ +find.gnu/exec-many-rtn-success.exp \ +find.gnu/exec-one-rtn-fail.exp \ +find.gnu/exec-one-rtn-success.exp \ +find.gnu/false.exp \ +find.gnu/follow-arg-parent-symlink.exp \ +find.gnu/follow-basic.exp \ +find.gnu/fprint0_stdout.exp \ +find.gnu/fprint-unwritable.exp \ +find.gnu/gnuand.exp \ +find.gnu/gnunot.exp \ +find.gnu/gnu-or.exp \ +find.gnu/ilname.exp \ +find.gnu/iname.exp \ +find.gnu/inum.exp \ +find.gnu/ipath.exp \ +find.gnu/iregex1.exp \ +find.gnu/iwholename.exp \ +find.gnu/lname.exp \ +find.gnu/mindepth-arg.exp \ +find.gnu/mindepth-badarg.exp \ +find.gnu/name-opt.exp \ +find.gnu/name-period.exp \ +find.gnu/path.exp \ +find.gnu/print_stdout.exp \ +find.gnu/print0.exp \ +find.gnu/perm.exp \ +find.gnu/perm000.exp \ +find.gnu/perm-slash.exp \ +find.gnu/posix-dflt.exp \ +find.gnu/posix-h.exp \ +find.gnu/posix-l.exp \ +find.gnu/printfHdfl.exp \ +find.gnu/printf.exp \ +find.gnu/printf.exp \ +find.gnu/printf-symlink.exp \ +find.gnu/printf-h.exp \ +find.gnu/prune-default-print.exp \ +find.gnu/regex1.exp \ +find.gnu/regex2.exp \ +find.gnu/samefile-copy.exp \ +find.gnu/samefile-link.exp \ +find.gnu/samefile-missing.exp \ +find.gnu/samefile-p-brokenlink.exp \ +find.gnu/samefile-same.exp \ +find.gnu/samefile-symlink.exp \ +find.gnu/true.exp \ +find.gnu/wholename.exp \ +find.gnu/xtype-symlink.exp \ +find.gnu/sv-bug-12230.exp \ +find.gnu/sv-bug-17477.exp \ +find.gnu/sv-bug-17490.exp \ +find.gnu/sv-bug-17782.exp \ +find.gnu/sv-bug-18222.exp \ +find.gnu/quit.exp \ +find.gnu/used-invarg.exp \ +find.gnu/used-missing.exp \ +find.gnu/user-invalid.exp \ +find.gnu/xtype.exp \ +find.posix/and.exp \ +find.posix/bracket-depth.exp \ +find.posix/depth1.exp \ +find.posix/empty-parens.exp \ +find.posix/exec-one.exp \ +find.posix/files-not-expressions1.exp \ +find.posix/files-not-expressions2.exp \ +find.posix/files-not-expressions3.exp \ +find.posix/grouping.exp \ +find.posix/group-empty.exp \ +find.posix/group-missing.exp \ +find.posix/links.exp \ +find.posix/sv-bug-11175.exp \ +find.posix/sv-bug-12181.exp \ +find.posix/depth1.exp \ +find.posix/sizes.exp \ +find.posix/name.exp \ +find.posix/name-missing.exp \ +find.posix/perm-X.exp \ +find.posix/perm-vanilla.exp \ +find.posix/posixnot.exp \ +find.posix/prune.exp \ +find.posix/size-invalid.exp \ +find.posix/size-missing.exp \ +find.posix/sizes.exp \ +find.posix/sizetype.exp \ +find.posix/typearg.exp \ +find.posix/sv-bug-11175.exp \ +find.posix/sv-bug-12181.exp \ +find.posix/sv-bug-15235.exp \ +find.posix/sv-bug-19605.exp \ +find.posix/sv-bug-19613.exp \ +find.posix/sv-bug-19617.exp \ +find.posix/typesize.exp \ +find.posix/grouping.exp \ +find.posix/and.exp \ +find.posix/exec-one.exp \ +find.posix/user-empty.exp \ +find.posix/user-missing.exp + +EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) +CLEANFILES = *.log *.sum site.exp site.bak +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(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 find/testsuite/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits find/testsuite/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +check-DEJAGNU: site.exp + srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \ + if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + then :; else exit_status=1; fi; \ + done; \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi; \ + exit $$exit_status +site.exp: Makefile + @echo 'Making a new site.exp file...' + @echo '## these variables are automatically generated by make ##' >site.tmp + @echo '# Do not edit here. If you wish to override these values' >>site.tmp + @echo '# edit the last section' >>site.tmp + @echo 'set srcdir $(srcdir)' >>site.tmp + @echo "set objdir `pwd`" >>site.tmp + @echo 'set build_alias "$(build_alias)"' >>site.tmp + @echo 'set build_triplet $(build_triplet)' >>site.tmp + @echo 'set host_alias "$(host_alias)"' >>site.tmp + @echo 'set host_triplet $(host_triplet)' >>site.tmp + @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp + @test ! -f site.exp || \ + sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @-rm -f site.bak + @test ! -f site.exp || mv site.exp site.bak + @mv site.tmp site.exp + +distclean-DEJAGNU: + -rm -f site.exp site.bak + -l='$(DEJATOOL)'; for tool in $$l; do \ + rm -f $$tool.sum $$tool.log; \ + done + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +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-DEJAGNU distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ + distclean distclean-DEJAGNU distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am + + +#DIST_SUBDIRS = config + +checklists: + cd $(srcdir) && \ + ( find config find.gnu find.posix \( -name "*.exp" -o -name "*.xo" \) -print ; \ + ls $(EXTRA_DIST_XO) ; \ + ls $(EXTRA_DIST_EXP) ; ) | \ + sort | uniq -c | awk '$$1 != 2 { print; }' +# 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/find/testsuite/config/unix.exp b/find/testsuite/config/unix.exp new file mode 100644 index 0000000..4317e09 --- /dev/null +++ b/find/testsuite/config/unix.exp @@ -0,0 +1,298 @@ +# -*- TCL -*- +# Test-specific TCL procedures required by DejaGNU. +# Copyright (C) 2000,2003,2004,2005,2006 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 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. + +# Modified by Kevin Dalley from the xargs files. +# Modified by David MacKenzie from the gcc files +# written by Rob Savoye . + + +global OLDFIND +global FTSFIND + +verbose "base_dir is $base_dir" 2 + +# look for OLDFIND and FTSFIND +if { ![info exists OLDFIND] || ![info exists FTSFIND] } { + verbose "Searching for oldfind" + set dir "$base_dir/.." + + set objfile "find.o" + if ![file exists "$dir/$objfile"] then { + error "dir is $dir, but I cannot see $objfile in that directory" + } + if ([findfile $dir/oldfind 1 0]) { + verbose "found oldfind, so ftsfind must be called find" + set OLDFIND [findfile $dir/oldfind $dir/oldfind [transform oldfind]] + set FTSFIND [findfile $dir/find $dir/find [transform find ]] + } else { + verbose "did not find oldfind, so ftsfind must be called ftsfind" + set OLDFIND [findfile $dir/find $dir/find [transform find ]] + set FTSFIND [findfile $dir/ftsfind $dir/ftsfind [transform ftsfind]] + } +} + +verbose "ftsfind is at $FTSFIND" 2 +verbose "oldfind is at $OLDFIND" 2 + +if { [ string equal $FTSFIND $OLDFIND ] } { + error "OLDFIND and FTSFIND are set to $FTSFIND, which can't be right" +} + +if [file exists $FTSFIND] then { + if [file exists $OLDFIND] then { + verbose "FTSFIND=$FTSFIND and OLDFIND=$OLDFIND both exist." 2 + } else { + error "OLDFIND=$OLDFIND, but that program does not exist" + } +} else { + error "FTSFIND=$FTSFIND, but that program does not exist (base_dir is $base_dir)" +} + + +global FINDFLAGS +if ![info exists FINDFLAGS] then { + set FINDFLAGS "" +} + +# Called by runtest. +# Extract and print the version number of find. +proc find_version {} { + global FTSFIND + global FINDFLAGS + + if {[which $FTSFIND] != 0} then { + set tmp [ eval exec $FTSFIND $FINDFLAGS --version find.out.uns" + send_log "$cmd\n" + if $verbose>1 then { + send_user "Spawning \"$cmd\"\n" + } + + if $fail_good then { + send_log "Hoping for this command to return nonzero\n" + } else { + send_log "Hoping for this command to return 0\n" + } + set failed [ catch "exec $cmd" result ] + send_log "return value is $failed, result is '$result'\n" + if $failed { + # The command failed. + if $fail_good then { + send_log "As expected, $cmd returned nonzero\n" + } else { + fail "$testname, $result" + } + } else { + # The command returned 0. + if $fail_good then { + fail "$testname, $result" + } else { + send_log "As expected, $cmd returned 0\n" + } + } + + exec sort < find.out.uns > find.out + file delete find.out.uns + + if [file exists $outfile] then { + # We use the 'sort' above to sort the output of find to ensure + # that the directory entries appear in a predictable order. + # Because in the general case the person compiling and running + # "make check" will have a different collating order to the + # maintainer, we can't guarantee that our "correct" answer + # is already sorted in the correct order. To avoid trying + # to figure out how to select a POSIX environment on a + # random system, we just sort the data again here, using + # the local user's environment. + exec sort < $outfile > cmp.out + set cmp_cmd "$compareprog find.out cmp.out" + + send_log "$cmp_cmd\n" + catch "exec $cmp_cmd" cmpout + if {$cmpout != ""} then { + fail "$testname, standard output differs from the expected result:\n$cmpout" + return + } + } else { + if {[file size find.out] != 0} then { + fail "$testname, output should be empty" + return + } + } + pass "$testname" +} + + +proc find_start { passfail options {infile ""} {output ""} {setup ""}} { + global OLDFIND + global FTSFIND + global FINDFLAGS + global SKIP_OLD + global SKIP_NEW + + if {$infile != ""} then { + set msg "Did not expect infile parameter to be set" + untested $msg + error $msg + } + + if {[which $FTSFIND] == 0} then { + error "$FTSFIND, program does not exist" + exit 1 + } + if {[which $OLDFIND] == 0} then { + error "$OLDFIND, program does not exist" + exit 1 + } + + # Now run the test with each binary, once with each optimisation level. + foreach optlevel {0 1 2 3} { + set flags "$FINDFLAGS -O$optlevel" + if { ![info exists SKIP_OLD] || ! $SKIP_OLD } { + eval $setup + do_find_start old-O$optlevel $OLDFIND $flags $passfail $options $infile $output + } + if { ![info exists SKIP_NEW] || !$SKIP_NEW } { + eval $setup + do_find_start new-O$optlevel $FTSFIND $flags $passfail $options $infile $output + } + } +} + +# Called by runtest. +# Clean up (remove temporary files) before runtest exits. +proc find_exit {} { + catch "exec rm -f find.out cmp.out" +} + +proc path_setting_is_unsafe {} { + global env; + set itemlist [ split $env(PATH) : ] + foreach item $itemlist { + if { [ string equal $item "" ] } { + return 1; + } + if { [ string equal $item "." ] } { + return 1; + } + if { ! [ string match "/*" $item ] } { + # not an absolute path element. + return 1 + } + } + return 0; +} + +proc touch args { + foreach filename $args { + set f [open "$filename" "a"] + close $f + } +} + + + +proc safe_path [ ] { + if { [ path_setting_is_unsafe ] } { + warning { Cannot perform test as your $PATH environment variable includes a reference to the current directory or a directory name which is not absolute } + untested { skipping this test because your $PATH variable is wrongly set } + return 0 + } else { + return 1 + } +} + + +proc fs_superuser [ ] { + set tmpfile "tmp000" + exec rm -f $tmpfile + touch $tmpfile + exec chmod 000 $tmpfile + set retval 0 + + if [ file readable $tmpfile ] { + # On Cygwin, a user with admin rights can read all files, and + # access(foo,R_OK) correctly returns 1 for all files. + warning "You have superuser privileges, skipping this test." + untested {skipping this test because you have superuser privileges} + set retval 1 + } + exec rm -f $tmpfile + return $retval +} diff --git a/find/testsuite/find.gnu/access.exp b/find/testsuite/find.gnu/access.exp new file mode 100644 index 0000000..18b7aab --- /dev/null +++ b/find/testsuite/find.gnu/access.exp @@ -0,0 +1,15 @@ +# tests for -readable, -writable, -executable +exec rm -rf tmp +exec mkdir tmp +if { ! [ fs_superuser ] } { + touch tmp/x tmp/w tmp/r tmp/rw tmp/rwx tmp/0 + exec chmod 400 tmp/r + exec chmod 200 tmp/w + exec chmod 100 tmp/x + exec chmod 000 tmp/0 + exec chmod 600 tmp/rw + exec chmod 700 tmp/rwx + find_start p {tmp -readable -printf "r %p\n" , -writable -printf "w %p\n" , -executable -printf "x %p\n"} + exec rm -rf tmp +} + diff --git a/find/testsuite/find.gnu/access.xo b/find/testsuite/find.gnu/access.xo new file mode 100644 index 0000000..464957d --- /dev/null +++ b/find/testsuite/find.gnu/access.xo @@ -0,0 +1,11 @@ +r tmp +r tmp/r +r tmp/rw +r tmp/rwx +w tmp +w tmp/rw +w tmp/rwx +w tmp/w +x tmp +x tmp/rwx +x tmp/x diff --git a/find/testsuite/find.gnu/comma.exp b/find/testsuite/find.gnu/comma.exp new file mode 100644 index 0000000..07a768b --- /dev/null +++ b/find/testsuite/find.gnu/comma.exp @@ -0,0 +1 @@ +find_start p {. -maxdepth 2 -false , -name .} diff --git a/find/testsuite/find.gnu/comma.xo b/find/testsuite/find.gnu/comma.xo new file mode 100644 index 0000000..9c558e3 --- /dev/null +++ b/find/testsuite/find.gnu/comma.xo @@ -0,0 +1 @@ +. diff --git a/find/testsuite/find.gnu/delete.exp b/find/testsuite/find.gnu/delete.exp new file mode 100644 index 0000000..f748321 --- /dev/null +++ b/find/testsuite/find.gnu/delete.exp @@ -0,0 +1,7 @@ +global FTSFIND +global FINDFLAGS +exec rm -rf tmp +exec mkdir tmp tmp/top tmp/top/one tmp/top/one/foo tmp/top/two +eval exec $FTSFIND tmp $FINDFLAGS -path tmp/top/two -delete +find_start p {tmp -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/delete.xo b/find/testsuite/find.gnu/delete.xo new file mode 100644 index 0000000..c84cffb --- /dev/null +++ b/find/testsuite/find.gnu/delete.xo @@ -0,0 +1,4 @@ +tmp +tmp/top +tmp/top/one +tmp/top/one/foo diff --git a/find/testsuite/find.gnu/deletedir.exp b/find/testsuite/find.gnu/deletedir.exp new file mode 100644 index 0000000..0d849d9 --- /dev/null +++ b/find/testsuite/find.gnu/deletedir.exp @@ -0,0 +1,9 @@ +global FTSFIND +global FINDFLAGS +exec rm -rf tmp +exec mkdir tmp tmp/top +proc createdir {} { + exec mkdir tmp/top/dir +} +find_start p {tmp -path tmp/top/dir -delete -print} "" "" createdir +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/deletedir.xo b/find/testsuite/find.gnu/deletedir.xo new file mode 100644 index 0000000..9f0155f --- /dev/null +++ b/find/testsuite/find.gnu/deletedir.xo @@ -0,0 +1 @@ +tmp/top/dir diff --git a/find/testsuite/find.gnu/deletefile.exp b/find/testsuite/find.gnu/deletefile.exp new file mode 100644 index 0000000..5473a26 --- /dev/null +++ b/find/testsuite/find.gnu/deletefile.exp @@ -0,0 +1,9 @@ +global FTSFIND +global FINDFLAGS +exec rm -rf tmp +exec mkdir tmp tmp/top +proc touchfile {} { + exec touch tmp/top/file +} +find_start p {tmp -path tmp/top/file -delete -print} "" "" touchfile +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/deletefile.xo b/find/testsuite/find.gnu/deletefile.xo new file mode 100644 index 0000000..425c112 --- /dev/null +++ b/find/testsuite/find.gnu/deletefile.xo @@ -0,0 +1 @@ +tmp/top/file diff --git a/find/testsuite/find.gnu/depth-d.exp b/find/testsuite/find.gnu/depth-d.exp new file mode 100644 index 0000000..8e264a8 --- /dev/null +++ b/find/testsuite/find.gnu/depth-d.exp @@ -0,0 +1,8 @@ +exec rm -rf tmp +exec mkdir tmp +exec mkdir tmp/top +exec mkdir tmp/top/one +exec touch tmp/top/one/foo +exec mkdir tmp/top/two +find_start p {tmp/top -d -mindepth 1 -type d -empty -print} +# exec rm -rf tmp diff --git a/find/testsuite/find.gnu/depth-d.xo b/find/testsuite/find.gnu/depth-d.xo new file mode 100644 index 0000000..e5f6986 --- /dev/null +++ b/find/testsuite/find.gnu/depth-d.xo @@ -0,0 +1 @@ +tmp/top/two diff --git a/find/testsuite/find.gnu/depth.exp b/find/testsuite/find.gnu/depth.exp new file mode 100644 index 0000000..d4913b2 --- /dev/null +++ b/find/testsuite/find.gnu/depth.exp @@ -0,0 +1,8 @@ +exec rm -rf tmp +exec mkdir tmp +exec mkdir tmp/top +exec mkdir tmp/top/one +exec touch tmp/top/one/foo +exec mkdir tmp/top/two +find_start p {tmp/top -depth -mindepth 1 -type d -empty -print} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/depth.xo b/find/testsuite/find.gnu/depth.xo new file mode 100644 index 0000000..e5f6986 --- /dev/null +++ b/find/testsuite/find.gnu/depth.xo @@ -0,0 +1 @@ +tmp/top/two diff --git a/find/testsuite/find.gnu/empty.exp b/find/testsuite/find.gnu/empty.exp new file mode 100644 index 0000000..78f94d7 --- /dev/null +++ b/find/testsuite/find.gnu/empty.exp @@ -0,0 +1,7 @@ +# tests for -empty +exec rm -rf tmp +exec mkdir tmp +exec true > tmp/empty +exec echo > tmp/notempty +find_start p { tmp -type f -empty } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/empty.xo b/find/testsuite/find.gnu/empty.xo new file mode 100644 index 0000000..f352040 --- /dev/null +++ b/find/testsuite/find.gnu/empty.xo @@ -0,0 +1 @@ +tmp/empty \ No newline at end of file diff --git a/find/testsuite/find.gnu/exec-many-rtn-failure.exp b/find/testsuite/find.gnu/exec-many-rtn-failure.exp new file mode 100644 index 0000000..463f8e2 --- /dev/null +++ b/find/testsuite/find.gnu/exec-many-rtn-failure.exp @@ -0,0 +1,4 @@ +# POSIX: If the invoked command fails, -exec still returns true if it +# was punctuated with +, because that always returns true. However, +# the program as a whole should return a NON-zero exit status. +find_start f { /tmp -exec false \{\} + -printf "yep\n" -quit } diff --git a/find/testsuite/find.gnu/exec-many-rtn-failure.xo b/find/testsuite/find.gnu/exec-many-rtn-failure.xo new file mode 100644 index 0000000..3b6f27e --- /dev/null +++ b/find/testsuite/find.gnu/exec-many-rtn-failure.xo @@ -0,0 +1 @@ +yep diff --git a/find/testsuite/find.gnu/exec-many-rtn-success.exp b/find/testsuite/find.gnu/exec-many-rtn-success.exp new file mode 100644 index 0000000..142929f --- /dev/null +++ b/find/testsuite/find.gnu/exec-many-rtn-success.exp @@ -0,0 +1,4 @@ +# POSIX: If the invoked command succeeds, -exec should return true if +# it was punctuated with +, because that always returns true. However, +# the program as a whole should also return a zero exit status. +find_start p { /tmp -exec true \{\} + -printf "yep\n" -quit } diff --git a/find/testsuite/find.gnu/exec-many-rtn-success.xo b/find/testsuite/find.gnu/exec-many-rtn-success.xo new file mode 100644 index 0000000..3b6f27e --- /dev/null +++ b/find/testsuite/find.gnu/exec-many-rtn-success.xo @@ -0,0 +1 @@ +yep diff --git a/find/testsuite/find.gnu/exec-one-rtn-fail.exp b/find/testsuite/find.gnu/exec-one-rtn-fail.exp new file mode 100644 index 0000000..c3f66fa --- /dev/null +++ b/find/testsuite/find.gnu/exec-one-rtn-fail.exp @@ -0,0 +1,5 @@ +# If -exec \; fails, it should return false. The return +# value of find shoudl stil; be 0, unless another error has +# happened. +find_start p { /tmp -exec false \; -o \( -printf "yep\n" -quit \) } + diff --git a/find/testsuite/find.gnu/exec-one-rtn-fail.xo b/find/testsuite/find.gnu/exec-one-rtn-fail.xo new file mode 100644 index 0000000..3b6f27e --- /dev/null +++ b/find/testsuite/find.gnu/exec-one-rtn-fail.xo @@ -0,0 +1 @@ +yep diff --git a/find/testsuite/find.gnu/exec-one-rtn-success.exp b/find/testsuite/find.gnu/exec-one-rtn-success.exp new file mode 100644 index 0000000..d3c8b99 --- /dev/null +++ b/find/testsuite/find.gnu/exec-one-rtn-success.exp @@ -0,0 +1,3 @@ +# POSIX: If the invoked command succeeds, -exec should return true if +# it was punctuated with ; +find_start p { /tmp -exec true \; -printf "yep\n" -quit } diff --git a/find/testsuite/find.gnu/exec-one-rtn-success.xo b/find/testsuite/find.gnu/exec-one-rtn-success.xo new file mode 100644 index 0000000..3b6f27e --- /dev/null +++ b/find/testsuite/find.gnu/exec-one-rtn-success.xo @@ -0,0 +1 @@ +yep diff --git a/find/testsuite/find.gnu/execdir-hier.exp b/find/testsuite/find.gnu/execdir-hier.exp new file mode 100644 index 0000000..8b43c55 --- /dev/null +++ b/find/testsuite/find.gnu/execdir-hier.exp @@ -0,0 +1,8 @@ +# tests for -execdir ... \+ +# Specifically, ensure that output for separate directoires is not mixed. +if { [ safe_path ] } { + exec rm -rf tmp + exec mkdir tmp tmp/two + find_start p { tmp -execdir echo \{\} \+ } + exec rm -rf tmp +} diff --git a/find/testsuite/find.gnu/execdir-hier.xo b/find/testsuite/find.gnu/execdir-hier.xo new file mode 100644 index 0000000..d9fc49d --- /dev/null +++ b/find/testsuite/find.gnu/execdir-hier.xo @@ -0,0 +1,2 @@ +./tmp +./two diff --git a/find/testsuite/find.gnu/execdir-in-unreadable.exp b/find/testsuite/find.gnu/execdir-in-unreadable.exp new file mode 100644 index 0000000..fe78d5a --- /dev/null +++ b/find/testsuite/find.gnu/execdir-in-unreadable.exp @@ -0,0 +1,11 @@ +# tests for -execdir ... \+ in a directory which is not readable +if { [ safe_path ] } { + exec rm -rf tmp + exec mkdir tmp + exec chmod 755 tmp + exec mkdir tmp/sub + exec chmod 300 tmp/sub + find_start p { tmp -maxdepth 1 -execdir true \{\} \+ } + exec chmod 700 tmp/sub + exec rm -rf tmp +} diff --git a/find/testsuite/find.gnu/execdir-one.exp b/find/testsuite/find.gnu/execdir-one.exp new file mode 100644 index 0000000..53f2e00 --- /dev/null +++ b/find/testsuite/find.gnu/execdir-one.exp @@ -0,0 +1,7 @@ +# tests for -name +if { [ safe_path ] } { + exec rm -rf tmp + exec mkdir tmp tmp/fred tmp/jim + find_start p {tmp -name fred -execdir echo \{\} \; } + exec rm -rf tmp +} diff --git a/find/testsuite/find.gnu/execdir-one.xo b/find/testsuite/find.gnu/execdir-one.xo new file mode 100644 index 0000000..8584084 --- /dev/null +++ b/find/testsuite/find.gnu/execdir-one.xo @@ -0,0 +1 @@ +./fred diff --git a/find/testsuite/find.gnu/execdir-pwd.exp b/find/testsuite/find.gnu/execdir-pwd.exp new file mode 100644 index 0000000..7726f6e --- /dev/null +++ b/find/testsuite/find.gnu/execdir-pwd.exp @@ -0,0 +1,20 @@ +# tests for -execdir pwd \+ +if { [ safe_path ] } { + global SKIP_OLD + + exec rm -rf tmp + exec mkdir tmp + + # Create an empty shell script. + exec touch tmp/foo + exec chmod +x tmp/foo + + # The -execdir should find the "foo" in the current directory. + # If not, the find command is probably executing the command + # built up by -execdir in the wrong directory. + + set SKIP_OLD 1 + find_start p {tmp -name foo -execdir sh ./foo \{\} + } "" + set SKIP_OLD 0 + exec rm -rf tmp +} diff --git a/find/testsuite/find.gnu/execdir-root-only.exp b/find/testsuite/find.gnu/execdir-root-only.exp new file mode 100644 index 0000000..a957e7e --- /dev/null +++ b/find/testsuite/find.gnu/execdir-root-only.exp @@ -0,0 +1,21 @@ +# Bug report by Bas van Gompel: +# +# This appears to work well. However when the rootdir is passed, +# something looks fishy: +# +# find / -mindepth 0 -maxdepth 0 -execdir echo {} \; +# .// +# +# I also spotted, when `+' is used: +# +# find / -mindepth 0 -maxdepth 0 -execdir echo == {} + +# == +# == .// +# +# (Notice the first line of output, which should not be there.) + + +# This test checks the second of these two cases. +if { [ safe_path ] } { + find_start p { / -mindepth 0 -maxdepth 0 -execdir echo == "{}" + } +} diff --git a/find/testsuite/find.gnu/execdir-root-only.xo b/find/testsuite/find.gnu/execdir-root-only.xo new file mode 100644 index 0000000..c975392 --- /dev/null +++ b/find/testsuite/find.gnu/execdir-root-only.xo @@ -0,0 +1 @@ +== / diff --git a/find/testsuite/find.gnu/false.exp b/find/testsuite/find.gnu/false.exp new file mode 100644 index 0000000..31f98a5 --- /dev/null +++ b/find/testsuite/find.gnu/false.exp @@ -0,0 +1,5 @@ +# test for -false. +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/fred/jim +find_start p { tmp -depth -print -false -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/false.xo b/find/testsuite/find.gnu/false.xo new file mode 100644 index 0000000..9baad64 --- /dev/null +++ b/find/testsuite/find.gnu/false.xo @@ -0,0 +1,3 @@ +tmp/fred/jim +tmp/fred +tmp diff --git a/find/testsuite/find.gnu/follow-arg-parent-symlink.exp b/find/testsuite/find.gnu/follow-arg-parent-symlink.exp new file mode 100644 index 0000000..52f374a --- /dev/null +++ b/find/testsuite/find.gnu/follow-arg-parent-symlink.exp @@ -0,0 +1,6 @@ +exec rm -rf tmp +exec mkdir tmp tmp/dir1 tmp/dir1/dir2 +exec touch tmp/dir1/dir2/foo +exec ln -s dir1 tmp/link1 +find_start p {tmp/link1/dir2 -type f -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/follow-arg-parent-symlink.xo b/find/testsuite/find.gnu/follow-arg-parent-symlink.xo new file mode 100644 index 0000000..0cf5187 --- /dev/null +++ b/find/testsuite/find.gnu/follow-arg-parent-symlink.xo @@ -0,0 +1 @@ +tmp/link1/dir2/foo diff --git a/find/testsuite/find.gnu/follow-basic.exp b/find/testsuite/find.gnu/follow-basic.exp new file mode 100644 index 0000000..bc62a2d --- /dev/null +++ b/find/testsuite/find.gnu/follow-basic.exp @@ -0,0 +1,10 @@ +# Verifies that the -follow option is correctly implemented, +# but does this by using the GNU extension -printf. +exec rm -rf tmp + +exec mkdir tmp +exec ln -s /etc/passwd tmp/LINK +exec ln -s /NOSUCHFILE tmp/BROKEN + +# Links should all be dereferenced unless they are broken. +find_start p { tmp/LINK tmp/BROKEN tmp -follow -printf "%y %d %p\n" } diff --git a/find/testsuite/find.gnu/follow-basic.xo b/find/testsuite/find.gnu/follow-basic.xo new file mode 100644 index 0000000..f2c7940 --- /dev/null +++ b/find/testsuite/find.gnu/follow-basic.xo @@ -0,0 +1,5 @@ +d 0 tmp +f 0 tmp/LINK +f 1 tmp/LINK +l 0 tmp/BROKEN +l 1 tmp/BROKEN diff --git a/find/testsuite/find.gnu/fprint-unwritable.exp b/find/testsuite/find.gnu/fprint-unwritable.exp new file mode 100644 index 0000000..905894d --- /dev/null +++ b/find/testsuite/find.gnu/fprint-unwritable.exp @@ -0,0 +1,9 @@ +# test for -fprint to unwritable dest (we expect this to fail) +if { ! [ fs_superuser ] } { + exec rm -rf tmp + file mkdir tmp + exec touch tmp/unwritable + exec chmod 444 tmp/unwritable + find_start f { tmp -fprint tmp/unwritable } + exec rm -rf tmp +} diff --git a/find/testsuite/find.gnu/fprint0_stdout.exp b/find/testsuite/find.gnu/fprint0_stdout.exp new file mode 100644 index 0000000..c5a5aa8 --- /dev/null +++ b/find/testsuite/find.gnu/fprint0_stdout.exp @@ -0,0 +1,5 @@ +# test for -fprint +exec rm -rf tmp +exec touch tmp +find_start p { tmp -fprint0 /dev/stdout } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/fprint0_stdout.xo b/find/testsuite/find.gnu/fprint0_stdout.xo new file mode 100644 index 0000000000000000000000000000000000000000..60688ddb683a27d5048ee3f025f587b27fadf6d1 GIT binary patch literal 5 McmXTPEnwgR00mb8TmS$7 literal 0 HcmV?d00001 diff --git a/find/testsuite/find.gnu/gnu-or.exp b/find/testsuite/find.gnu/gnu-or.exp new file mode 100644 index 0000000..92a2939 --- /dev/null +++ b/find/testsuite/find.gnu/gnu-or.exp @@ -0,0 +1,5 @@ +# test for -false. +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/fred/jim +find_start p { tmp -depth -print -false -or -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/gnu-or.xo b/find/testsuite/find.gnu/gnu-or.xo new file mode 100644 index 0000000..8484390 --- /dev/null +++ b/find/testsuite/find.gnu/gnu-or.xo @@ -0,0 +1,6 @@ +tmp/fred/jim +tmp/fred/jim +tmp/fred +tmp/fred +tmp +tmp diff --git a/find/testsuite/find.gnu/gnuand.exp b/find/testsuite/find.gnu/gnuand.exp new file mode 100644 index 0000000..2e685ca --- /dev/null +++ b/find/testsuite/find.gnu/gnuand.exp @@ -0,0 +1,5 @@ +# tests for -name +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim +find_start p {tmp -name fred -and -print} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/gnuand.xo b/find/testsuite/find.gnu/gnuand.xo new file mode 100644 index 0000000..8cc8940 --- /dev/null +++ b/find/testsuite/find.gnu/gnuand.xo @@ -0,0 +1 @@ +tmp/fred diff --git a/find/testsuite/find.gnu/gnunot.exp b/find/testsuite/find.gnu/gnunot.exp new file mode 100644 index 0000000..4951c1e --- /dev/null +++ b/find/testsuite/find.gnu/gnunot.exp @@ -0,0 +1,5 @@ +# tests for ! +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim +find_start p {tmp -not -name fred -print} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/gnunot.xo b/find/testsuite/find.gnu/gnunot.xo new file mode 100644 index 0000000..776fed4 --- /dev/null +++ b/find/testsuite/find.gnu/gnunot.xo @@ -0,0 +1,2 @@ +tmp +tmp/jim \ No newline at end of file diff --git a/find/testsuite/find.gnu/ilname.exp b/find/testsuite/find.gnu/ilname.exp new file mode 100644 index 0000000..9b77b6a --- /dev/null +++ b/find/testsuite/find.gnu/ilname.exp @@ -0,0 +1,7 @@ +# tests for -ilname +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/one +exec ln -s one tmp/two +find_start p {tmp -ilname One -print} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/ilname.xo b/find/testsuite/find.gnu/ilname.xo new file mode 100644 index 0000000..c7b45df --- /dev/null +++ b/find/testsuite/find.gnu/ilname.xo @@ -0,0 +1 @@ +tmp/two diff --git a/find/testsuite/find.gnu/iname.exp b/find/testsuite/find.gnu/iname.exp new file mode 100644 index 0000000..c8c26a4 --- /dev/null +++ b/find/testsuite/find.gnu/iname.exp @@ -0,0 +1,5 @@ +# tests for -name +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim +find_start p {tmp -iname frED -print} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/iname.xo b/find/testsuite/find.gnu/iname.xo new file mode 100644 index 0000000..8cc8940 --- /dev/null +++ b/find/testsuite/find.gnu/iname.xo @@ -0,0 +1 @@ +tmp/fred diff --git a/find/testsuite/find.gnu/inum.exp b/find/testsuite/find.gnu/inum.exp new file mode 100644 index 0000000..75614f5 --- /dev/null +++ b/find/testsuite/find.gnu/inum.exp @@ -0,0 +1,7 @@ +# test for -inum +exec rm -rf tmp tmp2 +exec touch tmp tmp2 +set list [ split [ exec ls -1i tmp ] ] +set inode [ lindex $list 0 ] +find_start p " tmp tmp2 -inum $inode -print " +exec rm -rf tmp tmp2 diff --git a/find/testsuite/find.gnu/inum.xo b/find/testsuite/find.gnu/inum.xo new file mode 100644 index 0000000..a9a5aec --- /dev/null +++ b/find/testsuite/find.gnu/inum.xo @@ -0,0 +1 @@ +tmp diff --git a/find/testsuite/find.gnu/ipath.exp b/find/testsuite/find.gnu/ipath.exp new file mode 100644 index 0000000..0013e48 --- /dev/null +++ b/find/testsuite/find.gnu/ipath.exp @@ -0,0 +1,5 @@ +# test for -path +exec rm -rf tmp +exec mkdir tmp tmp/top tmp/top/ONE tmp/top/ONE/two +find_start p {tmp/top -ipath Tmp/TOP/one -print 2>/dev/null } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/ipath.xo b/find/testsuite/find.gnu/ipath.xo new file mode 100644 index 0000000..6ac3ca0 --- /dev/null +++ b/find/testsuite/find.gnu/ipath.xo @@ -0,0 +1 @@ +tmp/top/ONE diff --git a/find/testsuite/find.gnu/iregex1.exp b/find/testsuite/find.gnu/iregex1.exp new file mode 100644 index 0000000..c24cdf0 --- /dev/null +++ b/find/testsuite/find.gnu/iregex1.exp @@ -0,0 +1,5 @@ +# test for -iregex +exec rm -rf tmp +exec mkdir tmp tmp/d tmp/d/D tmp/d/D/d tmp/d/D/d/e +find_start p {tmp -iregex {tmp\(/d\)*} -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/iregex1.xo b/find/testsuite/find.gnu/iregex1.xo new file mode 100644 index 0000000..8901de0 --- /dev/null +++ b/find/testsuite/find.gnu/iregex1.xo @@ -0,0 +1,4 @@ +tmp +tmp/d +tmp/d/D +tmp/d/D/d diff --git a/find/testsuite/find.gnu/iwholename.exp b/find/testsuite/find.gnu/iwholename.exp new file mode 100644 index 0000000..d58656a --- /dev/null +++ b/find/testsuite/find.gnu/iwholename.exp @@ -0,0 +1,5 @@ +# test for -iwholename +exec rm -rf tmp +exec mkdir tmp tmp/top tmp/top/one tmp/top/one/two +find_start p {tmp/top -iwholename tmP/TOP/One -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/iwholename.xo b/find/testsuite/find.gnu/iwholename.xo new file mode 100644 index 0000000..66d2877 --- /dev/null +++ b/find/testsuite/find.gnu/iwholename.xo @@ -0,0 +1 @@ +tmp/top/one diff --git a/find/testsuite/find.gnu/lname.exp b/find/testsuite/find.gnu/lname.exp new file mode 100644 index 0000000..ada635f --- /dev/null +++ b/find/testsuite/find.gnu/lname.exp @@ -0,0 +1,7 @@ +# tests for -lname +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/one +exec ln -s one tmp/two +find_start p {tmp -lname one -print} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/lname.xo b/find/testsuite/find.gnu/lname.xo new file mode 100644 index 0000000..c7b45df --- /dev/null +++ b/find/testsuite/find.gnu/lname.xo @@ -0,0 +1 @@ +tmp/two diff --git a/find/testsuite/find.gnu/mindepth-arg.exp b/find/testsuite/find.gnu/mindepth-arg.exp new file mode 100644 index 0000000..ba4d0dc --- /dev/null +++ b/find/testsuite/find.gnu/mindepth-arg.exp @@ -0,0 +1,9 @@ +# Argument validation for -mindepth and -maxdepth +proc prepare {} { + exec rm -rf tmp + exec mkdir tmp tmp/top tmp/top/one +} +foreach predicate { -mindepth -maxdepth } { + find_start p "tmp/top $predicate 0 -print -quit" {} {} prepare +} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/mindepth-arg.xo b/find/testsuite/find.gnu/mindepth-arg.xo new file mode 100644 index 0000000..ddcb130 --- /dev/null +++ b/find/testsuite/find.gnu/mindepth-arg.xo @@ -0,0 +1 @@ +tmp/top \ No newline at end of file diff --git a/find/testsuite/find.gnu/mindepth-badarg.exp b/find/testsuite/find.gnu/mindepth-badarg.exp new file mode 100644 index 0000000..d098af0 --- /dev/null +++ b/find/testsuite/find.gnu/mindepth-badarg.exp @@ -0,0 +1,12 @@ +# Argument validation for -mindepth and -maxdepth + +exec rm -rf tmp +exec mkdir tmp tmp/top tmp/top/one + +foreach predicate { -mindepth -maxdepth } { + # Try a variety of bad arguments. + foreach arg { x 0x01 Fnord "" +1 1.2 -3 3e1 } { + find_start f "tmp/top $predicate $arg -quit" + } +} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/name-opt.exp b/find/testsuite/find.gnu/name-opt.exp new file mode 100644 index 0000000..0ec1d8d --- /dev/null +++ b/find/testsuite/find.gnu/name-opt.exp @@ -0,0 +1,8 @@ +# Verifies that -name is not optimized in front of -prune +exec rm -rf tmp +exec mkdir tmp +exec mkdir tmp/top +exec mkdir tmp/top/one +exec touch tmp/top/one/foo +find_start p {tmp/top -prune -name foo} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/name-opt.xo b/find/testsuite/find.gnu/name-opt.xo new file mode 100644 index 0000000..e69de29 diff --git a/find/testsuite/find.gnu/name-period.exp b/find/testsuite/find.gnu/name-period.exp new file mode 100644 index 0000000..42858fe --- /dev/null +++ b/find/testsuite/find.gnu/name-period.exp @@ -0,0 +1,10 @@ +# Verifies that -name '*bar' will match quux/.foobar. +# See http://standards.ieee.org/reading/ieee/interp/1003-2-92_int/pasc-1003.2-126.html +# Also see http://savannah.gnu.org/bugs/?func=detailitem&item_id=10757 +exec rm -rf tmp +exec mkdir tmp +exec mkdir tmp/top +exec mkdir tmp/top/.one +exec mkdir tmp/top/bane +find_start p {tmp/top -name \*ne -print} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/name-period.xo b/find/testsuite/find.gnu/name-period.xo new file mode 100644 index 0000000..53cbcdc --- /dev/null +++ b/find/testsuite/find.gnu/name-period.xo @@ -0,0 +1,2 @@ +tmp/top/bane +tmp/top/.one diff --git a/find/testsuite/find.gnu/path.exp b/find/testsuite/find.gnu/path.exp new file mode 100644 index 0000000..40fa01e --- /dev/null +++ b/find/testsuite/find.gnu/path.exp @@ -0,0 +1,5 @@ +# test for -path +exec rm -rf tmp +exec mkdir tmp tmp/top tmp/top/one tmp/top/one/two +find_start p {tmp/top -path tmp/top/one -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/path.xo b/find/testsuite/find.gnu/path.xo new file mode 100644 index 0000000..66d2877 --- /dev/null +++ b/find/testsuite/find.gnu/path.xo @@ -0,0 +1 @@ +tmp/top/one diff --git a/find/testsuite/find.gnu/perm-slash.exp b/find/testsuite/find.gnu/perm-slash.exp new file mode 100644 index 0000000..a5be0ab --- /dev/null +++ b/find/testsuite/find.gnu/perm-slash.exp @@ -0,0 +1,19 @@ +# tests for -perm /nnn +# The slash is a GNU extension + +exec rm -rf tmp +exec mkdir tmp + +## set up a selection of test files +foreach perm { 400 200 555 700 000 050 } { + exec touch "tmp/$perm" + exec chmod $perm "tmp/$perm" +} + +# +# The -o operator normally has a short-circuit effect, +# so we have to use "-exec false \;" to make sure that +# all the parenthesised expression actually fail. +# +find_start p {tmp -mindepth 1 -perm /555 -printf "p/555 %p\n" } +# exec rm -rf tmp tmp2 diff --git a/find/testsuite/find.gnu/perm-slash.xo b/find/testsuite/find.gnu/perm-slash.xo new file mode 100644 index 0000000..f84e5b7 --- /dev/null +++ b/find/testsuite/find.gnu/perm-slash.xo @@ -0,0 +1,4 @@ +p/555 tmp/050 +p/555 tmp/555 +p/555 tmp/400 +p/555 tmp/700 \ No newline at end of file diff --git a/find/testsuite/find.gnu/perm.exp b/find/testsuite/find.gnu/perm.exp new file mode 100644 index 0000000..d4913f8 --- /dev/null +++ b/find/testsuite/find.gnu/perm.exp @@ -0,0 +1,7 @@ +# tests for -perm -0100 (-perm with -) +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/fred +exec chmod 444 tmp/fred +find_start p {tmp -perm -0100} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/perm.xo b/find/testsuite/find.gnu/perm.xo new file mode 100644 index 0000000..a9a5aec --- /dev/null +++ b/find/testsuite/find.gnu/perm.xo @@ -0,0 +1 @@ +tmp diff --git a/find/testsuite/find.gnu/perm000.exp b/find/testsuite/find.gnu/perm000.exp new file mode 100644 index 0000000..9217129 --- /dev/null +++ b/find/testsuite/find.gnu/perm000.exp @@ -0,0 +1,7 @@ +# tests for -perm /000 (Savannah bug #14748). +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/fred tmp/wilma +exec chmod 000 tmp/fred +find_start p {tmp -perm /000 -print 2>/dev/null } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/perm000.xo b/find/testsuite/find.gnu/perm000.xo new file mode 100644 index 0000000..7a1f6e9 --- /dev/null +++ b/find/testsuite/find.gnu/perm000.xo @@ -0,0 +1,3 @@ +tmp +tmp/fred +tmp/wilma diff --git a/find/testsuite/find.gnu/posix-dflt.exp b/find/testsuite/find.gnu/posix-dflt.exp new file mode 100644 index 0000000..3e7d573 --- /dev/null +++ b/find/testsuite/find.gnu/posix-dflt.exp @@ -0,0 +1,10 @@ +# Verifies that the POSIX behaviour without -P or -L options is +# correctly implemented, but does this by using the GNU extension +# -printf. +exec rm -rf tmp + +exec mkdir tmp +exec ln -s /etc/passwd tmp/LINK +exec ln -s /NOSUCHFILE tmp/BROKEN + +find_start p { -P tmp/LINK tmp/BROKEN tmp -printf "%y %d %p\n" } diff --git a/find/testsuite/find.gnu/posix-dflt.xo b/find/testsuite/find.gnu/posix-dflt.xo new file mode 100644 index 0000000..7359d24 --- /dev/null +++ b/find/testsuite/find.gnu/posix-dflt.xo @@ -0,0 +1,5 @@ +d 0 tmp +l 0 tmp/BROKEN +l 0 tmp/LINK +l 1 tmp/BROKEN +l 1 tmp/LINK diff --git a/find/testsuite/find.gnu/posix-h.exp b/find/testsuite/find.gnu/posix-h.exp new file mode 100644 index 0000000..4023b25 --- /dev/null +++ b/find/testsuite/find.gnu/posix-h.exp @@ -0,0 +1,13 @@ +# Verifies that the POSIX -H option is correctly implemented, +# but does this by using the GNU extension -printf. +exec rm -rf tmp + +exec mkdir tmp +exec ln -s /etc/passwd tmp/LINK +exec ln -s /NOSUCHFILE tmp/BROKEN + +# If the file is not on the command line, the link is not +# dereferenced, and so tmp/LINK should appear at depth 1 +# but as type "l". tmp itself appears first at depth 0 as +# a directory. +find_start p { -H tmp/LINK tmp/BROKEN tmp -printf "H1: %y %d %p\n" } diff --git a/find/testsuite/find.gnu/posix-h.xo b/find/testsuite/find.gnu/posix-h.xo new file mode 100644 index 0000000..4d503f7 --- /dev/null +++ b/find/testsuite/find.gnu/posix-h.xo @@ -0,0 +1,5 @@ +H1: d 0 tmp +H1: f 0 tmp/LINK +H1: l 0 tmp/BROKEN +H1: l 1 tmp/BROKEN +H1: l 1 tmp/LINK diff --git a/find/testsuite/find.gnu/posix-l.exp b/find/testsuite/find.gnu/posix-l.exp new file mode 100644 index 0000000..6055edf --- /dev/null +++ b/find/testsuite/find.gnu/posix-l.exp @@ -0,0 +1,10 @@ +# Verifies that the POSIX -L option is correctly implemented, +# but does this by using the GNU extension -printf. +exec rm -rf tmp + +exec mkdir tmp +exec ln -s /etc/passwd tmp/LINK +exec ln -s /NOSUCHFILE tmp/BROKEN + +# Links should all be dereferenced unless they are broken. +find_start p { -L tmp/LINK tmp/BROKEN tmp -printf "%y %d %p\n" } diff --git a/find/testsuite/find.gnu/posix-l.xo b/find/testsuite/find.gnu/posix-l.xo new file mode 100644 index 0000000..f2c7940 --- /dev/null +++ b/find/testsuite/find.gnu/posix-l.xo @@ -0,0 +1,5 @@ +d 0 tmp +f 0 tmp/LINK +f 1 tmp/LINK +l 0 tmp/BROKEN +l 1 tmp/BROKEN diff --git a/find/testsuite/find.gnu/print0.exp b/find/testsuite/find.gnu/print0.exp new file mode 100644 index 0000000..11a3cb6 --- /dev/null +++ b/find/testsuite/find.gnu/print0.exp @@ -0,0 +1,5 @@ +# test for -print0. +exec rm -rf tmp +exec touch tmp +find_start p { tmp -print0 } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/print0.xo b/find/testsuite/find.gnu/print0.xo new file mode 100644 index 0000000000000000000000000000000000000000..b947b3b7e55900b5b3261f7bf0fd726189e503e2 GIT binary patch literal 4 LcmXTPEnolu1N#9| literal 0 HcmV?d00001 diff --git a/find/testsuite/find.gnu/print_stdout.exp b/find/testsuite/find.gnu/print_stdout.exp new file mode 100644 index 0000000..5bbeefa --- /dev/null +++ b/find/testsuite/find.gnu/print_stdout.exp @@ -0,0 +1,5 @@ +# test for -fprint +exec rm -rf tmp +exec touch tmp +find_start p { tmp -fprint /dev/stdout } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/print_stdout.xo b/find/testsuite/find.gnu/print_stdout.xo new file mode 100644 index 0000000..a9a5aec --- /dev/null +++ b/find/testsuite/find.gnu/print_stdout.xo @@ -0,0 +1 @@ +tmp diff --git a/find/testsuite/find.gnu/printf-h.exp b/find/testsuite/find.gnu/printf-h.exp new file mode 100644 index 0000000..fb0187c --- /dev/null +++ b/find/testsuite/find.gnu/printf-h.exp @@ -0,0 +1,5 @@ +# Test case for Savannah bug ID #12085. +exec rm -rf tmp +exec touch tmp +find_start p {tmp -printf "RESULT: %h %f\n" } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/printf-h.xo b/find/testsuite/find.gnu/printf-h.xo new file mode 100644 index 0000000..dc6ce01 --- /dev/null +++ b/find/testsuite/find.gnu/printf-h.xo @@ -0,0 +1 @@ +RESULT: . tmp diff --git a/find/testsuite/find.gnu/printf-symlink.exp b/find/testsuite/find.gnu/printf-symlink.exp new file mode 100644 index 0000000..6acc3e6 --- /dev/null +++ b/find/testsuite/find.gnu/printf-symlink.exp @@ -0,0 +1,6 @@ +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/file +exec ln -s file tmp/LINK +find_start p {tmp/LINK -printf "RESULT: %y %Y %p\n" -printf "RESULT2: %Y %y %p\n" } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/printf-symlink.xo b/find/testsuite/find.gnu/printf-symlink.xo new file mode 100644 index 0000000..cc2b69c --- /dev/null +++ b/find/testsuite/find.gnu/printf-symlink.xo @@ -0,0 +1,2 @@ +RESULT: l f tmp/LINK +RESULT2: f l tmp/LINK diff --git a/find/testsuite/find.gnu/printf.exp b/find/testsuite/find.gnu/printf.exp new file mode 100644 index 0000000..c504d85 --- /dev/null +++ b/find/testsuite/find.gnu/printf.exp @@ -0,0 +1,6 @@ +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/file +exec chmod 600 tmp/file +find_start p {tmp -type f -printf "a %d\n" -printf "b %f\n" -printf "c %h\n" -printf "d %H\n" -printf "e %l\n" -printf "f %m\n" -printf "g %n\n" -printf "h %p\n" -printf "i %P\n" -printf "j %y\n" -printf "k %Y\n"} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/printf.xo b/find/testsuite/find.gnu/printf.xo new file mode 100644 index 0000000..4eda7e3 --- /dev/null +++ b/find/testsuite/find.gnu/printf.xo @@ -0,0 +1,11 @@ +a 1 +b file +c tmp +d tmp +e +f 600 +g 1 +h tmp/file +i file +j f +k f diff --git a/find/testsuite/find.gnu/printfHdfl.exp b/find/testsuite/find.gnu/printfHdfl.exp new file mode 100644 index 0000000..517ecc5 --- /dev/null +++ b/find/testsuite/find.gnu/printfHdfl.exp @@ -0,0 +1,2 @@ +# verify that %H with no argument assumes "." +find_start p { -maxdepth 0 -printf "%H" } diff --git a/find/testsuite/find.gnu/printfHdfl.xo b/find/testsuite/find.gnu/printfHdfl.xo new file mode 100644 index 0000000..9c558e3 --- /dev/null +++ b/find/testsuite/find.gnu/printfHdfl.xo @@ -0,0 +1 @@ +. diff --git a/find/testsuite/find.gnu/prune-default-print.exp b/find/testsuite/find.gnu/prune-default-print.exp new file mode 100644 index 0000000..b43a6b9 --- /dev/null +++ b/find/testsuite/find.gnu/prune-default-print.exp @@ -0,0 +1,5 @@ +# Verifies that default -print is used with -prune +exec rm -rf tmp +exec mkdir tmp +find_start p {tmp -prune} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/prune-default-print.xo b/find/testsuite/find.gnu/prune-default-print.xo new file mode 100644 index 0000000..a9a5aec --- /dev/null +++ b/find/testsuite/find.gnu/prune-default-print.xo @@ -0,0 +1 @@ +tmp diff --git a/find/testsuite/find.gnu/quit.exp b/find/testsuite/find.gnu/quit.exp new file mode 100644 index 0000000..610ad7f --- /dev/null +++ b/find/testsuite/find.gnu/quit.exp @@ -0,0 +1,5 @@ +# test for -quit. +exec rm -rf tmp +exec mkdir tmp tmp/top tmp/top/one tmp/top/one/foo tmp/top/two +find_start p {tmp/top/one tmp/top/two -depth -print -name one -quit } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/quit.xo b/find/testsuite/find.gnu/quit.xo new file mode 100644 index 0000000..14c1d8d --- /dev/null +++ b/find/testsuite/find.gnu/quit.xo @@ -0,0 +1,2 @@ +tmp/top/one/foo +tmp/top/one diff --git a/find/testsuite/find.gnu/regex1.exp b/find/testsuite/find.gnu/regex1.exp new file mode 100644 index 0000000..071dcaf --- /dev/null +++ b/find/testsuite/find.gnu/regex1.exp @@ -0,0 +1,5 @@ +# test for -regex +exec rm -rf tmp +exec mkdir tmp tmp/d tmp/d/d tmp/d/d/d tmp/d/d/d/e +find_start p {tmp -regex {tmp\(/d\)*} -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/regex1.xo b/find/testsuite/find.gnu/regex1.xo new file mode 100644 index 0000000..c4259bb --- /dev/null +++ b/find/testsuite/find.gnu/regex1.xo @@ -0,0 +1,4 @@ +tmp +tmp/d +tmp/d/d +tmp/d/d/d diff --git a/find/testsuite/find.gnu/regex2.exp b/find/testsuite/find.gnu/regex2.exp new file mode 100644 index 0000000..71cc1e3 --- /dev/null +++ b/find/testsuite/find.gnu/regex2.exp @@ -0,0 +1,5 @@ +# test for -regex +exec rm -rf tmp +exec mkdir tmp tmp/d tmp/d/d tmp/d/d/d tmp/d/d/d/e +find_start p {tmp -regextype posix-extended -regex {tmp(/d)*} -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/regex2.xo b/find/testsuite/find.gnu/regex2.xo new file mode 100644 index 0000000..c4259bb --- /dev/null +++ b/find/testsuite/find.gnu/regex2.xo @@ -0,0 +1,4 @@ +tmp +tmp/d +tmp/d/d +tmp/d/d/d diff --git a/find/testsuite/find.gnu/samefile-copy.exp b/find/testsuite/find.gnu/samefile-copy.exp new file mode 100644 index 0000000..69e47cd --- /dev/null +++ b/find/testsuite/find.gnu/samefile-copy.exp @@ -0,0 +1,8 @@ +# test for -samefile +exec rm -rf tmp +exec mkdir tmp tmp/one tmp/two +exec touch tmp/file1 tmp/file2 +exec cp tmp/file1 tmp/one/link +exec cp tmp/file2 tmp/two/link +find_start p {tmp/one tmp/two -samefile tmp/file1 -print} +# exec rm -rf tmp diff --git a/find/testsuite/find.gnu/samefile-copy.xo b/find/testsuite/find.gnu/samefile-copy.xo new file mode 100644 index 0000000..e69de29 diff --git a/find/testsuite/find.gnu/samefile-link.exp b/find/testsuite/find.gnu/samefile-link.exp new file mode 100644 index 0000000..e288160 --- /dev/null +++ b/find/testsuite/find.gnu/samefile-link.exp @@ -0,0 +1,9 @@ +# test for -samefile +exec rm -rf tmp +exec mkdir tmp tmp/one tmp/two +exec touch tmp/file1 tmp/file2 +exec ln tmp/file1 tmp/one/link +exec ln -s tmp/file1 tmp/one/symlink +exec ln tmp/file2 tmp/two/link +find_start p {tmp/one tmp/two -samefile tmp/file1 -print} +# exec rm -rf tmp diff --git a/find/testsuite/find.gnu/samefile-link.xo b/find/testsuite/find.gnu/samefile-link.xo new file mode 100644 index 0000000..e53b73e --- /dev/null +++ b/find/testsuite/find.gnu/samefile-link.xo @@ -0,0 +1 @@ +tmp/one/link diff --git a/find/testsuite/find.gnu/samefile-missing.exp b/find/testsuite/find.gnu/samefile-missing.exp new file mode 100644 index 0000000..143f117 --- /dev/null +++ b/find/testsuite/find.gnu/samefile-missing.exp @@ -0,0 +1,4 @@ +# test for diagnosis of the fact that the argument to -samefile is missing +find_start f ". -samefile" + + diff --git a/find/testsuite/find.gnu/samefile-p-brokenlink.exp b/find/testsuite/find.gnu/samefile-p-brokenlink.exp new file mode 100644 index 0000000..9289516 --- /dev/null +++ b/find/testsuite/find.gnu/samefile-p-brokenlink.exp @@ -0,0 +1,13 @@ +# test for find -P -samefile with a broken link +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/file1 +exec ln tmp/file1 tmp/link +exec ln -s tmp/file1 tmp/symlink +exec ln -s tmp/file2 tmp/broken +exec ln tmp/broken tmp/blink + +find_start p { -P tmp -samefile tmp/broken -print} +exec rm -rf tmp + + diff --git a/find/testsuite/find.gnu/samefile-p-brokenlink.xo b/find/testsuite/find.gnu/samefile-p-brokenlink.xo new file mode 100644 index 0000000..aaa98f3 --- /dev/null +++ b/find/testsuite/find.gnu/samefile-p-brokenlink.xo @@ -0,0 +1,2 @@ +tmp/blink +tmp/broken \ No newline at end of file diff --git a/find/testsuite/find.gnu/samefile-same.exp b/find/testsuite/find.gnu/samefile-same.exp new file mode 100644 index 0000000..739f6c6 --- /dev/null +++ b/find/testsuite/find.gnu/samefile-same.exp @@ -0,0 +1,6 @@ +# test for -samefile +exec rm -rf tmp +exec mkdir tmp tmp/one tmp/two +exec touch tmp/file +find_start p {tmp tmp/file -samefile tmp/file -print} +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/samefile-same.xo b/find/testsuite/find.gnu/samefile-same.xo new file mode 100644 index 0000000..061fd95 --- /dev/null +++ b/find/testsuite/find.gnu/samefile-same.xo @@ -0,0 +1,2 @@ +tmp/file +tmp/file diff --git a/find/testsuite/find.gnu/samefile-symlink.exp b/find/testsuite/find.gnu/samefile-symlink.exp new file mode 100644 index 0000000..1c6aa1f --- /dev/null +++ b/find/testsuite/find.gnu/samefile-symlink.exp @@ -0,0 +1,10 @@ +# test for -samefile +exec rm -rf tmp +exec mkdir tmp tmp/one tmp/two +exec touch tmp/file1 tmp/file2 +exec ln tmp/file1 tmp/one/link +exec ln -s ../file1 tmp/one/symlink +exec ln tmp/file2 tmp/two/link +exec ln -s ../file2 tmp/two/symlink +find_start p { -L tmp/one tmp/two -samefile tmp/file1 -print} +# exec rm -rf tmp diff --git a/find/testsuite/find.gnu/samefile-symlink.xo b/find/testsuite/find.gnu/samefile-symlink.xo new file mode 100644 index 0000000..ca1e727 --- /dev/null +++ b/find/testsuite/find.gnu/samefile-symlink.xo @@ -0,0 +1,2 @@ +tmp/one/link +tmp/one/symlink diff --git a/find/testsuite/find.gnu/sv-bug-12230.exp b/find/testsuite/find.gnu/sv-bug-12230.exp new file mode 100644 index 0000000..3af22c6 --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-12230.exp @@ -0,0 +1,14 @@ +# Bug report by Dmitry V. Levin. +# +# The command: +# find tmp -false -execdir echo == {} + +# Actually produces one line of output. It +# should produce none, because the echo command +# should never be invoked. +# +if { [ safe_path ] } { + exec rm -rf tmp + exec mkdir tmp + find_start p { tmp -false -execdir echo == "{}" + } + exec rm -rf tmp +} diff --git a/find/testsuite/find.gnu/sv-bug-17477.exp b/find/testsuite/find.gnu/sv-bug-17477.exp new file mode 100644 index 0000000..2cc7fe3 --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-17477.exp @@ -0,0 +1,2 @@ +# verify that % with no argument fails gracefully +find_start f { -maxdepth 0 -printf "test: %" } diff --git a/find/testsuite/find.gnu/sv-bug-17490.exp b/find/testsuite/find.gnu/sv-bug-17490.exp new file mode 100644 index 0000000..b0d522d --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-17490.exp @@ -0,0 +1,5 @@ +# test for Savannah bug #17490 +# +# That bug was a coredump if the argument to -regex was the final argument. +find_start p {. -maxdepth 0 -regex x } + diff --git a/find/testsuite/find.gnu/sv-bug-17782.exp b/find/testsuite/find.gnu/sv-bug-17782.exp new file mode 100644 index 0000000..6771f28 --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-17782.exp @@ -0,0 +1,15 @@ +# Savannah bug #17782. +# While -execdir echo blah {} works, -execdir echo "blah {}" doesn't. +# The bug is that the ./ prefix is prepended to the argument containing the +# braces, not to the expansion of the braces, so you get output like +# ./blah foo +# instead of +# blah ./foo +# +if { [ safe_path ] } { + exec rm -rf tmp + exec mkdir tmp + exec touch tmp/foo + find_start p { tmp -name foo -execdir echo "saw {}" \; } + exec rm -rf tmp +} diff --git a/find/testsuite/find.gnu/sv-bug-17782.xo b/find/testsuite/find.gnu/sv-bug-17782.xo new file mode 100644 index 0000000..2bde550 --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-17782.xo @@ -0,0 +1 @@ +saw ./foo \ No newline at end of file diff --git a/find/testsuite/find.gnu/sv-bug-18222.exp b/find/testsuite/find.gnu/sv-bug-18222.exp new file mode 100644 index 0000000..f317448 --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-18222.exp @@ -0,0 +1,9 @@ +# Test for Savannah bug #18222 +# +# That bug was a case were the expansion of %H is truncated if the name +# of the second start point is longer than that of the first. +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/short tmp/longer +find_start p { tmp/short tmp/longer -printf "%H\n" } + diff --git a/find/testsuite/find.gnu/sv-bug-18222.xo b/find/testsuite/find.gnu/sv-bug-18222.xo new file mode 100644 index 0000000..4f5f863 --- /dev/null +++ b/find/testsuite/find.gnu/sv-bug-18222.xo @@ -0,0 +1,2 @@ +tmp/short +tmp/longer diff --git a/find/testsuite/find.gnu/true.exp b/find/testsuite/find.gnu/true.exp new file mode 100644 index 0000000..3da595b --- /dev/null +++ b/find/testsuite/find.gnu/true.exp @@ -0,0 +1,5 @@ +# test for -true. +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/fred/jim +find_start p { tmp -depth -print -true -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/true.xo b/find/testsuite/find.gnu/true.xo new file mode 100644 index 0000000..8484390 --- /dev/null +++ b/find/testsuite/find.gnu/true.xo @@ -0,0 +1,6 @@ +tmp/fred/jim +tmp/fred/jim +tmp/fred +tmp/fred +tmp +tmp diff --git a/find/testsuite/find.gnu/used-invarg.exp b/find/testsuite/find.gnu/used-invarg.exp new file mode 100644 index 0000000..be5eed1 --- /dev/null +++ b/find/testsuite/find.gnu/used-invarg.exp @@ -0,0 +1,2 @@ +# tests for invalid argument to -used +find_start f {. -used ZZ} diff --git a/find/testsuite/find.gnu/used-missing.exp b/find/testsuite/find.gnu/used-missing.exp new file mode 100644 index 0000000..b8b8674 --- /dev/null +++ b/find/testsuite/find.gnu/used-missing.exp @@ -0,0 +1,2 @@ +# tests for missing argument to -used +find_start f {. -used } diff --git a/find/testsuite/find.gnu/user-invalid.exp b/find/testsuite/find.gnu/user-invalid.exp new file mode 100644 index 0000000..ee1d02a --- /dev/null +++ b/find/testsuite/find.gnu/user-invalid.exp @@ -0,0 +1,4 @@ +# tests for invalid argument to -user +foreach user { : "" 14JJ 10.3 -4 } { + find_start f ". -user $user" +} diff --git a/find/testsuite/find.gnu/wholename.exp b/find/testsuite/find.gnu/wholename.exp new file mode 100644 index 0000000..128d1ac --- /dev/null +++ b/find/testsuite/find.gnu/wholename.exp @@ -0,0 +1,5 @@ +# test for -wholename +exec rm -rf tmp +exec mkdir tmp tmp/top tmp/top/one tmp/top/one/two +find_start p {tmp/top -wholename tmp/top/one -print } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/wholename.xo b/find/testsuite/find.gnu/wholename.xo new file mode 100644 index 0000000..66d2877 --- /dev/null +++ b/find/testsuite/find.gnu/wholename.xo @@ -0,0 +1 @@ +tmp/top/one diff --git a/find/testsuite/find.gnu/xtype-symlink.exp b/find/testsuite/find.gnu/xtype-symlink.exp new file mode 100644 index 0000000..500daa5 --- /dev/null +++ b/find/testsuite/find.gnu/xtype-symlink.exp @@ -0,0 +1,7 @@ +exec rm -rf tmp +exec mkdir tmp +exec touch tmp/file +exec ln -s file tmp/LINK +exec ls -l tmp > /tmp/z +find_start p {tmp/LINK -xtype f } +exec rm -rf tmp diff --git a/find/testsuite/find.gnu/xtype-symlink.xo b/find/testsuite/find.gnu/xtype-symlink.xo new file mode 100644 index 0000000..f46bde2 --- /dev/null +++ b/find/testsuite/find.gnu/xtype-symlink.xo @@ -0,0 +1 @@ +tmp/LINK diff --git a/find/testsuite/find.gnu/xtype.exp b/find/testsuite/find.gnu/xtype.exp new file mode 100644 index 0000000..62cb749 --- /dev/null +++ b/find/testsuite/find.gnu/xtype.exp @@ -0,0 +1,8 @@ +# checks for the -xtype test. +exec rm -rf tmp + +exec mkdir tmp +exec ln -s /etc/passwd tmp/LINK +exec ln -s /NOSUCHFILE tmp/BROKEN + +find_start p { -H tmp/LINK tmp/BROKEN tmp -xtype l -printf "xtype is l: %p\n" , \! -xtype l -printf "xtype is not l: %p\n" } diff --git a/find/testsuite/find.gnu/xtype.xo b/find/testsuite/find.gnu/xtype.xo new file mode 100644 index 0000000..92b74ed --- /dev/null +++ b/find/testsuite/find.gnu/xtype.xo @@ -0,0 +1,5 @@ +xtype is l: tmp/LINK +xtype is l: tmp/BROKEN +xtype is not l: tmp +xtype is not l: tmp/LINK +xtype is l: tmp/BROKEN diff --git a/find/testsuite/find.posix/and.exp b/find/testsuite/find.posix/and.exp new file mode 100644 index 0000000..ac1d622 --- /dev/null +++ b/find/testsuite/find.posix/and.exp @@ -0,0 +1,5 @@ +# tests for -name +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim +find_start p {tmp -name fred -a -print} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/and.xo b/find/testsuite/find.posix/and.xo new file mode 100644 index 0000000..8cc8940 --- /dev/null +++ b/find/testsuite/find.posix/and.xo @@ -0,0 +1 @@ +tmp/fred diff --git a/find/testsuite/find.posix/bracket-depth.exp b/find/testsuite/find.posix/bracket-depth.exp new file mode 100644 index 0000000..05d659e --- /dev/null +++ b/find/testsuite/find.posix/bracket-depth.exp @@ -0,0 +1,5 @@ +exec rm -rf tmp +exec mkdir tmp +# shoud not result in a fatal error. +find_start p { tmp \( -depth \) -false -print } + diff --git a/find/testsuite/find.posix/depth1.exp b/find/testsuite/find.posix/depth1.exp new file mode 100644 index 0000000..c730d22 --- /dev/null +++ b/find/testsuite/find.posix/depth1.exp @@ -0,0 +1,7 @@ +# tests for the bug reported at http://lists.gnu.org/archive/html/bug-findutils/2005-02/msg00077.html +exec rm -rf tmp +exec mkdir tmp +exec mkdir tmp/1 tmp/1/2 tmp/1/2/3 tmp/1/2/20 tmp/1/2/37 tmp/1/2/54 tmp/1/2/55 tmp/1/2/55/56 tmp/1/2/55/57 tmp/1/2/55/58 tmp/1/2/55/59 +touch tmp/1/2/3/4 tmp/1/2/3/5 tmp/1/2/3/6 tmp/1/2/3/7 tmp/1/2/3/8 tmp/1/2/3/9 tmp/1/2/3/10 tmp/1/2/3/11 tmp/1/2/3/12 tmp/1/2/3/13 tmp/1/2/3/14 tmp/1/2/3/15 tmp/1/2/3/16 tmp/1/2/3/17 tmp/1/2/3/18 tmp/1/2/3/19 tmp/1/2/20/21 tmp/1/2/20/22 tmp/1/2/20/23 tmp/1/2/20/24 tmp/1/2/20/25 tmp/1/2/20/26 tmp/1/2/20/27 tmp/1/2/20/28 tmp/1/2/20/29 tmp/1/2/20/30 tmp/1/2/20/31 tmp/1/2/20/32 tmp/1/2/20/33 tmp/1/2/20/34 tmp/1/2/20/35 tmp/1/2/20/36 tmp/1/2/37/38 tmp/1/2/37/39 tmp/1/2/37/40 tmp/1/2/37/41 tmp/1/2/37/42 tmp/1/2/37/43 tmp/1/2/37/44 tmp/1/2/37/45 tmp/1/2/37/46 tmp/1/2/37/47 tmp/1/2/37/48 tmp/1/2/37/49 tmp/1/2/37/50 tmp/1/2/37/51 tmp/1/2/37/52 tmp/1/2/37/53 tmp/1/2/60 tmp/1/2/61 tmp/1/2/62 tmp/1/2/63 tmp/1/2/64 tmp/1/2/65 tmp/1/66 tmp/1/67 tmp/1/68 tmp/1/69 tmp/1/70 tmp/1/71 tmp/1/72 tmp/1/73 tmp/1/74 tmp/1/75 tmp/1/76 tmp/1/77 tmp/1/78 tmp/1/79 tmp/1/80 tmp/1/81 +find_start p {tmp/1 -depth -type d -print} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/depth1.xo b/find/testsuite/find.posix/depth1.xo new file mode 100644 index 0000000..0147ad5 --- /dev/null +++ b/find/testsuite/find.posix/depth1.xo @@ -0,0 +1,11 @@ +tmp/1 +tmp/1/2 +tmp/1/2/20 +tmp/1/2/3 +tmp/1/2/37 +tmp/1/2/54 +tmp/1/2/55 +tmp/1/2/55/56 +tmp/1/2/55/57 +tmp/1/2/55/58 +tmp/1/2/55/59 diff --git a/find/testsuite/find.posix/empty-parens.exp b/find/testsuite/find.posix/empty-parens.exp new file mode 100644 index 0000000..fc22c54 --- /dev/null +++ b/find/testsuite/find.posix/empty-parens.exp @@ -0,0 +1,3 @@ +# empty parentheses should be rejected as being invalid. +find_start f { . \( -\) } + diff --git a/find/testsuite/find.posix/exec-one.exp b/find/testsuite/find.posix/exec-one.exp new file mode 100644 index 0000000..a4a7ef6 --- /dev/null +++ b/find/testsuite/find.posix/exec-one.exp @@ -0,0 +1,5 @@ +# tests for -name +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim +find_start p {tmp -name fred -exec echo \{\} \; } +exec rm -rf tmp diff --git a/find/testsuite/find.posix/exec-one.xo b/find/testsuite/find.posix/exec-one.xo new file mode 100644 index 0000000..8cc8940 --- /dev/null +++ b/find/testsuite/find.posix/exec-one.xo @@ -0,0 +1 @@ +tmp/fred diff --git a/find/testsuite/find.posix/files-not-expressions1.exp b/find/testsuite/find.posix/files-not-expressions1.exp new file mode 100644 index 0000000..cb5386d --- /dev/null +++ b/find/testsuite/find.posix/files-not-expressions1.exp @@ -0,0 +1,9 @@ +set files "\(1 " + +foreach file $files { touch $file } + +# shoud not result in a fatal error. +find_start p { \(1 } + +foreach file $files { file delete -- $file } + diff --git a/find/testsuite/find.posix/files-not-expressions1.xo b/find/testsuite/find.posix/files-not-expressions1.xo new file mode 100644 index 0000000..000b2a0 --- /dev/null +++ b/find/testsuite/find.posix/files-not-expressions1.xo @@ -0,0 +1 @@ +(1 diff --git a/find/testsuite/find.posix/files-not-expressions2.exp b/find/testsuite/find.posix/files-not-expressions2.exp new file mode 100644 index 0000000..da61124 --- /dev/null +++ b/find/testsuite/find.posix/files-not-expressions2.exp @@ -0,0 +1,9 @@ +set files "!2" + +foreach file $files { touch $file } + +# shoud not result in a fatal error. +find_start p { !2 } + +foreach file $files { file delete -- $file } + diff --git a/find/testsuite/find.posix/files-not-expressions2.xo b/find/testsuite/find.posix/files-not-expressions2.xo new file mode 100644 index 0000000..a829de6 --- /dev/null +++ b/find/testsuite/find.posix/files-not-expressions2.xo @@ -0,0 +1 @@ +!2 diff --git a/find/testsuite/find.posix/files-not-expressions3.exp b/find/testsuite/find.posix/files-not-expressions3.exp new file mode 100644 index 0000000..a85bfe7 --- /dev/null +++ b/find/testsuite/find.posix/files-not-expressions3.exp @@ -0,0 +1,9 @@ +set files "\)" + +foreach file $files { touch $file } + +# shoud not result in a fatal error. +find_start p { \) } + +foreach file $files { file delete -- $file } + diff --git a/find/testsuite/find.posix/files-not-expressions3.xo b/find/testsuite/find.posix/files-not-expressions3.xo new file mode 100644 index 0000000..bea8cd1 --- /dev/null +++ b/find/testsuite/find.posix/files-not-expressions3.xo @@ -0,0 +1 @@ +) diff --git a/find/testsuite/find.posix/group-empty.exp b/find/testsuite/find.posix/group-empty.exp new file mode 100644 index 0000000..eb7851a --- /dev/null +++ b/find/testsuite/find.posix/group-empty.exp @@ -0,0 +1,3 @@ +# test for diagnosis of the fact that the argument to -group is empty +find_start f { . -group "" } + diff --git a/find/testsuite/find.posix/group-missing.exp b/find/testsuite/find.posix/group-missing.exp new file mode 100644 index 0000000..c3e2735 --- /dev/null +++ b/find/testsuite/find.posix/group-missing.exp @@ -0,0 +1,5 @@ +# test for diagnosis of the fact that the argument to -group is missing +exec rm -rf tmp +exec touch tmp +find_start f { tmp -group } +exec rm -rf tmp diff --git a/find/testsuite/find.posix/grouping.exp b/find/testsuite/find.posix/grouping.exp new file mode 100644 index 0000000..c5ce2d7 --- /dev/null +++ b/find/testsuite/find.posix/grouping.exp @@ -0,0 +1,5 @@ +# tests for ! +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim +find_start p {tmp \! \( -name fred -o -name tmp \) -print} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/grouping.xo b/find/testsuite/find.posix/grouping.xo new file mode 100644 index 0000000..a7eac4c --- /dev/null +++ b/find/testsuite/find.posix/grouping.xo @@ -0,0 +1 @@ +tmp/jim \ No newline at end of file diff --git a/find/testsuite/find.posix/links.exp b/find/testsuite/find.posix/links.exp new file mode 100644 index 0000000..adb0fae --- /dev/null +++ b/find/testsuite/find.posix/links.exp @@ -0,0 +1,25 @@ +# tests for -links +exec rm -rf tmp +exec mkdir tmp +touch tmp/file1 tmp/file2 tmp/file3 + +# four links including the original file +exec ln tmp/file1 tmp/1a +exec ln tmp/file1 tmp/1b +exec ln tmp/file1 tmp/1c + +# five links including the original file +exec ln tmp/file2 tmp/2a +exec ln tmp/file2 tmp/2b +exec ln tmp/file2 tmp/2c +exec ln tmp/file2 tmp/2d + +# six links including the original file +exec ln tmp/file3 tmp/3a +exec ln tmp/file3 tmp/3b +exec ln tmp/file3 tmp/3c +exec ln tmp/file3 tmp/3d +exec ln tmp/file3 tmp/3e + +find_start p { tmp/file1 tmp/file2 tmp/file3 -type f ( ( -links -5 -exec echo under5 \{\} \; ) -o ( -links 5 -exec echo exactly5 \{\} \; ) -o ( -links +5 -exec echo over5 \{\} \; ) ) } +exec rm -rf tmp diff --git a/find/testsuite/find.posix/links.xo b/find/testsuite/find.posix/links.xo new file mode 100644 index 0000000..311447f --- /dev/null +++ b/find/testsuite/find.posix/links.xo @@ -0,0 +1,3 @@ +exactly5 tmp/file2 +over5 tmp/file3 +under5 tmp/file1 diff --git a/find/testsuite/find.posix/name-missing.exp b/find/testsuite/find.posix/name-missing.exp new file mode 100644 index 0000000..da8ae5a --- /dev/null +++ b/find/testsuite/find.posix/name-missing.exp @@ -0,0 +1,5 @@ +# test for diagnosis of the fact that the argument to -name is missing +exec rm -rf tmp +exec touch tmp +find_start f { tmp -name } +exec rm -rf tmp diff --git a/find/testsuite/find.posix/name.exp b/find/testsuite/find.posix/name.exp new file mode 100644 index 0000000..65c6f5f --- /dev/null +++ b/find/testsuite/find.posix/name.exp @@ -0,0 +1,5 @@ +# tests for -name +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim +find_start p {tmp -name fred -print} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/name.xo b/find/testsuite/find.posix/name.xo new file mode 100644 index 0000000..8cc8940 --- /dev/null +++ b/find/testsuite/find.posix/name.xo @@ -0,0 +1 @@ +tmp/fred diff --git a/find/testsuite/find.posix/perm-X.exp b/find/testsuite/find.posix/perm-X.exp new file mode 100644 index 0000000..28e78ad --- /dev/null +++ b/find/testsuite/find.posix/perm-X.exp @@ -0,0 +1,12 @@ +# tests for -perm with X +exec rm -rf tmp +exec mkdir tmp +exec chmod 755 tmp +exec true > tmp/empty +exec true > tmp/empty-xxx +exec chmod 711 tmp/empty-xxx +exec mkdir tmp/sub +exec chmod 300 tmp/sub +find_start p { tmp \( ! -name sub -o -prune \) -perm -u+w,a+X -print } +exec chmod 700 tmp/sub +exec rm -rf tmp diff --git a/find/testsuite/find.posix/perm-X.xo b/find/testsuite/find.posix/perm-X.xo new file mode 100644 index 0000000..2af57aa --- /dev/null +++ b/find/testsuite/find.posix/perm-X.xo @@ -0,0 +1,3 @@ +tmp +tmp/empty +tmp/empty-xxx diff --git a/find/testsuite/find.posix/perm-vanilla.exp b/find/testsuite/find.posix/perm-vanilla.exp new file mode 100644 index 0000000..c6b551f --- /dev/null +++ b/find/testsuite/find.posix/perm-vanilla.exp @@ -0,0 +1,18 @@ +# tests for -perm +exec rm -rf tmp +exec mkdir tmp + +## set up a selection of test files +foreach perm { 400 555 700 } { + touch "tmp/$perm" + exec chmod $perm "tmp/$perm" +} +exec ls -l tmp + +# +# The -o operator normally has a short-circuit effect, +# so we have to use "-exec false \;" to make sure that +# all the parenthesised expression actually fail. +# +find_start p {tmp/400 tmp/555 tmp/700 \( -perm 400 -exec echo p400 \{\} \; -exec false \; \) -o \( -perm -400 -exec echo p-400 \{\} \; -exec false \; \) } +# exec rm -rf tmp tmp2 diff --git a/find/testsuite/find.posix/perm-vanilla.xo b/find/testsuite/find.posix/perm-vanilla.xo new file mode 100644 index 0000000..6724004 --- /dev/null +++ b/find/testsuite/find.posix/perm-vanilla.xo @@ -0,0 +1,4 @@ +p400 tmp/400 +p-400 tmp/400 +p-400 tmp/555 +p-400 tmp/700 diff --git a/find/testsuite/find.posix/posixnot.exp b/find/testsuite/find.posix/posixnot.exp new file mode 100644 index 0000000..859309d --- /dev/null +++ b/find/testsuite/find.posix/posixnot.exp @@ -0,0 +1,5 @@ +# tests for ! +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim +find_start p {tmp \! -name fred -print} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/posixnot.xo b/find/testsuite/find.posix/posixnot.xo new file mode 100644 index 0000000..776fed4 --- /dev/null +++ b/find/testsuite/find.posix/posixnot.xo @@ -0,0 +1,2 @@ +tmp +tmp/jim \ No newline at end of file diff --git a/find/testsuite/find.posix/prune.exp b/find/testsuite/find.posix/prune.exp new file mode 100644 index 0000000..10c1bb0 --- /dev/null +++ b/find/testsuite/find.posix/prune.exp @@ -0,0 +1,5 @@ +# tests for -name +exec rm -rf tmp +exec mkdir tmp tmp/fred tmp/jim tmp/jim/1 tmp/shiela +find_start p {tmp -name jim -prune -o -print } +#exec rm -rf tmp diff --git a/find/testsuite/find.posix/prune.xo b/find/testsuite/find.posix/prune.xo new file mode 100644 index 0000000..afe68f8 --- /dev/null +++ b/find/testsuite/find.posix/prune.xo @@ -0,0 +1,3 @@ +tmp +tmp/fred +tmp/shiela diff --git a/find/testsuite/find.posix/size-invalid.exp b/find/testsuite/find.posix/size-invalid.exp new file mode 100644 index 0000000..4989438 --- /dev/null +++ b/find/testsuite/find.posix/size-invalid.exp @@ -0,0 +1,7 @@ +# test for diagnosis of the fact that the argument to -size is invalid +exec rm -rf tmp +exec touch tmp +foreach size { w b c k m G "" +-1 +-1G 1.2k } { + find_start f " tmp -size $size " +} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/size-missing.exp b/find/testsuite/find.posix/size-missing.exp new file mode 100644 index 0000000..74ad151 --- /dev/null +++ b/find/testsuite/find.posix/size-missing.exp @@ -0,0 +1,5 @@ +# test for diagnosis of the fact that the argument to -size is missing +exec rm -rf tmp +exec touch tmp +find_start f { tmp -size } +exec rm -rf tmp diff --git a/find/testsuite/find.posix/sizes.exp b/find/testsuite/find.posix/sizes.exp new file mode 100644 index 0000000..1fdea48 --- /dev/null +++ b/find/testsuite/find.posix/sizes.exp @@ -0,0 +1,15 @@ +# tests for -size +exec rm -rf tmp +exec mkdir tmp +exec true > tmp/0-bytes +exec dd if=/dev/zero bs=1 count=511 of=tmp/511-bytes > /dev/null 2>/dev/null +exec dd if=/dev/zero bs=1 count=512 of=tmp/512-bytes > /dev/null 2>/dev/null +exec dd if=/dev/zero bs=1 count=513 of=tmp/513-bytes > /dev/null 2>/dev/null +exec dd if=/dev/zero bs=1 count=1024 of=tmp/1024-bytes > /dev/null 2>/dev/null +find_start p {tmp -mindepth 1 ( -size -1 -printf "A size -1: %s %p\n" ) , ( -size 1 -printf "B size 1: %s %p\n" ) , ( -size +1 -printf "C size +1: %s %p\n" ) , ( -size -2 -printf "G size -2: %s %p\n" ) , ( -size 2 -printf "H size 2: %s %p\n" ) , ( -size +2 -printf "I size +2: %s %p\n" ) } +# ( -size =1 -printf "E size =1: %s %p\n" ) +# ( -size >1 -printf "F size >1: %s %p\n" ) , +# ( -size <2 -printf "J size <2: %s %p\n" ) , +# ( -size =2 -printf "K size =2: %s %p\n" ) , +# ( -size >2 -printf "L size >2: %s %p\n" ) +exec rm -rf tmp diff --git a/find/testsuite/find.posix/sizes.xo b/find/testsuite/find.posix/sizes.xo new file mode 100644 index 0000000..f89a10c --- /dev/null +++ b/find/testsuite/find.posix/sizes.xo @@ -0,0 +1,10 @@ +A size -1: 0 tmp/0-bytes +B size 1: 511 tmp/511-bytes +B size 1: 512 tmp/512-bytes +C size +1: 513 tmp/513-bytes +C size +1: 1024 tmp/1024-bytes +H size 2: 513 tmp/513-bytes +H size 2: 1024 tmp/1024-bytes +G size -2: 0 tmp/0-bytes +G size -2: 511 tmp/511-bytes +G size -2: 512 tmp/512-bytes diff --git a/find/testsuite/find.posix/sizetype.exp b/find/testsuite/find.posix/sizetype.exp new file mode 100644 index 0000000..b9dedf3 --- /dev/null +++ b/find/testsuite/find.posix/sizetype.exp @@ -0,0 +1,6 @@ +# tests for -size -type +exec rm -rf tmp +exec mkdir tmp +exec true > tmp/empty +find_start p {tmp -size 0c -type f } +exec rm -rf tmp diff --git a/find/testsuite/find.posix/sizetype.xo b/find/testsuite/find.posix/sizetype.xo new file mode 100644 index 0000000..445f1d4 --- /dev/null +++ b/find/testsuite/find.posix/sizetype.xo @@ -0,0 +1 @@ +tmp/empty diff --git a/find/testsuite/find.posix/sv-bug-11175.exp b/find/testsuite/find.posix/sv-bug-11175.exp new file mode 100644 index 0000000..06dd160 --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-11175.exp @@ -0,0 +1,10 @@ +# tests for Savannah bug 11175 (should not check perms of pruned dir) +exec rm -rf tmp +exec mkdir tmp +exec mkdir tmp/noxdir +exec chmod 700 tmp +exec chmod 600 tmp/noxdir +#find_start p {tmp/noxdir -prune -type d -print} +find_start p {tmp -name noxdir -prune -type d -print} +exec chmod 700 tmp/noxdir +exec rm -rf tmp diff --git a/find/testsuite/find.posix/sv-bug-11175.xo b/find/testsuite/find.posix/sv-bug-11175.xo new file mode 100644 index 0000000..cd9c95f --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-11175.xo @@ -0,0 +1 @@ +tmp/noxdir diff --git a/find/testsuite/find.posix/sv-bug-12181.exp b/find/testsuite/find.posix/sv-bug-12181.exp new file mode 100644 index 0000000..8f1d339 --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-12181.exp @@ -0,0 +1,6 @@ +# tests for Savannah bug 12181 (find -H symlink should work) +exec rm -rf tmp +exec mkdir tmp +exec ln -s tmp link +find_start p { -H link} +exec rm -rf tmp link diff --git a/find/testsuite/find.posix/sv-bug-12181.xo b/find/testsuite/find.posix/sv-bug-12181.xo new file mode 100644 index 0000000..2b2328d --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-12181.xo @@ -0,0 +1 @@ +link diff --git a/find/testsuite/find.posix/sv-bug-15235.exp b/find/testsuite/find.posix/sv-bug-15235.exp new file mode 100644 index 0000000..9342e49 --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-15235.exp @@ -0,0 +1,6 @@ +# tests for directory parsing +exec rm -rf \(1 \!2 \, \) +exec mkdir \(1 \!2 \, \) +touch \(1/a \!2/b \,/c \)/d +find_start p {\(1 \!2 \, \)} +exec rm -rf \(1 \!2 \, \) diff --git a/find/testsuite/find.posix/sv-bug-15235.xo b/find/testsuite/find.posix/sv-bug-15235.xo new file mode 100644 index 0000000..2852b81 --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-15235.xo @@ -0,0 +1,8 @@ +(1 +(1/a +!2 +!2/b +, +,/c +) +)/d diff --git a/find/testsuite/find.posix/sv-bug-19605.exp b/find/testsuite/find.posix/sv-bug-19605.exp new file mode 100644 index 0000000..05b8841 --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-19605.exp @@ -0,0 +1,7 @@ +# tests for Savannah bug 19605 (Inability of ftsfind to detect symlink loop) +exec rm -rf tmp +exec mkdir tmp +exec ln -s a tmp/b +exec ln -s b tmp/a +find_start f {-L tmp -false -print} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/sv-bug-19613.exp b/find/testsuite/find.posix/sv-bug-19613.exp new file mode 100644 index 0000000..44423ef --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-19613.exp @@ -0,0 +1,14 @@ +# tests for Savannah bug 19613 ("find -L -type f" fails on symlink loops) +exec rm -rf tmp +exec mkdir tmp tmp/subdir +exec ln -s a tmp/subdir/b +exec ln -s b tmp/subdir/a + +# We want to distinguish between the correct behaviour (error message +# and return 1 because of the loop) and the failure case (assertion +# failure in 4.3.3). To do that we just check that the "tmp/vanilla" +# file is also found. + +touch tmp/vanilla +find_start f { -L tmp -depth -type f} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/sv-bug-19613.xo b/find/testsuite/find.posix/sv-bug-19613.xo new file mode 100644 index 0000000..5618aba --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-19613.xo @@ -0,0 +1 @@ +tmp/vanilla diff --git a/find/testsuite/find.posix/sv-bug-19617.exp b/find/testsuite/find.posix/sv-bug-19617.exp new file mode 100644 index 0000000..fc4caca --- /dev/null +++ b/find/testsuite/find.posix/sv-bug-19617.exp @@ -0,0 +1,7 @@ +# tests for Savannah bug 19617 (Inability of ftsfind to detect nonexistent command line args) +exec rm -rf tmp +exec mkdir tmp +find_start f {-P tmp/nosuchfile -print} +find_start f {-H tmp/nosuchfile -print} +find_start f {-L tmp/nosuchfile -print} +exec rm -rf tmp diff --git a/find/testsuite/find.posix/typearg.exp b/find/testsuite/find.posix/typearg.exp new file mode 100644 index 0000000..ea6a933 --- /dev/null +++ b/find/testsuite/find.posix/typearg.exp @@ -0,0 +1,4 @@ +# tests for arguments to -type +foreach type { Z ZZ } { + find_start f ". -type $type" +} diff --git a/find/testsuite/find.posix/typesize.exp b/find/testsuite/find.posix/typesize.exp new file mode 100644 index 0000000..596b2da --- /dev/null +++ b/find/testsuite/find.posix/typesize.exp @@ -0,0 +1,6 @@ +# tests for -type -size +exec rm -rf tmp +exec mkdir tmp +exec true > tmp/empty +find_start p {tmp -type f -size 0c } +exec rm -rf tmp diff --git a/find/testsuite/find.posix/typesize.xo b/find/testsuite/find.posix/typesize.xo new file mode 100644 index 0000000..445f1d4 --- /dev/null +++ b/find/testsuite/find.posix/typesize.xo @@ -0,0 +1 @@ +tmp/empty diff --git a/find/testsuite/find.posix/user-empty.exp b/find/testsuite/find.posix/user-empty.exp new file mode 100644 index 0000000..136fce0 --- /dev/null +++ b/find/testsuite/find.posix/user-empty.exp @@ -0,0 +1,3 @@ +# test for diagnosis of the fact that the argument to -user is empty +find_start f { . -user "" } + diff --git a/find/testsuite/find.posix/user-missing.exp b/find/testsuite/find.posix/user-missing.exp new file mode 100644 index 0000000..d038735 --- /dev/null +++ b/find/testsuite/find.posix/user-missing.exp @@ -0,0 +1,3 @@ +# test for diagnosis of the fact that the argument to -user is missing +find_start f { tmp -user } + diff --git a/find/tree.c b/find/tree.c new file mode 100644 index 0000000..60184f0 --- /dev/null +++ b/find/tree.c @@ -0,0 +1,1656 @@ +/* tree.c -- helper functions to build and evaluate the expression tree. + Copyright (C) 1990, 91, 92, 93, 94, 2000, 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 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. +*/ + +#include +#include "defs.h" + +#include +#include + +#include "xalloc.h" +#include "error.h" + + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + + + +/* All predicates for each path to process. */ +static struct predicate *predicates = NULL; + +/* The root of the evaluation tree. */ +static struct predicate *eval_tree = NULL; + +/* The last predicate allocated. */ +static struct predicate *last_pred = NULL; + + +static struct predicate *scan_rest PARAMS((struct predicate **input, + struct predicate *head, + short int prev_prec)); +static void merge_pred PARAMS((struct predicate *beg_list, struct predicate *end_list, struct predicate **last_p)); +static struct predicate *set_new_parent PARAMS((struct predicate *curr, enum predicate_precedence high_prec, struct predicate **prevp)); +static const char *cost_name PARAMS((enum EvaluationCost cost)); + + +/* Return a pointer to a tree that represents the + expression prior to non-unary operator *INPUT. + Set *INPUT to point at the next input predicate node. + + Only accepts the following: + + + expression [operators of higher precedence] + + (arbitrary expression) + (arbitrary expression) + + In other words, you can not start out with a bi_op or close_paren. + + If the following operator (if any) is of a higher precedence than + PREV_PREC, the expression just nabbed is part of a following + expression, which really is the expression that should be handed to + our caller, so get_expr recurses. */ + +struct predicate * +get_expr (struct predicate **input, + short int prev_prec, + const struct predicate* prev_pred) +{ + struct predicate *next = NULL; + struct predicate *this_pred = (*input); + + if (*input == NULL) + error (1, 0, _("invalid expression")); + + switch ((*input)->p_type) + { + case NO_TYPE: + error (1, 0, _("invalid expression")); + break; + + case BI_OP: + /* e.g. "find . -a" */ + error (1, 0, _("invalid expression; you have used a binary operator '%s' with nothing before it."), this_pred->p_name); + break; + + case CLOSE_PAREN: + if ((UNI_OP == prev_pred->p_type + || BI_OP == prev_pred->p_type) + && !this_pred->artificial) + { + /* e.g. "find \( -not \)" or "find \( -true -a \" */ + error(1, 0, _("expected an expression between '%s' and ')'"), + prev_pred->p_name); + } + else if ( (*input)->artificial ) + { + /* We have reached the end of the user-supplied predicates + * unexpectedly. + */ + /* e.g. "find . -true -a" */ + error (1, 0, _("expected an expression after '%s'"), prev_pred->p_name); + } + else + { + error (1, 0, _("invalid expression; you have too many ')'")); + } + break; + + case PRIMARY_TYPE: + next = *input; + *input = (*input)->pred_next; + break; + + case UNI_OP: + next = *input; + *input = (*input)->pred_next; + next->pred_right = get_expr (input, NEGATE_PREC, next); + break; + + case OPEN_PAREN: + if ( (NULL == (*input)->pred_next) || (*input)->pred_next->artificial ) + { + /* user typed something like "find . (", and so the ) we are + * looking at is from the artificial "( ) -print" that we + * add. + */ + error (1, 0, _("invalid expression; expected to find a ')' but didn't see one. Perhaps you need an extra predicate after '%s'"), this_pred->p_name); + } + prev_pred = (*input); + *input = (*input)->pred_next; + if ( (*input)->p_type == CLOSE_PAREN ) + { + error (1, 0, _("invalid expression; empty parentheses are not allowed.")); + } + next = get_expr (input, NO_PREC, prev_pred); + if ((*input == NULL) + || ((*input)->p_type != CLOSE_PAREN)) + error (1, 0, _("invalid expression; I was expecting to find a ')' somewhere but did not see one.")); + *input = (*input)->pred_next; /* move over close */ + break; + + default: + error (1, 0, _("oops -- invalid expression type!")); + break; + } + + /* We now have the first expression and are positioned to check + out the next operator. If NULL, all done. Otherwise, if + PREV_PREC < the current node precedence, we must continue; + the expression we just nabbed is more tightly bound to the + following expression than to the previous one. */ + if (*input == NULL) + return (next); + if ((int) (*input)->p_prec > (int) prev_prec) + { + next = scan_rest (input, next, prev_prec); + if (next == NULL) + error (1, 0, _("invalid expression")); + } + return (next); +} + +/* Scan across the remainder of a predicate input list starting + at *INPUT, building the rest of the expression tree to return. + Stop at the first close parenthesis or the end of the input list. + Assumes that get_expr has been called to nab the first element + of the expression tree. + + *INPUT points to the current input predicate list element. + It is updated as we move along the list to point to the + terminating input element. + HEAD points to the predicate element that was obtained + by the call to get_expr. + PREV_PREC is the precedence of the previous predicate element. */ + +static struct predicate * +scan_rest (struct predicate **input, + struct predicate *head, + short int prev_prec) +{ + struct predicate *tree; /* The new tree we are building. */ + + if ((*input == NULL) || ((*input)->p_type == CLOSE_PAREN)) + return (NULL); + tree = head; + while ((*input != NULL) && ((int) (*input)->p_prec > (int) prev_prec)) + { + switch ((*input)->p_type) + { + case NO_TYPE: + case PRIMARY_TYPE: + case UNI_OP: + case OPEN_PAREN: + /* I'm not sure how we get here, so it is not obvious what + * sort of mistakes might give rise to this condition. + */ + error (1, 0, _("invalid expression")); + break; + + case BI_OP: + { + struct predicate *prev = (*input); + (*input)->pred_left = tree; + tree = *input; + *input = (*input)->pred_next; + tree->pred_right = get_expr (input, tree->p_prec, prev); + break; + } + + case CLOSE_PAREN: + return tree; + + default: + error (1, 0, + _("oops -- invalid expression type (%d)!"), + (int)(*input)->p_type); + break; + } + } + return tree; +} + +/* Returns true if the specified predicate is reorderable. */ +static boolean +predicate_is_cost_free(const struct predicate *p) +{ + if (pred_is(p, pred_name) || + pred_is(p, pred_path) || + pred_is(p, pred_iname) || + pred_is(p, pred_ipath)) + { + /* Traditionally (at least 4.1.7 through 4.2.x) GNU find always + * optimised these cases. + */ + return true; + } + else if (options.optimisation_level > 0) + { + if (pred_is(p, pred_and) || + pred_is(p, pred_negate) || + pred_is(p, pred_comma) || + pred_is(p, pred_or)) + return false; + else + return NeedsNothing == p->p_cost; + } + else + { + return false; + } +} + +/* Prints a predicate */ +void print_predicate(FILE *fp, const struct predicate *p) +{ + fprintf (fp, "%s%s%s", + p->p_name, + p->arg_text ? " " : "", + p->arg_text ? p->arg_text : ""); +} + + +struct predlist +{ + struct predicate *head; + struct predicate *tail; +}; + +static void +predlist_init(struct predlist *p) +{ + p->head = p->tail = NULL; +} + +static void +predlist_insert(struct predlist *list, + struct predicate *curr, + struct predicate **pprev) +{ + struct predicate **insertpos = &(list->head); + + *pprev = curr->pred_left; + if (options.optimisation_level > 2) + { + /* Insert the new node in the list after any other entries which + * are more selective. + */ + if (0) + while ( (*insertpos) && ((*insertpos)->est_success_rate < curr->est_success_rate) ) + { + insertpos = &((*insertpos)->pred_left); + } + } + curr->pred_left = (*insertpos); + (*insertpos) = curr; + if (NULL == list->tail) + list->tail = list->head; +} + +static int +pred_cost_compare(const struct predicate *p1, const struct predicate *p2, boolean wantfailure) +{ + if (p1->p_cost == p2->p_cost) + { + if (p1->est_success_rate == p2->est_success_rate) + return 0; + else if (wantfailure) + return p1->est_success_rate < p2->est_success_rate ? -1 : 1; + else + return p1->est_success_rate < p2->est_success_rate ? 1 : -1; + } + else + { + return p1->p_cost < p2->p_cost ? -1 : 1; + } +} + + +static void +predlist_merge_sort(struct predlist *list, + struct predicate **last) +{ + struct predlist new_list; + struct predicate *p, *q; + + if (NULL == list->head) + return; /* nothing to do */ + + if (options.debug_options & DebugTreeOpt) + { + fprintf(stderr, "%s:\n", "predlist before merge sort"); + print_tree(stderr, list->head, 2); + } + + calculate_derived_rates(list->head); + predlist_init(&new_list); + while (list->head) + { + /* remove head of source list */ + q = list->head; + list->head = list->head->pred_left; + q->pred_left = NULL; + + /* insert it into the new list */ + for (p=new_list.head; p; p=p->pred_left) + { + /* If these operations are OR operations, we want to get a + * successful test as soon as possible, to take advantage of + * the short-circuit evaluation. If they're AND, we want to + * get an unsuccessful result early for the same reason. + * Therefore we invert the sense of the comparison for the + * OR case. We only want to invert the sense of the success + * rate comparison, not the operation cost comparison. Hence we + * pass a flag into pred_cost_compare(). + */ + boolean wantfailure = (OR_PREC != p->p_prec); + if (pred_cost_compare(p->pred_right, q->pred_right, wantfailure) >= 0) + break; + } + if (p) + { + /* insert into existing list */ + q->pred_left = p->pred_left; + if (NULL == q->pred_left) + new_list.tail = q; + p->pred_left = q; + } + else + { + q->pred_left = new_list.head; /* prepend */ + new_list.head = q; + if (NULL == new_list.tail) + new_list.tail = q; /* first item in new list */ + } + } + if (options.debug_options & DebugTreeOpt) + { + fprintf(stderr, "%s:\n", "predlist after merge sort"); + print_tree(stderr, new_list.head, 2); + } + + calculate_derived_rates(new_list.head); + merge_pred(new_list.head, new_list.tail, last); + predlist_init(list); +} + +static void +merge_lists(struct predlist lists[], int nlists, + struct predlist *name_list, + struct predlist *regex_list, + struct predicate **last) +{ + int i; + static void (*mergefn)(struct predlist *, struct predicate**); + + mergefn = predlist_merge_sort; + + mergefn(name_list, last); + mergefn(regex_list, last); + + for (i=0; iside_effects + || subtree_has_side_effects(p->pred_left) + || subtree_has_side_effects(p->pred_right); + } + else + { + + return false; + } +} + +static int +worst_cost (const struct predicate *p) +{ + if (p) + { + unsigned int cost_r, cost_l, worst; + cost_l = worst_cost(p->pred_left); + cost_r = worst_cost(p->pred_right); + worst = (cost_l > cost_r) ? cost_l : cost_r; + if (worst < p->p_cost) + worst = p->p_cost; + return worst; + } + else + { + return 0; + } +} + + + +static void +perform_arm_swap(struct predicate *p) +{ + struct predicate *tmp = p->pred_left->pred_right; + p->pred_left->pred_right = p->pred_right; + p->pred_right = tmp; +} + +/* Consider swapping p->pred_left->pred_right with p->pred_right, + * if that yields a faster evaluation. Normally the left predicate is + * evaluated first. + * + * If the operation is an OR, we want the left predicate to be the one that + * succeeds most often. If it is an AND, we want it to be the predicate that + * fails most often. + * + * We don't consider swapping arms of an operator where their cost is + * different or where they have side effects. + * + * A viable test case for this is + * ./find -D opt -O3 . \! -type f -o -type d + * Here, the ! -type f should be evaluated first, + * as we assume that 95% of inodes are vanilla files. + */ +static boolean +consider_arm_swap(struct predicate *p) +{ + int left_cost, right_cost; + const char *reason = NULL; + struct predicate **pl, **pr; + + if (BI_OP != p->p_type) + reason = "Not a binary operation"; + + if (!reason) + { + if (NULL == p->pred_left || NULL == p->pred_right) + reason = "Doesn't have two arms"; + } + + + if (!reason) + { + if (NULL == p->pred_left->pred_right) + reason = "Left arm has no child on RHS"; + } + pr = &p->pred_right; + pl = &p->pred_left->pred_right; + + if (!reason) + { + if (subtree_has_side_effects(*pl)) + reason = "Left subtree has side-effects"; + } + if (!reason) + { + if (subtree_has_side_effects(*pr)) + reason = "Right subtree has side-effects"; + } + + if (!reason) + { + left_cost = worst_cost(*pl); + right_cost = worst_cost(*pr); + + if (left_cost < right_cost) + { + reason = "efficient as-is"; + } + } + if (!reason) + { + boolean want_swap; + + if (left_cost == right_cost) + { + /* it's a candidate */ + float succ_rate_l = (*pl)->est_success_rate; + float succ_rate_r = (*pr)->est_success_rate; + + if (options.debug_options & DebugTreeOpt) + { + fprintf(stderr, "Success rates: l=%f, r=%f\n", succ_rate_l, succ_rate_r); + } + + if (pred_is(p, pred_or)) + { + want_swap = succ_rate_r < succ_rate_l; + if (!want_swap) + reason = "Operation is OR and right success rate >= left"; + } + else if (pred_is(p, pred_and)) + { + want_swap = succ_rate_r > succ_rate_l; + if (!want_swap) + reason = "Operation is AND and right success rate <= left"; + } + else + { + want_swap = false; + reason = "Not AND or OR"; + } + } + else + { + want_swap = true; + } + + if (want_swap) + { + if (options.debug_options & DebugTreeOpt) + { + fprintf(stderr, "Performing arm swap on:\n"); + print_tree (stderr, p, 0); + } + perform_arm_swap(p); + return true; + } + } + + + if (options.debug_options & DebugTreeOpt) + { + fprintf(stderr, "Not an arm swap candidate (%s):\n", reason); + print_tree (stderr, p, 0); + } + return false; +} + +static boolean +do_arm_swaps(struct predicate *p) +{ + if (p) + { + boolean swapped; + do + { + swapped = false; + if (consider_arm_swap(p) + || do_arm_swaps(p->pred_left) + || do_arm_swaps(p->pred_right)) + { + swapped = true; + } + } while (swapped); + return swapped; + } + else + { + return false; + } +} + + + +/* Optimize the ordering of the predicates in the tree. Rearrange + them to minimize work. Strategies: + * Evaluate predicates that don't need inode information first; + the predicates are divided into 1 or more groups separated by + predicates (if any) which have "side effects", such as printing. + The grouping implements the partial ordering on predicates which + those with side effects impose. + + * Place -name, -iname, -path, -ipath, -regex and -iregex at the front + of a group, with -name, -iname, -path and -ipath ahead of + -regex and -iregex. Predicates which are moved to the front + of a group by definition do not have side effects. Both + -regex and -iregex both use pred_regex. + + If higher optimisation levels have been selected, reordering also + occurs according to the p_cost member of each predicate (which + reflects the performance cost of the test). The ordering also + bears in mind whether these operations are more likely to succeed + or fail. When evauating a chain of OR conditions, we prefer + tests likely to succeed at the front of the list. For AND, we + prefer tests likely to fail at the front of the list. + + This routine "normalizes" the predicate tree by ensuring that + all expression predicates have AND (or OR or COMMA) parent nodes + which are linked along the left edge of the expression tree. + This makes manipulation of subtrees easier. + + EVAL_TREEP points to the root pointer of the predicate tree + to be rearranged. opt_expr may return a new root pointer there. + Return true if the tree contains side effects, false if not. */ + +static boolean +opt_expr (struct predicate **eval_treep) +{ + struct predlist regex_list={NULL,NULL}, name_list={NULL,NULL}; + struct predlist cbo_list[NumEvaluationCosts]; + int i; + struct predicate *curr; + struct predicate **prevp; /* Address of `curr' node. */ + struct predicate **last_sidep; /* Last predicate with side effects. */ + PRED_FUNC pred_func; + enum predicate_type p_type; + boolean has_side_effects = false; /* Return value. */ + enum predicate_precedence prev_prec, /* precedence of last BI_OP in branch */ + biop_prec; /* topmost BI_OP precedence in branch */ + + if (eval_treep == NULL || *eval_treep == NULL) + return (false); + + for (i=0; ipred_left != NULL) + { + prevp = &curr->pred_left; + prev_prec = curr->p_prec; /* must be a BI_OP */ + curr = curr->pred_left; + } + + /* Link in the appropriate BI_OP for the last expression, if needed. */ + if (curr->p_type != BI_OP) + set_new_parent (curr, prev_prec, prevp); + + if (options.debug_options & (DebugExpressionTree|DebugTreeOpt)) + { + /* Normalized tree. */ + fprintf (stderr, "Normalized Eval Tree:\n"); + print_tree (stderr, *eval_treep, 0); + } + + /* Rearrange the predicates. */ + prevp = eval_treep; + biop_prec = NO_PREC; /* not COMMA_PREC */ + if ((*prevp) && (*prevp)->p_type == BI_OP) + biop_prec = (*prevp)->p_prec; + while ((curr = *prevp) != NULL) + { + /* If there is a BI_OP of different precedence from the first + in the pred_left chain, create a new parent of the + original precedence, link the new parent to the left of the + previous and link CURR to the right of the new parent. + This preserves the precedence of expressions in the tree + in case we rearrange them. */ + if (curr->p_type == BI_OP) + { + if (curr->p_prec != biop_prec) + curr = set_new_parent(curr, biop_prec, prevp); + } + + /* See which predicate type we have. */ + p_type = curr->pred_right->p_type; + pred_func = curr->pred_right->pred_func; + + + switch (p_type) + { + case NO_TYPE: + case PRIMARY_TYPE: + /* Don't rearrange the arguments of the comma operator, it is + not commutative. */ + if (biop_prec == COMMA_PREC) + break; + + /* If this predicate has no side effects, consider reordering it. */ + if (!curr->pred_right->side_effects) + { + boolean reorder; + + /* If it's one of our special primaries, move it to the + front of the list for that primary. */ + if (predicate_is_cost_free(curr->pred_right)) + { + if (options.debug_options & DebugTreeOpt) + { + fprintf(stderr, "-O%d: promoting cheap predicate ", + (int)options.optimisation_level); + print_predicate(stderr, curr->pred_right); + fprintf(stderr, " into name_list\n"); + } + predlist_insert(&name_list, curr, prevp); + continue; + } + + if (pred_func == pred_regex) + { + predlist_insert(®ex_list, curr, prevp); + continue; + } + + reorder = ((options.optimisation_level > 1) + && (NeedsType == curr->pred_right->p_cost) + && !curr->pred_right->need_stat) || + (options.optimisation_level > 2); + + if (reorder) + { + if (options.debug_options & DebugTreeOpt) + { + fprintf(stderr, "-O%d: categorising predicate ", + (int)options.optimisation_level); + print_predicate(stderr, curr->pred_right); + fprintf(stderr, " by cost (%s)\n", + cost_name(curr->pred_right->p_cost)); + } + predlist_insert(&cbo_list[curr->pred_right->p_cost], curr, prevp); + continue; + } + } + + break; + + case UNI_OP: + /* For NOT, check the expression trees below the NOT. */ + curr->pred_right->side_effects + = opt_expr (&curr->pred_right->pred_right); + break; + + case BI_OP: + /* For nested AND or OR, recurse (AND/OR form layers on the left of + the tree), and continue scanning this level of AND or OR. */ + curr->pred_right->side_effects = opt_expr (&curr->pred_right); + break; + + /* At this point, get_expr and scan_rest have already removed + all of the user's parentheses. */ + + default: + error (1, 0, _("oops -- invalid expression type!")); + break; + } + + if (curr->pred_right->side_effects == true) + { + last_sidep = prevp; + + /* Incorporate lists and reset list pointers for this group. */ + merge_lists(cbo_list, NumEvaluationCosts, &name_list, ®ex_list, last_sidep); + has_side_effects = true; + } + + prevp = &curr->pred_left; + } + + /* Do final list merges. */ + last_sidep = prevp; + merge_lists(cbo_list, NumEvaluationCosts, &name_list, ®ex_list, last_sidep); + return has_side_effects; +} + +static float +constrain_rate(float rate) +{ + if (rate > 1.0f) + return 1.0; + else if (rate < 0.0) + return 0.0; + else + return rate; +} + +/* Link in a new parent BI_OP node for CURR, at *PREVP, with precedence + HIGH_PREC. */ + +static struct predicate * +set_new_parent (struct predicate *curr, enum predicate_precedence high_prec, struct predicate **prevp) +{ + struct predicate *new_parent; + + new_parent = (struct predicate *) xmalloc (sizeof (struct predicate)); + new_parent->p_type = BI_OP; + new_parent->p_prec = high_prec; + new_parent->need_stat = false; + new_parent->need_type = false; + new_parent->p_cost = NeedsNothing; + + switch (high_prec) + { + case COMMA_PREC: + new_parent->pred_func = pred_comma; + new_parent->p_name = ","; + new_parent->est_success_rate = 1.0; + break; + case OR_PREC: + new_parent->pred_func = pred_or; + new_parent->p_name = "-o"; + new_parent->est_success_rate = constrain_rate(curr->est_success_rate); + break; + case AND_PREC: + new_parent->pred_func = pred_and; + new_parent->p_name = "-a"; + new_parent->est_success_rate = constrain_rate(curr->est_success_rate); + break; + default: + ; /* empty */ + } + + new_parent->side_effects = false; + new_parent->no_default_print = false; + new_parent->args.str = NULL; + new_parent->pred_next = NULL; + + /* Link in new_parent. + Pushes rest of left branch down 1 level to new_parent->pred_right. */ + new_parent->pred_left = NULL; + new_parent->pred_right = curr; + *prevp = new_parent; + + return new_parent; +} + +/* Merge the predicate list that starts at BEG_LIST and ends at END_LIST + into the tree at LAST_P. */ + +static void +merge_pred (struct predicate *beg_list, struct predicate *end_list, struct predicate **last_p) +{ + end_list->pred_left = *last_p; + *last_p = beg_list; +} + +/* Find the first node in expression tree TREE that requires + a stat call and mark the operator above it as needing a stat + before calling the node. Since the expression precedences + are represented in the tree, some preds that need stat may not + get executed (because the expression value is determined earlier.) + So every expression needing stat must be marked as such, not just + the earliest, to be sure to obtain the stat. This still guarantees + that a stat is made as late as possible. Return true if the top node + in TREE requires a stat, false if not. */ + + +struct pred_cost_lookup +{ + PRED_FUNC fn; + enum EvaluationCost cost; +}; +static struct pred_cost_lookup costlookup[] = + { + { pred_amin , NeedsStatInfo }, + { pred_and , NeedsNothing, }, + { pred_anewer , NeedsStatInfo, }, + { pred_atime , NeedsStatInfo, }, + { pred_closeparen, NeedsNothing }, + { pred_cmin , NeedsStatInfo, }, + { pred_cnewer , NeedsStatInfo, }, + { pred_comma , NeedsNothing, }, + { pred_ctime , NeedsStatInfo, }, + { pred_delete , NeedsSyncDiskHit }, + { pred_empty , NeedsStatInfo }, + { pred_exec , NeedsEventualExec }, + { pred_execdir , NeedsEventualExec }, + { pred_executable, NeedsAccessInfo }, + { pred_false , NeedsNothing }, + { pred_fprint , NeedsNothing }, + { pred_fprint0 , NeedsNothing }, + { pred_fprintf , NeedsNothing }, + { pred_fstype , NeedsStatInfo }, /* true for amortised cost */ + { pred_gid , NeedsStatInfo }, + { pred_group , NeedsStatInfo }, + { pred_ilname , NeedsLinkName }, + { pred_iname , NeedsNothing }, + { pred_inum , NeedsStatInfo }, + { pred_ipath , NeedsNothing }, + { pred_links , NeedsStatInfo }, + { pred_lname , NeedsLinkName }, + { pred_ls , NeedsStatInfo }, + { pred_fls , NeedsStatInfo }, + { pred_mmin , NeedsStatInfo }, + { pred_mtime , NeedsStatInfo }, + { pred_name , NeedsNothing }, + { pred_negate , NeedsNothing, }, + { pred_newer , NeedsStatInfo, }, + { pred_newerXY , NeedsStatInfo, }, + { pred_nogroup , NeedsStatInfo }, /* true for amortised cost if caching is on */ + { pred_nouser , NeedsStatInfo }, /* true for amortised cost if caching is on */ + { pred_ok , NeedsUserInteraction }, + { pred_okdir , NeedsUserInteraction }, + { pred_openparen , NeedsNothing }, + { pred_or , NeedsNothing, }, + { pred_path , NeedsNothing }, + { pred_perm , NeedsStatInfo }, + { pred_print , NeedsNothing }, + { pred_print0 , NeedsNothing }, + { pred_prune , NeedsNothing }, + { pred_quit , NeedsNothing }, + { pred_readable , NeedsAccessInfo }, + { pred_regex , NeedsNothing }, + { pred_samefile , NeedsStatInfo }, + { pred_size , NeedsStatInfo }, + { pred_true , NeedsNothing }, + { pred_type , NeedsType }, + { pred_uid , NeedsStatInfo }, + { pred_used , NeedsStatInfo }, + { pred_user , NeedsStatInfo }, + { pred_writable , NeedsAccessInfo }, + { pred_xtype , NeedsType } /* roughly correct unless most files are symlinks */ + }; +static int pred_table_sorted = 0; + +static boolean +check_sorted(void *base, size_t members, size_t membersize, + int (*cmpfn)(const void*, const void*)) +{ + const char *p = base; + size_t i; + for (i=1u; ifn <= pl2->fn); + } + return true; +} + + +static int +cost_table_comparison(const void *p1, const void *p2) +{ + const struct pred_cost_lookup *pc1 = p1; + const struct pred_cost_lookup *pc2 = p2; + + + if (pc1->fn == pc2->fn) + return 0; + else if (pc1->fn > pc2->fn) + return 1; + else + return -1; +} + +static enum EvaluationCost +get_pred_cost(const struct predicate *p) +{ + enum EvaluationCost data_requirement_cost = NeedsNothing; + enum EvaluationCost inherent_cost = NeedsUnknown; + + if (p->need_stat) + { + data_requirement_cost = NeedsStatInfo; + } + else if (p->need_type) + { + data_requirement_cost = NeedsType; + } + else + { + data_requirement_cost = NeedsNothing; + } + + if (pred_is(p, pred_exec) || pred_is(p, pred_execdir)) + { + if (p->args.exec_vec.multiple) + inherent_cost = NeedsEventualExec; + else + inherent_cost = NeedsImmediateExec; + } + else if (pred_is(p, pred_fprintf)) + { + /* the parser calculated the cost for us. */ + inherent_cost = p->p_cost; + } + else + { + struct pred_cost_lookup key; + void *entry; + + if (!pred_table_sorted) + { + qsort(costlookup, + sizeof(costlookup)/sizeof(costlookup[0]), + sizeof(costlookup[0]), + cost_table_comparison); + + if (!check_sorted(costlookup, + sizeof(costlookup)/sizeof(costlookup[0]), + sizeof(costlookup[0]), + cost_table_comparison)) + { + error(1, 0, "Failed to sort the costlookup array."); + } + pred_table_sorted = 1; + } + key.fn = p->pred_func; + entry = bsearch(&key, costlookup, + sizeof(costlookup)/sizeof(costlookup[0]), + sizeof(costlookup[0]), + cost_table_comparison); + if (entry) + { + inherent_cost = ((const struct pred_cost_lookup*)entry)->cost; + } + else + { + error(0, 0, "warning: no cost entry for predicate %s", p->p_name); + inherent_cost = NeedsUnknown; + } + } + + if (inherent_cost > data_requirement_cost) + return inherent_cost; + else + return data_requirement_cost; +} + +static void +estimate_costs (struct predicate *tree) +{ + if (tree) + { + estimate_costs(tree->pred_right); + estimate_costs(tree->pred_left); + + tree->p_cost = get_pred_cost(tree); + } +} + +struct predicate* +get_eval_tree(void) +{ + return eval_tree; +} + +static float +getrate(const struct predicate *p) +{ + if (p) + return p->est_success_rate; + else + return 1.0f; +} + + +float +calculate_derived_rates(struct predicate *p) +{ + assert(NULL != p); + + if (p->pred_right) + calculate_derived_rates(p->pred_right); + if (p->pred_left) + calculate_derived_rates(p->pred_left); + + assert(p->p_type != CLOSE_PAREN); + assert(p->p_type != OPEN_PAREN); + + switch (p->p_type) + { + case NO_TYPE: + assert(NULL == p->pred_right); + assert(NULL == p->pred_left); + return p->est_success_rate; + + case PRIMARY_TYPE: + assert(NULL == p->pred_right); + assert(NULL == p->pred_left); + return p->est_success_rate; + + case UNI_OP: + /* Unary operators must have exactly one operand */ + assert(pred_is(p, pred_negate)); + assert(NULL == p->pred_left); + p->est_success_rate = (1.0 - p->pred_right->est_success_rate); + return p->est_success_rate; + + case BI_OP: + { + float rate; + /* Binary operators must have two operands */ + if (pred_is(p, pred_and)) + { + rate = getrate(p->pred_right) * getrate(p->pred_left); + } + else if (pred_is(p, pred_comma)) + { + rate = 1.0f; + } + else if (pred_is(p, pred_or)) + { + rate = getrate(p->pred_right) + getrate(p->pred_left); + } + else + { + /* only and, or and comma are BI_OP. */ + assert(0); + rate = 0.0f; + } + p->est_success_rate = constrain_rate(rate); + } + return p->est_success_rate; + + case OPEN_PAREN: + case CLOSE_PAREN: + p->est_success_rate = 1.0; + return p->est_success_rate; + } +} + +/* opt_expr() rearranges predicates such that each left subtree is + * rooted at a logical predicate (e.g. and or or). check_normalization() + * asserts that this property still holds. + * + */ +static void check_normalization(struct predicate *p, boolean at_root) +{ + if (at_root) + { + assert(BI_OP == p->p_type); + } + + if (p->pred_left) + { + assert(BI_OP == p->pred_left->p_type); + check_normalization(p->pred_left, false); + } + if (p->pred_right) + { + check_normalization(p->pred_right, false); + } +} + +struct predicate* +build_expression_tree(int argc, char *argv[], int end_of_leading_options) +{ + const struct parser_table *parse_entry; /* Pointer to the parsing table entry for this expression. */ + char *predicate_name; /* Name of predicate being parsed. */ + struct predicate *cur_pred; + const struct parser_table *entry_close, *entry_print, *entry_open; + int i, oldi; + + predicates = NULL; + + /* Find where in ARGV the predicates begin by skipping the list of + * start points. + */ + for (i = end_of_leading_options; i < argc && !looks_like_expression(argv[i], true); i++) + { + /* Do nothing. */ ; + } + + /* Enclose the expression in `( ... )' so a default -print will + apply to the whole expression. */ + entry_open = find_parser("("); + entry_close = find_parser(")"); + entry_print = find_parser("print"); + assert(entry_open != NULL); + assert(entry_close != NULL); + assert(entry_print != NULL); + + parse_openparen (entry_open, argv, &argc); + last_pred->p_name = "("; + predicates->artificial = true; + parse_begin_user_args(argv, argc, last_pred, predicates); + pred_sanity_check(last_pred); + + /* Build the input order list. */ + while (i < argc ) + { + if (!looks_like_expression(argv[i], false)) + { + error (0, 0, _("paths must precede expression: %s"), argv[i]); + usage(stderr, 1, NULL); + } + + predicate_name = argv[i]; + parse_entry = find_parser (predicate_name); + if (parse_entry == NULL) + { + /* Command line option not recognized */ + error (1, 0, _("unknown predicate `%s'"), predicate_name); + } + + /* We have recognised a test of the form -foo. Eat that, + * unless it is a predicate like -newerXY. + */ + if (parse_entry->type != ARG_SPECIAL_PARSE) + { + i++; + } + oldi = i; + if (!(*(parse_entry->parser_func)) (parse_entry, argv, &i)) + { + if (argv[i]) + { + if ( (ARG_SPECIAL_PARSE == parse_entry->type) && (i == oldi) ) + { + /* The special parse function spat out the + * predicate. It must be invalid, or not tasty. + */ + error (1, 0, _("invalid predicate `%s'"), + predicate_name); + } + else + { + error (1, 0, _("invalid argument `%s' to `%s'"), + argv[i], predicate_name); + } + } + else + { + /* Command line option requires an argument */ + error (1, 0, _("missing argument to `%s'"), predicate_name); + } + } + else + { + last_pred->p_name = predicate_name; + + /* If the parser consumed an argument, save it. */ + if (i != oldi) + last_pred->arg_text = argv[oldi]; + else + last_pred->arg_text = NULL; + } + pred_sanity_check(last_pred); + pred_sanity_check(predicates); /* XXX: expensive */ + } + parse_end_user_args(argv, argc, last_pred, predicates); + if (predicates->pred_next == NULL) + { + /* No predicates that do something other than set a global variable + were given; remove the unneeded initial `(' and add `-print'. */ + cur_pred = predicates; + predicates = last_pred = predicates->pred_next; + free ((char *) cur_pred); + parse_print (entry_print, argv, &argc); + last_pred->p_name = "-print"; + pred_sanity_check(last_pred); + pred_sanity_check(predicates); /* XXX: expensive */ + } + else if (!default_prints (predicates->pred_next)) + { + /* One or more predicates that produce output were given; + remove the unneeded initial `('. */ + cur_pred = predicates; + predicates = predicates->pred_next; + pred_sanity_check(predicates); /* XXX: expensive */ + free ((char *) cur_pred); + } + else + { + /* `( user-supplied-expression ) -print'. */ + parse_closeparen (entry_close, argv, &argc); + last_pred->p_name = ")"; + last_pred->artificial = true; + pred_sanity_check(last_pred); + parse_print (entry_print, argv, &argc); + last_pred->p_name = "-print"; + last_pred->artificial = true; + pred_sanity_check(last_pred); + pred_sanity_check(predicates); /* XXX: expensive */ + } + + if (options.debug_options & (DebugExpressionTree|DebugTreeOpt)) + { + fprintf (stderr, "Predicate List:\n"); + print_list (stderr, predicates); + } + + /* do a sanity check */ + pred_sanity_check(predicates); + + /* Done parsing the predicates. Build the evaluation tree. */ + cur_pred = predicates; + eval_tree = get_expr (&cur_pred, NO_PREC, NULL); + calculate_derived_rates(eval_tree); + + /* Check if we have any left-over predicates (this fixes + * Debian bug #185202). + */ + if (cur_pred != NULL) + { + /* cur_pred->p_name is often NULL here */ + if (pred_is(cur_pred, pred_closeparen)) + { + /* e.g. "find \( -true \) \)" */ + error (1, 0, _("you have too many ')'")); + } + else + { + if (cur_pred->p_name) + error (1, 0, _("unexpected extra predicate '%s'"), cur_pred->p_name); + else + error (1, 0, _("unexpected extra predicate")); + } + } + + if (options.debug_options & (DebugExpressionTree|DebugTreeOpt)) + { + fprintf (stderr, "Eval Tree:\n"); + print_tree (stderr, eval_tree, 0); + } + + estimate_costs(eval_tree); + + /* Rearrange the eval tree in optimal-predicate order. */ + opt_expr (&eval_tree); + + /* Check that the tree is in normalised order (opt_expr does this) */ + check_normalization(eval_tree, true); + + do_arm_swaps(eval_tree); + + /* Check that the tree is still in normalised order */ + check_normalization(eval_tree, true); + + if (options.debug_options & (DebugExpressionTree|DebugTreeOpt)) + { + fprintf (stderr, "Optimized Eval Tree:\n"); + print_tree (stderr, eval_tree, 0); + fprintf (stderr, "Optimized command line:\n"); + print_optlist(stderr, eval_tree); + fprintf(stderr, "\n"); + } + + return eval_tree; +} + +/* Initialise the performance data for a predicate. + */ +static void +init_pred_perf(struct predicate *pred) +{ + struct predicate_performance_info *p = &pred->perf; + p->visits = p->successes = 0; +} + + +/* Return a pointer to a new predicate structure, which has been + linked in as the last one in the predicates list. + + Set `predicates' to point to the start of the predicates list. + Set `last_pred' to point to the new last predicate in the list. + + Set all cells in the new structure to the default values. */ + +struct predicate * +get_new_pred (const struct parser_table *entry) +{ + register struct predicate *new_pred; + (void) entry; + + /* Options should not be turned into predicates. */ + assert(entry->type != ARG_OPTION); + assert(entry->type != ARG_POSITIONAL_OPTION); + + if (predicates == NULL) + { + predicates = (struct predicate *) + xmalloc (sizeof (struct predicate)); + last_pred = predicates; + } + else + { + new_pred = (struct predicate *) xmalloc (sizeof (struct predicate)); + last_pred->pred_next = new_pred; + last_pred = new_pred; + } + last_pred->parser_entry = entry; + last_pred->pred_func = NULL; + last_pred->p_name = NULL; + last_pred->p_type = NO_TYPE; + last_pred->p_prec = NO_PREC; + last_pred->side_effects = false; + last_pred->no_default_print = false; + last_pred->need_stat = true; + last_pred->need_type = true; + last_pred->args.str = NULL; + last_pred->pred_next = NULL; + last_pred->pred_left = NULL; + last_pred->pred_right = NULL; + last_pred->literal_control_chars = options.literal_control_chars; + last_pred->artificial = false; + last_pred->est_success_rate = 1.0; + init_pred_perf(last_pred); + return last_pred; +} + +/* Return a pointer to a new predicate, with operator check. + Like get_new_pred, but it checks to make sure that the previous + predicate is an operator. If it isn't, the AND operator is inserted. */ + +struct predicate * +get_new_pred_chk_op (const struct parser_table *entry) +{ + struct predicate *new_pred; + static const struct parser_table *entry_and = NULL; + + /* Locate the entry in the parser table for the "and" operator */ + if (NULL == entry_and) + entry_and = find_parser("and"); + + /* Check that it's actually there. If not, that is a bug.*/ + assert(entry_and != NULL); + + if (last_pred) + switch (last_pred->p_type) + { + case NO_TYPE: + error (1, 0, _("oops -- invalid default insertion of and!")); + break; + + case PRIMARY_TYPE: + case CLOSE_PAREN: + /* We need to interpose the and operator. */ + new_pred = get_new_pred (entry_and); + new_pred->pred_func = pred_and; + new_pred->p_name = "-a"; + new_pred->p_type = BI_OP; + new_pred->p_prec = AND_PREC; + new_pred->need_stat = false; + new_pred->need_type = false; + new_pred->args.str = NULL; + new_pred->side_effects = false; + new_pred->no_default_print = false; + break; + + default: + break; + } + + new_pred = get_new_pred (entry); + new_pred->parser_entry = entry; + return new_pred; +} + +struct cost_assoc +{ + enum EvaluationCost cost; + char *name; +}; +struct cost_assoc cost_table[] = + { + { NeedsNothing, "Nothing" }, + { NeedsType, "Type" }, + { NeedsStatInfo, "StatInfo" }, + { NeedsLinkName, "LinkName" }, + { NeedsAccessInfo, "AccessInfo" }, + { NeedsSyncDiskHit, "SyncDiskHit" }, + { NeedsEventualExec, "EventualExec" }, + { NeedsImmediateExec, "ImmediateExec" }, + { NeedsUserInteraction, "UserInteraction" }, + { NeedsUnknown, "Unknown" } + }; + +struct prec_assoc +{ + short prec; + char *prec_name; +}; + +static struct prec_assoc prec_table[] = +{ + {NO_PREC, "no"}, + {COMMA_PREC, "comma"}, + {OR_PREC, "or"}, + {AND_PREC, "and"}, + {NEGATE_PREC, "negate"}, + {MAX_PREC, "max"}, + {-1, "unknown "} +}; + +struct op_assoc +{ + short type; + char *type_name; +}; + +static struct op_assoc type_table[] = +{ + {NO_TYPE, "no"}, + {PRIMARY_TYPE, "primary"}, + {UNI_OP, "uni_op"}, + {BI_OP, "bi_op"}, + {OPEN_PAREN, "open_paren "}, + {CLOSE_PAREN, "close_paren "}, + {-1, "unknown"} +}; + +static const char * +cost_name (enum EvaluationCost cost) +{ + unsigned int i; + unsigned int n = sizeof(cost_table)/sizeof(cost_table[0]); + + for (i = 0; ip_type), prec_name (node->p_prec)); + fprintf (fp, " cost=%s rate=%#03.2g %sside effects ", + cost_name(node->p_cost), + node->est_success_rate, + (node->side_effects ? "" : "no ")); + + if (node->need_stat || node->need_type) + { + int comma = 0; + + fprintf (fp, "Needs "); + if (node->need_stat) + { + fprintf (fp, "stat"); + comma = 1; + } + if (node->need_type) + { + fprintf (fp, "%stype", comma ? "," : ""); + } + } + fprintf (fp, "\n"); + + + for (i = 0; i < indent; i++) + fprintf (fp, " "); + if (NULL == node->pred_left && NULL == node->pred_right) + { + fprintf (fp, "no children.\n"); + } + else + { + if (node->pred_left) + { + fprintf (fp, "left:\n"); + print_tree (fp, node->pred_left, indent + 1); + } + else + { + fprintf (fp, "no left.\n"); + } + + for (i = 0; i < indent; i++) + fprintf (fp, " "); + if (node->pred_right) + { + fprintf (fp, "right:\n"); + print_tree (fp, node->pred_right, indent + 1); + } + else + { + fprintf (fp, "no right.\n"); + } + } +} diff --git a/find/util.c b/find/util.c new file mode 100644 index 0000000..9150d23 --- /dev/null +++ b/find/util.c @@ -0,0 +1,1033 @@ +/* util.c -- functions for initializing new tree elements, and other things. + Copyright (C) 1990, 91, 92, 93, 94, 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. +*/ + +#include +#include "defs.h" + +#ifdef HAVE_FCNTL_H +#include +#else +#include +#endif +#ifdef HAVE_SYS_UTSNAME_H +#include +#endif +#include +#include +#include +#include +#include +#include + +#include "xalloc.h" +#include "quotearg.h" +#include "timespec.h" +#include "error.h" +#include "verify.h" +#include "openat.h" + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + + +struct debug_option_assoc +{ + char *name; + int val; + char *docstring; +}; +static struct debug_option_assoc debugassoc[] = + { + { "help", DebugHelp, "Explain the various -D options" }, + { "tree", DebugExpressionTree, "Display the expression tree" }, + { "search",DebugSearch, "Navigate the directory tree verbosely" }, + { "stat", DebugStat, "Trace calls to stat(2) and lstat(2)" }, + { "rates", DebugSuccessRates, "Indicate how often each predicate succeeded" }, + { "opt", DebugExpressionTree|DebugTreeOpt, "Show diagnostic information relating to optimisation" }, + { "exec", DebugExec, "Show diagnostic information relating to -exec, -execdir, -ok and -okdir" } + }; +#define N_DEBUGASSOC (sizeof(debugassoc)/sizeof(debugassoc[0])) + + + + +/* Add a primary of predicate type PRED_FUNC (described by ENTRY) to the predicate input list. + + Return a pointer to the predicate node just inserted. + + Fills in the following cells of the new predicate node: + + pred_func PRED_FUNC + args(.str) NULL + p_type PRIMARY_TYPE + p_prec NO_PREC + + Other cells that need to be filled in are defaulted by + get_new_pred_chk_op, which is used to insure that the prior node is + either not there at all (we are the very first node) or is an + operator. */ + +struct predicate * +insert_primary_withpred (const struct parser_table *entry, PRED_FUNC pred_func) +{ + struct predicate *new_pred; + + new_pred = get_new_pred_chk_op (entry); + new_pred->pred_func = pred_func; + new_pred->p_name = entry->parser_name; + new_pred->args.str = NULL; + new_pred->p_type = PRIMARY_TYPE; + new_pred->p_prec = NO_PREC; + return new_pred; +} + +/* Add a primary described by ENTRY to the predicate input list. + + Return a pointer to the predicate node just inserted. + + Fills in the following cells of the new predicate node: + + pred_func PRED_FUNC + args(.str) NULL + p_type PRIMARY_TYPE + p_prec NO_PREC + + Other cells that need to be filled in are defaulted by + get_new_pred_chk_op, which is used to insure that the prior node is + either not there at all (we are the very first node) or is an + operator. */ +struct predicate * +insert_primary (const struct parser_table *entry) +{ + assert(entry->pred_func != NULL); + return insert_primary_withpred(entry, entry->pred_func); +} + + + +static void +show_valid_debug_options(FILE *fp, int full) +{ + int i; + if (full) + { + fprintf(fp, "Valid arguments for -D:\n"); + for (i=0; i0 ? "|" : ""), debugassoc[i].name); + } + } +} + +void +usage (FILE *fp, int status, char *msg) +{ + if (msg) + fprintf (fp, "%s: %s\n", program_name, msg); + + fprintf (fp, _("Usage: %s [-H] [-L] [-P] [-Olevel] [-D "), program_name); + show_valid_debug_options(fp, 0); + fprintf (fp, _("] [path...] [expression]\n")); + if (0 != status) + exit (status); +} + +void +set_stat_placeholders(struct stat *p) +{ +#if HAVE_STRUCT_STAT_ST_BIRTHTIME + p->st_birthtime = 0; +#endif +#if HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + p->st_birthtimensec = 0; +#endif +#if HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + p->st_birthtimespec.tv_nsec = -1; +#endif +#if HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_SEC + p->st_birthtimespec.tv_sec = 0; +#endif +} + + +/* Get the stat information for a file, if it is + * not already known. + */ +int +get_statinfo (const char *pathname, const char *name, struct stat *p) +{ + /* Set markers in fields so we have a good idea if the implementation + * didn't bother to set them (e.g., NetBSD st_birthtimespec for MS-DOS + * files) + */ + if (!state.have_stat) + { + set_stat_placeholders(p); + if (0 == (*options.xstat) (name, p)) + { + if (00000 == p->st_mode) + { + /* Savannah bug #16378. */ + error(0, 0, _("Warning: file %s appears to have mode 0000"), + quotearg_n_style(0, options.err_quoting_style, name)); + } + } + else + { + if (!options.ignore_readdir_race || (errno != ENOENT) ) + { + error (0, errno, "%s", + safely_quote_err_filename(0, pathname)); + state.exit_status = 1; + } + return -1; + } + } + state.have_stat = true; + state.have_type = true; + state.type = p->st_mode; + + return 0; +} + + +/* Get the stat/type information for a file, if it is + * not already known. + */ +int +get_info (const char *pathname, + struct stat *p, + struct predicate *pred_ptr) +{ + boolean todo = false; + + /* If we need the full stat info, or we need the type info but don't + * already have it, stat the file now. + */ + if (pred_ptr->need_stat) + todo = true; + else if ((pred_ptr->need_type && (0 == state.have_type))) + todo = true; + + if (todo) + return get_statinfo(pathname, state.rel_pathname, p); + else + return 0; +} + +/* Determine if we can use O_NOFOLLOW. + */ +#if defined(O_NOFOLLOW) +boolean +check_nofollow(void) +{ + struct utsname uts; + float release; + + if (0 == O_NOFOLLOW) + { + return false; + } + + if (0 == uname(&uts)) + { + /* POSIX requires that atof() ignore "unrecognised suffixes". */ + release = atof(uts.release); + + if (0 == strcmp("Linux", uts.sysname)) + { + /* Linux kernels 2.1.126 and earlier ignore the O_NOFOLLOW flag. */ + return release >= 2.2; /* close enough */ + } + else if (0 == strcmp("FreeBSD", uts.sysname)) + { + /* FreeBSD 3.0-CURRENT and later support it */ + return release >= 3.1; + } + } + + /* Well, O_NOFOLLOW was defined, so we'll try to use it. */ + return true; +} +#endif + + + +/* Examine the predicate list for instances of -execdir or -okdir + * which have been terminated with '+' (build argument list) rather + * than ';' (singles only). If there are any, run them (this will + * have no effect if there are no arguments waiting). + */ +static void +do_complete_pending_execdirs(struct predicate *p, int dirfd) +{ + if (NULL == p) + return; + + assert(state.execdirs_outstanding); + + do_complete_pending_execdirs(p->pred_left, dirfd); + + if (pred_is(p, pred_execdir) || pred_is(p, pred_okdir)) + { + /* It's an exec-family predicate. p->args.exec_val is valid. */ + if (p->args.exec_vec.multiple) + { + struct exec_val *execp = &p->args.exec_vec; + + /* This one was terminated by '+' and so might have some + * left... Run it if necessary. + */ + if (execp->state.todo) + { + /* There are not-yet-executed arguments. */ + launch (&execp->ctl, &execp->state); + } + } + } + + do_complete_pending_execdirs(p->pred_right, dirfd); +} + +void +complete_pending_execdirs(int dirfd) +{ + if (state.execdirs_outstanding) + { + do_complete_pending_execdirs(get_eval_tree(), dirfd); + state.execdirs_outstanding = false; + } +} + + + +/* Examine the predicate list for instances of -exec which have been + * terminated with '+' (build argument list) rather than ';' (singles + * only). If there are any, run them (this will have no effect if + * there are no arguments waiting). + */ +void +complete_pending_execs(struct predicate *p) +{ + if (NULL == p) + return; + + complete_pending_execs(p->pred_left); + + /* It's an exec-family predicate then p->args.exec_val is valid + * and we can check it. + */ + /* XXX: what about pred_ok() ? */ + if (pred_is(p, pred_exec) && p->args.exec_vec.multiple) + { + struct exec_val *execp = &p->args.exec_vec; + + /* This one was terminated by '+' and so might have some + * left... Run it if necessary. Set state.exit_status if + * there are any problems. + */ + if (execp->state.todo) + { + /* There are not-yet-executed arguments. */ + launch (&execp->ctl, &execp->state); + } + } + + complete_pending_execs(p->pred_right); +} + +static void +traverse_tree(struct predicate *tree, + void (*callback)(struct predicate*)) +{ + if (tree->pred_left) + traverse_tree(tree->pred_left, callback); + + callback(tree); + + if (tree->pred_right) + traverse_tree(tree->pred_right, callback); +} + +static void +flush_and_close_output_files(struct predicate *p) +{ + if (pred_is(p, pred_fprint) + || pred_is(p, pred_fprintf) + || pred_is(p, pred_fls) + || pred_is(p, pred_fprint0)) + { + FILE *f = p->args.printf_vec.stream; + bool failed; + + if (f == stdout || f == stderr) + failed = fflush(p->args.printf_vec.stream) == EOF; + else + failed = fclose(p->args.printf_vec.stream) == EOF; + + if (failed) + nonfatal_file_error(p->args.printf_vec.filename); + } + else if (pred_is(p, pred_print)) + { + if (fflush(p->args.printf_vec.stream) == EOF) + { + nonfatal_file_error(p->args.printf_vec.filename); + } + } + else if (pred_is(p, pred_ls) || pred_is(p, pred_print0)) + { + if (fflush(stdout) == EOF) + { + /* XXX: migrate to printf_vec. */ + nonfatal_file_error("standard output"); + } + } +} + +/* Complete any outstanding commands. + */ +void +cleanup(void) +{ + struct predicate *eval_tree = get_eval_tree(); + if (eval_tree) + { + traverse_tree(eval_tree, complete_pending_execs); + complete_pending_execdirs(get_current_dirfd()); + traverse_tree(eval_tree, flush_and_close_output_files); + } +} + +/* Savannah bug #16378 manifests as an assertion failure in pred_type() + * when an NFS server returns st_mode with value 0 (of course the stat(2) + * system call is itself returning 0 in this case). + */ +#undef DEBUG_SV_BUG_16378 +#if defined(DEBUG_SV_BUG_16378) +static int hook_fstatat(int fd, const char *name, struct stat *p, int flags) +{ + static int warned = 0; + + if (!warned) + { + /* No use of _() here; no point asking translators to translate a debug msg */ + error(0, 0, + "Warning: some debug code is enabled for Savannah bug #16378; " + "this should not occur in released versions of findutils!"); + warned = 1; + } + + if (0 == strcmp(name, "./mode0file") + || 0 == strcmp(name, "mode0file")) + { + time_t now = time(NULL); + long day = 86400; + + p->st_rdev = 0; + p->st_dev = 0x300; + p->st_ino = 0; + p->st_mode = 0; /* SV bug #16378 */ + p->st_nlink = 1; + p->st_uid = geteuid(); + p->st_gid = 0; + p->st_size = 42; + p->st_blksize = 32768; + p->st_atime = now-1*day; + p->st_mtime = now-2*day; + p->st_ctime = now-3*day; + + return 0; + } + return fstatat(fd, name, p, flags); +} + +# undef fstatat +# define fstatat(fd,name,p,flags) hook_fstatat((fd),(name),(p),(flags)) +#endif + + +static int +fallback_stat(const char *name, struct stat *p, int prev_rv) +{ + /* Our original stat() call failed. Perhaps we can't follow a + * symbolic link. If that might be the problem, lstat() the link. + * Otherwise, admit defeat. + */ + switch (errno) + { + case ENOENT: + case ENOTDIR: + if (options.debug_options & DebugStat) + fprintf(stderr, "fallback_stat(): stat(%s) failed; falling back on lstat()\n", name); + return fstatat(state.cwd_dir_fd, name, p, AT_SYMLINK_NOFOLLOW); + + case EACCES: + case EIO: + case ELOOP: + case ENAMETOOLONG: +#ifdef EOVERFLOW + case EOVERFLOW: /* EOVERFLOW is not #defined on UNICOS. */ +#endif + default: + return prev_rv; + } +} + + +/* optionh_stat() implements the stat operation when the -H option is + * in effect. + * + * If the item to be examined is a command-line argument, we follow + * symbolic links. If the stat() call fails on the command-line item, + * we fall back on the properties of the symbolic link. + * + * If the item to be examined is not a command-line argument, we + * examine the link itself. + */ +int +optionh_stat(const char *name, struct stat *p) +{ + if (AT_FDCWD != state.cwd_dir_fd) + assert(state.cwd_dir_fd >= 0); + set_stat_placeholders(p); + if (0 == state.curdepth) + { + /* This file is from the command line; deference the link (if it + * is a link). + */ + int rv; + rv = fstatat(state.cwd_dir_fd, name, p, 0); + if (0 == rv) + return 0; /* success */ + else + return fallback_stat(name, p, rv); + } + else + { + /* Not a file on the command line; do not dereference the link. + */ + return fstatat(state.cwd_dir_fd, name, p, AT_SYMLINK_NOFOLLOW); + } +} + +/* optionl_stat() implements the stat operation when the -L option is + * in effect. That option makes us examine the thing the symbolic + * link points to, not the symbolic link itself. + */ +int +optionl_stat(const char *name, struct stat *p) +{ + int rv; + if (AT_FDCWD != state.cwd_dir_fd) + assert(state.cwd_dir_fd >= 0); + + set_stat_placeholders(p); + rv = fstatat(state.cwd_dir_fd, name, p, 0); + if (0 == rv) + return 0; /* normal case. */ + else + return fallback_stat(name, p, rv); +} + +/* optionp_stat() implements the stat operation when the -P option is + * in effect (this is also the default). That option makes us examine + * the symbolic link itself, not the thing it points to. + */ +int +optionp_stat(const char *name, struct stat *p) +{ + assert((state.cwd_dir_fd >= 0) || (state.cwd_dir_fd==AT_FDCWD)); + set_stat_placeholders(p); + return fstatat(state.cwd_dir_fd, name, p, AT_SYMLINK_NOFOLLOW); +} + + +static uintmax_t stat_count = 0u; + +int +debug_stat (const char *file, struct stat *bufp) +{ + ++stat_count; + fprintf (stderr, "debug_stat (%s)\n", file); + + switch (options.symlink_handling) + { + case SYMLINK_ALWAYS_DEREF: + return optionl_stat(file, bufp); + case SYMLINK_DEREF_ARGSONLY: + return optionh_stat(file, bufp); + case SYMLINK_NEVER_DEREF: + return optionp_stat(file, bufp); + } + /*NOTREACHED*/ + assert(false); + return -1; +} + + +int +following_links(void) +{ + switch (options.symlink_handling) + { + case SYMLINK_ALWAYS_DEREF: + return 1; + case SYMLINK_DEREF_ARGSONLY: + return (state.curdepth == 0); + case SYMLINK_NEVER_DEREF: + default: + return 0; + } +} + + +/* Take a "mode" indicator and fill in the files of 'state'. + */ +int +digest_mode(mode_t mode, + const char *pathname, + const char *name, + struct stat *pstat, + boolean leaf) +{ + /* If we know the type of the directory entry, and it is not a + * symbolic link, we may be able to avoid a stat() or lstat() call. + */ + if (mode) + { + if (S_ISLNK(mode) && following_links()) + { + /* mode is wrong because we should have followed the symlink. */ + if (get_statinfo(pathname, name, pstat) != 0) + return 0; + mode = state.type = pstat->st_mode; + state.have_type = true; + } + else + { + state.have_type = true; + pstat->st_mode = state.type = mode; + } + } + else + { + /* Mode is not yet known; may have to stat the file unless we + * can deduce that it is not a directory (which is all we need to + * know at this stage) + */ + if (leaf) + { + state.have_stat = false; + state.have_type = false;; + state.type = 0; + } + else + { + if (get_statinfo(pathname, name, pstat) != 0) + return 0; + + /* If -L is in effect and we are dealing with a symlink, + * st_mode is the mode of the pointed-to file, while mode is + * the mode of the directory entry (S_IFLNK). Hence now + * that we have the stat information, override "mode". + */ + state.type = pstat->st_mode; + state.have_type = true; + } + } + + /* success. */ + return 1; +} + + +/* Return true if there are no predicates with no_default_print in + predicate list PRED, false if there are any. + Returns true if default print should be performed */ + +boolean +default_prints (struct predicate *pred) +{ + while (pred != NULL) + { + if (pred->no_default_print) + return (false); + pred = pred->pred_next; + } + return (true); +} + +boolean +looks_like_expression(const char *arg, boolean leading) +{ + switch (arg[0]) + { + case '-': + if (arg[1]) /* "-foo" is an expression. */ + return true; + else + return false; /* Just "-" is a filename. */ + break; + + case ')': + case ',': + if (arg[1]) + return false; /* )x and ,z are not expressions */ + else + return !leading; /* A leading ) or , is not either */ + + /* ( and ! are part of an expression, but (2 and !foo are + * filenames. + */ + case '!': + case '(': + if (arg[1]) + return false; + else + return true; + + default: + return false; + } +} + +static void +process_debug_options(char *arg) +{ + const char *p; + char *token_context = NULL; + const char delimiters[] = ","; + boolean empty = true; + size_t i; + + p = strtok_r(arg, delimiters, &token_context); + while (p) + { + empty = false; + + for (i=0; i= N_DEBUGASSOC) + { + error(0, 0, _("Ignoring unrecognised debug flag %s"), + quotearg_n_style(0, options.err_quoting_style, arg)); + } + p = strtok_r(NULL, delimiters, &token_context); + } + if (empty) + { + error(1, 0, _("Empty argument to the -D option.")); + } + else if (options.debug_options & DebugHelp) + { + show_valid_debug_options(stdout, 1); + exit(0); + } +} + +static void +process_optimisation_option(const char *arg) +{ + if (0 == arg[0]) + { + error(1, 0, _("The -O option must be immediately followed by a decimal integer")); + } + else + { + unsigned long opt_level; + char *end; + + if (!isdigit( (unsigned char) arg[0] )) + { + error(1, 0, _("Please specify a decimal number immediately after -O")); + } + else + { + int prev_errno = errno; + errno = 0; + + opt_level = strtoul(arg, &end, 10); + if ( (0==opt_level) && (end==arg) ) + { + error(1, 0, _("Please specify a decimal number immediately after -O")); + } + else if (*end) + { + /* unwanted trailing characters. */ + error(1, 0, _("Invalid optimisation level %s"), arg); + } + else if ( (ULONG_MAX==opt_level) && errno) + { + error(1, errno, _("Invalid optimisation level %s"), arg); + } + else if (opt_level > USHRT_MAX) + { + /* tricky to test, as on some platforms USHORT_MAX and ULONG_MAX + * can have the same value, though this is unusual. + */ + error(1, 0, _("Optimisation level %lu is too high. " + "If you want to find files very quickly, " + "consider using GNU locate."), + opt_level); + } + else + { + options.optimisation_level = opt_level; + errno = prev_errno; + } + } + } +} + +int +process_leading_options(int argc, char *argv[]) +{ + int i, end_of_leading_options; + + for (i=1; (end_of_leading_options = i) < argc; ++i) + { + if (0 == strcmp("-H", argv[i])) + { + /* Meaning: dereference symbolic links on command line, but nowhere else. */ + set_follow_state(SYMLINK_DEREF_ARGSONLY); + } + else if (0 == strcmp("-L", argv[i])) + { + /* Meaning: dereference all symbolic links. */ + set_follow_state(SYMLINK_ALWAYS_DEREF); + } + else if (0 == strcmp("-P", argv[i])) + { + /* Meaning: never dereference symbolic links (default). */ + set_follow_state(SYMLINK_NEVER_DEREF); + } + else if (0 == strcmp("--", argv[i])) + { + /* -- signifies the end of options. */ + end_of_leading_options = i+1; /* Next time start with the next option */ + break; + } + else if (0 == strcmp("-D", argv[i])) + { + process_debug_options(argv[i+1]); + ++i; /* skip the argument too. */ + } + else if (0 == strncmp("-O", argv[i], 2)) + { + process_optimisation_option(argv[i]+2); + } + else + { + /* Hmm, must be one of + * (a) A path name + * (b) A predicate + */ + end_of_leading_options = i; /* Next time start with this option */ + break; + } + } + return end_of_leading_options; +} + +static struct timespec +now(void) +{ + struct timespec retval; + struct timeval tv; + time_t t; + + if (0 == gettimeofday(&tv, NULL)) + { + retval.tv_sec = tv.tv_sec; + retval.tv_nsec = tv.tv_usec * 1000; /* convert unit from microseconds to nanoseconds */ + return retval; + } + t = time(NULL); + assert(t != (time_t)-1); + retval.tv_sec = t; + retval.tv_nsec = 0; + return retval; +} + +void +set_option_defaults(struct options *p) +{ + /* We call check_nofollow() before setlocale() because the numbers + * for which we check (in the results of uname) definitiely have "." + * as the decimal point indicator even under locales for which that + * is not normally true. Hence atof() would do the wrong thing + * if we call it after setlocale(). + */ +#ifdef O_NOFOLLOW + p->open_nofollow_available = check_nofollow(); +#else + p->open_nofollow_available = false; +#endif + + p->regex_options = RE_SYNTAX_EMACS; + + if (isatty(0)) + { + p->warnings = true; + p->literal_control_chars = false; + } + else + { + p->warnings = false; + p->literal_control_chars = false; /* may change */ + } + + + p->do_dir_first = true; + p->maxdepth = p->mindepth = -1; + p->start_time = now(); + p->cur_day_start = p->start_time.tv_sec - DAYSECS; + p->full_days = false; + p->stay_on_filesystem = false; + p->ignore_readdir_race = false; + + if (getenv("POSIXLY_CORRECT")) + p->output_block_size = 512; + else + p->output_block_size = 1024; + + p->debug_options = 0uL; + p->optimisation_level = 0; + + if (getenv("FIND_BLOCK_SIZE")) + { + error (1, 0, _("The environment variable FIND_BLOCK_SIZE is not supported, the only thing that affects the block size is the POSIXLY_CORRECT environment variable")); + } + +#if LEAF_OPTIMISATION + /* The leaf optimisation is enabled. */ + p->no_leaf_check = false; +#else + /* The leaf optimisation is disabled. */ + p->no_leaf_check = true; +#endif + + set_follow_state(SYMLINK_NEVER_DEREF); /* The default is equivalent to -P. */ + + p->err_quoting_style = locale_quoting_style; +} + + +/* get_start_dirfd + * + * Returns the fd for the directory we started in. + */ +int get_start_dirfd(void) +{ + return starting_desc; +} + +/* apply_predicate + * + */ +boolean +apply_predicate(const char *pathname, struct stat *stat_buf, struct predicate *p) +{ + ++p->perf.visits; + + if (p->need_stat || p->need_type) + { + /* We may need a stat here. */ + if (get_info(pathname, stat_buf, p) != 0) + return false; + } + if ((p->pred_func)(pathname, stat_buf, p)) + { + ++(p->perf.successes); + return true; + } + else + { + return false; + } +} + + +/* safely_quote_err_filename + * + */ +const char * +safely_quote_err_filename (int n, char const *arg) +{ + return quotearg_n_style (n, options.err_quoting_style, arg); +} + +/* report_file_err + */ +static void +report_file_err(int exitval, int errno_value, const char *name) +{ + /* It is important that the errno value is passed in as a function + * argument before we call safely_quote_err_filename(), because otherwise + * we might find that safely_quote_err_filename() changes errno. + */ + if (state.exit_status < 1) + state.exit_status = 1; + + error (exitval, errno_value, "%s", safely_quote_err_filename(0, name)); +} + +/* fatal_file_error + * + */ +void +fatal_file_error(const char *name) +{ + report_file_err(1, errno, name); + /*NOTREACHED*/ + abort(); +} + +void +nonfatal_file_error(const char *name) +{ + report_file_err(0, errno, name); +} + diff --git a/find/version.c b/find/version.c new file mode 100644 index 0000000..c833c5b --- /dev/null +++ b/find/version.c @@ -0,0 +1,3 @@ +#include +char *version_string = VERSION; + diff --git a/gnulib/Makefile.am b/gnulib/Makefile.am new file mode 100644 index 0000000..eb3beb7 --- /dev/null +++ b/gnulib/Makefile.am @@ -0,0 +1,11 @@ +# Copyright (C) 2004 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 Automake, under +# the same distribution terms as the rest of that program. +# +# This file was generated by import-gnulib.sh gnulib-cvs/gnulib. +# +SUBDIRS = lib diff --git a/gnulib/Makefile.in b/gnulib/Makefile.in new file mode 100644 index 0000000..6215313 --- /dev/null +++ b/gnulib/Makefile.in @@ -0,0 +1,782 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = gnulib +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Copyright (C) 2004 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 Automake, under +# the same distribution terms as the rest of that program. +# +# This file was generated by import-gnulib.sh gnulib-cvs/gnulib. +# +SUBDIRS = lib +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(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 gnulib/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits gnulib/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(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) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic ctags \ + ctags-recursive distclean distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am + +# 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/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am new file mode 100644 index 0000000..b4c405a --- /dev/null +++ b/gnulib/lib/Makefile.am @@ -0,0 +1,1414 @@ +## DO NOT EDIT! GENERATED AUTOMATICALLY! +## Process this file with automake to produce Makefile.in. +# Copyright (C) 2004-2007 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=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl alloca argmatch c-strstr canonicalize closeout dirname error fchdir fileblocks filemode fnmatch-gnu fopen-safer fts getdate getline getopt gettext human idcache inline lstat malloc mbscasestr mbsstr memcmp memset mktime modechange mountlist pathmax quotearg realloc regex rpmatch savedir stat-macros stat-time stpcpy strdup strftime strtol strtoul strtoull strtoumax sys_stat timespec verify wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno + +AUTOMAKE_OPTIONS = 1.5 gnits + +noinst_HEADERS = +noinst_LIBRARIES = +noinst_LTLIBRARIES = +EXTRA_DIST = +BUILT_SOURCES = +SUFFIXES = +MOSTLYCLEANFILES = core *.stackdump +MOSTLYCLEANDIRS = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = + +AM_CPPFLAGS = + +noinst_LIBRARIES += libgnulib.a + +libgnulib_a_SOURCES = +libgnulib_a_LIBADD = $(gl_LIBOBJS) +libgnulib_a_DEPENDENCIES = $(gl_LIBOBJS) +EXTRA_libgnulib_a_SOURCES = + +## begin gnulib module absolute-header + +# Use this preprocessor expression to decide whether #include_next works. +# Do not rely on a 'configure'-time test for this, since the expression +# might appear in an installed header, which is used by some other compiler. +HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) + +## end gnulib module absolute-header + +## begin gnulib module alloca + + +EXTRA_DIST += alloca.c + +EXTRA_libgnulib_a_SOURCES += alloca.c + +libgnulib_a_LIBADD += @ALLOCA@ +libgnulib_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_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/alloca_.h; \ + } > $@-t + mv -f $@-t $@ +MOSTLYCLEANFILES += alloca.h alloca.h-t + +EXTRA_DIST += alloca_.h + +## end gnulib module alloca-opt + +## begin gnulib module allocsa + +libgnulib_a_SOURCES += allocsa.h allocsa.c + +EXTRA_DIST += allocsa.valgrind + +## end gnulib module allocsa + +## begin gnulib module argmatch + + +EXTRA_DIST += argmatch.c argmatch.h + +EXTRA_libgnulib_a_SOURCES += argmatch.c + +## end gnulib module argmatch + +## begin gnulib module c-strstr + +libgnulib_a_SOURCES += c-strstr.h c-strstr.c + +## end gnulib module c-strstr + +## begin gnulib module canonicalize + + +EXTRA_DIST += canonicalize.c canonicalize.h pathmax.h + +EXTRA_libgnulib_a_SOURCES += canonicalize.c + +## end gnulib module canonicalize + +## begin gnulib module canonicalize-lgpl + + +EXTRA_DIST += canonicalize-lgpl.c canonicalize.h + +EXTRA_libgnulib_a_SOURCES += canonicalize-lgpl.c + +## end gnulib module canonicalize-lgpl + +## begin gnulib module chdir-long + + +EXTRA_DIST += chdir-long.c chdir-long.h + +EXTRA_libgnulib_a_SOURCES += chdir-long.c + +## end gnulib module chdir-long + +## begin gnulib module chown + + +EXTRA_DIST += chown.c fchown-stub.c + +EXTRA_libgnulib_a_SOURCES += chown.c fchown-stub.c + +## end gnulib module chown + +## begin gnulib module close-stream + + +EXTRA_DIST += close-stream.c close-stream.h + +EXTRA_libgnulib_a_SOURCES += close-stream.c + +## end gnulib module close-stream + +## begin gnulib module closeout + + +EXTRA_DIST += closeout.c closeout.h + +EXTRA_libgnulib_a_SOURCES += closeout.c + +## end gnulib module closeout + +## 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 cycle-check + + +EXTRA_DIST += cycle-check.c cycle-check.h + +EXTRA_libgnulib_a_SOURCES += cycle-check.c + +## end gnulib module cycle-check + +## begin gnulib module dev-ino + + +EXTRA_DIST += dev-ino.h + +## end gnulib module dev-ino + +## begin gnulib module dirfd + + +EXTRA_DIST += dirfd.c dirfd.h + +EXTRA_libgnulib_a_SOURCES += dirfd.c + +## end gnulib module dirfd + +## begin gnulib module dirname + + +EXTRA_DIST += basename.c dirname.c dirname.h stripslash.c + +EXTRA_libgnulib_a_SOURCES += basename.c dirname.c stripslash.c + +## end gnulib module dirname + +## begin gnulib module dup2 + + +EXTRA_DIST += dup2.c + +EXTRA_libgnulib_a_SOURCES += dup2.c + +## end gnulib module dup2 + +## begin gnulib module error + + +EXTRA_DIST += error.c error.h + +EXTRA_libgnulib_a_SOURCES += error.c + +## end gnulib module error + +## begin gnulib module exitfail + + +EXTRA_DIST += exitfail.c exitfail.h + +EXTRA_libgnulib_a_SOURCES += exitfail.c + +## end gnulib module exitfail + +## begin gnulib module fchdir + +BUILT_SOURCES += $(DIRENT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +dirent.h: dirent_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_DIRENT_H''@|$(ABSOLUTE_DIRENT_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ + < $(srcdir)/dirent_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += dirent.h dirent.h-t + +EXTRA_DIST += dirent_.h fchdir.c + +EXTRA_libgnulib_a_SOURCES += fchdir.c + +## end gnulib module fchdir + +## 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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_FCNTL_H''@|$(ABSOLUTE_FCNTL_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + < $(srcdir)/fcntl_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += fcntl.h fcntl.h-t + +EXTRA_DIST += fcntl_.h + +## end gnulib module fcntl + +## begin gnulib module fcntl-safer + + +EXTRA_DIST += creat-safer.c fcntl--.h fcntl-safer.h open-safer.c + +EXTRA_libgnulib_a_SOURCES += creat-safer.c open-safer.c + +## end gnulib module fcntl-safer + +## begin gnulib module fileblocks + + +EXTRA_DIST += fileblocks.c + +EXTRA_libgnulib_a_SOURCES += fileblocks.c + +## end gnulib module fileblocks + +## begin gnulib module filemode + + +EXTRA_DIST += filemode.c filemode.h + +EXTRA_libgnulib_a_SOURCES += filemode.c + +## end gnulib module filemode + +## begin gnulib module filenamecat + + +EXTRA_DIST += filenamecat.c filenamecat.h + +EXTRA_libgnulib_a_SOURCES += filenamecat.c + +## end gnulib module filenamecat + +## 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_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/fnmatch_.h; \ + } > $@-t + mv -f $@-t $@ +MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t + +EXTRA_DIST += fnmatch.c fnmatch_.h fnmatch_loop.c + +EXTRA_libgnulib_a_SOURCES += fnmatch.c fnmatch_loop.c + +## end gnulib module fnmatch + +## begin gnulib module fopen-safer + + +EXTRA_DIST += fopen-safer.c stdio--.h stdio-safer.h + +EXTRA_libgnulib_a_SOURCES += fopen-safer.c + +## end gnulib module fopen-safer + +## begin gnulib module fpending + + +EXTRA_DIST += __fpending.c __fpending.h + +EXTRA_libgnulib_a_SOURCES += __fpending.c + +## end gnulib module fpending + +## begin gnulib module fts + + +EXTRA_DIST += fts-cycle.c fts.c fts_.h + +EXTRA_libgnulib_a_SOURCES += fts-cycle.c fts.c + +## end gnulib module fts + +## begin gnulib module getcwd + + +EXTRA_DIST += getcwd.c + +EXTRA_libgnulib_a_SOURCES += getcwd.c + +## end gnulib module getcwd + +## begin gnulib module getdate + +libgnulib_a_SOURCES += getdate.y +BUILT_SOURCES += getdate.c +MAINTAINERCLEANFILES += getdate.c +EXTRA_DIST += getdate.c + +EXTRA_DIST += getdate.h + +## end gnulib module getdate + +## begin gnulib module getdelim + + +EXTRA_DIST += getdelim.c getdelim.h + +EXTRA_libgnulib_a_SOURCES += getdelim.c + +## end gnulib module getdelim + +## begin gnulib module getline + + +EXTRA_DIST += getline.c getline.h + +EXTRA_libgnulib_a_SOURCES += getline.c + +## end gnulib module getline + +## 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_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/getopt_.h; \ + } > $@-t + mv -f $@-t $@ +MOSTLYCLEANFILES += getopt.h getopt.h-t + +EXTRA_DIST += getopt.c getopt1.c getopt_.h getopt_int.h + +EXTRA_libgnulib_a_SOURCES += getopt.c getopt1.c + +## end gnulib module getopt + +## begin gnulib module gettext + +# This is for those projects which use "gettextize --intl" to put a source-code +# copy of libintl into their package. In such projects, every Makefile.am needs +# -I$(top_builddir)/intl, so that can be found in this directory. +# For the Makefile.ams in other directories it is the maintainer's +# responsibility; for the one from gnulib we do it here. +# This option has no effect when the user disables NLS (because then the intl +# directory contains no libintl.h file) or when the project does not use +# "gettextize --intl". +AM_CPPFLAGS += -I$(top_builddir)/intl + +## end gnulib module gettext + +## begin gnulib module gettext-h + +libgnulib_a_SOURCES += gettext.h + +## end gnulib module gettext-h + +## begin gnulib module gettime + + +EXTRA_DIST += gettime.c + +EXTRA_libgnulib_a_SOURCES += gettime.c + +## end gnulib module gettime + +## begin gnulib module gettimeofday + + +EXTRA_DIST += gettimeofday.c + +EXTRA_libgnulib_a_SOURCES += gettimeofday.c + +## end gnulib module gettimeofday + +## begin gnulib module hash + + +EXTRA_DIST += hash.c hash.h + +EXTRA_libgnulib_a_SOURCES += hash.c + +## end gnulib module hash + +## begin gnulib module human + + +EXTRA_DIST += human.c human.h + +EXTRA_libgnulib_a_SOURCES += human.c + +## end gnulib module human + +## begin gnulib module i-ring + + +EXTRA_DIST += i-ring.c i-ring.h + +EXTRA_libgnulib_a_SOURCES += i-ring.c + +## end gnulib module i-ring + +## begin gnulib module idcache + + +EXTRA_DIST += idcache.c + +EXTRA_libgnulib_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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's|@''ABSOLUTE_INTTYPES_H''@|$(ABSOLUTE_INTTYPES_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/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 '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/inttypes_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += inttypes.h inttypes.h-t + +EXTRA_DIST += inttypes_.h + +## end gnulib module inttypes + +## begin gnulib module lchown + + +EXTRA_DIST += lchown.c lchown.h + +EXTRA_libgnulib_a_SOURCES += lchown.c + +## end gnulib module lchown + +## begin gnulib module link-warning + +LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h + +## end gnulib module link-warning + +## begin gnulib module localcharset + +libgnulib_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 + test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir) + 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 test $(GLIBC21) = no; 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 lstat.h + +EXTRA_libgnulib_a_SOURCES += lstat.c + +## end gnulib module lstat + +## begin gnulib module malloc + + +EXTRA_DIST += malloc.c + +EXTRA_libgnulib_a_SOURCES += malloc.c + +## end gnulib module malloc + +## begin gnulib module mbchar + +libgnulib_a_SOURCES += mbchar.c + +EXTRA_DIST += mbchar.h + +## end gnulib module mbchar + +## begin gnulib module mbscasestr + +libgnulib_a_SOURCES += mbscasestr.c + +## end gnulib module mbscasestr + +## begin gnulib module mbslen + +libgnulib_a_SOURCES += mbslen.c + +## end gnulib module mbslen + +## begin gnulib module mbsstr + +libgnulib_a_SOURCES += mbsstr.c + +## end gnulib module mbsstr + +## begin gnulib module mbuiter + +libgnulib_a_SOURCES += mbuiter.h + +## end gnulib module mbuiter + +## begin gnulib module memchr + + +EXTRA_DIST += memchr.c + +EXTRA_libgnulib_a_SOURCES += memchr.c + +## end gnulib module memchr + +## begin gnulib module memcmp + + +EXTRA_DIST += memcmp.c + +EXTRA_libgnulib_a_SOURCES += memcmp.c + +## end gnulib module memcmp + +## begin gnulib module mempcpy + + +EXTRA_DIST += mempcpy.c + +EXTRA_libgnulib_a_SOURCES += mempcpy.c + +## end gnulib module mempcpy + +## begin gnulib module memrchr + + +EXTRA_DIST += memrchr.c + +EXTRA_libgnulib_a_SOURCES += memrchr.c + +## end gnulib module memrchr + +## begin gnulib module memset + + +EXTRA_DIST += memset.c + +EXTRA_libgnulib_a_SOURCES += memset.c + +## end gnulib module memset + +## begin gnulib module mktime + + +EXTRA_DIST += mktime.c + +EXTRA_libgnulib_a_SOURCES += mktime.c + +## end gnulib module mktime + +## begin gnulib module modechange + + +EXTRA_DIST += modechange.c modechange.h + +EXTRA_libgnulib_a_SOURCES += modechange.c + +## end gnulib module modechange + +## begin gnulib module mountlist + + +EXTRA_DIST += mountlist.c mountlist.h + +EXTRA_libgnulib_a_SOURCES += mountlist.c + +## end gnulib module mountlist + +## begin gnulib module openat + + +EXTRA_DIST += at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c openat-priv.h openat-proc.c openat.c openat.h + +EXTRA_libgnulib_a_SOURCES += at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c openat-proc.c openat.c + +## end gnulib module openat + +## begin gnulib module openat-die + +libgnulib_a_SOURCES += openat-die.c + +## end gnulib module openat-die + +## begin gnulib module pathmax + + +EXTRA_DIST += pathmax.h + +## end gnulib module pathmax + +## begin gnulib module progname + +libgnulib_a_SOURCES += progname.h progname.c + +## end gnulib module progname + +## begin gnulib module quote + + +EXTRA_DIST += quote.c quote.h + +EXTRA_libgnulib_a_SOURCES += quote.c + +## end gnulib module quote + +## begin gnulib module quotearg + + +EXTRA_DIST += quotearg.c quotearg.h + +EXTRA_libgnulib_a_SOURCES += quotearg.c + +## end gnulib module quotearg + +## begin gnulib module readlink + + +EXTRA_DIST += readlink.c + +EXTRA_libgnulib_a_SOURCES += readlink.c + +## end gnulib module readlink + +## begin gnulib module realloc + + +EXTRA_DIST += realloc.c + +EXTRA_libgnulib_a_SOURCES += realloc.c + +## end gnulib module realloc + +## begin gnulib module regex + + +EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c + +EXTRA_libgnulib_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c + +## end gnulib module regex + +## begin gnulib module rpmatch + + +EXTRA_DIST += rpmatch.c + +EXTRA_libgnulib_a_SOURCES += rpmatch.c + +## end gnulib module rpmatch + +## begin gnulib module same-inode + + +EXTRA_DIST += same-inode.h + +## end gnulib module same-inode + +## begin gnulib module save-cwd + + +EXTRA_DIST += save-cwd.c save-cwd.h + +EXTRA_libgnulib_a_SOURCES += save-cwd.c + +## end gnulib module save-cwd + +## begin gnulib module savedir + + +EXTRA_DIST += savedir.c savedir.h + +EXTRA_libgnulib_a_SOURCES += savedir.c + +## end gnulib module savedir + +## begin gnulib module setenv + + +EXTRA_DIST += setenv.c setenv.h unsetenv.c + +EXTRA_libgnulib_a_SOURCES += setenv.c unsetenv.c + +## end gnulib module setenv + +## begin gnulib module stat-macros + + +EXTRA_DIST += stat-macros.h + +## end gnulib module stat-macros + +## begin gnulib module stat-time + + +EXTRA_DIST += stat-time.h + +## end gnulib module stat-time + +## 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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdbool.h stdbool.h-t + +EXTRA_DIST += stdbool_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/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/@''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_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdint.h stdint.h-t + +EXTRA_DIST += stdint_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''ABSOLUTE_STDLIB_H''@|$(ABSOLUTE_STDLIB_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ + -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ + -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ + -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ + -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ + -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/stdlib_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdlib.h stdlib.h-t + +EXTRA_DIST += stdlib_.h + +## end gnulib module stdlib + +## begin gnulib module stpcpy + + +EXTRA_DIST += stpcpy.c + +EXTRA_libgnulib_a_SOURCES += stpcpy.c + +## end gnulib module stpcpy + +## begin gnulib module strdup + + +EXTRA_DIST += strdup.c + +EXTRA_libgnulib_a_SOURCES += strdup.c + +## end gnulib module strdup + +## begin gnulib module strftime + + +EXTRA_DIST += strftime.c strftime.h + +EXTRA_libgnulib_a_SOURCES += strftime.c + +## end gnulib module strftime + +## 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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|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_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_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ + -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|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_STPCPY''@|$(HAVE_STPCPY)|g' \ + -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ + -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ + -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|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 '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/string_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += string.h string.h-t + +EXTRA_DIST += string_.h + +## end gnulib module string + +## begin gnulib module strndup + + +EXTRA_DIST += strndup.c + +EXTRA_libgnulib_a_SOURCES += strndup.c + +## end gnulib module strndup + +## begin gnulib module strnlen + + +EXTRA_DIST += strnlen.c + +EXTRA_libgnulib_a_SOURCES += strnlen.c + +## end gnulib module strnlen + +## begin gnulib module strnlen1 + +libgnulib_a_SOURCES += strnlen1.h strnlen1.c + +## end gnulib module strnlen1 + +## begin gnulib module strtoimax + + +EXTRA_DIST += strtoimax.c + +EXTRA_libgnulib_a_SOURCES += strtoimax.c + +## end gnulib module strtoimax + +## begin gnulib module strtol + + +EXTRA_DIST += strtol.c + +EXTRA_libgnulib_a_SOURCES += strtol.c + +## end gnulib module strtol + +## begin gnulib module strtoll + + +EXTRA_DIST += strtoll.c + +EXTRA_libgnulib_a_SOURCES += strtoll.c + +## end gnulib module strtoll + +## begin gnulib module strtoul + + +EXTRA_DIST += strtoul.c + +EXTRA_libgnulib_a_SOURCES += strtoul.c + +## end gnulib module strtoul + +## begin gnulib module strtoull + + +EXTRA_DIST += strtoull.c + +EXTRA_libgnulib_a_SOURCES += strtoull.c + +## end gnulib module strtoull + +## begin gnulib module strtoumax + + +EXTRA_DIST += strtoumax.c + +EXTRA_libgnulib_a_SOURCES += strtoumax.c + +## end gnulib module strtoumax + +## 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_.h + @MKDIR_P@ sys + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''HAVE_IO_H''@|$(HAVE_IO_H)|g' \ + -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ + -e 's|@''HAVE_DECL_MKDIR''@|$(HAVE_DECL_MKDIR)|g' \ + < $(srcdir)/sys_stat_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_stat_.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_.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|@''ABSOLUTE_SYS_TIME_H''@|$(ABSOLUTE_SYS_TIME_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + < $(srcdir)/sys_time_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += sys/time.h sys/time.h-t + +EXTRA_DIST += sys_time_.h + +## end gnulib module sys_time + +## 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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@ABSOLUTE_TIME_H''@|$(ABSOLUTE_TIME_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/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_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += time.h time.h-t + +EXTRA_DIST += time_.h + +## end gnulib module time + +## begin gnulib module time_r + + +EXTRA_DIST += time_r.c + +EXTRA_libgnulib_a_SOURCES += time_r.c + +## end gnulib module time_r + +## 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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ + -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ + -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ + -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ + -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ + -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ + -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ + -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ + -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ + -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ + -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ + -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ + -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ + -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ + -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ + -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ + < $(srcdir)/unistd_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += unistd.h unistd.h-t + +EXTRA_DIST += unistd_.h + +## end gnulib module unistd + +## begin gnulib module unistd-safer + + +EXTRA_DIST += dup-safer.c fd-safer.c pipe-safer.c unistd--.h unistd-safer.h + +EXTRA_libgnulib_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c + +## end gnulib module unistd-safer + +## begin gnulib module verify + +libgnulib_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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_WCHAR_H''@|$(ABSOLUTE_WCHAR_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + < $(srcdir)/wchar_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += wchar.h wchar.h-t + +EXTRA_DIST += wchar_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ + -e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ + -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ + < $(srcdir)/wctype_.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += wctype.h wctype.h-t + +EXTRA_DIST += wctype_.h + +## end gnulib module wctype + +## begin gnulib module wcwidth + +libgnulib_a_SOURCES += wcwidth.h + +## end gnulib module wcwidth + +## begin gnulib module xalloc + + +EXTRA_DIST += xalloc.h xmalloc.c + +EXTRA_libgnulib_a_SOURCES += xmalloc.c + +## end gnulib module xalloc + +## begin gnulib module xalloc-die + +libgnulib_a_SOURCES += xalloc-die.c + +## end gnulib module xalloc-die + +## begin gnulib module xgetcwd + + +EXTRA_DIST += xgetcwd.c xgetcwd.h + +EXTRA_libgnulib_a_SOURCES += xgetcwd.c + +## end gnulib module xgetcwd + +## begin gnulib module xreadlink-with-size + +libgnulib_a_SOURCES += xreadlink-with-size.c + +EXTRA_DIST += xreadlink.h + +## end gnulib module xreadlink-with-size + +## begin gnulib module xstrndup + +libgnulib_a_SOURCES += xstrndup.h xstrndup.c + +## end gnulib module xstrndup + +## begin gnulib module xstrtod + + +EXTRA_DIST += xstrtod.c xstrtod.h + +EXTRA_libgnulib_a_SOURCES += xstrtod.c + +## end gnulib module xstrtod + +## begin gnulib module xstrtol + + +EXTRA_DIST += xstrtol.c xstrtol.h xstrtoul.c + +EXTRA_libgnulib_a_SOURCES += xstrtol.c xstrtoul.c + +## end gnulib module xstrtol + +## begin gnulib module xstrtoumax + +libgnulib_a_SOURCES += xstrtoumax.c + +## end gnulib module xstrtoumax + +## begin gnulib module yesno + + +EXTRA_DIST += yesno.c yesno.h + +EXTRA_libgnulib_a_SOURCES += yesno.c + +## end gnulib module yesno + + +mostlyclean-local: mostlyclean-generic + @for dir in '' $(MOSTLYCLEANDIRS); do \ + if test -n "$$dir" && test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in new file mode 100644 index 0000000..83057d0 --- /dev/null +++ b/gnulib/lib/Makefile.in @@ -0,0 +1,1344 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2004-2007 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=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl alloca argmatch c-strstr canonicalize closeout dirname error fchdir fileblocks filemode fnmatch-gnu fopen-safer fts getdate getline getopt gettext human idcache inline lstat malloc mbscasestr mbsstr memcmp memset mktime modechange mountlist pathmax quotearg realloc regex rpmatch savedir stat-macros stat-time stpcpy strdup strftime strtol strtoul strtoull strtoumax sys_stat timespec verify wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = gnulib/lib +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in alloca.c getdate.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +libgnulib_a_AR = $(AR) $(ARFLAGS) +am__DEPENDENCIES_1 = +am_libgnulib_a_OBJECTS = allocsa.$(OBJEXT) c-strstr.$(OBJEXT) \ + getdate.$(OBJEXT) localcharset.$(OBJEXT) mbchar.$(OBJEXT) \ + mbscasestr.$(OBJEXT) mbslen.$(OBJEXT) mbsstr.$(OBJEXT) \ + openat-die.$(OBJEXT) progname.$(OBJEXT) strnlen1.$(OBJEXT) \ + xalloc-die.$(OBJEXT) xreadlink-with-size.$(OBJEXT) \ + xstrndup.$(OBJEXT) xstrtoumax.$(OBJEXT) +libgnulib_a_OBJECTS = $(am_libgnulib_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/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 $@ +YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) +YLWRAP = $(top_srcdir)/build-aux/ylwrap +SOURCES = $(libgnulib_a_SOURCES) $(EXTRA_libgnulib_a_SOURCES) +DIST_SOURCES = $(libgnulib_a_SOURCES) $(EXTRA_libgnulib_a_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = 1.5 gnits +noinst_HEADERS = +noinst_LIBRARIES = libgnulib.a +noinst_LTLIBRARIES = +EXTRA_DIST = alloca.c alloca_.h allocsa.valgrind argmatch.c argmatch.h \ + canonicalize.c canonicalize.h pathmax.h canonicalize-lgpl.c \ + canonicalize.h chdir-long.c chdir-long.h chown.c fchown-stub.c \ + close-stream.c close-stream.h closeout.c closeout.h \ + cycle-check.c cycle-check.h dev-ino.h dirfd.c dirfd.h \ + basename.c dirname.c dirname.h stripslash.c dup2.c error.c \ + error.h exitfail.c exitfail.h dirent_.h fchdir.c fcntl_.h \ + creat-safer.c fcntl--.h fcntl-safer.h open-safer.c \ + fileblocks.c filemode.c filemode.h filenamecat.c filenamecat.h \ + fnmatch.c fnmatch_.h fnmatch_loop.c fopen-safer.c stdio--.h \ + stdio-safer.h __fpending.c __fpending.h fts-cycle.c fts.c \ + fts_.h getcwd.c getdate.c getdate.h getdelim.c getdelim.h \ + getline.c getline.h getopt.c getopt1.c getopt_.h getopt_int.h \ + gettime.c gettimeofday.c hash.c hash.h human.c human.h \ + i-ring.c i-ring.h idcache.c intprops.h inttypes_.h lchown.c \ + lchown.h config.charset ref-add.sin ref-del.sin lstat.c \ + lstat.h malloc.c mbchar.h memchr.c memcmp.c mempcpy.c \ + memrchr.c memset.c mktime.c modechange.c modechange.h \ + mountlist.c mountlist.h at-func.c fchmodat.c fchownat.c \ + fstatat.c mkdirat.c openat-priv.h openat-proc.c openat.c \ + openat.h pathmax.h quote.c quote.h quotearg.c quotearg.h \ + readlink.c realloc.c regcomp.c regex.c regex.h \ + regex_internal.c regex_internal.h regexec.c rpmatch.c \ + same-inode.h save-cwd.c save-cwd.h savedir.c savedir.h \ + setenv.c setenv.h unsetenv.c stat-macros.h stat-time.h \ + stdbool_.h stdint_.h stdlib_.h stpcpy.c strdup.c strftime.c \ + strftime.h string_.h strndup.c strnlen.c strtoimax.c strtol.c \ + strtoll.c strtoul.c strtoull.c strtoumax.c sys_stat_.h \ + sys_time_.h time_.h time_r.c timespec.h unistd_.h dup-safer.c \ + fd-safer.c pipe-safer.c unistd--.h unistd-safer.h wchar_.h \ + wctype_.h xalloc.h xmalloc.c xgetcwd.c xgetcwd.h xreadlink.h \ + xstrtod.c xstrtod.h xstrtol.c xstrtol.h xstrtoul.c yesno.c \ + yesno.h +BUILT_SOURCES = $(ALLOCA_H) configmake.h $(DIRENT_H) $(FCNTL_H) \ + $(FNMATCH_H) getdate.c $(GETOPT_H) $(INTTYPES_H) $(STDBOOL_H) \ + $(STDINT_H) stdlib.h string.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 dirent.h \ + dirent.h-t fcntl.h fcntl.h-t fnmatch.h fnmatch.h-t getopt.h \ + getopt.h-t inttypes.h inttypes.h-t stdbool.h stdbool.h-t \ + stdint.h stdint.h-t stdlib.h stdlib.h-t string.h string.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 +CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ + ref-del.sed +DISTCLEANFILES = +MAINTAINERCLEANFILES = getdate.c + +# This is for those projects which use "gettextize --intl" to put a source-code +# copy of libintl into their package. In such projects, every Makefile.am needs +# -I$(top_builddir)/intl, so that can be found in this directory. +# For the Makefile.ams in other directories it is the maintainer's +# responsibility; for the one from gnulib we do it here. +# This option has no effect when the user disables NLS (because then the intl +# directory contains no libintl.h file) or when the project does not use +# "gettextize --intl". +AM_CPPFLAGS = -I$(top_builddir)/intl +libgnulib_a_SOURCES = allocsa.h allocsa.c c-strstr.h c-strstr.c \ + getdate.y gettext.h localcharset.h localcharset.c mbchar.c \ + mbscasestr.c mbslen.c mbsstr.c mbuiter.h openat-die.c \ + progname.h progname.c strnlen1.h strnlen1.c verify.h wcwidth.h \ + xalloc-die.c xreadlink-with-size.c xstrndup.h xstrndup.c \ + xstrtoumax.c +libgnulib_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ +libgnulib_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ +EXTRA_libgnulib_a_SOURCES = alloca.c argmatch.c canonicalize.c \ + canonicalize-lgpl.c chdir-long.c chown.c fchown-stub.c \ + close-stream.c closeout.c cycle-check.c dirfd.c basename.c \ + dirname.c stripslash.c dup2.c error.c exitfail.c fchdir.c \ + creat-safer.c open-safer.c fileblocks.c filemode.c \ + filenamecat.c fnmatch.c fnmatch_loop.c fopen-safer.c \ + __fpending.c fts-cycle.c fts.c getcwd.c getdelim.c getline.c \ + getopt.c getopt1.c gettime.c gettimeofday.c hash.c human.c \ + i-ring.c idcache.c lchown.c lstat.c malloc.c memchr.c memcmp.c \ + mempcpy.c memrchr.c memset.c mktime.c modechange.c mountlist.c \ + at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c \ + openat-proc.c openat.c quote.c quotearg.c readlink.c realloc.c \ + regcomp.c regex.c regex_internal.c regexec.c rpmatch.c \ + save-cwd.c savedir.c setenv.c unsetenv.c stpcpy.c strdup.c \ + strftime.c strndup.c strnlen.c strtoimax.c strtol.c strtoll.c \ + strtoul.c strtoull.c strtoumax.c time_r.c dup-safer.c \ + fd-safer.c pipe-safer.c xmalloc.c xgetcwd.c xstrtod.c \ + xstrtol.c xstrtoul.c yesno.c + +# Use this preprocessor expression to decide whether #include_next works. +# Do not rely on a 'configure'-time test for this, since the expression +# might appear in an installed header, which is used by some other compiler. +HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) +LINK_WARNING_H = $(top_srcdir)/build-aux/link-warning.h +charset_alias = $(DESTDIR)$(libdir)/charset.alias +charset_tmp = $(DESTDIR)$(libdir)/charset.tmp +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .sed .sin .c .o .obj .y +$(srcdir)/Makefile.in: $(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 gnulib/lib/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits gnulib/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libgnulib.a: $(libgnulib_a_OBJECTS) $(libgnulib_a_DEPENDENCIES) + -rm -f libgnulib.a + $(libgnulib_a_AR) libgnulib.a $(libgnulib_a_OBJECTS) $(libgnulib_a_LIBADD) + $(RANLIB) libgnulib.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) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/__fpending.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocsa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize-lgpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir-long.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-stream.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closeout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cycle-check.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.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)/fchdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown-stub.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileblocks.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat.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)/fopen-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fts-cycle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.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)/hash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/human.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i-ring.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idcache.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.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)/mbchar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbscasestr.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)/memchr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modechange.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountlist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.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)/realloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpmatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savedir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpcpy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.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)/time_r.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetcwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xreadlink-with-size.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtod.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@./$(DEPDIR)/yesno.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.y.c: + $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local +installdirs: +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: + -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) + -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." + -rm -f getdate.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-exec-local + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf $(DEPDIR) ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-local + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-local + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-local \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-local pdf pdf-am ps ps-am tags uninstall \ + uninstall-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_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/alloca_.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 works with the given compiler. +dirent.h: dirent_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_DIRENT_H''@|$(ABSOLUTE_DIRENT_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ + < $(srcdir)/dirent_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_FCNTL_H''@|$(ABSOLUTE_FCNTL_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + < $(srcdir)/fcntl_.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_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/fnmatch_.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_.h + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/getopt_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's|@''ABSOLUTE_INTTYPES_H''@|$(ABSOLUTE_INTTYPES_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/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 '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/inttypes_.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 + test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir) + 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 test $(GLIBC21) = no; 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 one that works. +stdbool.h: stdbool_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/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/@''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_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''ABSOLUTE_STDLIB_H''@|$(ABSOLUTE_STDLIB_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ + -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ + -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ + -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ + -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ + -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/stdlib_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|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_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_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ + -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|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_STPCPY''@|$(HAVE_STPCPY)|g' \ + -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ + -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ + -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|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 '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ + < $(srcdir)/string_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# has one that is incomplete. +sys/stat.h: sys_stat_.h + @MKDIR_P@ sys + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''HAVE_IO_H''@|$(HAVE_IO_H)|g' \ + -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ + -e 's|@''HAVE_DECL_MKDIR''@|$(HAVE_DECL_MKDIR)|g' \ + < $(srcdir)/sys_stat_.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_.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|@''ABSOLUTE_SYS_TIME_H''@|$(ABSOLUTE_SYS_TIME_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + < $(srcdir)/sys_time_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@ABSOLUTE_TIME_H''@|$(ABSOLUTE_TIME_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/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_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ + -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ + -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ + -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ + -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ + -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ + -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ + -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ + -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ + -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ + -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ + -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ + -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ + -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ + -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ + -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ + < $(srcdir)/unistd_.h; \ + } > $@-t + mv $@-t $@ + +# We need the following in order to create when the system +# version does not work standalone. +wchar.h: wchar_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''ABSOLUTE_WCHAR_H''@|$(ABSOLUTE_WCHAR_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + < $(srcdir)/wchar_.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_.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ + -e 's|@''ABSOLUTE_WCTYPE_H''@|$(ABSOLUTE_WCTYPE_H)|g' \ + -e 's/@''HAVE_INCLUDE_NEXT''@/$(HAVE_INCLUDE_NEXT)/g' \ + -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ + -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ + < $(srcdir)/wctype_.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: diff --git a/gnulib/lib/__fpending.c b/gnulib/lib/__fpending.c new file mode 100644 index 0000000..221aee6 --- /dev/null +++ b/gnulib/lib/__fpending.c @@ -0,0 +1,30 @@ +/* __fpending.c -- return the number of pending output bytes on a stream + Copyright (C) 2000, 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 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. */ + +/* Written by Jim Meyering. */ + +#include + +#include "__fpending.h" + +/* Return the number of pending (aka buffered, unflushed) + bytes on the stream, FP, that is open for writing. */ +size_t +__fpending (FILE *fp) +{ + return PENDING_OUTPUT_N_BYTES; +} diff --git a/gnulib/lib/__fpending.h b/gnulib/lib/__fpending.h new file mode 100644 index 0000000..8a8aabc --- /dev/null +++ b/gnulib/lib/__fpending.h @@ -0,0 +1,34 @@ +/* Declare __fpending. + + Copyright (C) 2000, 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 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. + + Written by Jim Meyering. */ + +#include +#include + +#ifndef HAVE_DECL___FPENDING +"this configure-time declaration test was not run" +#endif + +#if HAVE_DECL___FPENDING +# if HAVE_STDIO_EXT_H +# include +# endif +#else +size_t __fpending (FILE *); +#endif diff --git a/gnulib/lib/alloca.c b/gnulib/lib/alloca.c new file mode 100644 index 0000000..3a1f4e2 --- /dev/null +++ b/gnulib/lib/alloca.c @@ -0,0 +1,489 @@ +/* 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 2 */ diff --git a/gnulib/lib/alloca_.h b/gnulib/lib/alloca_.h new file mode 100644 index 0000000..af274b9 --- /dev/null +++ b/gnulib/lib/alloca_.h @@ -0,0 +1,54 @@ +/* Memory allocation on the stack. + + Copyright (C) 1995, 1999, 2001-2004, 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 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. */ + +/* 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 +# else +# include +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +# endif +#endif + +#endif /* _GL_ALLOCA_H */ diff --git a/gnulib/lib/allocsa.c b/gnulib/lib/allocsa.c new file mode 100644 index 0000000..97652e6 --- /dev/null +++ b/gnulib/lib/allocsa.c @@ -0,0 +1,137 @@ +/* Safe automatic memory allocation. + Copyright (C) 2003, 2006 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 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. */ + +#include + +/* Specification. */ +#include "allocsa.h" + +/* The speed critical point in this file is freesa() applied to an alloca() + result: it must be fast, to match the speed of alloca(). The speed of + mallocsa() and freesa() in the other case are not critical, because they + are only invoked for big memory sizes. */ + +#if HAVE_ALLOCA + +/* Store the mallocsa() results in a hash table. This is needed to reliably + distinguish a mallocsa() result and an alloca() result. + + Although it is possible that the same pointer is returned by alloca() and + by mallocsa() at different times in the same application, it does not lead + to a bug in freesa(), 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 freesa() on it anyway. + - Before a pointer returned by mallocsa() can point into the stack, it + must be freed. The only function that can free it is freesa(), and + when freesa() 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 * mallocsa_results[HASH_TABLE_SIZE]; + +#endif + +void * +mallocsa (size_t n) +{ +#if HAVE_ALLOCA + /* Allocate one more word, that serves as an indicator for malloc()ed + memory, so that freesa() 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 = mallocsa_results[slot]; + mallocsa_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 +freesa (void *p) +{ + /* mallocsa() may have returned NULL. */ + if (p != NULL) + { + /* Attempt to quickly distinguish the mallocsa() 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 mallocsa() 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 = &mallocsa_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 mallocsa() result. */ + } +} +#endif diff --git a/gnulib/lib/allocsa.h b/gnulib/lib/allocsa.h new file mode 100644 index 0000000..6592b35 --- /dev/null +++ b/gnulib/lib/allocsa.h @@ -0,0 +1,124 @@ +/* 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 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. */ + +#ifndef _ALLOCSA_H +#define _ALLOCSA_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) ((N), NULL) +#endif + +/* allocsa(N) is a safe variant of alloca(N). It allocates N bytes of + memory allocated on the stack, that must be freed using freesa() before + the function returns. Upon failure, it returns NULL. */ +#if HAVE_ALLOCA +# define allocsa(N) \ + ((N) < 4032 - sa_increment \ + ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ + : mallocsa (N)) +#else +# define allocsa(N) \ + mallocsa (N) +#endif +extern void * mallocsa (size_t n); + +/* Free a block of memory allocated through allocsa(). */ +#if HAVE_ALLOCA +extern void freesa (void *p); +#else +# define freesa free +#endif + +/* Maybe we should also define a variant + nallocsa (size_t n, size_t s) - behaves like allocsa (n * s) + If this would be useful in your application. please speak up. */ + + +#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 /* _ALLOCSA_H */ diff --git a/gnulib/lib/allocsa.valgrind b/gnulib/lib/allocsa.valgrind new file mode 100644 index 0000000..f4c77d6 --- /dev/null +++ b/gnulib/lib/allocsa.valgrind @@ -0,0 +1,7 @@ +# Suppress a valgrind message about use of uninitialized memory in freesa(). +# This use is OK because it provides only a speedup. +{ + freesa + Memcheck:Cond + fun:freesa +} diff --git a/gnulib/lib/argmatch.c b/gnulib/lib/argmatch.c new file mode 100644 index 0000000..72d9248 --- /dev/null +++ b/gnulib/lib/argmatch.c @@ -0,0 +1,278 @@ +/* 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 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. */ + +/* 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 diff --git a/gnulib/lib/argmatch.h b/gnulib/lib/argmatch.h new file mode 100644 index 0000000..f2dfe59 --- /dev/null +++ b/gnulib/lib/argmatch.h @@ -0,0 +1,103 @@ +/* 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 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. */ + +/* 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_ */ diff --git a/gnulib/lib/at-func.c b/gnulib/lib/at-func.c new file mode 100644 index 0000000..f98c207 --- /dev/null +++ b/gnulib/lib/at-func.c @@ -0,0 +1,86 @@ +/* Define an at-style functions like fstatat, unlinkat, fchownat, etc. + 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 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. */ + +/* written by Jim Meyering */ + +#define CALL_FUNC(F) \ + (AT_FUNC_USE_F1_COND \ + ? AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS) \ + : AT_FUNC_F2 (F AT_FUNC_POST_FILE_ARGS)) + +/* Call AT_FUNC_F1 or AT_FUNC_F2 (testing AT_FUNC_USE_F1_COND to + determine which) to operate on FILE, which is in the directory + open on descriptor FD. If possible, do it without changing the + working directory. Otherwise, resort to using save_cwd/fchdir, + then AT_FUNC_F?/restore_cwd. If either the save_cwd or the restore_cwd + fails, then give a diagnostic and exit nonzero. */ +int +AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS) +{ + struct saved_cwd saved_cwd; + int saved_errno; + int err; + + if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) + return CALL_FUNC (file); + + { + char buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (buf, fd, file); + if (proc_file) + { + int proc_result = CALL_FUNC (proc_file); + int proc_errno = errno; + if (proc_file != buf) + free (proc_file); + /* If the syscall succeeds, or if it fails with an unexpected + errno value, then return right away. Otherwise, fall through + and resort to using save_cwd/restore_cwd. */ + if (0 <= proc_result) + return proc_result; + if (! EXPECTED_ERRNO (proc_errno)) + { + errno = proc_errno; + return proc_result; + } + } + } + + if (save_cwd (&saved_cwd) != 0) + openat_save_fail (errno); + + if (fchdir (fd) != 0) + { + saved_errno = errno; + free_cwd (&saved_cwd); + errno = saved_errno; + return -1; + } + + err = CALL_FUNC (file); + saved_errno = (err < 0 ? errno : 0); + + if (restore_cwd (&saved_cwd) != 0) + openat_restore_fail (errno); + + free_cwd (&saved_cwd); + + if (saved_errno) + errno = saved_errno; + return err; +} +#undef CALL_FUNC diff --git a/gnulib/lib/basename.c b/gnulib/lib/basename.c new file mode 100644 index 0000000..fbe17ff --- /dev/null +++ b/gnulib/lib/basename.c @@ -0,0 +1,129 @@ +/* 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 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. */ + +#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; +} diff --git a/gnulib/lib/c-strstr.c b/gnulib/lib/c-strstr.c new file mode 100644 index 0000000..ce97ee3 --- /dev/null +++ b/gnulib/lib/c-strstr.c @@ -0,0 +1,214 @@ +/* c-strstr.c -- substring search in C locale + Copyright (C) 2005-2007 Free Software Foundation, Inc. + Written by Bruno Haible , 2005, 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 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. */ + +#include + +/* Specification. */ +#include "c-strstr.h" + +#include +#include +#include + +#include "allocsa.h" + +/* Knuth-Morris-Pratt algorithm. + See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm + Return a boolean indicating success. */ +static bool +knuth_morris_pratt (const char *haystack, const char *needle, + const char **resultp) +{ + size_t m = strlen (needle); + + /* Allocate the table. */ + size_t *table = (size_t *) allocsa (m * sizeof (size_t)); + if (table == NULL) + return false; + /* Fill the table. + For 0 < i < m: + 0 < table[i] <= i is defined such that + rhaystack[0..i-1] == needle[0..i-1] and rhaystack[i] != needle[i] + implies + forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1], + and table[i] is as large as possible with this property. + table[0] remains uninitialized. */ + { + size_t i, j; + + table[1] = 1; + j = 0; + for (i = 2; i < m; i++) + { + unsigned char b = (unsigned char) needle[i - 1]; + + for (;;) + { + if (b == (unsigned char) needle[j]) + { + table[i] = i - ++j; + break; + } + if (j == 0) + { + table[i] = i; + break; + } + j = j - table[j]; + } + } + } + + /* 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 ((unsigned char) needle[j] == (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++; + } + } + + freesa (table); + return true; +} + +/* Find the first occurrence of NEEDLE in HAYSTACK. */ +char * +c_strstr (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 (*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. */ + unsigned char b = (unsigned char) *needle; + + 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 (haystack, needle - 1, &result); + if (success) + return (char *) result; + try_kmp = false; + } + } + + outer_loop_count++; + comparison_count++; + if ((unsigned char) *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 ((unsigned char) *rhaystack != (unsigned char) *rneedle) + /* Nothing in this round. */ + break; + } + } + } + } + else + return (char *) haystack; +} diff --git a/gnulib/lib/c-strstr.h b/gnulib/lib/c-strstr.h new file mode 100644 index 0000000..4ce2db2 --- /dev/null +++ b/gnulib/lib/c-strstr.h @@ -0,0 +1,45 @@ +/* Searching in a string. + Copyright (C) 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 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. */ + + +/* The functions defined in this file assume a nearly ASCII compatible + character set. */ + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Find the first occurrence of NEEDLE in HAYSTACK. + This function is safe to be called, even in a multibyte locale, if NEEDLE + 1. consists solely of printable ASCII characters excluding '\\' and '~' + [this restriction is needed because of Shift_JIS and JOHAB] + or of the control ASCII characters '\a' '\b' '\f' '\n' '\r' '\t' '\v' + [this restriction is needed because of VISCII], and + 2. has at least length 2 + [this restriction is needed because of BIG5, BIG5-HKSCS, GBK, GB18030, + Shift_JIS, JOHAB], and + 3. does not consist entirely of decimal digits, or has at least length 4 + [this restricion is needed because of GB18030]. + This function is also safe to be called, even in a multibyte locale, if + HAYSTACK and NEEDLE are known to both consist solely of printable ASCII + characters excluding '\\' and '~'. */ +extern char *c_strstr (const char *haystack, const char *needle); + +#ifdef __cplusplus +} +#endif diff --git a/gnulib/lib/canonicalize-lgpl.c b/gnulib/lib/canonicalize-lgpl.c new file mode 100644 index 0000000..05ced11 --- /dev/null +++ b/gnulib/lib/canonicalize-lgpl.c @@ -0,0 +1,353 @@ +/* Return the canonical absolute name of a given file. + Copyright (C) 1996-2003, 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 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. */ + +#include + +/* Avoid a clash of our rpl_realpath() function with the prototype in + on Solaris 2.5.1. */ +#undef realpath + +#if !HAVE_CANONICALIZE_FILE_NAME || defined _LIBC + +#include + +/* Specification. */ +#include "canonicalize.h" + +#include +#include +#include + +#if HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include + +#if HAVE_SYS_PARAM_H || defined _LIBC +# include +#endif +#ifndef MAXSYMLINKS +# define MAXSYMLINKS 20 +#endif + +#include + +#include +#ifndef _LIBC +# define __set_errno(e) errno = (e) +# ifndef ENAMETOOLONG +# define ENAMETOOLONG EINVAL +# endif +#endif + +#ifdef _LIBC +# include +#else +# define SHLIB_COMPAT(lib, introduced, obsoleted) 0 +# define versioned_symbol(lib, local, symbol, version) +# define compat_symbol(lib, local, symbol, version) +# define weak_alias(local, symbol) +# define __canonicalize_file_name canonicalize_file_name +# define __realpath rpl_realpath +# include "pathmax.h" +# include "allocsa.h" +# if HAVE_GETCWD +# ifdef VMS + /* We want the directory in Unix syntax, not in VMS syntax. */ +# define __getcwd(buf, max) getcwd (buf, max, 0) +# else +# define __getcwd getcwd +# endif +# else +# define __getcwd(buf, max) getwd (buf) +# endif +# define __readlink readlink + /* On systems without symbolic links, call stat() instead of lstat(). */ +# if !defined S_ISNLK && !HAVE_READLINK +# define lstat stat +# endif +#endif + +/* Return the canonical absolute name of file NAME. A canonical name + does not contain any `.', `..' components nor any repeated path + separators ('/') or symlinks. All path components must exist. If + RESOLVED is null, the result is malloc'd; otherwise, if the + canonical name is PATH_MAX chars or more, returns null with `errno' + set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, + returns the name in RESOLVED. If the name cannot be resolved and + RESOLVED is non-NULL, it contains the path of the first component + that cannot be resolved. If the path can be resolved, RESOLVED + holds the same value as the value returned. */ + +char * +__realpath (const char *name, char *resolved) +{ + char *rpath, *dest, *extra_buf = NULL; + const char *start, *end, *rpath_limit; + long int path_max; +#if HAVE_READLINK + int num_links = 0; +#endif + + if (name == NULL) + { + /* As per Single Unix Specification V2 we must return an error if + either parameter is a null pointer. We extend this to allow + the RESOLVED parameter to be NULL in case the we are expected to + allocate the room for the return value. */ + __set_errno (EINVAL); + return NULL; + } + + if (name[0] == '\0') + { + /* As per Single Unix Specification V2 we must return an error if + the name argument points to an empty string. */ + __set_errno (ENOENT); + return NULL; + } + +#ifdef PATH_MAX + path_max = PATH_MAX; +#else + path_max = pathconf (name, _PC_PATH_MAX); + if (path_max <= 0) + path_max = 1024; +#endif + + if (resolved == NULL) + { + rpath = malloc (path_max); + if (rpath == NULL) + return NULL; + } + else + rpath = resolved; + rpath_limit = rpath + path_max; + + if (name[0] != '/') + { + if (!__getcwd (rpath, path_max)) + { + rpath[0] = '\0'; + goto error; + } + dest = strchr (rpath, '\0'); + } + else + { + rpath[0] = '/'; + dest = rpath + 1; + } + + for (start = end = name; *start; start = end) + { +#ifdef _LIBC + struct stat64 st; +#else + struct stat st; +#endif + + /* Skip sequence of multiple path-separators. */ + while (*start == '/') + ++start; + + /* Find end of path component. */ + for (end = start; *end && *end != '/'; ++end) + /* Nothing. */; + + if (end - start == 0) + break; + else if (end - start == 1 && start[0] == '.') + /* nothing */; + else if (end - start == 2 && start[0] == '.' && start[1] == '.') + { + /* Back up to previous component, ignore if at root already. */ + if (dest > rpath + 1) + while ((--dest)[-1] != '/'); + } + else + { + size_t new_size; + + if (dest[-1] != '/') + *dest++ = '/'; + + if (dest + (end - start) >= rpath_limit) + { + ptrdiff_t dest_offset = dest - rpath; + char *new_rpath; + + if (resolved) + { + __set_errno (ENAMETOOLONG); + if (dest > rpath + 1) + dest--; + *dest = '\0'; + goto error; + } + new_size = rpath_limit - rpath; + if (end - start + 1 > path_max) + new_size += end - start + 1; + else + new_size += path_max; + new_rpath = (char *) realloc (rpath, new_size); + if (new_rpath == NULL) + goto error; + rpath = new_rpath; + rpath_limit = rpath + new_size; + + dest = rpath + dest_offset; + } + +#ifdef _LIBC + dest = __mempcpy (dest, start, end - start); +#else + memcpy (dest, start, end - start); + dest += end - start; +#endif + *dest = '\0'; + +#ifdef _LIBC + if (__lxstat64 (_STAT_VER, rpath, &st) < 0) +#else + if (lstat (rpath, &st) < 0) +#endif + goto error; + +#if HAVE_READLINK + if (S_ISLNK (st.st_mode)) + { + char *buf; + size_t len; + int n; + + if (++num_links > MAXSYMLINKS) + { + __set_errno (ELOOP); + goto error; + } + + buf = allocsa (path_max); + if (!buf) + { + errno = ENOMEM; + goto error; + } + + n = __readlink (rpath, buf, path_max); + if (n < 0) + { + int saved_errno = errno; + freesa (buf); + errno = saved_errno; + goto error; + } + buf[n] = '\0'; + + if (!extra_buf) + { + extra_buf = allocsa (path_max); + if (!extra_buf) + { + freesa (buf); + errno = ENOMEM; + goto error; + } + } + + len = strlen (end); + if ((long int) (n + len) >= path_max) + { + freesa (buf); + __set_errno (ENAMETOOLONG); + goto error; + } + + /* Careful here, end may be a pointer into extra_buf... */ + memmove (&extra_buf[n], end, len + 1); + name = end = memcpy (extra_buf, buf, n); + + if (buf[0] == '/') + dest = rpath + 1; /* It's an absolute symlink */ + else + /* Back up to previous component, ignore if at root already: */ + if (dest > rpath + 1) + while ((--dest)[-1] != '/'); + } +#endif + } + } + if (dest > rpath + 1 && dest[-1] == '/') + --dest; + *dest = '\0'; + + if (extra_buf) + freesa (extra_buf); + + return resolved ? memcpy (resolved, rpath, dest - rpath + 1) : rpath; + +error: + { + int saved_errno = errno; + if (extra_buf) + freesa (extra_buf); + if (resolved) + strcpy (resolved, rpath); + else + free (rpath); + errno = saved_errno; + } + return NULL; +} +#ifdef _LIBC +versioned_symbol (libc, __realpath, realpath, GLIBC_2_3); +#endif + + +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3) +char * +__old_realpath (const char *name, char *resolved) +{ + if (resolved == NULL) + { + __set_errno (EINVAL); + return NULL; + } + + return __realpath (name, resolved); +} +compat_symbol (libc, __old_realpath, realpath, GLIBC_2_0); +#endif + + +char * +__canonicalize_file_name (const char *name) +{ + return __realpath (name, NULL); +} +weak_alias (__canonicalize_file_name, canonicalize_file_name) + +#else + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; + +#endif diff --git a/gnulib/lib/canonicalize.c b/gnulib/lib/canonicalize.c new file mode 100644 index 0000000..48e4a23 --- /dev/null +++ b/gnulib/lib/canonicalize.c @@ -0,0 +1,307 @@ +/* Return the canonical absolute name of a given file. + Copyright (C) 1996-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 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#include "canonicalize.h" + +#include +#include + +#if HAVE_SYS_PARAM_H +# include +#endif + +#include + +#include + +#include +#include + +#include "cycle-check.h" +#include "filenamecat.h" +#include "xalloc.h" +#include "xgetcwd.h" + +#ifndef ELOOP +# define ELOOP 0 +#endif +#ifndef __set_errno +# define __set_errno(Val) errno = (Val) +#endif + +#include "pathmax.h" +#include "xreadlink.h" + +#if !HAVE_CANONICALIZE_FILE_NAME +/* Return the canonical absolute name of file NAME. A canonical name + does not contain any `.', `..' components nor any repeated file name + separators ('/') or symlinks. All components must exist. + The result is malloc'd. */ + +char * +canonicalize_file_name (const char *name) +{ +# if HAVE_RESOLVEPATH + + char *resolved, *extra_buf = NULL; + size_t resolved_size; + ssize_t resolved_len; + + if (name == NULL) + { + __set_errno (EINVAL); + return NULL; + } + + if (name[0] == '\0') + { + __set_errno (ENOENT); + return NULL; + } + + /* All known hosts with resolvepath (e.g. Solaris 7) don't turn + relative names into absolute ones, so prepend the working + directory if the file name is not absolute. */ + if (name[0] != '/') + { + char *wd; + + if (!(wd = xgetcwd ())) + return NULL; + + extra_buf = file_name_concat (wd, name, NULL); + name = extra_buf; + free (wd); + } + + resolved_size = strlen (name); + while (1) + { + resolved_size = 2 * resolved_size + 1; + resolved = xmalloc (resolved_size); + resolved_len = resolvepath (name, resolved, resolved_size); + if (resolved_len < 0) + { + free (resolved); + free (extra_buf); + return NULL; + } + if (resolved_len < resolved_size) + break; + free (resolved); + } + + free (extra_buf); + + /* NUL-terminate the resulting name. */ + resolved[resolved_len] = '\0'; + + return resolved; + +# else + + return canonicalize_filename_mode (name, CAN_EXISTING); + +# endif /* !HAVE_RESOLVEPATH */ +} +#endif /* !HAVE_CANONICALIZE_FILE_NAME */ + +/* Return the canonical absolute name of file NAME. A canonical name + does not contain any `.', `..' components nor any repeated file name + separators ('/') or symlinks. Whether components must exist + or not depends on canonicalize mode. The result is malloc'd. */ + +char * +canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode) +{ + char *rname, *dest, *extra_buf = NULL; + char const *start; + char const *end; + char const *rname_limit; + size_t extra_len = 0; + struct cycle_check_state cycle_state; + + if (name == NULL) + { + __set_errno (EINVAL); + return NULL; + } + + if (name[0] == '\0') + { + __set_errno (ENOENT); + return NULL; + } + + if (name[0] != '/') + { + rname = xgetcwd (); + if (!rname) + return NULL; + dest = strchr (rname, '\0'); + if (dest - rname < PATH_MAX) + { + char *p = xrealloc (rname, PATH_MAX); + dest = p + (dest - rname); + rname = p; + rname_limit = rname + PATH_MAX; + } + else + { + rname_limit = dest; + } + } + else + { + rname = xmalloc (PATH_MAX); + rname_limit = rname + PATH_MAX; + rname[0] = '/'; + dest = rname + 1; + } + + cycle_check_init (&cycle_state); + for (start = end = name; *start; start = end) + { + /* Skip sequence of multiple file name separators. */ + while (*start == '/') + ++start; + + /* Find end of component. */ + for (end = start; *end && *end != '/'; ++end) + /* Nothing. */; + + if (end - start == 0) + break; + else if (end - start == 1 && start[0] == '.') + /* nothing */; + else if (end - start == 2 && start[0] == '.' && start[1] == '.') + { + /* Back up to previous component, ignore if at root already. */ + if (dest > rname + 1) + while ((--dest)[-1] != '/'); + } + else + { + struct stat st; + + if (dest[-1] != '/') + *dest++ = '/'; + + if (dest + (end - start) >= rname_limit) + { + ptrdiff_t dest_offset = dest - rname; + size_t new_size = rname_limit - rname; + + if (end - start + 1 > PATH_MAX) + new_size += end - start + 1; + else + new_size += PATH_MAX; + rname = xrealloc (rname, new_size); + rname_limit = rname + new_size; + + dest = rname + dest_offset; + } + + dest = memcpy (dest, start, end - start); + dest += end - start; + *dest = '\0'; + + if (lstat (rname, &st) != 0) + { + if (can_mode == CAN_EXISTING) + goto error; + if (can_mode == CAN_ALL_BUT_LAST && *end) + goto error; + st.st_mode = 0; + } + + if (S_ISLNK (st.st_mode)) + { + char *buf; + size_t n, len; + + if (cycle_check (&cycle_state, &st)) + { + __set_errno (ELOOP); + if (can_mode == CAN_MISSING) + continue; + else + goto error; + } + + buf = xreadlink_with_size (rname, st.st_size); + if (!buf) + { + if (can_mode == CAN_MISSING) + continue; + else + goto error; + } + + n = strlen (buf); + len = strlen (end); + + if (!extra_len) + { + extra_len = + ((n + len + 1) > PATH_MAX) ? (n + len + 1) : PATH_MAX; + extra_buf = xmalloc (extra_len); + } + else if ((n + len + 1) > extra_len) + { + extra_len = n + len + 1; + extra_buf = xrealloc (extra_buf, extra_len); + } + + /* Careful here, end may be a pointer into extra_buf... */ + memmove (&extra_buf[n], end, len + 1); + name = end = memcpy (extra_buf, buf, n); + + if (buf[0] == '/') + dest = rname + 1; /* It's an absolute symlink */ + else + /* Back up to previous component, ignore if at root already: */ + if (dest > rname + 1) + while ((--dest)[-1] != '/'); + + free (buf); + } + else + { + if (!S_ISDIR (st.st_mode) && *end && (can_mode != CAN_MISSING)) + { + errno = ENOTDIR; + goto error; + } + } + } + } + if (dest > rname + 1 && dest[-1] == '/') + --dest; + *dest = '\0'; + + free (extra_buf); + return rname; + +error: + free (extra_buf); + free (rname); + return NULL; +} diff --git a/gnulib/lib/canonicalize.h b/gnulib/lib/canonicalize.h new file mode 100644 index 0000000..5c4d3f1 --- /dev/null +++ b/gnulib/lib/canonicalize.h @@ -0,0 +1,54 @@ +/* Return the canonical absolute name of a given file. + Copyright (C) 1996-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 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef CANONICALIZE_H_ +# define CANONICALIZE_H_ + +# if GNULIB_CANONICALIZE +enum canonicalize_mode_t + { + /* All components must exist. */ + CAN_EXISTING = 0, + + /* All components excluding last one must exist. */ + CAN_ALL_BUT_LAST = 1, + + /* No requirements on components existence. */ + CAN_MISSING = 2 + }; +typedef enum canonicalize_mode_t canonicalize_mode_t; + +/* Return a malloc'd string containing the canonical absolute name of + the named file. This acts like canonicalize_file_name, except that + whether components must exist depends on the canonicalize_mode_t + argument. */ +char *canonicalize_filename_mode (const char *, canonicalize_mode_t); +# endif + +# if HAVE_DECL_CANONICALIZE_FILE_NAME +# include +# else +/* Return a malloc'd string containing the canonical absolute name of + the named file. If any file name component does not exist or is a + symlink to a nonexistent file, return NULL. A canonical name does + not contain any `.', `..' components nor any repeated file name + separators ('/') or symlinks. */ +char *canonicalize_file_name (const char *); +# endif + +#endif /* !CANONICALIZE_H_ */ diff --git a/gnulib/lib/chdir-long.c b/gnulib/lib/chdir-long.c new file mode 100644 index 0000000..3fc7ef2 --- /dev/null +++ b/gnulib/lib/chdir-long.c @@ -0,0 +1,265 @@ +/* provide a chdir function that tries not to fail due to ENAMETOOLONG + Copyright (C) 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 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. */ + +/* written by Jim Meyering */ + +#include + +#include "chdir-long.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "openat.h" + +#ifndef PATH_MAX +# error "compile this file only if your system defines PATH_MAX" +#endif + +struct cd_buf +{ + int fd; +}; + +static inline void +cdb_init (struct cd_buf *cdb) +{ + cdb->fd = AT_FDCWD; +} + +static inline int +cdb_fchdir (struct cd_buf const *cdb) +{ + return fchdir (cdb->fd); +} + +static inline void +cdb_free (struct cd_buf const *cdb) +{ + if (0 <= cdb->fd) + { + bool close_fail = close (cdb->fd); + assert (! close_fail); + } +} + +/* Given a file descriptor of an open directory (or AT_FDCWD), CDB->fd, + try to open the CDB->fd-relative directory, DIR. If the open succeeds, + update CDB->fd with the resulting descriptor, close the incoming file + descriptor, and return zero. Upon failure, return -1 and set errno. */ +static int +cdb_advance_fd (struct cd_buf *cdb, char const *dir) +{ + int new_fd = openat (cdb->fd, dir, + O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); + if (new_fd < 0) + return -1; + + cdb_free (cdb); + cdb->fd = new_fd; + + return 0; +} + +/* Return a pointer to the first non-slash in S. */ +static inline char * +find_non_slash (char const *s) +{ + size_t n_slash = strspn (s, "/"); + return (char *) s + n_slash; +} + +/* This is a function much like chdir, but without the PATH_MAX limitation + on the length of the directory name. A significant difference is that + it must be able to modify (albeit only temporarily) the directory + name. It handles an arbitrarily long directory name by operating + on manageable portions of the name. On systems without the openat + syscall, this means changing the working directory to more and more + `distant' points along the long directory name and then restoring + the working directory. If any of those attempts to save or restore + the working directory fails, this function exits nonzero. + + Note that this function may still fail with errno == ENAMETOOLONG, but + only if the specified directory name contains a component that is long + enough to provoke such a failure all by itself (e.g. if the component + has length PATH_MAX or greater on systems that define PATH_MAX). */ + +int +chdir_long (char *dir) +{ + int e = chdir (dir); + if (e == 0 || errno != ENAMETOOLONG) + return e; + + { + size_t len = strlen (dir); + char *dir_end = dir + len; + struct cd_buf cdb; + size_t n_leading_slash; + + cdb_init (&cdb); + + /* If DIR is the empty string, then the chdir above + must have failed and set errno to ENOENT. */ + assert (0 < len); + assert (PATH_MAX <= len); + + /* Count leading slashes. */ + n_leading_slash = strspn (dir, "/"); + + /* Handle any leading slashes as well as any name that matches + the regular expression, m!^//hostname[/]*! . Handling this + prefix separately usually results in a single additional + cdb_advance_fd call, but it's worthwhile, since it makes the + code in the following loop cleaner. */ + if (n_leading_slash == 2) + { + int err; + /* Find next slash. + We already know that dir[2] is neither a slash nor '\0'. */ + char *slash = memchr (dir + 3, '/', dir_end - (dir + 3)); + if (slash == NULL) + { + errno = ENAMETOOLONG; + return -1; + } + *slash = '\0'; + err = cdb_advance_fd (&cdb, dir); + *slash = '/'; + if (err != 0) + goto Fail; + dir = find_non_slash (slash + 1); + } + else if (n_leading_slash) + { + if (cdb_advance_fd (&cdb, "/") != 0) + goto Fail; + dir += n_leading_slash; + } + + assert (*dir != '/'); + assert (dir <= dir_end); + + while (PATH_MAX <= dir_end - dir) + { + int err; + /* Find a slash that is PATH_MAX or fewer bytes away from dir. + I.e. see if there is a slash that will give us a name of + length PATH_MAX-1 or less. */ + char *slash = memrchr (dir, '/', PATH_MAX); + if (slash == NULL) + { + errno = ENAMETOOLONG; + return -1; + } + + *slash = '\0'; + assert (slash - dir < PATH_MAX); + err = cdb_advance_fd (&cdb, dir); + *slash = '/'; + if (err != 0) + goto Fail; + + dir = find_non_slash (slash + 1); + } + + if (dir < dir_end) + { + if (cdb_advance_fd (&cdb, dir) != 0) + goto Fail; + } + + if (cdb_fchdir (&cdb) != 0) + goto Fail; + + cdb_free (&cdb); + return 0; + + Fail: + { + int saved_errno = errno; + cdb_free (&cdb); + errno = saved_errno; + return -1; + } + } +} + +#if TEST_CHDIR + +# include +# include "closeout.h" +# include "error.h" + +char *program_name; + +int +main (int argc, char *argv[]) +{ + char *line = NULL; + size_t n = 0; + int len; + + program_name = argv[0]; + atexit (close_stdout); + + len = getline (&line, &n, stdin); + if (len < 0) + { + int saved_errno = errno; + if (feof (stdin)) + exit (0); + + error (EXIT_FAILURE, saved_errno, + "reading standard input"); + } + else if (len == 0) + exit (0); + + if (line[len-1] == '\n') + line[len-1] = '\0'; + + if (chdir_long (line) != 0) + error (EXIT_FAILURE, errno, + "chdir_long failed: %s", line); + + if (argc <= 1) + { + /* Using `pwd' here makes sense only if it is a robust implementation, + like the one in coreutils after the 2004-04-19 changes. */ + char const *cmd = "pwd"; + execlp (cmd, (char *) NULL); + error (EXIT_FAILURE, errno, "%s", cmd); + } + + fclose (stdin); + fclose (stderr); + + exit (EXIT_SUCCESS); +} +#endif + +/* +Local Variables: +compile-command: "gcc -DTEST_CHDIR=1 -g -O -W -Wall chdir-long.c libcoreutils.a" +End: +*/ diff --git a/gnulib/lib/chdir-long.h b/gnulib/lib/chdir-long.h new file mode 100644 index 0000000..4852b40 --- /dev/null +++ b/gnulib/lib/chdir-long.h @@ -0,0 +1,35 @@ +/* provide a chdir function that tries not to fail due to ENAMETOOLONG + Copyright (C) 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. */ + +/* Written by Jim Meyering. */ + +#include +#include + +#ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# endif +#endif + +/* On systems without PATH_MAX, presume that chdir accepts + arbitrarily long directory names. */ +#ifndef PATH_MAX +# define chdir_long(Dir) chdir (Dir) +#else +int chdir_long (char *dir); +#endif diff --git a/gnulib/lib/chown.c b/gnulib/lib/chown.c new file mode 100644 index 0000000..b7786f6 --- /dev/null +++ b/gnulib/lib/chown.c @@ -0,0 +1,104 @@ +/* provide consistent interface to chown for systems that don't interpret + an ID of -1 as meaning `don't change the corresponding ID'. + + Copyright (C) 1997, 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 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. */ + +/* written by Jim Meyering */ + +#include + +/* Specification. */ +#include + +#include +#include +#include +#include +#include + +/* Below we refer to the system's chown(). */ +#undef chown + +/* The results of open() in this file are not used with fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef open +#undef close + +/* Provide a more-closely POSIX-conforming version of chown on + systems with one or both of the following problems: + - chown doesn't treat an ID of -1 as meaning + `don't change the corresponding ID'. + - chown doesn't dereference symlinks. */ + +int +rpl_chown (const char *file, uid_t uid, gid_t gid) +{ +#if CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE + if (gid == (gid_t) -1 || uid == (uid_t) -1) + { + struct stat file_stats; + + /* Stat file to get id(s) that should remain unchanged. */ + if (stat (file, &file_stats)) + return -1; + + if (gid == (gid_t) -1) + gid = file_stats.st_gid; + + if (uid == (uid_t) -1) + uid = file_stats.st_uid; + } +#endif + +#if CHOWN_MODIFIES_SYMLINK + { + /* Handle the case in which the system-supplied chown function + does *not* follow symlinks. Instead, it changes permissions + on the symlink itself. To work around that, we open the + file (but this can fail due to lack of read or write permission) and + use fchown on the resulting descriptor. */ + int open_flags = O_NONBLOCK | O_NOCTTY; + int fd = open (file, O_RDONLY | open_flags); + if (0 <= fd + || (errno == EACCES + && 0 <= (fd = open (file, O_WRONLY | open_flags)))) + { + int result = fchown (fd, uid, gid); + int saved_errno = errno; + + /* POSIX says fchown can fail with errno == EINVAL on sockets, + so fall back on chown in that case. */ + struct stat sb; + bool fchown_socket_failure = + (result != 0 && saved_errno == EINVAL + && fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)); + + close (fd); + + if (! fchown_socket_failure) + { + errno = saved_errno; + return result; + } + } + else if (errno != EACCES) + return -1; + } +#endif + + return chown (file, uid, gid); +} diff --git a/gnulib/lib/close-stream.c b/gnulib/lib/close-stream.c new file mode 100644 index 0000000..72d0d68 --- /dev/null +++ b/gnulib/lib/close-stream.c @@ -0,0 +1,76 @@ +/* Close a stream, with nicer error checking than fclose's. + + Copyright (C) 1998, 1999, 2000, 2001, 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 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. */ + +#include + +#include "close-stream.h" + +#include +#include + +#include "__fpending.h" + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + +/* Close STREAM. Return 0 if successful, EOF (setting errno) + otherwise. A failure might set errno to 0 if the error number + cannot be determined. + + If a program writes *anything* to STREAM, that program should close + STREAM and make sure that it succeeds before exiting. Otherwise, + suppose that you go to the extreme of checking the return status + of every function that does an explicit write to STREAM. The last + printf can succeed in writing to the internal stream buffer, and yet + the fclose(STREAM) could still fail (due e.g., to a disk full error) + when it tries to write out that buffered data. Thus, you would be + left with an incomplete output file and the offending program would + exit successfully. Even calling fflush is not always sufficient, + since some file systems (NFS and CODA) buffer written/flushed data + until an actual close call. + + Besides, it's wasteful to check the return value from every call + that writes to STREAM -- just let the internal stream state record + the failure. That's what the ferror test is checking below. */ + +int +close_stream (FILE *stream) +{ + bool some_pending = (__fpending (stream) != 0); + bool prev_fail = (ferror (stream) != 0); + bool fclose_fail = (fclose (stream) != 0); + + /* Return an error indication if there was a previous failure or if + fclose failed, with one exception: ignore an fclose failure if + there was no previous error, no data remains to be flushed, and + fclose failed with EBADF. That can happen when a program like cp + is invoked like this `cp a b >&-' (i.e., with standard output + closed) and doesn't generate any output (hence no previous error + and nothing to be flushed). */ + + if (prev_fail || (fclose_fail && (some_pending || errno != EBADF))) + { + if (! fclose_fail) + errno = 0; + return EOF; + } + + return 0; +} diff --git a/gnulib/lib/close-stream.h b/gnulib/lib/close-stream.h new file mode 100644 index 0000000..be3d419 --- /dev/null +++ b/gnulib/lib/close-stream.h @@ -0,0 +1,2 @@ +#include +int close_stream (FILE *stream); diff --git a/gnulib/lib/closeout.c b/gnulib/lib/closeout.c new file mode 100644 index 0000000..830f16f --- /dev/null +++ b/gnulib/lib/closeout.c @@ -0,0 +1,86 @@ +/* Close standard output and standard error, exiting with a diagnostic on error. + + Copyright (C) 1998, 1999, 2000, 2001, 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 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. */ + +#include + +#include "closeout.h" + +#include +#include +#include + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +#include "close-stream.h" +#include "error.h" +#include "exitfail.h" +#include "quotearg.h" + +static const char *file_name; + +/* Set the file name to be reported in the event an error is detected + by close_stdout. */ +void +close_stdout_set_file_name (const char *file) +{ + file_name = file; +} + +/* Close standard output. On error, issue a diagnostic and _exit + with status 'exit_failure'. + + Also close standard error. On error, _exit with status 'exit_failure'. + + Since close_stdout is commonly registered via 'atexit', POSIX + and the C standard both say that it should not call 'exit', + because the behavior is undefined if 'exit' is called more than + once. So it calls '_exit' instead of 'exit'. If close_stdout + is registered via atexit before other functions are registered, + the other functions can act before this _exit is invoked. + + Applications that use close_stdout should flush any streams + other than stdout and stderr before exiting, since the call to + _exit will bypass other buffer flushing. Applications should + be flushing and closing other streams anyway, to check for I/O + errors. Also, applications should not use tmpfile, since _exit + can bypass the removal of these files. + + It's important to detect such failures and exit nonzero because many + tools (most notably `make' and other build-management systems) depend + on being able to detect failure in other tools via their exit status. */ + +void +close_stdout (void) +{ + if (close_stream (stdout) != 0) + { + char const *write_error = _("write error"); + if (file_name) + error (0, errno, "%s: %s", quotearg_colon (file_name), + write_error); + else + error (0, errno, "%s", write_error); + + _exit (exit_failure); + } + + if (close_stream (stderr) != 0) + _exit (exit_failure); +} diff --git a/gnulib/lib/closeout.h b/gnulib/lib/closeout.h new file mode 100644 index 0000000..8bed23b --- /dev/null +++ b/gnulib/lib/closeout.h @@ -0,0 +1,33 @@ +/* Close standard output and standard error. + + Copyright (C) 1998, 2000, 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 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. */ + +#ifndef CLOSEOUT_H +# define CLOSEOUT_H 1 + +# ifdef __cplusplus +extern "C" { +# endif + +void close_stdout_set_file_name (const char *file); +void close_stdout (void); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/gnulib/lib/config.charset b/gnulib/lib/config.charset new file mode 100755 index 0000000..148ea44 --- /dev/null +++ b/gnulib/lib/config.charset @@ -0,0 +1,639 @@ +#! /bin/sh +# Output a system dependent table of character encoding aliases. +# +# Copyright (C) 2000-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 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. +# +# 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 darwin +# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd darwin +# ISO-8859-3 Y glibc solaris +# ISO-8859-4 Y osf solaris freebsd netbsd darwin +# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd darwin +# ISO-8859-6 Y glibc aix hpux solaris +# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd 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 darwin +# ISO-8859-14 glibc +# ISO-8859-15 glibc aix osf solaris freebsd darwin +# KOI8-R Y glibc solaris freebsd netbsd darwin +# KOI8-U Y glibc freebsd netbsd 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 darwin dos +# CP869 dos +# CP874 woe32 dos +# CP922 aix +# CP932 aix woe32 dos +# CP943 aix +# CP949 osf woe32 dos +# CP950 woe32 dos +# CP1046 aix +# CP1124 aix +# CP1125 dos +# CP1129 aix +# CP1250 woe32 +# CP1251 glibc solaris netbsd 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 +# GBK glibc aix osf solaris woe32 dos +# GB18030 glibc solaris netbsd +# 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 +# GEORGIAN-PS 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" + ;; + 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 it 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. + echo "* UTF-8" + ;; + beos*) + # BeOS has 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 diff --git a/gnulib/lib/creat-safer.c b/gnulib/lib/creat-safer.c new file mode 100644 index 0000000..f4a2e59 --- /dev/null +++ b/gnulib/lib/creat-safer.c @@ -0,0 +1,32 @@ +/* Invoke creat, but avoid some glitches. + + 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 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. */ + +/* Written by Jim Meyering. */ + +#include + +#include "fcntl-safer.h" + +#include +#include "unistd-safer.h" + +int +creat_safer (char const *file, mode_t mode) +{ + return fd_safer (creat (file, mode)); +} diff --git a/gnulib/lib/cycle-check.c b/gnulib/lib/cycle-check.c new file mode 100644 index 0000000..5359d71 --- /dev/null +++ b/gnulib/lib/cycle-check.c @@ -0,0 +1,87 @@ +/* help detect directory cycles efficiently + + Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Jim Meyering */ + +#include + +#include +#include +#include +#include +#include + +#include + +#include "cycle-check.h" + +#define CC_MAGIC 9827862 + +/* Return true if I is a power of 2, or is zero. */ + +static inline bool +is_zero_or_power_of_two (uintmax_t i) +{ + return (i & (i - 1)) == 0; +} + +void +cycle_check_init (struct cycle_check_state *state) +{ + state->chdir_counter = 0; + state->magic = CC_MAGIC; +} + +/* In traversing a directory hierarchy, call this function once for each + descending chdir call, with SB corresponding to the chdir operand. + If SB corresponds to a directory that has already been seen, + return true to indicate that there is a directory cycle. + Note that this is done `lazily', which means that some of + the directories in the cycle may be processed twice before + the cycle is detected. */ + +bool +cycle_check (struct cycle_check_state *state, struct stat const *sb) +{ + assert (state->magic == CC_MAGIC); + + /* If the current directory ever happens to be the same + as the one we last recorded for the cycle detection, + then it's obviously part of a cycle. */ + if (state->chdir_counter && SAME_INODE (*sb, state->dev_ino)) + return true; + + /* If the number of `descending' chdir calls is a power of two, + record the dev/ino of the current directory. */ + if (is_zero_or_power_of_two (++(state->chdir_counter))) + { + /* On all architectures that we know about, if the counter + overflows then there is a directory cycle here somewhere, + even if we haven't detected it yet. Typically this happens + only after the counter is incremented 2**64 times, so it's a + fairly theoretical point. */ + if (state->chdir_counter == 0) + return true; + + state->dev_ino.st_dev = sb->st_dev; + state->dev_ino.st_ino = sb->st_ino; + } + + return false; +} diff --git a/gnulib/lib/cycle-check.h b/gnulib/lib/cycle-check.h new file mode 100644 index 0000000..afd7a8f --- /dev/null +++ b/gnulib/lib/cycle-check.h @@ -0,0 +1,54 @@ +/* help detect directory cycles efficiently + + Copyright (C) 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 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Jim Meyering */ + +#ifndef CYCLE_CHECK_H +# define CYCLE_CHECK_H 1 + +# include +# include +# include "dev-ino.h" +# include "same-inode.h" + +struct cycle_check_state +{ + struct dev_ino dev_ino; + uintmax_t chdir_counter; + int magic; +}; + +void cycle_check_init (struct cycle_check_state *state); +bool cycle_check (struct cycle_check_state *state, struct stat const *sb); + +# define CYCLE_CHECK_REFLECT_CHDIR_UP(State, SB_dir, SB_subdir) \ + do \ + { \ + /* You must call cycle_check at least once before using this macro. */ \ + if ((State)->chdir_counter == 0) \ + abort (); \ + if (SAME_INODE ((State)->dev_ino, SB_subdir)) \ + { \ + (State)->dev_ino.st_dev = (SB_dir).st_dev; \ + (State)->dev_ino.st_ino = (SB_dir).st_ino; \ + } \ + } \ + while (0) + +#endif diff --git a/gnulib/lib/dev-ino.h b/gnulib/lib/dev-ino.h new file mode 100644 index 0000000..695d38c --- /dev/null +++ b/gnulib/lib/dev-ino.h @@ -0,0 +1,13 @@ +#ifndef DEV_INO_H +# define DEV_INO_H 1 + +# include +# include + +struct dev_ino +{ + ino_t st_ino; + dev_t st_dev; +}; + +#endif diff --git a/gnulib/lib/dirent_.h b/gnulib/lib/dirent_.h new file mode 100644 index 0000000..371aeac --- /dev/null +++ b/gnulib/lib/dirent_.h @@ -0,0 +1,45 @@ +/* Wrapper around . + 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 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. */ + +#ifndef _GL_DIRENT_H +#define _GL_DIRENT_H + +#if @HAVE_INCLUDE_NEXT@ +# include_next +#else +# include @ABSOLUTE_DIRENT_H@ +#endif + +/* Declare overridden functions. */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if @REPLACE_FCHDIR@ +# define opendir rpl_opendir +extern DIR * opendir (const char *); +# define closedir rpl_closedir +extern int closedir (DIR *); +#endif + +#ifdef __cplusplus +} +#endif + + +#endif /* _GL_DIRENT_H */ diff --git a/gnulib/lib/dirfd.c b/gnulib/lib/dirfd.c new file mode 100644 index 0000000..06cb3c4 --- /dev/null +++ b/gnulib/lib/dirfd.c @@ -0,0 +1,29 @@ +/* dirfd.c -- return the file descriptor associated with an open DIR* + + 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 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. */ + +/* Written by Jim Meyering. */ + +#include + +#include "dirfd.h" + +int +dirfd (DIR const *dir_p) +{ + return DIR_TO_FD (dir_p); +} diff --git a/gnulib/lib/dirfd.h b/gnulib/lib/dirfd.h new file mode 100644 index 0000000..05b7777 --- /dev/null +++ b/gnulib/lib/dirfd.h @@ -0,0 +1,29 @@ +/* Declare dirfd, if necessary. + Copyright (C) 2001, 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 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. + + Written by Jim Meyering. */ + +#include + +#include + +#ifndef HAVE_DECL_DIRFD +"this configure-time declaration test was not run" +#endif +#if !HAVE_DECL_DIRFD && !defined dirfd +int dirfd (DIR const *); +#endif diff --git a/gnulib/lib/dirname.c b/gnulib/lib/dirname.c new file mode 100644 index 0000000..16552c6 --- /dev/null +++ b/gnulib/lib/dirname.c @@ -0,0 +1,85 @@ +/* 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 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. */ + +#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; +} diff --git a/gnulib/lib/dirname.h b/gnulib/lib/dirname.h new file mode 100644 index 0000000..91e7ed3 --- /dev/null +++ b/gnulib/lib/dirname.h @@ -0,0 +1,70 @@ +/* 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 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. */ + +#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_ */ diff --git a/gnulib/lib/dup-safer.c b/gnulib/lib/dup-safer.c new file mode 100644 index 0000000..7b12b61 --- /dev/null +++ b/gnulib/lib/dup-safer.c @@ -0,0 +1,45 @@ +/* Invoke dup, but avoid some glitches. + + Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Paul Eggert. */ + +#include + +#include "unistd-safer.h" + +#include + +#include +#ifndef STDERR_FILENO +# define STDERR_FILENO 2 +#endif + +/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or + STDERR_FILENO. */ + +int +dup_safer (int fd) +{ +#if defined F_DUPFD && !defined FCHDIR_REPLACEMENT + return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); +#else + /* fd_safer calls us back, but eventually the recursion unwinds and + does the right thing. */ + return fd_safer (dup (fd)); +#endif +} diff --git a/gnulib/lib/dup2.c b/gnulib/lib/dup2.c new file mode 100644 index 0000000..8894481 --- /dev/null +++ b/gnulib/lib/dup2.c @@ -0,0 +1,58 @@ +/* Duplicate an open file descriptor to a specified file descriptor. + + Copyright (C) 1999, 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 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. */ + +/* written by Paul Eggert */ + +#include + +/* Specification. */ +#include + +#include +#include + +#ifndef F_DUPFD +static int +dupfd (int fd, int desired_fd) +{ + int duplicated_fd = dup (fd); + if (duplicated_fd < 0 || duplicated_fd == desired_fd) + return duplicated_fd; + else + { + int r = dupfd (fd, desired_fd); + int e = errno; + close (duplicated_fd); + errno = e; + return r; + } +} +#endif + +int +dup2 (int fd, int desired_fd) +{ + if (fd == desired_fd) + return fd; + close (desired_fd); +#ifdef F_DUPFD + return fcntl (fd, F_DUPFD, desired_fd); +#else + return dupfd (fd, desired_fd); +#endif +} diff --git a/gnulib/lib/error.c b/gnulib/lib/error.c new file mode 100644 index 0000000..cf86343 --- /dev/null +++ b/gnulib/lib/error.c @@ -0,0 +1,338 @@ +/* Error handler for noninteractive utilities + Copyright (C) 1990-1998, 2000-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 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. */ + +/* Written by David MacKenzie . */ + +#if !_LIBC +# include +#endif + +#include "error.h" + +#include +#include +#include +#include + +#if !_LIBC && ENABLE_NLS +# include "gettext.h" +#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 diff --git a/gnulib/lib/error.h b/gnulib/lib/error.h new file mode 100644 index 0000000..5a5f247 --- /dev/null +++ b/gnulib/lib/error.h @@ -0,0 +1,66 @@ +/* Declaration for error-reporting function + Copyright (C) 1995, 1996, 1997, 2003, 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 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. */ + +#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) || __STRICT_ANSI__ +# 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 */ diff --git a/gnulib/lib/exitfail.c b/gnulib/lib/exitfail.c new file mode 100644 index 0000000..373d325 --- /dev/null +++ b/gnulib/lib/exitfail.c @@ -0,0 +1,26 @@ +/* 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 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include + +#include "exitfail.h" + +#include + +int volatile exit_failure = EXIT_FAILURE; diff --git a/gnulib/lib/exitfail.h b/gnulib/lib/exitfail.h new file mode 100644 index 0000000..e46cf9c --- /dev/null +++ b/gnulib/lib/exitfail.h @@ -0,0 +1,20 @@ +/* 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 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +extern int volatile exit_failure; diff --git a/gnulib/lib/fchdir.c b/gnulib/lib/fchdir.c new file mode 100644 index 0000000..e3ec2fc --- /dev/null +++ b/gnulib/lib/fchdir.c @@ -0,0 +1,279 @@ +/* fchdir replacement. + 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 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. */ + +#include + +/* Specification. */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "canonicalize.h" +#include "dirfd.h" + +/* This replacement assumes that a directory is not renamed while opened + through a file descriptor. */ + +/* Array of file descriptors opened. If it points to a directory, it stores + info about this directory; otherwise it stores an errno value of ENOTDIR. */ +typedef struct +{ + char *name; /* Absolute name of the directory, or NULL. */ + int saved_errno; /* If name == NULL: The error code describing the failure + reason. */ +} dir_info_t; +static dir_info_t *dirs; +static size_t dirs_allocated; + +/* Try to ensure dirs has enough room for a slot at index fd. */ +static void +ensure_dirs_slot (size_t fd) +{ + if (fd >= dirs_allocated) + { + size_t new_allocated; + dir_info_t *new_dirs; + size_t i; + + new_allocated = 2 * dirs_allocated + 1; + if (new_allocated <= fd) + new_allocated = fd + 1; + new_dirs = + (dirs != NULL + ? (dir_info_t *) realloc (dirs, new_allocated * sizeof (dir_info_t)) + : (dir_info_t *) malloc (new_allocated * sizeof (dir_info_t))); + if (new_dirs != NULL) + { + for (i = dirs_allocated; i < new_allocated; i++) + { + new_dirs[i].name = NULL; + new_dirs[i].saved_errno = ENOTDIR; + } + dirs = new_dirs; + dirs_allocated = new_allocated; + } + } +} + +/* Override open() and close(), to keep track of the open file descriptors. */ + +int +close (int fd) +#undef close +{ + int retval = close (fd); + + if (retval >= 0 && fd >= 0 && fd < dirs_allocated) + { + if (dirs[fd].name != NULL) + free (dirs[fd].name); + dirs[fd].name = NULL; + dirs[fd].saved_errno = ENOTDIR; + } + return retval; +} + +int +open (const char *filename, int flags, ...) +#undef open +{ + mode_t mode; + int fd; + struct stat statbuf; + + 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); + } + fd = open (filename, flags, mode); + if (fd >= 0) + { + ensure_dirs_slot (fd); + if (fd < dirs_allocated + && fstat (fd, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) + { + dirs[fd].name = canonicalize_file_name (filename); + if (dirs[fd].name == NULL) + dirs[fd].saved_errno = errno; + } + } + return fd; +} + +/* Override opendir() and closedir(), to keep track of the open file + descriptors. Needed because there is a function dirfd(). */ + +int +closedir (DIR *dp) +#undef closedir +{ + int fd = dirfd (dp); + int retval = closedir (dp); + + if (retval >= 0 && fd >= 0 && fd < dirs_allocated) + { + if (dirs[fd].name != NULL) + free (dirs[fd].name); + dirs[fd].name = NULL; + dirs[fd].saved_errno = ENOTDIR; + } + return retval; +} + +DIR * +opendir (const char *filename) +#undef opendir +{ + DIR *dp; + + dp = opendir (filename); + if (dp != NULL) + { + int fd = dirfd (dp); + if (fd >= 0) + { + ensure_dirs_slot (fd); + if (fd < dirs_allocated) + { + dirs[fd].name = canonicalize_file_name (filename); + if (dirs[fd].name == NULL) + dirs[fd].saved_errno = errno; + } + } + } + return dp; +} + +/* Override dup() and dup2(), to keep track of open file descriptors. */ + +int +dup (int oldfd) +#undef dup +{ + int newfd = dup (oldfd); + + if (oldfd >= 0 && newfd >= 0) + { + ensure_dirs_slot (newfd); + if (newfd < dirs_allocated) + { + if (oldfd < dirs_allocated) + { + if (dirs[oldfd].name != NULL) + { + dirs[newfd].name = strdup (dirs[oldfd].name); + if (dirs[newfd].name == NULL) + dirs[newfd].saved_errno = ENOMEM; + } + else + { + dirs[newfd].name = NULL; + dirs[newfd].saved_errno = dirs[oldfd].saved_errno; + } + } + else + { + dirs[newfd].name = NULL; + dirs[newfd].saved_errno = ENOMEM; + } + } + } + return newfd; +} + +int +dup2 (int oldfd, int newfd) +#undef dup2 +{ + int retval = dup2 (oldfd, newfd); + + if (retval >= 0 && oldfd >= 0 && newfd >= 0 && newfd != oldfd) + { + ensure_dirs_slot (newfd); + if (newfd < dirs_allocated) + { + if (oldfd < dirs_allocated) + { + if (dirs[oldfd].name != NULL) + { + dirs[newfd].name = strdup (dirs[oldfd].name); + if (dirs[newfd].name == NULL) + dirs[newfd].saved_errno = ENOMEM; + } + else + { + dirs[newfd].name = NULL; + dirs[newfd].saved_errno = dirs[oldfd].saved_errno; + } + } + else + { + dirs[newfd].name = NULL; + dirs[newfd].saved_errno = ENOMEM; + } + } + } + return retval; +} + +/* Implement fchdir() in terms of chdir(). */ + +int +fchdir (int fd) +{ + if (fd >= 0) + { + if (fd < dirs_allocated) + { + if (dirs[fd].name != NULL) + return chdir (dirs[fd].name); + else + { + errno = dirs[fd].saved_errno; + return -1; + } + } + else + { + errno = ENOMEM; + return -1; + } + } + else + { + errno = EBADF; + return -1; + } +} diff --git a/gnulib/lib/fchmodat.c b/gnulib/lib/fchmodat.c new file mode 100644 index 0000000..2598b70 --- /dev/null +++ b/gnulib/lib/fchmodat.c @@ -0,0 +1,50 @@ +/* Change the protections of file relative to an open 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 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. */ + +/* written by Jim Meyering */ + +#include + +#include "openat.h" +#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ +#include "save-cwd.h" +#include "openat-priv.h" + +#ifndef HAVE_LCHMOD +/* Use a different name, to avoid conflicting with any + system-supplied declaration. */ +# undef lchmod +# define lchmod lchmod_rpl +static int lchmod (char const *f, mode_t m) { errno = ENOSYS; return -1; } +#endif + +/* Solaris 10 has no function like this. + Invoke chmod or lchmod on file, FILE, using mode MODE, in the directory + open on descriptor FD. If possible, do it without changing the + working directory. Otherwise, resort to using save_cwd/fchdir, + then mkdir/restore_cwd. If either the save_cwd or the restore_cwd + fails, then give a diagnostic and exit nonzero. + Note that an attempt to use a FLAG value of AT_SYMLINK_NOFOLLOW + on a system without lchmod support causes this function to fail. */ + +#define AT_FUNC_NAME fchmodat +#define AT_FUNC_F1 lchmod +#define AT_FUNC_F2 chmod +#define AT_FUNC_USE_F1_COND flag == AT_SYMLINK_NOFOLLOW +#define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode, int flag +#define AT_FUNC_POST_FILE_ARGS , mode +#include "at-func.c" diff --git a/gnulib/lib/fchown-stub.c b/gnulib/lib/fchown-stub.c new file mode 100644 index 0000000..6be750b --- /dev/null +++ b/gnulib/lib/fchown-stub.c @@ -0,0 +1,16 @@ +#include + +#include +#include + +/* A trivial substitute for `fchown'. + + DJGPP 2.03 and earlier (and perhaps later) don't have `fchown', + so we pretend no-one has permission for this operation. */ + +int +fchown (int fd, uid_t uid, gid_t gid) +{ + errno = EPERM; + return -1; +} diff --git a/gnulib/lib/fchownat.c b/gnulib/lib/fchownat.c new file mode 100644 index 0000000..801c92a --- /dev/null +++ b/gnulib/lib/fchownat.c @@ -0,0 +1,50 @@ +/* This function serves as replacement for a missing fchownat function, + as well as a work around for the fchownat bug in glibc-2.4: + + when the buggy fchownat-with-AT_SYMLINK_NOFOLLOW operates on a symlink, it + mistakenly affects the symlink referent, rather than the symlink itself. + + 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 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. */ + +/* written by Jim Meyering */ + +#include + +#include "openat.h" + +#include + +#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ +#include "lchown.h" +#include "save-cwd.h" +#include "openat-priv.h" + +/* Replacement for Solaris' function by the same name. + Invoke chown or lchown on file, FILE, using OWNER and GROUP, in the + directory open on descriptor FD. If FLAG is AT_SYMLINK_NOFOLLOW, then + use lchown, otherwise, use chown. If possible, do it without changing + the working directory. Otherwise, resort to using save_cwd/fchdir, + then mkdir/restore_cwd. If either the save_cwd or the restore_cwd + fails, then give a diagnostic and exit nonzero. */ + +#define AT_FUNC_NAME fchownat +#define AT_FUNC_F1 lchown +#define AT_FUNC_F2 chown +#define AT_FUNC_USE_F1_COND flag == AT_SYMLINK_NOFOLLOW +#define AT_FUNC_POST_FILE_PARAM_DECLS , uid_t owner, gid_t group, int flag +#define AT_FUNC_POST_FILE_ARGS , owner, group +#include "at-func.c" diff --git a/gnulib/lib/fcntl--.h b/gnulib/lib/fcntl--.h new file mode 100644 index 0000000..51b869e --- /dev/null +++ b/gnulib/lib/fcntl--.h @@ -0,0 +1,28 @@ +/* Like fcntl.h, but redefine some names to avoid glitches. + + 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 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. */ + +/* Written by Paul Eggert. */ + +#include +#include "fcntl-safer.h" + +#undef open +#define open open_safer + +#undef creat +#define creat creat_safer diff --git a/gnulib/lib/fcntl-safer.h b/gnulib/lib/fcntl-safer.h new file mode 100644 index 0000000..cab6aab --- /dev/null +++ b/gnulib/lib/fcntl-safer.h @@ -0,0 +1,24 @@ +/* Invoke fcntl-like functions, but avoid some glitches. + + 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 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. */ + +/* Written by Paul Eggert. */ + +#include + +int open_safer (char const *, int, ...); +int creat_safer (char const *, mode_t); diff --git a/gnulib/lib/fcntl_.h b/gnulib/lib/fcntl_.h new file mode 100644 index 0000000..98e1372 --- /dev/null +++ b/gnulib/lib/fcntl_.h @@ -0,0 +1,120 @@ +/* Like , but with non-working flags defined to 0. + + 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 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. */ + +/* written by Paul Eggert */ + +#ifndef _GL_FCNTL_H +#define _GL_FCNTL_H + +#include +#include +#include +#if @HAVE_INCLUDE_NEXT@ +# include_next +#else +# include @ABSOLUTE_FCNTL_H@ +#endif + + +/* Declare overridden functions. */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef FCHDIR_REPLACEMENT +# define open rpl_open +extern int open (const char *, int, ...); +#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 + +#ifdef __BEOS__ + /* BeOS 5 has 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 diff --git a/gnulib/lib/fd-safer.c b/gnulib/lib/fd-safer.c new file mode 100644 index 0000000..256bfa4 --- /dev/null +++ b/gnulib/lib/fd-safer.c @@ -0,0 +1,57 @@ +/* Return a safer copy of a file descriptor. + + 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 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. */ + +/* Written by Paul Eggert. */ + +#include + +#include "unistd-safer.h" + +#include + +#include +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +#endif +#ifndef STDERR_FILENO +# define STDERR_FILENO 2 +#endif + +/* Return FD, unless FD would be a copy of standard input, output, or + error; in that case, return a duplicate of FD, closing FD. On + failure to duplicate, close FD, set errno, and return -1. Preserve + errno if FD is negative, so that the caller can always inspect + errno when the returned value is negative. + + This function is usefully wrapped around functions that return file + descriptors, e.g., fd_safer (open ("file", O_RDONLY)). */ + +int +fd_safer (int fd) +{ + if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) + { + int f = dup_safer (fd); + int e = errno; + close (fd); + errno = e; + fd = f; + } + + return fd; +} diff --git a/gnulib/lib/fileblocks.c b/gnulib/lib/fileblocks.c new file mode 100644 index 0000000..4024d1e --- /dev/null +++ b/gnulib/lib/fileblocks.c @@ -0,0 +1,75 @@ +/* Convert file size to number of blocks on System V-like machines. + + Copyright (C) 1990, 1997, 1998, 1999, 2004, 2005, 2006 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Brian L. Matthews, blm@6sceng.UUCP. */ + +#include + +#include + +#if HAVE_SYS_PARAM_H +# include +#endif + +#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE + +# include + +# ifndef NINDIR + +# if defined __DJGPP__ +typedef long daddr_t; /* for disk address */ +# endif + +/* Some SysV's, like Irix, seem to lack this. Hope it's correct. */ +/* Number of inode pointers per indirect block. */ +# define NINDIR (BSIZE / sizeof (daddr_t)) +# endif /* !NINDIR */ + +/* Number of direct block addresses in an inode. */ +# define NDIR 10 + +/* Return the number of 512-byte blocks in a file of SIZE bytes. */ + +off_t +st_blocks (off_t size) +{ + off_t datablks = size / 512 + (size % 512 != 0); + off_t indrblks = 0; + + if (datablks > NDIR) + { + indrblks = (datablks - NDIR - 1) / NINDIR + 1; + + if (datablks > NDIR + NINDIR) + { + indrblks += (datablks - NDIR - NINDIR - 1) / (NINDIR * NINDIR) + 1; + + if (datablks > NDIR + NINDIR + NINDIR * NINDIR) + indrblks++; + } + } + + return datablks + indrblks; +} +#else +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int textutils_fileblocks_unused; +#endif diff --git a/gnulib/lib/filemode.c b/gnulib/lib/filemode.c new file mode 100644 index 0000000..726c331 --- /dev/null +++ b/gnulib/lib/filemode.c @@ -0,0 +1,181 @@ +/* filemode.c -- make a string describing file modes + + Copyright (C) 1985, 1990, 1993, 1998-2000, 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 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. */ + +#include + +#include "filemode.h" + +/* The following is for Cray DMF (Data Migration Facility), which is a + HSM file system. A migrated file has a `st_dm_mode' that is + different from the normal `st_mode', so any tests for migrated + files should use the former. */ +#if HAVE_ST_DM_MODE +# define IS_MIGRATED_FILE(statp) \ + (S_ISOFD (statp->st_dm_mode) || S_ISOFL (statp->st_dm_mode)) +#else +# define IS_MIGRATED_FILE(statp) 0 +#endif + +#if ! HAVE_DECL_STRMODE + +/* Return a character indicating the type of file described by + file mode BITS: + '-' regular file + 'b' block special file + 'c' character special file + 'C' high performance ("contiguous data") file + 'd' directory + 'D' door + 'l' symbolic link + 'm' multiplexed file (7th edition Unix; obsolete) + 'n' network special file (HP-UX) + 'p' fifo (named pipe) + 'P' port + 's' socket + 'w' whiteout (4.4BSD) + '?' some other file type */ + +static char +ftypelet (mode_t bits) +{ + /* These are the most common, so test for them first. */ + if (S_ISREG (bits)) + return '-'; + if (S_ISDIR (bits)) + return 'd'; + + /* Other letters standardized by POSIX 1003.1-2004. */ + if (S_ISBLK (bits)) + return 'b'; + if (S_ISCHR (bits)) + return 'c'; + if (S_ISLNK (bits)) + return 'l'; + if (S_ISFIFO (bits)) + return 'p'; + + /* Other file types (though not letters) standardized by POSIX. */ + if (S_ISSOCK (bits)) + return 's'; + + /* Nonstandard file types. */ + if (S_ISCTG (bits)) + return 'C'; + if (S_ISDOOR (bits)) + return 'D'; + if (S_ISMPB (bits) || S_ISMPC (bits)) + return 'm'; + if (S_ISNWK (bits)) + return 'n'; + if (S_ISPORT (bits)) + return 'P'; + if (S_ISWHT (bits)) + return 'w'; + + return '?'; +} + +/* Like filemodestring, but rely only on MODE. */ + +void +strmode (mode_t mode, char *str) +{ + str[0] = ftypelet (mode); + str[1] = mode & S_IRUSR ? 'r' : '-'; + str[2] = mode & S_IWUSR ? 'w' : '-'; + str[3] = (mode & S_ISUID + ? (mode & S_IXUSR ? 's' : 'S') + : (mode & S_IXUSR ? 'x' : '-')); + str[4] = mode & S_IRGRP ? 'r' : '-'; + str[5] = mode & S_IWGRP ? 'w' : '-'; + str[6] = (mode & S_ISGID + ? (mode & S_IXGRP ? 's' : 'S') + : (mode & S_IXGRP ? 'x' : '-')); + str[7] = mode & S_IROTH ? 'r' : '-'; + str[8] = mode & S_IWOTH ? 'w' : '-'; + str[9] = (mode & S_ISVTX + ? (mode & S_IXOTH ? 't' : 'T') + : (mode & S_IXOTH ? 'x' : '-')); + str[10] = ' '; + str[11] = '\0'; +} + +#endif /* ! HAVE_DECL_STRMODE */ + +/* filemodestring - fill in string STR with an ls-style ASCII + representation of the st_mode field of file stats block STATP. + 12 characters are stored in STR. + The characters stored in STR are: + + 0 File type, as in ftypelet above, except that other letters are used + for files whose type cannot be determined solely from st_mode: + + 'F' semaphore + 'M' migrated file (Cray DMF) + 'Q' message queue + 'S' shared memory object + 'T' typed memory object + + 1 'r' if the owner may read, '-' otherwise. + + 2 'w' if the owner may write, '-' otherwise. + + 3 'x' if the owner may execute, 's' if the file is + set-user-id, '-' otherwise. + 'S' if the file is set-user-id, but the execute + bit isn't set. + + 4 'r' if group members may read, '-' otherwise. + + 5 'w' if group members may write, '-' otherwise. + + 6 'x' if group members may execute, 's' if the file is + set-group-id, '-' otherwise. + 'S' if it is set-group-id but not executable. + + 7 'r' if any user may read, '-' otherwise. + + 8 'w' if any user may write, '-' otherwise. + + 9 'x' if any user may execute, 't' if the file is "sticky" + (will be retained in swap space after execution), '-' + otherwise. + 'T' if the file is sticky but not executable. + + 10 ' ' for compatibility with 4.4BSD strmode, + since this interface does not support ACLs. + + 11 '\0'. */ + +void +filemodestring (struct stat const *statp, char *str) +{ + strmode (statp->st_mode, str); + + if (S_TYPEISSEM (statp)) + str[0] = 'F'; + else if (IS_MIGRATED_FILE (statp)) + str[0] = 'M'; + else if (S_TYPEISMQ (statp)) + str[0] = 'Q'; + else if (S_TYPEISSHM (statp)) + str[0] = 'S'; + else if (S_TYPEISTMO (statp)) + str[0] = 'T'; +} diff --git a/gnulib/lib/filemode.h b/gnulib/lib/filemode.h new file mode 100644 index 0000000..f71d994 --- /dev/null +++ b/gnulib/lib/filemode.h @@ -0,0 +1,33 @@ +/* Make a string describing file modes. + + Copyright (C) 1998, 1999, 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 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. */ + +#ifndef FILEMODE_H_ + +# include +# include + +# if HAVE_DECL_STRMODE +# include /* FreeBSD, OpenBSD */ +# include /* NetBSD */ +# else +void strmode (mode_t mode, char *str); +# endif + +void filemodestring (struct stat const *statp, char *str); + +#endif diff --git a/gnulib/lib/filenamecat.c b/gnulib/lib/filenamecat.c new file mode 100644 index 0000000..bccffb2 --- /dev/null +++ b/gnulib/lib/filenamecat.c @@ -0,0 +1,124 @@ +/* Concatenate two arbitrary file names. + + Copyright (C) 1996, 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 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. */ + +/* Written by Jim Meyering. */ + +#include + +/* Specification. */ +#include "filenamecat.h" + +#include + +#include "dirname.h" +#include "xalloc.h" + +#if ! HAVE_MEMPCPY && ! defined mempcpy +# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) +#endif + +/* Return the longest suffix of F that is a relative file name. + If it has no such suffix, return the empty string. */ + +static char const * +longest_relative_suffix (char const *f) +{ + for (f += FILE_SYSTEM_PREFIX_LEN (f); ISSLASH (*f); f++) + continue; + return f; +} + +/* Concatenate two file name components, DIR and ABASE, in + newly-allocated storage and return the result. + The resulting file name F is such that the commands "ls F" and "(cd + DIR; ls BASE)" refer to the same file, where BASE is ABASE with any + file system prefixes and leading separators removed. + Arrange for a directory separator if necessary between DIR and BASE + in the result, removing any redundant separators. + In any case, if BASE_IN_RESULT is non-NULL, set + *BASE_IN_RESULT to point to the copy of ABASE in the returned + concatenation. However, if ABASE begins with more than one slash, + set *BASE_IN_RESULT to point to the sole corresponding slash that + is copied into the result buffer. + + Report an error if memory is exhausted. */ + +char * +file_name_concat (char const *dir, char const *abase, char **base_in_result) +{ + char const *dirbase = last_component (dir); + size_t dirbaselen = base_len (dirbase); + size_t dirlen = dirbase - dir + dirbaselen; + size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1])); + + char const *base = longest_relative_suffix (abase); + size_t baselen = strlen (base); + + char *p_concat = xmalloc (dirlen + needs_separator + baselen + 1); + char *p; + + p = mempcpy (p_concat, dir, dirlen); + *p = DIRECTORY_SEPARATOR; + p += needs_separator; + + if (base_in_result) + *base_in_result = p - IS_ABSOLUTE_FILE_NAME (abase); + + p = mempcpy (p, base, baselen); + *p = '\0'; + + return p_concat; +} + +#ifdef TEST_FILE_NAME_CONCAT +# include +# include +int +main () +{ + static char const *const tests[][3] = + { + {"a", "b", "a/b"}, + {"a/", "b", "a/b"}, + {"a/", "/b", "a/b"}, + {"a", "/b", "a/b"}, + + {"/", "b", "/b"}, + {"/", "/b", "/b"}, + {"/", "/", "/"}, + {"a", "/", "a/"}, /* this might deserve a diagnostic */ + {"/a", "/", "/a/"}, /* this might deserve a diagnostic */ + {"a", "//b", "a/b"}, + }; + size_t i; + bool fail = false; + for (i = 0; i < sizeof tests / sizeof tests[0]; i++) + { + char *base_in_result; + char const *const *t = tests[i]; + char *res = file_name_concat (t[0], t[1], &base_in_result); + if (strcmp (res, t[2]) != 0) + { + printf ("got %s, expected %s\n", res, t[2]); + fail = true; + } + } + exit (fail ? EXIT_FAILURE : EXIT_SUCCESS); +} +#endif diff --git a/gnulib/lib/filenamecat.h b/gnulib/lib/filenamecat.h new file mode 100644 index 0000000..c943b67 --- /dev/null +++ b/gnulib/lib/filenamecat.h @@ -0,0 +1,22 @@ +/* Concatenate two arbitrary file names. + + Copyright (C) 1996, 1997, 2003, 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. */ + +/* Written by Jim Meyering. */ + +char *file_name_concat (char const *dir, char const *base, + char **base_in_result); diff --git a/gnulib/lib/fnmatch.c b/gnulib/lib/fnmatch.c new file mode 100644 index 0000000..02dd365 --- /dev/null +++ b/gnulib/lib/fnmatch.c @@ -0,0 +1,354 @@ +/* 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 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. */ + +#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_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__. */ diff --git a/gnulib/lib/fnmatch_.h b/gnulib/lib/fnmatch_.h new file mode 100644 index 0000000..b086b45 --- /dev/null +++ b/gnulib/lib/fnmatch_.h @@ -0,0 +1,65 @@ +/* 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 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. */ + +#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 */ diff --git a/gnulib/lib/fnmatch_loop.c b/gnulib/lib/fnmatch_loop.c new file mode 100644 index 0000000..d1008c2 --- /dev/null +++ b/gnulib/lib/fnmatch_loop.c @@ -0,0 +1,1210 @@ +/* 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 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. */ + +/* 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 diff --git a/gnulib/lib/fopen-safer.c b/gnulib/lib/fopen-safer.c new file mode 100644 index 0000000..3502dba --- /dev/null +++ b/gnulib/lib/fopen-safer.c @@ -0,0 +1,68 @@ +/* Invoke fopen, but avoid some glitches. + + Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Paul Eggert. */ + +#include + +#include "stdio-safer.h" + +#include +#include +#include "unistd-safer.h" + +#ifndef STDERR_FILENO +# define STDERR_FILENO 2 +#endif + +/* Like fopen, but do not return stdin, stdout, or stderr. */ + +FILE * +fopen_safer (char const *file, char const *mode) +{ + FILE *fp = fopen (file, mode); + + if (fp) + { + int fd = fileno (fp); + + if (0 <= fd && fd <= STDERR_FILENO) + { + int f = dup_safer (fd); + + if (f < 0) + { + int e = errno; + fclose (fp); + errno = e; + return NULL; + } + + if (fclose (fp) != 0 + || ! (fp = fdopen (f, mode))) + { + int e = errno; + close (f); + errno = e; + return NULL; + } + } + } + + return fp; +} diff --git a/gnulib/lib/fstatat.c b/gnulib/lib/fstatat.c new file mode 100644 index 0000000..92a5164 --- /dev/null +++ b/gnulib/lib/fstatat.c @@ -0,0 +1,57 @@ +/* Work around an fstatat bug on Solaris 9. + + 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 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. */ + +/* Written by Paul Eggert and Jim Meyering. */ + +#include + +#define COMPILING_FSTATAT 1 +#include "openat.h" + +#include +#include + +/* fstatat should always follow symbolic links that end in /, but on + Solaris 9 it doesn't if AT_SYMLINK_NOFOLLOW is specified. This is + the same problem that lstat.c addresses, so solve it in a similar + way. */ + +int +rpl_fstatat (int fd, char const *file, struct stat *st, int flag) +{ + int result = fstatat (fd, file, st, flag); + + if (result == 0 && (flag & AT_SYMLINK_NOFOLLOW) && S_ISLNK (st->st_mode) + && file[strlen (file) - 1] == '/') + { + /* FILE refers to a symbolic link and the name ends with a slash. + Get info about the link's referent. */ + result = fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW); + if (result == 0 && ! S_ISDIR (st->st_mode)) + { + /* fstatat 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; + } + } + + return result; +} diff --git a/gnulib/lib/fts-cycle.c b/gnulib/lib/fts-cycle.c new file mode 100644 index 0000000..669db58 --- /dev/null +++ b/gnulib/lib/fts-cycle.c @@ -0,0 +1,161 @@ +/* Detect cycles in file tree walks. + + Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + + Written by Jim Meyering. + + 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. */ + +#include "cycle-check.h" +#include "hash.h" + +/* Use each of these to map a device/inode pair to an FTSENT. */ +struct Active_dir +{ + dev_t dev; + ino_t ino; + FTSENT *fts_ent; +}; + +static bool +AD_compare (void const *x, void const *y) +{ + struct Active_dir const *ax = x; + struct Active_dir const *ay = y; + return ax->ino == ay->ino + && ax->dev == ay->dev; +} + +static size_t +AD_hash (void const *x, size_t table_size) +{ + struct Active_dir const *ax = x; + return (uintmax_t) ax->ino % table_size; +} + +/* Set up the cycle-detection machinery. */ + +static bool +setup_dir (FTS *fts) +{ + if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) + { + enum { HT_INITIAL_SIZE = 31 }; + fts->fts_cycle.ht = hash_initialize (HT_INITIAL_SIZE, NULL, AD_hash, + AD_compare, free); + if (! fts->fts_cycle.ht) + return false; + } + else + { + fts->fts_cycle.state = malloc (sizeof *fts->fts_cycle.state); + if (! fts->fts_cycle.state) + return false; + cycle_check_init (fts->fts_cycle.state); + } + + return true; +} + +/* Enter a directory during a file tree walk. */ + +static bool +enter_dir (FTS *fts, FTSENT *ent) +{ + if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) + { + struct stat const *st = ent->fts_statp; + struct Active_dir *ad = malloc (sizeof *ad); + struct Active_dir *ad_from_table; + + if (!ad) + return false; + + ad->dev = st->st_dev; + ad->ino = st->st_ino; + ad->fts_ent = ent; + + /* See if we've already encountered this directory. + This can happen when following symlinks as well as + with a corrupted directory hierarchy. */ + ad_from_table = hash_insert (fts->fts_cycle.ht, ad); + + if (ad_from_table != ad) + { + free (ad); + if (!ad_from_table) + return false; + + /* There was an entry with matching dev/inode already in the table. + Record the fact that we've found a cycle. */ + ent->fts_cycle = ad_from_table->fts_ent; + ent->fts_info = FTS_DC; + } + } + else + { + if (cycle_check (fts->fts_cycle.state, ent->fts_statp)) + { + /* FIXME: setting fts_cycle like this isn't proper. + To do what the documentation requires, we'd have to + go around the cycle again and find the right entry. + But no callers in coreutils use the fts_cycle member. */ + ent->fts_cycle = ent; + ent->fts_info = FTS_DC; + } + } + + return true; +} + +/* Leave a directory during a file tree walk. */ + +static void +leave_dir (FTS *fts, FTSENT *ent) +{ + struct stat const *st = ent->fts_statp; + if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) + { + struct Active_dir obj; + void *found; + obj.dev = st->st_dev; + obj.ino = st->st_ino; + found = hash_delete (fts->fts_cycle.ht, &obj); + if (!found) + abort (); + free (found); + } + else + { + FTSENT *parent = ent->fts_parent; + if (parent != NULL && 0 <= parent->fts_level) + CYCLE_CHECK_REFLECT_CHDIR_UP (fts->fts_cycle.state, + *(parent->fts_statp), *st); + } +} + +/* Free any memory used for cycle detection. */ + +static void +free_dir (FTS *sp) +{ + if (sp->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) + { + if (sp->fts_cycle.ht) + hash_free (sp->fts_cycle.ht); + } + else + free (sp->fts_cycle.state); +} diff --git a/gnulib/lib/fts.c b/gnulib/lib/fts.c new file mode 100644 index 0000000..1b5384b --- /dev/null +++ b/gnulib/lib/fts.c @@ -0,0 +1,1712 @@ +/* Traverse a file hierarchy. + + Copyright (C) 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 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. */ + +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "fts_.h" + +#if HAVE_SYS_PARAM_H || defined _LIBC +# include +#endif +#ifdef _LIBC +# include +#else +# include +#endif +#include +#include +#include "dirfd.h" +#include +#include +#include +#include + +#if ! _LIBC +# include "fcntl--.h" +# include "lstat.h" +# include "openat.h" +# include "unistd--.h" +# include "same-inode.h" +#endif + +#include +#ifndef _D_EXACT_NAMLEN +# define _D_EXACT_NAMLEN(dirent) strlen ((dirent)->d_name) +#endif + +#if HAVE_STRUCT_DIRENT_D_TYPE +/* True if the type of the directory entry D is known. */ +# define DT_IS_KNOWN(d) ((d)->d_type != DT_UNKNOWN) +/* True if the type of the directory entry D must be T. */ +# define DT_MUST_BE(d, t) ((d)->d_type == (t)) +#else +# define DT_IS_KNOWN(d) false +# define DT_MUST_BE(d, t) false +#endif + +enum Fts_stat +{ + FTS_NO_STAT_REQUIRED = 1, + FTS_STAT_REQUIRED = 2 +}; + +#ifdef _LIBC +# undef close +# define close __close +# undef closedir +# define closedir __closedir +# undef fchdir +# define fchdir __fchdir +# undef open +# define open __open +# undef opendir +# define opendir __opendir +# undef readdir +# define readdir __readdir +#else +# undef internal_function +# define internal_function /* empty */ +#endif + +#ifndef __set_errno +# define __set_errno(Val) errno = (Val) +#endif + +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) /* empty */ +# endif +#endif + +#ifndef ATTRIBUTE_UNUSED +# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif + +/* If this host provides the openat function, then we can avoid + attempting to open "." in some initialization code below. */ +#ifdef HAVE_OPENAT +# define HAVE_OPENAT_SUPPORT 1 +#else +# define HAVE_OPENAT_SUPPORT 0 +#endif + +#ifdef NDEBUG +# define fts_assert(expr) ((void) 0) +#else +# define fts_assert(expr) \ + do \ + { \ + if (!(expr)) \ + abort (); \ + } \ + while (false) +#endif + +static FTSENT *fts_alloc (FTS *, const char *, size_t) internal_function; +static FTSENT *fts_build (FTS *, int) internal_function; +static void fts_lfree (FTSENT *) internal_function; +static void fts_load (FTS *, FTSENT *) internal_function; +static size_t fts_maxarglen (char * const *) internal_function; +static void fts_padjust (FTS *, FTSENT *) internal_function; +static bool fts_palloc (FTS *, size_t) internal_function; +static FTSENT *fts_sort (FTS *, FTSENT *, size_t) internal_function; +static unsigned short int fts_stat (FTS *, FTSENT *, bool) internal_function; +static int fts_safe_changedir (FTS *, FTSENT *, int, const char *) + internal_function; + +#if GNULIB_FTS +# include "fts-cycle.c" +#else +static bool enter_dir (FTS *fts, FTSENT *ent) { return true; } +static void leave_dir (FTS *fts, FTSENT *ent) {} +static bool setup_dir (FTS *fts) { return true; } +static void free_dir (FTS *fts) {} +#endif + +#ifndef MAX +# define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +#ifndef O_DIRECTORY +# define O_DIRECTORY 0 +#endif + +#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) +#define STREQ(a, b) (strcmp ((a), (b)) == 0) + +#define CLR(opt) (sp->fts_options &= ~(opt)) +#define ISSET(opt) (sp->fts_options & (opt)) +#define SET(opt) (sp->fts_options |= (opt)) + +/* FIXME: make this a function */ +#define RESTORE_INITIAL_CWD(sp) \ + (fd_ring_clear (&((sp)->fts_fd_ring)), \ + FCHDIR ((sp), (ISSET (FTS_CWDFD) ? AT_FDCWD : (sp)->fts_rfd))) + +/* FIXME: FTS_NOCHDIR is now misnamed. + Call it FTS_USE_FULL_RELATIVE_FILE_NAMES instead. */ +#define FCHDIR(sp, fd) \ + (!ISSET(FTS_NOCHDIR) && (ISSET(FTS_CWDFD) \ + ? (cwd_advance_fd ((sp), (fd), true), 0) \ + : fchdir (fd))) + + +/* fts_build flags */ +/* FIXME: make this an enum */ +#define BCHILD 1 /* fts_children */ +#define BNAMES 2 /* fts_children, names only */ +#define BREAD 3 /* fts_read */ + +#if FTS_DEBUG +# include +# include +# include +# include "getcwdat.h" +bool fts_debug = false; +# define Dprintf(x) do { if (fts_debug) printf x; } while (false) +#else +# define Dprintf(x) +# define fd_ring_check(x) +# define fd_ring_print(a, b, c) +#endif + +#define LEAVE_DIR(Fts, Ent, Tag) \ + do \ + { \ + Dprintf ((" %s-leaving: %s\n", Tag, (Ent)->fts_path)); \ + leave_dir (Fts, Ent); \ + fd_ring_check (Fts); \ + } \ + while (false) + +static void +fd_ring_clear (I_ring *fd_ring) +{ + while ( ! i_ring_empty (fd_ring)) + { + int fd = i_ring_pop (fd_ring); + if (0 <= fd) + close (fd); + } +} + +/* Overload the fts_statp->st_size member (otherwise unused, when + fts_info is FTS_NSOK) to indicate whether fts_read should stat + this entry or not. */ +static void +fts_set_stat_required (FTSENT *p, bool required) +{ + fts_assert (p->fts_info == FTS_NSOK); + p->fts_statp->st_size = (required + ? FTS_STAT_REQUIRED + : FTS_NO_STAT_REQUIRED); +} + +/* file-descriptor-relative opendir. */ +/* FIXME: if others need this function, move it into lib/openat.c */ +static inline DIR * +internal_function +opendirat (int fd, char const *dir) +{ + int new_fd = openat (fd, dir, O_RDONLY); + DIR *dirp; + + if (new_fd < 0) + return NULL; + dirp = fdopendir (new_fd); + if (dirp == NULL) + { + int saved_errno = errno; + close (new_fd); + errno = saved_errno; + } + return dirp; +} + +/* Virtual fchdir. Advance SP's working directory file descriptor, + SP->fts_cwd_fd, to FD, and push the previous value onto the fd_ring. + CHDIR_DOWN_ONE is true if FD corresponds to an entry in the directory + open on sp->fts_cwd_fd; i.e., to move the working directory one level + down. */ +static void +internal_function +cwd_advance_fd (FTS *sp, int fd, bool chdir_down_one) +{ + int old = sp->fts_cwd_fd; + fts_assert (old != fd || old == AT_FDCWD); + + if (chdir_down_one) + { + /* Push "old" onto the ring. + If the displaced file descriptor is non-negative, close it. */ + int prev_fd_in_slot = i_ring_push (&sp->fts_fd_ring, old); + fd_ring_print (sp, stderr, "post-push"); + if (0 <= prev_fd_in_slot) + close (prev_fd_in_slot); /* ignore any close failure */ + } + else if ( ! ISSET (FTS_NOCHDIR)) + { + if (0 <= old) + close (old); /* ignore any close failure */ + } + + sp->fts_cwd_fd = fd; +} + +/* Open the directory DIR if possible, and return a file + descriptor. Return -1 and set errno on failure. It doesn't matter + whether the file descriptor has read or write access. */ + +static inline int +internal_function +diropen (FTS const *sp, char const *dir) +{ + int open_flags = (O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK + | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0)); + + return (ISSET (FTS_CWDFD) + ? openat (sp->fts_cwd_fd, dir, open_flags) + : open (dir, open_flags)); +} + +FTS * +fts_open (char * const *argv, + register int options, + int (*compar) (FTSENT const **, FTSENT const **)) +{ + register FTS *sp; + register FTSENT *p, *root; + register size_t nitems; + FTSENT *parent = NULL; + FTSENT *tmp = NULL; /* pacify gcc */ + size_t len; + bool defer_stat; + + /* Options check. */ + if (options & ~FTS_OPTIONMASK) { + __set_errno (EINVAL); + return (NULL); + } + if ((options & FTS_NOCHDIR) && (options & FTS_CWDFD)) { + __set_errno (EINVAL); + return (NULL); + } + if ( ! (options & (FTS_LOGICAL | FTS_PHYSICAL))) { + __set_errno (EINVAL); + return (NULL); + } + + /* Allocate/initialize the stream */ + if ((sp = malloc(sizeof(FTS))) == NULL) + return (NULL); + memset(sp, 0, sizeof(FTS)); + sp->fts_compar = compar; + sp->fts_options = options; + + /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ + if (ISSET(FTS_LOGICAL)) { + SET(FTS_NOCHDIR); + CLR(FTS_CWDFD); + } + + /* Initialize fts_cwd_fd. */ + sp->fts_cwd_fd = AT_FDCWD; + if ( ISSET(FTS_CWDFD) && ! HAVE_OPENAT_SUPPORT) + { + /* While it isn't technically necessary to open "." this + early, doing it here saves us the trouble of ensuring + later (where it'd be messier) that "." can in fact + be opened. If not, revert to FTS_NOCHDIR mode. */ + int fd = open (".", O_RDONLY); + if (fd < 0) + { + /* Even if `.' is unreadable, don't revert to FTS_NOCHDIR mode + on systems like Linux+PROC_FS, where our openat emulation + is good enough. Note: on a system that emulates + openat via /proc, this technique can still fail, but + only in extreme conditions, e.g., when the working + directory cannot be saved (i.e. save_cwd fails) -- + and that happens on Linux only when "." is unreadable + and the CWD would be longer than PATH_MAX. + FIXME: once Linux kernel openat support is well established, + replace the above open call and this entire if/else block + with the body of the if-block below. */ + if ( openat_needs_fchdir ()) + { + SET(FTS_NOCHDIR); + CLR(FTS_CWDFD); + } + } + else + { + close (fd); + } + } + + /* + * Start out with 1K of file name space, and enough, in any case, + * to hold the user's file names. + */ +#ifndef MAXPATHLEN +# define MAXPATHLEN 1024 +#endif + { + size_t maxarglen = fts_maxarglen(argv); + if (! fts_palloc(sp, MAX(maxarglen, MAXPATHLEN))) + goto mem1; + } + + /* Allocate/initialize root's parent. */ + if (*argv != NULL) { + if ((parent = fts_alloc(sp, "", 0)) == NULL) + goto mem2; + parent->fts_level = FTS_ROOTPARENTLEVEL; + } + + /* The classic fts implementation would call fts_stat with + a new entry for each iteration of the loop below. + If the comparison function is not specified or if the + FTS_DEFER_STAT option is in effect, don't stat any entry + in this loop. This is an attempt to minimize the interval + between the initial stat/lstat/fstatat and the point at which + a directory argument is first opened. This matters for any + directory command line argument that resides on a file system + without genuine i-nodes. If you specify FTS_DEFER_STAT along + with a comparison function, that function must not access any + data via the fts_statp pointer. */ + defer_stat = (compar == NULL || ISSET(FTS_DEFER_STAT)); + + /* Allocate/initialize root(s). */ + for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { + /* Don't allow zero-length file names. */ + if ((len = strlen(*argv)) == 0) { + __set_errno (ENOENT); + goto mem3; + } + + if ((p = fts_alloc(sp, *argv, len)) == NULL) + goto mem3; + p->fts_level = FTS_ROOTLEVEL; + p->fts_parent = parent; + p->fts_accpath = p->fts_name; + /* Even when defer_stat is true, be sure to stat the first + command line argument, since fts_read (at least with + FTS_XDEV) requires that. */ + if (defer_stat && root != NULL) { + p->fts_info = FTS_NSOK; + fts_set_stat_required(p, true); + } else { + p->fts_info = fts_stat(sp, p, false); + } + + /* + * If comparison routine supplied, traverse in sorted + * order; otherwise traverse in the order specified. + */ + if (compar) { + p->fts_link = root; + root = p; + } else { + p->fts_link = NULL; + if (root == NULL) + tmp = root = p; + else { + tmp->fts_link = p; + tmp = p; + } + } + } + if (compar && nitems > 1) + root = fts_sort(sp, root, nitems); + + /* + * Allocate a dummy pointer and make fts_read think that we've just + * finished the node before the root(s); set p->fts_info to FTS_INIT + * so that everything about the "current" node is ignored. + */ + if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL) + goto mem3; + sp->fts_cur->fts_link = root; + sp->fts_cur->fts_info = FTS_INIT; + if (! setup_dir (sp)) + goto mem3; + + /* + * If using chdir(2), grab a file descriptor pointing to dot to ensure + * that we can get back here; this could be avoided for some file names, + * but almost certainly not worth the effort. Slashes, symbolic links, + * and ".." are all fairly nasty problems. Note, if we can't get the + * descriptor we run anyway, just more slowly. + */ + if (!ISSET(FTS_NOCHDIR) && !ISSET(FTS_CWDFD) + && (sp->fts_rfd = diropen (sp, ".")) < 0) + SET(FTS_NOCHDIR); + + i_ring_init (&sp->fts_fd_ring, -1); + return (sp); + +mem3: fts_lfree(root); + free(parent); +mem2: free(sp->fts_path); +mem1: free(sp); + return (NULL); +} + +static void +internal_function +fts_load (FTS *sp, register FTSENT *p) +{ + register size_t len; + register char *cp; + + /* + * Load the stream structure for the next traversal. Since we don't + * actually enter the directory until after the preorder visit, set + * the fts_accpath field specially so the chdir gets done to the right + * place and the user can access the first node. From fts_open it's + * known that the file name will fit. + */ + len = p->fts_pathlen = p->fts_namelen; + memmove(sp->fts_path, p->fts_name, len + 1); + if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { + len = strlen(++cp); + memmove(p->fts_name, cp, len + 1); + p->fts_namelen = len; + } + p->fts_accpath = p->fts_path = sp->fts_path; +} + +int +fts_close (FTS *sp) +{ + register FTSENT *freep, *p; + int saved_errno = 0; + + /* + * This still works if we haven't read anything -- the dummy structure + * points to the root list, so we step through to the end of the root + * list which has a valid parent pointer. + */ + if (sp->fts_cur) { + for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { + freep = p; + p = p->fts_link != NULL ? p->fts_link : p->fts_parent; + free(freep); + } + free(p); + } + + /* Free up child linked list, sort array, file name buffer. */ + if (sp->fts_child) + fts_lfree(sp->fts_child); + free(sp->fts_array); + free(sp->fts_path); + + if (ISSET(FTS_CWDFD)) + { + if (0 <= sp->fts_cwd_fd) + close (sp->fts_cwd_fd); + } + else if (!ISSET(FTS_NOCHDIR)) + { + /* Return to original directory, save errno if necessary. */ + if (fchdir(sp->fts_rfd)) + saved_errno = errno; + close(sp->fts_rfd); + } + + fd_ring_clear (&sp->fts_fd_ring); + free_dir (sp); + + /* Free up the stream pointer. */ + free(sp); + + /* Set errno and return. */ + if (saved_errno) { + __set_errno (saved_errno); + return (-1); + } + + return (0); +} + +/* + * Special case of "/" at the end of the file name so that slashes aren't + * appended which would cause file names to be written as "....//foo". + */ +#define NAPPEND(p) \ + (p->fts_path[p->fts_pathlen - 1] == '/' \ + ? p->fts_pathlen - 1 : p->fts_pathlen) + +FTSENT * +fts_read (register FTS *sp) +{ + register FTSENT *p, *tmp; + register unsigned short int instr; + register char *t; + + /* If finished or unrecoverable error, return NULL. */ + if (sp->fts_cur == NULL || ISSET(FTS_STOP)) + return (NULL); + + /* Set current node pointer. */ + p = sp->fts_cur; + + /* Save and zero out user instructions. */ + instr = p->fts_instr; + p->fts_instr = FTS_NOINSTR; + + /* Any type of file may be re-visited; re-stat and re-turn. */ + if (instr == FTS_AGAIN) { + p->fts_info = fts_stat(sp, p, false); + return (p); + } + Dprintf (("fts_read: p=%s\n", + p->fts_info == FTS_INIT ? "" : p->fts_path)); + + /* + * Following a symlink -- SLNONE test allows application to see + * SLNONE and recover. If indirecting through a symlink, have + * keep a pointer to current location. If unable to get that + * pointer, follow fails. + */ + if (instr == FTS_FOLLOW && + (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { + p->fts_info = fts_stat(sp, p, true); + if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { + if ((p->fts_symfd = diropen (sp, ".")) < 0) { + p->fts_errno = errno; + p->fts_info = FTS_ERR; + } else + p->fts_flags |= FTS_SYMFOLLOW; + } + goto check_for_dir; + } + + /* Directory in pre-order. */ + if (p->fts_info == FTS_D) { + /* If skipped or crossed mount point, do post-order visit. */ + if (instr == FTS_SKIP || + (ISSET(FTS_XDEV) && p->fts_statp->st_dev != sp->fts_dev)) { + if (p->fts_flags & FTS_SYMFOLLOW) + (void)close(p->fts_symfd); + if (sp->fts_child) { + fts_lfree(sp->fts_child); + sp->fts_child = NULL; + } + p->fts_info = FTS_DP; + LEAVE_DIR (sp, p, "1"); + return (p); + } + + /* Rebuild if only read the names and now traversing. */ + if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { + CLR(FTS_NAMEONLY); + fts_lfree(sp->fts_child); + sp->fts_child = NULL; + } + + /* + * Cd to the subdirectory. + * + * If have already read and now fail to chdir, whack the list + * to make the names come out right, and set the parent errno + * so the application will eventually get an error condition. + * Set the FTS_DONTCHDIR flag so that when we logically change + * directories back to the parent we don't do a chdir. + * + * If haven't read do so. If the read fails, fts_build sets + * FTS_STOP or the fts_info field of the node. + */ + if (sp->fts_child != NULL) { + if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { + p->fts_errno = errno; + p->fts_flags |= FTS_DONTCHDIR; + for (p = sp->fts_child; p != NULL; + p = p->fts_link) + p->fts_accpath = + p->fts_parent->fts_accpath; + } + } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) { + if (ISSET(FTS_STOP)) + return (NULL); + /* If fts_build's call to fts_safe_changedir failed + because it was not able to fchdir into a + subdirectory, tell the caller. */ + if (p->fts_errno) + p->fts_info = FTS_ERR; + LEAVE_DIR (sp, p, "2"); + return (p); + } + p = sp->fts_child; + sp->fts_child = NULL; + goto name; + } + + /* Move to the next node on this level. */ +next: tmp = p; + if ((p = p->fts_link) != NULL) { + sp->fts_cur = p; + free(tmp); + + /* + * If reached the top, return to the original directory (or + * the root of the tree), and load the file names for the next + * root. + */ + if (p->fts_level == FTS_ROOTLEVEL) { + if (RESTORE_INITIAL_CWD(sp)) { + SET(FTS_STOP); + return (NULL); + } + fts_load(sp, p); + goto check_for_dir; + } + + /* + * User may have called fts_set on the node. If skipped, + * ignore. If followed, get a file descriptor so we can + * get back if necessary. + */ + if (p->fts_instr == FTS_SKIP) + goto next; + if (p->fts_instr == FTS_FOLLOW) { + p->fts_info = fts_stat(sp, p, true); + if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { + if ((p->fts_symfd = diropen (sp, ".")) < 0) { + p->fts_errno = errno; + p->fts_info = FTS_ERR; + } else + p->fts_flags |= FTS_SYMFOLLOW; + } + p->fts_instr = FTS_NOINSTR; + } + +name: t = sp->fts_path + NAPPEND(p->fts_parent); + *t++ = '/'; + memmove(t, p->fts_name, p->fts_namelen + 1); +check_for_dir: + sp->fts_cur = p; + if (p->fts_info == FTS_NSOK) + { + if (p->fts_statp->st_size == FTS_STAT_REQUIRED) + p->fts_info = fts_stat(sp, p, false); + else + fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED); + } + + if (p->fts_info == FTS_D) + { + /* Now that P->fts_statp is guaranteed to be valid, + if this is a command-line directory, record its + device number, to be used for FTS_XDEV. */ + if (p->fts_level == FTS_ROOTLEVEL) + sp->fts_dev = p->fts_statp->st_dev; + Dprintf ((" entering: %s\n", p->fts_path)); + if (! enter_dir (sp, p)) + { + __set_errno (ENOMEM); + return NULL; + } + } + return p; + } + + /* Move up to the parent node. */ + p = tmp->fts_parent; + sp->fts_cur = p; + free(tmp); + + if (p->fts_level == FTS_ROOTPARENTLEVEL) { + /* + * Done; free everything up and set errno to 0 so the user + * can distinguish between error and EOF. + */ + free(p); + __set_errno (0); + return (sp->fts_cur = NULL); + } + + fts_assert (p->fts_info != FTS_NSOK); + + /* NUL terminate the file name. */ + sp->fts_path[p->fts_pathlen] = '\0'; + + /* + * Return to the parent directory. If at a root node, restore + * the initial working directory. If we came through a symlink, + * go back through the file descriptor. Otherwise, move up + * one level, via "..". + */ + if (p->fts_level == FTS_ROOTLEVEL) { + if (RESTORE_INITIAL_CWD(sp)) { + p->fts_errno = errno; + SET(FTS_STOP); + } + } else if (p->fts_flags & FTS_SYMFOLLOW) { + if (FCHDIR(sp, p->fts_symfd)) { + int saved_errno = errno; + (void)close(p->fts_symfd); + __set_errno (saved_errno); + p->fts_errno = errno; + SET(FTS_STOP); + } + (void)close(p->fts_symfd); + } else if (!(p->fts_flags & FTS_DONTCHDIR) && + fts_safe_changedir(sp, p->fts_parent, -1, "..")) { + p->fts_errno = errno; + SET(FTS_STOP); + } + p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; + if (p->fts_errno == 0) + LEAVE_DIR (sp, p, "3"); + return ISSET(FTS_STOP) ? NULL : p; +} + +/* + * Fts_set takes the stream as an argument although it's not used in this + * implementation; it would be necessary if anyone wanted to add global + * semantics to fts using fts_set. An error return is allowed for similar + * reasons. + */ +/* ARGSUSED */ +int +fts_set(FTS *sp ATTRIBUTE_UNUSED, FTSENT *p, int instr) +{ + if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && + instr != FTS_NOINSTR && instr != FTS_SKIP) { + __set_errno (EINVAL); + return (1); + } + p->fts_instr = instr; + return (0); +} + +FTSENT * +fts_children (register FTS *sp, int instr) +{ + register FTSENT *p; + int fd; + + if (instr != 0 && instr != FTS_NAMEONLY) { + __set_errno (EINVAL); + return (NULL); + } + + /* Set current node pointer. */ + p = sp->fts_cur; + + /* + * Errno set to 0 so user can distinguish empty directory from + * an error. + */ + __set_errno (0); + + /* Fatal errors stop here. */ + if (ISSET(FTS_STOP)) + return (NULL); + + /* Return logical hierarchy of user's arguments. */ + if (p->fts_info == FTS_INIT) + return (p->fts_link); + + /* + * If not a directory being visited in pre-order, stop here. Could + * allow FTS_DNR, assuming the user has fixed the problem, but the + * same effect is available with FTS_AGAIN. + */ + if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */) + return (NULL); + + /* Free up any previous child list. */ + if (sp->fts_child != NULL) + fts_lfree(sp->fts_child); + + if (instr == FTS_NAMEONLY) { + SET(FTS_NAMEONLY); + instr = BNAMES; + } else + instr = BCHILD; + + /* + * If using chdir on a relative file name and called BEFORE fts_read + * does its chdir to the root of a traversal, we can lose -- we need to + * chdir into the subdirectory, and we don't know where the current + * directory is, so we can't get back so that the upcoming chdir by + * fts_read will work. + */ + if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' || + ISSET(FTS_NOCHDIR)) + return (sp->fts_child = fts_build(sp, instr)); + + if ((fd = diropen (sp, ".")) < 0) + return (sp->fts_child = NULL); + sp->fts_child = fts_build(sp, instr); + if (ISSET(FTS_CWDFD)) + { + cwd_advance_fd (sp, fd, true); + } + else + { + if (fchdir(fd)) + { + int saved_errno = errno; + close (fd); + __set_errno (saved_errno); + return NULL; + } + close (fd); + } + return (sp->fts_child); +} + +/* + * This is the tricky part -- do not casually change *anything* in here. The + * idea is to build the linked list of entries that are used by fts_children + * and fts_read. There are lots of special cases. + * + * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is + * set and it's a physical walk (so that symbolic links can't be directories), + * we can do things quickly. First, if it's a 4.4BSD file system, the type + * of the file is in the directory entry. Otherwise, we assume that the number + * of subdirectories in a node is equal to the number of links to the parent. + * The former skips all stat calls. The latter skips stat calls in any leaf + * directories and for any files after the subdirectories in the directory have + * been found, cutting the stat calls by about 2/3. + */ +static FTSENT * +internal_function +fts_build (register FTS *sp, int type) +{ + register struct dirent *dp; + register FTSENT *p, *head; + register size_t nitems; + FTSENT *cur, *tail; + DIR *dirp; + void *oldaddr; + int saved_errno; + bool descend; + bool doadjust; + ptrdiff_t level; + nlink_t nlinks; + bool nostat; + size_t len, maxlen, new_len; + char *cp; + + /* Set current node pointer. */ + cur = sp->fts_cur; + + /* + * Open the directory for reading. If this fails, we're done. + * If being called from fts_read, set the fts_info field. + */ +#if defined FTS_WHITEOUT && 0 + if (ISSET(FTS_WHITEOUT)) + oflag = DTF_NODUP|DTF_REWIND; + else + oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND; +#else +# define __opendir2(file, flag) \ + ( ! ISSET(FTS_NOCHDIR) && ISSET(FTS_CWDFD) \ + ? opendirat(sp->fts_cwd_fd, file) \ + : opendir(file)) +#endif + if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) { + if (type == BREAD) { + cur->fts_info = FTS_DNR; + cur->fts_errno = errno; + } + return (NULL); + } + /* Rather than calling fts_stat for each and every entry encountered + in the readdir loop (below), stat each directory only right after + opening it. */ + if (cur->fts_info == FTS_NSOK) + cur->fts_info = fts_stat(sp, cur, false); + + /* + * Nlinks is the number of possible entries of type directory in the + * directory if we're cheating on stat calls, 0 if we're not doing + * any stat calls at all, (nlink_t) -1 if we're statting everything. + */ + if (type == BNAMES) { + nlinks = 0; + /* Be quiet about nostat, GCC. */ + nostat = false; + } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { + nlinks = (cur->fts_statp->st_nlink + - (ISSET(FTS_SEEDOT) ? 0 : 2)); + nostat = true; + } else { + nlinks = -1; + nostat = false; + } + + /* + * If we're going to need to stat anything or we want to descend + * and stay in the directory, chdir. If this fails we keep going, + * but set a flag so we don't chdir after the post-order visit. + * We won't be able to stat anything, but we can still return the + * names themselves. Note, that since fts_read won't be able to + * chdir into the directory, it will have to return different file + * names than before, i.e. "a/b" instead of "b". Since the node + * has already been visited in pre-order, have to wait until the + * post-order visit to return the error. There is a special case + * here, if there was nothing to stat then it's not an error to + * not be able to stat. This is all fairly nasty. If a program + * needed sorted entries or stat information, they had better be + * checking FTS_NS on the returned nodes. + */ + if (nlinks || type == BREAD) { + int dir_fd = dirfd(dirp); + if (ISSET(FTS_CWDFD) && 0 <= dir_fd) + dir_fd = dup (dir_fd); + if (dir_fd < 0 || fts_safe_changedir(sp, cur, dir_fd, NULL)) { + if (nlinks && type == BREAD) + cur->fts_errno = errno; + cur->fts_flags |= FTS_DONTCHDIR; + descend = false; + closedir(dirp); + if (ISSET(FTS_CWDFD) && 0 <= dir_fd) + close (dir_fd); + dirp = NULL; + } else + descend = true; + } else + descend = false; + + /* + * Figure out the max file name length that can be stored in the + * current buffer -- the inner loop allocates more space as necessary. + * We really wouldn't have to do the maxlen calculations here, we + * could do them in fts_read before returning the name, but it's a + * lot easier here since the length is part of the dirent structure. + * + * If not changing directories set a pointer so that can just append + * each new component into the file name. + */ + len = NAPPEND(cur); + if (ISSET(FTS_NOCHDIR)) { + cp = sp->fts_path + len; + *cp++ = '/'; + } else { + /* GCC, you're too verbose. */ + cp = NULL; + } + len++; + maxlen = sp->fts_pathlen - len; + + level = cur->fts_level + 1; + + /* Read the directory, attaching each entry to the `link' pointer. */ + doadjust = false; + for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { + bool is_dir; + + if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) + continue; + + if ((p = fts_alloc (sp, dp->d_name, + _D_EXACT_NAMLEN (dp))) == NULL) + goto mem1; + if (_D_EXACT_NAMLEN (dp) >= maxlen) { + /* include space for NUL */ + oldaddr = sp->fts_path; + if (! fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) { + /* + * No more memory. Save + * errno, free up the current structure and the + * structures already allocated. + */ +mem1: saved_errno = errno; + free(p); + fts_lfree(head); + closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + __set_errno (saved_errno); + return (NULL); + } + /* Did realloc() change the pointer? */ + if (oldaddr != sp->fts_path) { + doadjust = true; + if (ISSET(FTS_NOCHDIR)) + cp = sp->fts_path + len; + } + maxlen = sp->fts_pathlen - len; + } + + new_len = len + _D_EXACT_NAMLEN (dp); + if (new_len < len) { + /* + * In the unlikely even that we would end up + * with a file name longer than SIZE_MAX, free up + * the current structure and the structures already + * allocated, then error out with ENAMETOOLONG. + */ + free(p); + fts_lfree(head); + closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + __set_errno (ENAMETOOLONG); + return (NULL); + } + p->fts_level = level; + p->fts_parent = sp->fts_cur; + p->fts_pathlen = new_len; + +#if defined FTS_WHITEOUT && 0 + if (dp->d_type == DT_WHT) + p->fts_flags |= FTS_ISW; +#endif + + /* Build a file name for fts_stat to stat. */ + if (ISSET(FTS_NOCHDIR)) { + p->fts_accpath = p->fts_path; + memmove(cp, p->fts_name, p->fts_namelen + 1); + } else + p->fts_accpath = p->fts_name; + + if (sp->fts_compar == NULL || ISSET(FTS_DEFER_STAT)) { + /* Record what fts_read will have to do with this + entry. In many cases, it will simply fts_stat it, + but we can take advantage of any d_type information + to optimize away the unnecessary stat calls. I.e., + if FTS_NOSTAT is in effect and we're not following + symlinks (FTS_PHYSICAL) and d_type indicates this + is *not* a directory, then we won't have to stat it + at all. If it *is* a directory, then (currently) + we stat it regardless, in order to get device and + inode numbers. Some day we might optimize that + away, too, for directories where d_ino is known to + be valid. */ + bool skip_stat = (ISSET(FTS_PHYSICAL) + && ISSET(FTS_NOSTAT) + && DT_IS_KNOWN(dp) + && ! DT_MUST_BE(dp, DT_DIR)); + p->fts_info = FTS_NSOK; + fts_set_stat_required(p, !skip_stat); + is_dir = (ISSET(FTS_PHYSICAL) && ISSET(FTS_NOSTAT) + && DT_MUST_BE(dp, DT_DIR)); + } else { + p->fts_info = fts_stat(sp, p, false); + is_dir = (p->fts_info == FTS_D + || p->fts_info == FTS_DC + || p->fts_info == FTS_DOT); + } + + /* Decrement link count if applicable. */ + if (nlinks > 0 && is_dir) + nlinks -= nostat; + + /* We walk in directory order so "ls -f" doesn't get upset. */ + p->fts_link = NULL; + if (head == NULL) + head = tail = p; + else { + tail->fts_link = p; + tail = p; + } + ++nitems; + } + if (dirp) + closedir(dirp); + + /* + * If realloc() changed the address of the file name, adjust the + * addresses for the rest of the tree and the dir list. + */ + if (doadjust) + fts_padjust(sp, head); + + /* + * If not changing directories, reset the file name back to original + * state. + */ + if (ISSET(FTS_NOCHDIR)) { + if (len == sp->fts_pathlen || nitems == 0) + --cp; + *cp = '\0'; + } + + /* + * If descended after called from fts_children or after called from + * fts_read and nothing found, get back. At the root level we use + * the saved fd; if one of fts_open()'s arguments is a relative name + * to an empty directory, we wind up here with no other way back. If + * can't get back, we're done. + */ + if (descend && (type == BCHILD || !nitems) && + (cur->fts_level == FTS_ROOTLEVEL + ? RESTORE_INITIAL_CWD(sp) + : fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + fts_lfree(head); + return (NULL); + } + + /* If didn't find anything, return NULL. */ + if (!nitems) { + if (type == BREAD) + cur->fts_info = FTS_DP; + fts_lfree(head); + return (NULL); + } + + /* Sort the entries. */ + if (sp->fts_compar && nitems > 1) + head = fts_sort(sp, head, nitems); + return (head); +} + +#if FTS_DEBUG + +/* Walk ->fts_parent links starting at E_CURR, until the root of the + current hierarchy. There should be a directory with dev/inode + matching those of AD. If not, print a lot of diagnostics. */ +static void +find_matching_ancestor (FTSENT const *e_curr, struct Active_dir const *ad) +{ + FTSENT const *ent; + for (ent = e_curr; ent->fts_level >= FTS_ROOTLEVEL; ent = ent->fts_parent) + { + if (ad->ino == ent->fts_statp->st_ino + && ad->dev == ent->fts_statp->st_dev) + return; + } + printf ("ERROR: tree dir, %s, not active\n", ad->fts_ent->fts_accpath); + printf ("active dirs:\n"); + for (ent = e_curr; + ent->fts_level >= FTS_ROOTLEVEL; ent = ent->fts_parent) + printf (" %s(%"PRIuMAX"/%"PRIuMAX") to %s(%"PRIuMAX"/%"PRIuMAX")...\n", + ad->fts_ent->fts_accpath, + (uintmax_t) ad->dev, + (uintmax_t) ad->ino, + ent->fts_accpath, + (uintmax_t) ent->fts_statp->st_dev, + (uintmax_t) ent->fts_statp->st_ino); +} + +void +fts_cross_check (FTS const *sp) +{ + FTSENT const *ent = sp->fts_cur; + FTSENT const *t; + if ( ! ISSET (FTS_TIGHT_CYCLE_CHECK)) + return; + + Dprintf (("fts-cross-check cur=%s\n", ent->fts_path)); + /* Make sure every parent dir is in the tree. */ + for (t = ent->fts_parent; t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) + { + struct Active_dir ad; + ad.ino = t->fts_statp->st_ino; + ad.dev = t->fts_statp->st_dev; + if ( ! hash_lookup (sp->fts_cycle.ht, &ad)) + printf ("ERROR: active dir, %s, not in tree\n", t->fts_path); + } + + /* Make sure every dir in the tree is an active dir. + But ENT is not necessarily a directory. If so, just skip this part. */ + if (ent->fts_parent->fts_level >= FTS_ROOTLEVEL + && (ent->fts_info == FTS_DP + || ent->fts_info == FTS_D)) + { + struct Active_dir *ad; + for (ad = hash_get_first (sp->fts_cycle.ht); ad != NULL; + ad = hash_get_next (sp->fts_cycle.ht, ad)) + { + find_matching_ancestor (ent, ad); + } + } +} + +static bool +same_fd (int fd1, int fd2) +{ + struct stat sb1, sb2; + return (fstat (fd1, &sb1) == 0 + && fstat (fd2, &sb2) == 0 + && SAME_INODE (sb1, sb2)); +} + +static void +fd_ring_print (FTS const *sp, FILE *stream, char const *msg) +{ + I_ring const *fd_ring = &sp->fts_fd_ring; + unsigned int i = fd_ring->fts_front; + char *cwd = getcwdat (sp->fts_cwd_fd, NULL, 0); + fprintf (stream, "=== %s ========== %s\n", msg, cwd); + free (cwd); + if (i_ring_empty (fd_ring)) + return; + + while (true) + { + int fd = fd_ring->fts_fd_ring[i]; + if (fd < 0) + fprintf (stream, "%d: %d:\n", i, fd); + else + { + char *wd = getcwdat (fd, NULL, 0); + fprintf (stream, "%d: %d: %s\n", i, fd, wd); + free (wd); + } + if (i == fd_ring->fts_back) + break; + i = (i + I_RING_SIZE - 1) % I_RING_SIZE; + } +} + +/* Ensure that each file descriptor on the fd_ring matches a + parent, grandparent, etc. of the current working directory. */ +static void +fd_ring_check (FTS const *sp) +{ + if (!fts_debug) + return; + + /* Make a writable copy. */ + I_ring fd_w = sp->fts_fd_ring; + + int cwd_fd = sp->fts_cwd_fd; + cwd_fd = dup (cwd_fd); + char *dot = getcwdat (cwd_fd, NULL, 0); + error (0, 0, "===== check ===== cwd: %s", dot); + free (dot); + while ( ! i_ring_empty (&fd_w)) + { + int fd = i_ring_pop (&fd_w); + if (0 <= fd) + { + int parent_fd = openat (cwd_fd, "..", O_RDONLY); + if (parent_fd < 0) + { + // Warn? + break; + } + if (!same_fd (fd, parent_fd)) + { + char *cwd = getcwdat (fd, NULL, 0); + error (0, errno, "ring : %s", cwd); + char *c2 = getcwdat (parent_fd, NULL, 0); + error (0, errno, "parent: %s", c2); + free (cwd); + free (c2); + fts_assert (0); + } + close (cwd_fd); + cwd_fd = parent_fd; + } + } + close (cwd_fd); +} +#endif + +static unsigned short int +internal_function +fts_stat(FTS *sp, register FTSENT *p, bool follow) +{ + struct stat *sbp = p->fts_statp; + int saved_errno; + + if (p->fts_level == FTS_ROOTLEVEL && ISSET(FTS_COMFOLLOW)) + follow = true; + +#if defined FTS_WHITEOUT && 0 + /* check for whiteout */ + if (p->fts_flags & FTS_ISW) { + memset(sbp, '\0', sizeof (*sbp)); + sbp->st_mode = S_IFWHT; + return (FTS_W); + } +#endif + + /* + * If doing a logical walk, or application requested FTS_FOLLOW, do + * a stat(2). If that fails, check for a non-existent symlink. If + * fail, set the errno from the stat call. + */ + if (ISSET(FTS_LOGICAL) || follow) { + if (stat(p->fts_accpath, sbp)) { + saved_errno = errno; + if (errno == ENOENT + && lstat(p->fts_accpath, sbp) == 0) { + __set_errno (0); + return (FTS_SLNONE); + } + p->fts_errno = saved_errno; + goto err; + } + } else if (fstatat(sp->fts_cwd_fd, p->fts_accpath, sbp, + AT_SYMLINK_NOFOLLOW)) { + p->fts_errno = errno; +err: memset(sbp, 0, sizeof(struct stat)); + return (FTS_NS); + } + + if (S_ISDIR(sbp->st_mode)) { + if (ISDOT(p->fts_name)) { + /* Command-line "." and ".." are real directories. */ + return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT); + } + +#if !GNULIB_FTS + { + /* + * Cycle detection is done by brute force when the directory + * is first encountered. If the tree gets deep enough or the + * number of symbolic links to directories is high enough, + * something faster might be worthwhile. + */ + FTSENT *t; + + for (t = p->fts_parent; + t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) + if (sbp->st_ino == t->fts_statp->st_ino + && sbp->st_dev == t->fts_statp->st_dev) + { + p->fts_cycle = t; + return (FTS_DC); + } + } +#endif + + return (FTS_D); + } + if (S_ISLNK(sbp->st_mode)) + return (FTS_SL); + if (S_ISREG(sbp->st_mode)) + return (FTS_F); + return (FTS_DEFAULT); +} + +static int +fts_compar (void const *a, void const *b) +{ + /* Convert A and B to the correct types, to pacify the compiler, and + for portability to bizarre hosts where "void const *" and "FTSENT + const **" differ in runtime representation. The comparison + function cannot modify *a and *b, but there is no compile-time + check for this. */ + FTSENT const **pa = (FTSENT const **) a; + FTSENT const **pb = (FTSENT const **) b; + return pa[0]->fts_fts->fts_compar (pa, pb); +} + +static FTSENT * +internal_function +fts_sort (FTS *sp, FTSENT *head, register size_t nitems) +{ + register FTSENT **ap, *p; + + /* On most modern hosts, void * and FTSENT ** have the same + run-time representation, and one can convert sp->fts_compar to + the type qsort expects without problem. Use the heuristic that + this is OK if the two pointer types are the same size, and if + converting FTSENT ** to long int is the same as converting + FTSENT ** to void * and then to long int. This heuristic isn't + valid in general but we don't know of any counterexamples. */ + FTSENT *dummy; + int (*compare) (void const *, void const *) = + ((sizeof &dummy == sizeof (void *) + && (long int) &dummy == (long int) (void *) &dummy) + ? (int (*) (void const *, void const *)) sp->fts_compar + : fts_compar); + + /* + * Construct an array of pointers to the structures and call qsort(3). + * Reassemble the array in the order returned by qsort. If unable to + * sort for memory reasons, return the directory entries in their + * current order. Allocate enough space for the current needs plus + * 40 so don't realloc one entry at a time. + */ + if (nitems > sp->fts_nitems) { + struct _ftsent **a; + + sp->fts_nitems = nitems + 40; + if (SIZE_MAX / sizeof *a < sp->fts_nitems + || ! (a = realloc (sp->fts_array, + sp->fts_nitems * sizeof *a))) { + free(sp->fts_array); + sp->fts_array = NULL; + sp->fts_nitems = 0; + return (head); + } + sp->fts_array = a; + } + for (ap = sp->fts_array, p = head; p; p = p->fts_link) + *ap++ = p; + qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), compare); + for (head = *(ap = sp->fts_array); --nitems; ++ap) + ap[0]->fts_link = ap[1]; + ap[0]->fts_link = NULL; + return (head); +} + +static FTSENT * +internal_function +fts_alloc (FTS *sp, const char *name, register size_t namelen) +{ + register FTSENT *p; + size_t len; + + /* + * The file name is a variable length array. Allocate the FTSENT + * structure and the file name in one chunk. + */ + len = sizeof(FTSENT) + namelen; + if ((p = malloc(len)) == NULL) + return (NULL); + + /* Copy the name and guarantee NUL termination. */ + memmove(p->fts_name, name, namelen); + p->fts_name[namelen] = '\0'; + + p->fts_namelen = namelen; + p->fts_fts = sp; + p->fts_path = sp->fts_path; + p->fts_errno = 0; + p->fts_flags = 0; + p->fts_instr = FTS_NOINSTR; + p->fts_number = 0; + p->fts_pointer = NULL; + return (p); +} + +static void +internal_function +fts_lfree (register FTSENT *head) +{ + register FTSENT *p; + + /* Free a linked list of structures. */ + while ((p = head)) { + head = head->fts_link; + free(p); + } +} + +/* + * Allow essentially unlimited file name lengths; find, rm, ls should + * all work on any tree. Most systems will allow creation of file + * names much longer than MAXPATHLEN, even though the kernel won't + * resolve them. Add the size (not just what's needed) plus 256 bytes + * so don't realloc the file name 2 bytes at a time. + */ +static bool +internal_function +fts_palloc (FTS *sp, size_t more) +{ + char *p; + size_t new_len = sp->fts_pathlen + more + 256; + + /* + * See if fts_pathlen would overflow. + */ + if (new_len < sp->fts_pathlen) { + free(sp->fts_path); + sp->fts_path = NULL; + __set_errno (ENAMETOOLONG); + return false; + } + sp->fts_pathlen = new_len; + p = realloc(sp->fts_path, sp->fts_pathlen); + if (p == NULL) { + free(sp->fts_path); + sp->fts_path = NULL; + return false; + } + sp->fts_path = p; + return true; +} + +/* + * When the file name is realloc'd, have to fix all of the pointers in + * structures already returned. + */ +static void +internal_function +fts_padjust (FTS *sp, FTSENT *head) +{ + FTSENT *p; + char *addr = sp->fts_path; + +#define ADJUST(p) do { \ + if ((p)->fts_accpath != (p)->fts_name) { \ + (p)->fts_accpath = \ + (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ + } \ + (p)->fts_path = addr; \ +} while (0) + /* Adjust the current set of children. */ + for (p = sp->fts_child; p; p = p->fts_link) + ADJUST(p); + + /* Adjust the rest of the tree, including the current level. */ + for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { + ADJUST(p); + p = p->fts_link ? p->fts_link : p->fts_parent; + } +} + +static size_t +internal_function +fts_maxarglen (char * const *argv) +{ + size_t len, max; + + for (max = 0; *argv; ++argv) + if ((len = strlen(*argv)) > max) + max = len; + return (max + 1); +} + +/* + * Change to dir specified by fd or file name without getting + * tricked by someone changing the world out from underneath us. + * Assumes p->fts_statp->st_dev and p->fts_statp->st_ino are filled in. + * If FD is non-negative, expect it to be used after this function returns, + * and to be closed eventually. So don't pass e.g., `dirfd(dirp)' and then + * do closedir(dirp), because that would invalidate the saved FD. + * Upon failure, close FD immediately and return nonzero. + */ +static int +internal_function +fts_safe_changedir (FTS *sp, FTSENT *p, int fd, char const *dir) +{ + int ret; + bool is_dotdot = dir && STREQ (dir, ".."); + int newfd; + + /* This clause handles the unusual case in which FTS_NOCHDIR + is specified, along with FTS_CWDFD. In that case, there is + no need to change even the virtual cwd file descriptor. + However, if FD is non-negative, we do close it here. */ + if (ISSET (FTS_NOCHDIR)) + { + if (ISSET (FTS_CWDFD) && 0 <= fd) + close (fd); + return 0; + } + + if (fd < 0 && is_dotdot && ISSET (FTS_CWDFD)) + { + /* When possible, skip the diropen and subsequent fstat+dev/ino + comparison. I.e., when changing to parent directory + (chdir ("..")), use a file descriptor from the ring and + save the overhead of diropen+fstat, as well as avoiding + failure when we lack "x" access to the virtual cwd. */ + if ( ! i_ring_empty (&sp->fts_fd_ring)) + { + int parent_fd; + fd_ring_print (sp, stderr, "pre-pop"); + parent_fd = i_ring_pop (&sp->fts_fd_ring); + is_dotdot = true; + if (0 <= parent_fd) + { + fd = parent_fd; + dir = NULL; + } + } + } + + newfd = fd; + if (fd < 0 && (newfd = diropen (sp, dir)) < 0) + return -1; + + /* The following dev/inode check is necessary if we're doing a + `logical' traversal (through symlinks, a la chown -L), if the + system lacks O_NOFOLLOW support, or if we're changing to ".." + (but not via a popped file descriptor). When changing to the + name "..", O_NOFOLLOW can't help. In general, when the target is + not "..", diropen's use of O_NOFOLLOW ensures we don't mistakenly + follow a symlink, so we can avoid the expense of this fstat. */ + if (ISSET(FTS_LOGICAL) || ! HAVE_WORKING_O_NOFOLLOW + || (dir && STREQ (dir, ".."))) + { + struct stat sb; + if (fstat(newfd, &sb)) + { + ret = -1; + goto bail; + } + if (p->fts_statp->st_dev != sb.st_dev + || p->fts_statp->st_ino != sb.st_ino) + { + __set_errno (ENOENT); /* disinformation */ + ret = -1; + goto bail; + } + } + + if (ISSET(FTS_CWDFD)) + { + cwd_advance_fd (sp, newfd, ! is_dotdot); + return 0; + } + + ret = fchdir(newfd); +bail: + if (fd < 0) + { + int oerrno = errno; + (void)close(newfd); + __set_errno (oerrno); + } + return ret; +} diff --git a/gnulib/lib/fts_.h b/gnulib/lib/fts_.h new file mode 100644 index 0000000..a8a52d2 --- /dev/null +++ b/gnulib/lib/fts_.h @@ -0,0 +1,233 @@ +/* Traverse a file hierarchy. + + Copyright (C) 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 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. */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)fts.h 8.3 (Berkeley) 8/14/94 + */ + +#ifndef _FTS_H +# define _FTS_H 1 + +# ifdef _LIBC +# include +# else +# undef __THROW +# define __THROW +# undef __BEGIN_DECLS +# define __BEGIN_DECLS +# undef __END_DECLS +# define __END_DECLS +# endif + +# include +# include +# include +# include "i-ring.h" + +typedef struct { + struct _ftsent *fts_cur; /* current node */ + struct _ftsent *fts_child; /* linked list of children */ + struct _ftsent **fts_array; /* sort array */ + dev_t fts_dev; /* starting device # */ + char *fts_path; /* file name for this descent */ + int fts_rfd; /* fd for root */ + int fts_cwd_fd; /* the file descriptor on which the + virtual cwd is open, or AT_FDCWD */ + size_t fts_pathlen; /* sizeof(path) */ + size_t fts_nitems; /* elements in the sort array */ + int (*fts_compar) (struct _ftsent const **, struct _ftsent const **); + /* compare fn */ + +# define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ +# define FTS_LOGICAL 0x0002 /* logical walk */ +# define FTS_NOCHDIR 0x0004 /* don't change directories */ +# define FTS_NOSTAT 0x0008 /* don't get stat info */ +# define FTS_PHYSICAL 0x0010 /* physical walk */ +# define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ +# define FTS_XDEV 0x0040 /* don't cross devices */ +# define FTS_WHITEOUT 0x0080 /* return whiteout information */ + + /* There are two ways to detect cycles. + The lazy way (which works only with FTS_PHYSICAL), + with which one may process a directory that is a + part of the cycle several times before detecting the cycle. + The `tight' way, whereby fts uses more memory (proportional + to number of `active' directories, aka distance from root + of current tree to current directory -- see active_dir_ht) + to detect any cycle right away. For example, du must use + this option to avoid counting disk space in a cycle multiple + times, but chown -R need not. + The default is to use the constant-memory lazy way, when possible + (see below). + + However, with FTS_LOGICAL (when following symlinks, e.g., chown -L) + using lazy cycle detection is inadequate. For example, traversing + a directory containing a symbolic link to a peer directory, it is + possible to encounter the same directory twice even though there + is no cycle: + dir + ... + slink -> dir + So, when FTS_LOGICAL is selected, we have to use a different + mode of cycle detection: FTS_TIGHT_CYCLE_CHECK. */ +# define FTS_TIGHT_CYCLE_CHECK 0x0100 + + /* Use this flag to enable semantics with which the parent + application may be made both more efficient and more robust. + Whereas the default is to visit each directory in a recursive + traversal (via chdir), using this flag makes it so the initial + working directory is never changed. Instead, these functions + perform the traversal via a virtual working directory, maintained + through the file descriptor member, fts_cwd_fd. */ +# define FTS_CWDFD 0x0200 + + /* Historically, for each directory that fts initially encounters, it would + open it, read all entries, and stat each entry, storing the results, and + then it would process the first entry. But that behavior is bad for + locality of reference, and also causes trouble with inode-simulating + file systems like FAT, CIFS, FUSE-based ones, etc., when entries from + their name/inode cache are flushed too early. + Use this flag to make fts_open and fts_read defer the stat/lstat/fststat + of each entry until it actually processed. However, note that if you use + this option and also specify a comparison function, that function may not + examine any data via fts_statp. */ +# define FTS_DEFER_STAT 0x0400 + +# define FTS_OPTIONMASK 0x07ff /* valid user option mask */ + +# define FTS_NAMEONLY 0x1000 /* (private) child names only */ +# define FTS_STOP 0x2000 /* (private) unrecoverable error */ + int fts_options; /* fts_open options, global flags */ + +# if GNULIB_FTS + union { + /* This data structure is used if FTS_TIGHT_CYCLE_CHECK is + specified. It records the directories between a starting + point and the current directory. I.e., a directory is + recorded here IFF we have visited it once, but we have not + yet completed processing of all its entries. Every time we + visit a new directory, we add that directory to this set. + When we finish with a directory (usually by visiting it a + second time), we remove it from this set. Each entry in + this data structure is a device/inode pair. This data + structure is used to detect directory cycles efficiently and + promptly even when the depth of a hierarchy is in the tens + of thousands. */ + struct hash_table *ht; + + /* FIXME: rename these two members to have the fts_ prefix */ + /* This data structure uses a lazy cycle-detection algorithm, + as done by rm via cycle-check.c. It's the default, + but it's not appropriate for programs like du. */ + struct cycle_check_state *state; + } fts_cycle; + +# endif + /* A stack of the file descriptors corresponding to the + most-recently traversed parent directories. + Currently used only in FTS_CWDFD mode. */ + I_ring fts_fd_ring; +} FTS; + +typedef struct _ftsent { + struct _ftsent *fts_cycle; /* cycle node */ + struct _ftsent *fts_parent; /* parent directory */ + struct _ftsent *fts_link; /* next file in directory */ + long fts_number; /* local numeric value */ + void *fts_pointer; /* local address value */ + char *fts_accpath; /* access file name */ + char *fts_path; /* root name; == fts_fts->fts_path */ + int fts_errno; /* errno for this node */ + int fts_symfd; /* fd for symlink */ + size_t fts_pathlen; /* strlen(fts_path) */ + + FTS *fts_fts; /* the file hierarchy itself */ + +# define FTS_ROOTPARENTLEVEL (-1) +# define FTS_ROOTLEVEL 0 + ptrdiff_t fts_level; /* depth (-1 to N) */ + + size_t fts_namelen; /* strlen(fts_name) */ + +# define FTS_D 1 /* preorder directory */ +# define FTS_DC 2 /* directory that causes cycles */ +# define FTS_DEFAULT 3 /* none of the above */ +# define FTS_DNR 4 /* unreadable directory */ +# define FTS_DOT 5 /* dot or dot-dot */ +# define FTS_DP 6 /* postorder directory */ +# define FTS_ERR 7 /* error; errno is set */ +# define FTS_F 8 /* regular file */ +# define FTS_INIT 9 /* initialized only */ +# define FTS_NS 10 /* stat(2) failed */ +# define FTS_NSOK 11 /* no stat(2) requested */ +# define FTS_SL 12 /* symbolic link */ +# define FTS_SLNONE 13 /* symbolic link without target */ +# define FTS_W 14 /* whiteout object */ + unsigned short int fts_info; /* user flags for FTSENT structure */ + +# define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ +# define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ + unsigned short int fts_flags; /* private flags for FTSENT structure */ + +# define FTS_AGAIN 1 /* read node again */ +# define FTS_FOLLOW 2 /* follow symbolic link */ +# define FTS_NOINSTR 3 /* no instructions */ +# define FTS_SKIP 4 /* discard node */ + unsigned short int fts_instr; /* fts_set() instructions */ + + struct stat fts_statp[1]; /* stat(2) information */ + char fts_name[1]; /* file name */ +} FTSENT; + +__BEGIN_DECLS +FTSENT *fts_children (FTS *, int) __THROW; +int fts_close (FTS *) __THROW; +FTS *fts_open (char * const *, int, + int (*)(const FTSENT **, const FTSENT **)) __THROW; +FTSENT *fts_read (FTS *) __THROW; +int fts_set (FTS *, FTSENT *, int) __THROW; +__END_DECLS + +#endif /* fts.h */ diff --git a/gnulib/lib/getcwd.c b/gnulib/lib/getcwd.c new file mode 100644 index 0000000..23b35de --- /dev/null +++ b/gnulib/lib/getcwd.c @@ -0,0 +1,428 @@ +/* Copyright (C) 1991,92,93,94,95,96,97,98,99,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 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. */ + +#if !_LIBC +# include +# include +# include "dirfd.h" +#endif + +#include +#include +#include +#include +#include + +#include /* For AT_FDCWD on Solaris 9. */ + +#ifndef __set_errno +# define __set_errno(val) (errno = (val)) +#endif + +#include +#ifndef _D_EXACT_NAMLEN +# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name) +#endif +#ifndef _D_ALLOC_NAMLEN +# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1) +#endif + +#include +#include +#include + +#if _LIBC +# ifndef mempcpy +# define mempcpy __mempcpy +# endif +#endif + +#include + +/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its + value exceeds INT_MAX, so its use as an int doesn't conform to the + C standard, and GCC and Sun C complain in some cases. */ +#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 +# undef AT_FDCWD +# define AT_FDCWD (-3041965) +#endif + +#ifdef ENAMETOOLONG +# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) +#else +# define is_ENAMETOOLONG(x) 0 +#endif + +#ifndef MAX +# define MAX(a, b) ((a) < (b) ? (b) : (a)) +#endif +#ifndef MIN +# define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + +#ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 1024 +# endif +#endif + +#if D_INO_IN_DIRENT +# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino)) +#else +# define MATCHING_INO(dp, ino) true +#endif + +#if !_LIBC +# define __getcwd getcwd +# define __lstat lstat +# define __closedir closedir +# define __opendir opendir +# define __readdir readdir +#endif + +/* The results of opendir() in this file are not used with dirfd and fchdir, + therefore save some unnecessary recursion in fchdir.c. */ +#undef opendir +#undef closedir + +/* Get the name of the current working directory, and put it in SIZE + bytes of BUF. Returns NULL if the directory couldn't be determined or + SIZE was too small. If successful, returns BUF. In GNU, 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. */ + +char * +__getcwd (char *buf, size_t size) +{ + /* Lengths of big file name components and entire file names, and a + deep level of file name nesting. These numbers are not upper + bounds; they are merely large values suitable for initial + allocations, designed to be large enough for most real-world + uses. */ + enum + { + BIG_FILE_NAME_COMPONENT_LENGTH = 255, + BIG_FILE_NAME_LENGTH = MIN (4095, PATH_MAX - 1), + DEEP_NESTING = 100 + }; + +#ifdef AT_FDCWD + int fd = AT_FDCWD; + bool fd_needs_closing = false; +#else + char dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1]; + char *dotlist = dots; + size_t dotsize = sizeof dots; + size_t dotlen = 0; +#endif + DIR *dirstream = NULL; + dev_t rootdev, thisdev; + ino_t rootino, thisino; + char *dir; + register char *dirp; + struct stat st; + size_t allocated = size; + size_t used; + +#if HAVE_PARTLY_WORKING_GETCWD + /* The system getcwd works, except it sometimes fails when it + shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If + AT_FDCWD is not defined, the algorithm below is O(N**2) and this + is much slower than the system getcwd (at least on GNU/Linux). + So trust the system getcwd's results unless they look + suspicious. + + Use the system getcwd even if we have openat support, since the + system getcwd works even when a parent is unreadable, while the + openat-based approach does not. */ + +# undef getcwd + dir = getcwd (buf, size); + if (dir || (errno != ERANGE && !is_ENAMETOOLONG (errno) && errno != ENOENT)) + return dir; +#endif + + if (size == 0) + { + if (buf != NULL) + { + __set_errno (EINVAL); + return NULL; + } + + allocated = BIG_FILE_NAME_LENGTH + 1; + } + + if (buf == NULL) + { + dir = malloc (allocated); + if (dir == NULL) + return NULL; + } + else + dir = buf; + + dirp = dir + allocated; + *--dirp = '\0'; + + if (__lstat (".", &st) < 0) + goto lose; + thisdev = st.st_dev; + thisino = st.st_ino; + + if (__lstat ("/", &st) < 0) + goto lose; + rootdev = st.st_dev; + rootino = st.st_ino; + + while (!(thisdev == rootdev && thisino == rootino)) + { + struct dirent *d; + dev_t dotdev; + ino_t dotino; + bool mount_point; + int parent_status; + size_t dirroom; + size_t namlen; + bool use_d_ino = true; + + /* Look at the parent directory. */ +#ifdef AT_FDCWD + fd = openat (fd, "..", O_RDONLY); + if (fd < 0) + goto lose; + fd_needs_closing = true; + parent_status = fstat (fd, &st); +#else + dotlist[dotlen++] = '.'; + dotlist[dotlen++] = '.'; + dotlist[dotlen] = '\0'; + parent_status = __lstat (dotlist, &st); +#endif + if (parent_status != 0) + goto lose; + + if (dirstream && __closedir (dirstream) != 0) + { + dirstream = NULL; + goto lose; + } + + /* Figure out if this directory is a mount point. */ + dotdev = st.st_dev; + dotino = st.st_ino; + mount_point = dotdev != thisdev; + + /* Search for the last directory. */ +#ifdef AT_FDCWD + dirstream = fdopendir (fd); + if (dirstream == NULL) + goto lose; + /* Reset fd. It may have been closed by fdopendir. */ + fd = dirfd (dirstream); + fd_needs_closing = false; +#else + dirstream = __opendir (dotlist); + if (dirstream == NULL) + goto lose; + dotlist[dotlen++] = '/'; +#endif + for (;;) + { + /* Clear errno to distinguish EOF from error if readdir returns + NULL. */ + __set_errno (0); + d = __readdir (dirstream); + + /* When we've iterated through all directory entries without finding + one with a matching d_ino, rewind the stream and consider each + name again, but this time, using lstat. This is necessary in a + chroot on at least one system (glibc-2.3.6 + linux 2.6.12), where + .., ../.., ../../.., etc. all had the same device number, yet the + d_ino values for entries in / did not match those obtained + via lstat. */ + if (d == NULL && errno == 0 && use_d_ino) + { + use_d_ino = false; + rewinddir (dirstream); + d = __readdir (dirstream); + } + + if (d == NULL) + { + if (errno == 0) + /* EOF on dirstream, which can mean e.g., that the current + directory has been removed. */ + __set_errno (ENOENT); + goto lose; + } + if (d->d_name[0] == '.' && + (d->d_name[1] == '\0' || + (d->d_name[1] == '.' && d->d_name[2] == '\0'))) + continue; + + if (use_d_ino) + { + bool match = (MATCHING_INO (d, thisino) || mount_point); + if (! match) + continue; + } + + { + int entry_status; +#ifdef AT_FDCWD + entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW); +#else + /* Compute size needed for this file name, or for the file + name ".." in the same directory, whichever is larger. + Room for ".." might be needed the next time through + the outer loop. */ + size_t name_alloc = _D_ALLOC_NAMLEN (d); + size_t filesize = dotlen + MAX (sizeof "..", name_alloc); + + if (filesize < dotlen) + goto memory_exhausted; + + if (dotsize < filesize) + { + /* My, what a deep directory tree you have, Grandma. */ + size_t newsize = MAX (filesize, dotsize * 2); + size_t i; + if (newsize < dotsize) + goto memory_exhausted; + if (dotlist != dots) + free (dotlist); + dotlist = malloc (newsize); + if (dotlist == NULL) + goto lose; + dotsize = newsize; + + i = 0; + do + { + dotlist[i++] = '.'; + dotlist[i++] = '.'; + dotlist[i++] = '/'; + } + while (i < dotlen); + } + + memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d)); + entry_status = __lstat (dotlist, &st); +#endif + /* We don't fail here if we cannot stat() a directory entry. + This can happen when (network) file systems fail. If this + entry is in fact the one we are looking for we will find + out soon as we reach the end of the directory without + having found anything. */ + if (entry_status == 0 && S_ISDIR (st.st_mode) + && st.st_dev == thisdev && st.st_ino == thisino) + break; + } + } + + dirroom = dirp - dir; + namlen = _D_EXACT_NAMLEN (d); + + if (dirroom <= namlen) + { + if (size != 0) + { + __set_errno (ERANGE); + goto lose; + } + else + { + char *tmp; + size_t oldsize = allocated; + + allocated += MAX (allocated, namlen); + if (allocated < oldsize + || ! (tmp = realloc (dir, allocated))) + goto memory_exhausted; + + /* Move current contents up to the end of the buffer. + This is guaranteed to be non-overlapping. */ + dirp = memcpy (tmp + allocated - (oldsize - dirroom), + tmp + dirroom, + oldsize - dirroom); + dir = tmp; + } + } + dirp -= namlen; + memcpy (dirp, d->d_name, namlen); + *--dirp = '/'; + + thisdev = dotdev; + thisino = dotino; + } + + if (dirstream && __closedir (dirstream) != 0) + { + dirstream = NULL; + goto lose; + } + + if (dirp == &dir[allocated - 1]) + *--dirp = '/'; + +#ifndef AT_FDCWD + if (dotlist != dots) + free (dotlist); +#endif + + used = dir + allocated - dirp; + memmove (dir, dirp, used); + + if (size == 0) + /* Ensure that the buffer is only as large as necessary. */ + buf = realloc (dir, used); + + if (buf == NULL) + /* Either buf was NULL all along, or `realloc' failed but + we still have the original string. */ + buf = dir; + + return buf; + + memory_exhausted: + __set_errno (ENOMEM); + lose: + { + int save = errno; + if (dirstream) + __closedir (dirstream); +#ifdef AT_FDCWD + if (fd_needs_closing) + close (fd); +#else + if (dotlist != dots) + free (dotlist); +#endif + if (buf == NULL) + free (dir); + __set_errno (save); + } + return NULL; +} + +#ifdef weak_alias +weak_alias (__getcwd, getcwd) +#endif diff --git a/gnulib/lib/getdate.c b/gnulib/lib/getdate.c new file mode 100644 index 0000000..dca83d8 --- /dev/null +++ b/gnulib/lib/getdate.c @@ -0,0 +1,3289 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 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 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, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + tAGO = 258, + tDST = 259, + tYEAR_UNIT = 260, + tMONTH_UNIT = 261, + tHOUR_UNIT = 262, + tMINUTE_UNIT = 263, + tSEC_UNIT = 264, + tDAY_UNIT = 265, + tDAY = 266, + tDAYZONE = 267, + tLOCAL_ZONE = 268, + tMERIDIAN = 269, + tMONTH = 270, + tORDINAL = 271, + tZONE = 272, + tSNUMBER = 273, + tUNUMBER = 274, + tSDECIMAL_NUMBER = 275, + tUDECIMAL_NUMBER = 276 + }; +#endif +/* Tokens. */ +#define tAGO 258 +#define tDST 259 +#define tYEAR_UNIT 260 +#define tMONTH_UNIT 261 +#define tHOUR_UNIT 262 +#define tMINUTE_UNIT 263 +#define tSEC_UNIT 264 +#define tDAY_UNIT 265 +#define tDAY 266 +#define tDAYZONE 267 +#define tLOCAL_ZONE 268 +#define tMERIDIAN 269 +#define tMONTH 270 +#define tORDINAL 271 +#define tZONE 272 +#define tSNUMBER 273 +#define tUNUMBER 274 +#define tSDECIMAL_NUMBER 275 +#define tUDECIMAL_NUMBER 276 + + + + +/* Copy the first part of user declarations. */ +#line 1 "getdate.y" + +/* Parse a string into an internal time stamp. + + Copyright (C) 1999, 2000, 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 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. */ + +/* Originally written by Steven M. Bellovin while + at the University of North Carolina at Chapel Hill. Later tweaked by + a couple of people on Usenet. Completely overhauled by Rich $alz + and Jim Berets in August, 1990. + + Modified by Paul Eggert in August 1999 to do + the right thing about local DST. Also modified by Paul Eggert + in February 2004 to support + nanosecond-resolution time stamps, and in October 2004 to support + TZ strings in dates. */ + +/* FIXME: Check for arithmetic overflow in all cases, not just + some of them. */ + +#include + +#include "getdate.h" +#include "timespec.h" + +/* There's no need to extend the stack, so there's no need to involve + alloca. */ +#define YYSTACK_USE_ALLOCA 0 + +/* Tell Bison how much stack space is needed. 20 should be plenty for + this grammar, which is not right recursive. Beware setting it too + high, since that might cause problems on machines whose + implementations have lame stack-overflow checking. */ +#define YYMAXDEPTH 20 +#define YYINITDEPTH YYMAXDEPTH + +/* Since the code of getdate.y is not included in the Emacs executable + itself, there is no need to #define static in this file. Even if + the code were included in the Emacs executable, it probably + wouldn't do any harm to #undef it here; this will only cause + problems if we try to write to a static variable, which I don't + think this code needs to do. */ +#ifdef emacs +# undef static +#endif + +#include +#include +#include +#include +#include + +#include "setenv.h" +#include "xalloc.h" + + +/* ISDIGIT differs from isdigit, as follows: + - Its arg may be any int or unsigned int; it need not be an unsigned char + or EOF. + - It's typically faster. + POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to + isdigit unless it's important to use the locale's definition + of `digit' even when the host does not conform to POSIX. */ +#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) + +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) +# endif +#endif + +#ifndef ATTRIBUTE_UNUSED +# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +#define EPOCH_YEAR 1970 +#define TM_YEAR_BASE 1900 + +#define HOUR(x) ((x) * 60) + +/* An integer value, and the number of digits in its textual + representation. */ +typedef struct +{ + bool negative; + long int value; + size_t digits; +} textint; + +/* An entry in the lexical lookup table. */ +typedef struct +{ + char const *name; + int type; + int value; +} table; + +/* Meridian: am, pm, or 24-hour style. */ +enum { MERam, MERpm, MER24 }; + +enum { BILLION = 1000000000, LOG10_BILLION = 9 }; + +/* Relative times. */ +typedef struct +{ + /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ + long int year; + long int month; + long int day; + long int hour; + long int minutes; + long int seconds; + long int ns; +} relative_time; + +#if HAVE_COMPOUND_LITERALS +# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 }) +#else +static relative_time const RELATIVE_TIME_0; +#endif + +/* Information passed to and from the parser. */ +typedef struct +{ + /* The input string remaining to be parsed. */ + const char *input; + + /* N, if this is the Nth Tuesday. */ + long int day_ordinal; + + /* Day of week; Sunday is 0. */ + int day_number; + + /* tm_isdst flag for the local zone. */ + int local_isdst; + + /* Time zone, in minutes east of UTC. */ + long int time_zone; + + /* Style used for time. */ + int meridian; + + /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds. */ + textint year; + long int month; + long int day; + long int hour; + long int minutes; + struct timespec seconds; /* includes nanoseconds */ + + /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ + relative_time rel; + + /* Presence or counts of nonterminals of various flavors parsed so far. */ + bool timespec_seen; + bool rels_seen; + size_t dates_seen; + size_t days_seen; + size_t local_zones_seen; + size_t dsts_seen; + size_t times_seen; + size_t zones_seen; + + /* Table of local time zone abbrevations, terminated by a null entry. */ + table local_time_zone_table[3]; +} parser_control; + +union YYSTYPE; +static int yylex (union YYSTYPE *, parser_control *); +static int yyerror (parser_control const *, char const *); +static long int time_zone_hhmm (textint, long int); + + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 214 "getdate.y" +{ + long int intval; + textint textintval; + struct timespec timespec; + relative_time rel; +} +/* Line 187 of yacc.c. */ +#line 348 "getdate.c" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 361 "getdate.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee 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 + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 12 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 91 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 26 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 19 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 78 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 96 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 276 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 24, 2, 2, 25, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 23, 2, + 2, 2, 2, 2, 22, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 5, 7, 10, 11, 14, 16, 18, + 20, 22, 24, 26, 28, 31, 36, 42, 49, 57, + 59, 62, 64, 67, 71, 73, 76, 78, 81, 84, + 87, 91, 97, 101, 105, 109, 112, 117, 120, 124, + 127, 129, 132, 135, 137, 140, 143, 145, 148, 151, + 153, 156, 159, 161, 164, 167, 169, 172, 175, 178, + 181, 183, 185, 188, 191, 194, 197, 200, 203, 205, + 207, 209, 211, 213, 215, 217, 218, 221, 222 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 27, 0, -1, 28, -1, 29, -1, 22, 39, -1, + -1, 29, 30, -1, 31, -1, 32, -1, 33, -1, + 35, -1, 34, -1, 36, -1, 42, -1, 19, 14, + -1, 19, 23, 19, 44, -1, 19, 23, 19, 18, + 43, -1, 19, 23, 19, 23, 41, 44, -1, 19, + 23, 19, 23, 41, 18, 43, -1, 13, -1, 13, + 4, -1, 17, -1, 17, 38, -1, 17, 18, 43, + -1, 12, -1, 17, 4, -1, 11, -1, 11, 24, + -1, 16, 11, -1, 19, 11, -1, 19, 25, 19, + -1, 19, 25, 19, 25, 19, -1, 19, 18, 18, + -1, 19, 15, 18, -1, 15, 18, 18, -1, 15, + 19, -1, 15, 19, 24, 19, -1, 19, 15, -1, + 19, 15, 19, -1, 37, 3, -1, 37, -1, 16, + 5, -1, 19, 5, -1, 5, -1, 16, 6, -1, + 19, 6, -1, 6, -1, 16, 10, -1, 19, 10, + -1, 10, -1, 16, 7, -1, 19, 7, -1, 7, + -1, 16, 8, -1, 19, 8, -1, 8, -1, 16, + 9, -1, 19, 9, -1, 20, 9, -1, 21, 9, + -1, 9, -1, 38, -1, 18, 5, -1, 18, 6, + -1, 18, 10, -1, 18, 7, -1, 18, 8, -1, + 18, 9, -1, 40, -1, 41, -1, 20, -1, 18, + -1, 21, -1, 19, -1, 19, -1, -1, 23, 19, + -1, -1, 14, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 240, 240, 241, 245, 252, 254, 258, 260, 262, + 264, 266, 268, 270, 274, 282, 290, 300, 307, 319, + 324, 332, 334, 344, 346, 348, 353, 358, 363, 368, + 376, 381, 401, 408, 416, 424, 429, 435, 440, 449, + 459, 472, 474, 476, 478, 480, 482, 484, 486, 488, + 490, 492, 494, 496, 498, 500, 502, 504, 506, 508, + 510, 512, 516, 518, 520, 522, 524, 526, 530, 530, + 533, 534, 539, 540, 545, 583, 584, 590, 591 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "tAGO", "tDST", "tYEAR_UNIT", + "tMONTH_UNIT", "tHOUR_UNIT", "tMINUTE_UNIT", "tSEC_UNIT", "tDAY_UNIT", + "tDAY", "tDAYZONE", "tLOCAL_ZONE", "tMERIDIAN", "tMONTH", "tORDINAL", + "tZONE", "tSNUMBER", "tUNUMBER", "tSDECIMAL_NUMBER", "tUDECIMAL_NUMBER", + "'@'", "':'", "','", "'/'", "$accept", "spec", "timespec", "items", + "item", "time", "local_zone", "zone", "day", "date", "rel", "relunit", + "relunit_snumber", "seconds", "signed_seconds", "unsigned_seconds", + "number", "o_colon_minutes", "o_merid", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 64, 58, 44, 47 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 26, 27, 27, 28, 29, 29, 30, 30, 30, + 30, 30, 30, 30, 31, 31, 31, 31, 31, 32, + 32, 33, 33, 33, 33, 33, 34, 34, 34, 34, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, + 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 38, 38, 38, 38, 38, 38, 39, 39, + 40, 40, 41, 41, 42, 43, 43, 44, 44 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, + 1, 1, 1, 1, 2, 4, 5, 6, 7, 1, + 2, 1, 2, 3, 1, 2, 1, 2, 2, 2, + 3, 5, 3, 3, 3, 2, 4, 2, 3, 2, + 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, + 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, + 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 0, 2, 0, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 5, 0, 0, 2, 3, 71, 73, 70, 72, 4, + 68, 69, 1, 43, 46, 52, 55, 60, 49, 26, + 24, 19, 0, 0, 21, 0, 74, 0, 0, 6, + 7, 8, 9, 11, 10, 12, 40, 61, 13, 27, + 20, 0, 35, 41, 44, 50, 53, 56, 47, 28, + 25, 75, 22, 62, 63, 65, 66, 67, 64, 42, + 45, 51, 54, 57, 48, 29, 14, 37, 0, 0, + 0, 58, 59, 39, 34, 0, 0, 23, 33, 38, + 32, 77, 30, 36, 76, 78, 75, 0, 15, 0, + 16, 77, 31, 75, 17, 18 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 2, 3, 4, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 9, 10, 11, 38, 77, 88 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -79 +static const yytype_int8 yypact[] = +{ + -10, 47, 27, -79, 25, -79, -79, -79, -79, -79, + -79, -79, -79, -79, -79, -79, -79, -79, -79, 5, + -79, 59, 43, 42, 10, 49, -5, 62, 63, -79, + -79, -79, -79, -79, -79, -79, 70, -79, -79, -79, + -79, 56, 52, -79, -79, -79, -79, -79, -79, -79, + -79, 16, -79, -79, -79, -79, -79, -79, -79, -79, + -79, -79, -79, -79, -79, -79, -79, 51, 57, 58, + 60, -79, -79, -79, -79, 61, 64, -79, -79, -79, + -79, -7, 53, -79, -79, -79, 65, -2, -79, 66, + -79, 46, -79, 65, -79, -79 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, + -79, -79, 67, -79, -79, -6, -79, -78, -9 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint8 yytable[] = +{ + 59, 60, 61, 62, 63, 64, 65, 85, 90, 66, + 67, 86, 1, 68, 50, 95, 87, 6, 69, 8, + 70, 53, 54, 55, 56, 57, 58, 12, 51, 39, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 76, + 22, 23, 24, 25, 26, 27, 28, 43, 44, 45, + 46, 47, 48, 49, 53, 54, 55, 56, 57, 58, + 85, 41, 42, 40, 93, 5, 6, 7, 8, 78, + 79, 71, 72, 73, 74, 80, 75, 81, 89, 82, + 83, 91, 94, 84, 0, 92, 0, 0, 76, 0, + 0, 52 +}; + +static const yytype_int8 yycheck[] = +{ + 5, 6, 7, 8, 9, 10, 11, 14, 86, 14, + 15, 18, 22, 18, 4, 93, 23, 19, 23, 21, + 25, 5, 6, 7, 8, 9, 10, 0, 18, 24, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 23, + 15, 16, 17, 18, 19, 20, 21, 5, 6, 7, + 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, + 14, 18, 19, 4, 18, 18, 19, 20, 21, 18, + 19, 9, 9, 3, 18, 18, 24, 19, 25, 19, + 19, 87, 91, 19, -1, 19, -1, -1, 23, -1, + -1, 24 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 22, 27, 28, 29, 18, 19, 20, 21, 39, + 40, 41, 0, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 15, 16, 17, 18, 19, 20, 21, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 42, 24, + 4, 18, 19, 5, 6, 7, 8, 9, 10, 11, + 4, 18, 38, 5, 6, 7, 8, 9, 10, 5, + 6, 7, 8, 9, 10, 11, 14, 15, 18, 23, + 25, 9, 9, 3, 18, 24, 23, 43, 18, 19, + 18, 19, 19, 19, 19, 14, 18, 23, 44, 25, + 43, 41, 19, 18, 44, 43 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (pc, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval, pc) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, pc); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + parser_control *pc; +#endif +{ + if (!yyvaluep) + return; + YYUSE (pc); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, pc) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + parser_control *pc; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_control *pc) +#else +static void +yy_reduce_print (yyvsp, yyrule, pc) + YYSTYPE *yyvsp; + int yyrule; + parser_control *pc; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , pc); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule, pc); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_control *pc) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, pc) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + parser_control *pc; +#endif +{ + YYUSE (yyvaluep); + YYUSE (pc); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (parser_control *pc); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (parser_control *pc) +#else +int +yyparse (pc) + parser_control *pc; +#endif +#endif +{ + /* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 4: +#line 246 "getdate.y" + { + pc->seconds = (yyvsp[(2) - (2)].timespec); + pc->timespec_seen = true; + } + break; + + case 7: +#line 259 "getdate.y" + { pc->times_seen++; } + break; + + case 8: +#line 261 "getdate.y" + { pc->local_zones_seen++; } + break; + + case 9: +#line 263 "getdate.y" + { pc->zones_seen++; } + break; + + case 10: +#line 265 "getdate.y" + { pc->dates_seen++; } + break; + + case 11: +#line 267 "getdate.y" + { pc->days_seen++; } + break; + + case 12: +#line 269 "getdate.y" + { pc->rels_seen = true; } + break; + + case 14: +#line 275 "getdate.y" + { + pc->hour = (yyvsp[(1) - (2)].textintval).value; + pc->minutes = 0; + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = (yyvsp[(2) - (2)].intval); + } + break; + + case 15: +#line 283 "getdate.y" + { + pc->hour = (yyvsp[(1) - (4)].textintval).value; + pc->minutes = (yyvsp[(3) - (4)].textintval).value; + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = (yyvsp[(4) - (4)].intval); + } + break; + + case 16: +#line 291 "getdate.y" + { + pc->hour = (yyvsp[(1) - (5)].textintval).value; + pc->minutes = (yyvsp[(3) - (5)].textintval).value; + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = MER24; + pc->zones_seen++; + pc->time_zone = time_zone_hhmm ((yyvsp[(4) - (5)].textintval), (yyvsp[(5) - (5)].intval)); + } + break; + + case 17: +#line 301 "getdate.y" + { + pc->hour = (yyvsp[(1) - (6)].textintval).value; + pc->minutes = (yyvsp[(3) - (6)].textintval).value; + pc->seconds = (yyvsp[(5) - (6)].timespec); + pc->meridian = (yyvsp[(6) - (6)].intval); + } + break; + + case 18: +#line 308 "getdate.y" + { + pc->hour = (yyvsp[(1) - (7)].textintval).value; + pc->minutes = (yyvsp[(3) - (7)].textintval).value; + pc->seconds = (yyvsp[(5) - (7)].timespec); + pc->meridian = MER24; + pc->zones_seen++; + pc->time_zone = time_zone_hhmm ((yyvsp[(6) - (7)].textintval), (yyvsp[(7) - (7)].intval)); + } + break; + + case 19: +#line 320 "getdate.y" + { + pc->local_isdst = (yyvsp[(1) - (1)].intval); + pc->dsts_seen += (0 < (yyvsp[(1) - (1)].intval)); + } + break; + + case 20: +#line 325 "getdate.y" + { + pc->local_isdst = 1; + pc->dsts_seen += (0 < (yyvsp[(1) - (2)].intval)) + 1; + } + break; + + case 21: +#line 333 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (1)].intval); } + break; + + case 22: +#line 335 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (2)].intval); + pc->rel.ns += (yyvsp[(2) - (2)].rel).ns; + pc->rel.seconds += (yyvsp[(2) - (2)].rel).seconds; + pc->rel.minutes += (yyvsp[(2) - (2)].rel).minutes; + pc->rel.hour += (yyvsp[(2) - (2)].rel).hour; + pc->rel.day += (yyvsp[(2) - (2)].rel).day; + pc->rel.month += (yyvsp[(2) - (2)].rel).month; + pc->rel.year += (yyvsp[(2) - (2)].rel).year; + pc->rels_seen = true; } + break; + + case 23: +#line 345 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (3)].intval) + time_zone_hhmm ((yyvsp[(2) - (3)].textintval), (yyvsp[(3) - (3)].intval)); } + break; + + case 24: +#line 347 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (1)].intval) + 60; } + break; + + case 25: +#line 349 "getdate.y" + { pc->time_zone = (yyvsp[(1) - (2)].intval) + 60; } + break; + + case 26: +#line 354 "getdate.y" + { + pc->day_ordinal = 1; + pc->day_number = (yyvsp[(1) - (1)].intval); + } + break; + + case 27: +#line 359 "getdate.y" + { + pc->day_ordinal = 1; + pc->day_number = (yyvsp[(1) - (2)].intval); + } + break; + + case 28: +#line 364 "getdate.y" + { + pc->day_ordinal = (yyvsp[(1) - (2)].intval); + pc->day_number = (yyvsp[(2) - (2)].intval); + } + break; + + case 29: +#line 369 "getdate.y" + { + pc->day_ordinal = (yyvsp[(1) - (2)].textintval).value; + pc->day_number = (yyvsp[(2) - (2)].intval); + } + break; + + case 30: +#line 377 "getdate.y" + { + pc->month = (yyvsp[(1) - (3)].textintval).value; + pc->day = (yyvsp[(3) - (3)].textintval).value; + } + break; + + case 31: +#line 382 "getdate.y" + { + /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, + otherwise as MM/DD/YY. + The goal in recognizing YYYY/MM/DD is solely to support legacy + machine-generated dates like those in an RCS log listing. If + you want portability, use the ISO 8601 format. */ + if (4 <= (yyvsp[(1) - (5)].textintval).digits) + { + pc->year = (yyvsp[(1) - (5)].textintval); + pc->month = (yyvsp[(3) - (5)].textintval).value; + pc->day = (yyvsp[(5) - (5)].textintval).value; + } + else + { + pc->month = (yyvsp[(1) - (5)].textintval).value; + pc->day = (yyvsp[(3) - (5)].textintval).value; + pc->year = (yyvsp[(5) - (5)].textintval); + } + } + break; + + case 32: +#line 402 "getdate.y" + { + /* ISO 8601 format. YYYY-MM-DD. */ + pc->year = (yyvsp[(1) - (3)].textintval); + pc->month = -(yyvsp[(2) - (3)].textintval).value; + pc->day = -(yyvsp[(3) - (3)].textintval).value; + } + break; + + case 33: +#line 409 "getdate.y" + { + /* e.g. 17-JUN-1992. */ + pc->day = (yyvsp[(1) - (3)].textintval).value; + pc->month = (yyvsp[(2) - (3)].intval); + pc->year.value = -(yyvsp[(3) - (3)].textintval).value; + pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; + } + break; + + case 34: +#line 417 "getdate.y" + { + /* e.g. JUN-17-1992. */ + pc->month = (yyvsp[(1) - (3)].intval); + pc->day = -(yyvsp[(2) - (3)].textintval).value; + pc->year.value = -(yyvsp[(3) - (3)].textintval).value; + pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; + } + break; + + case 35: +#line 425 "getdate.y" + { + pc->month = (yyvsp[(1) - (2)].intval); + pc->day = (yyvsp[(2) - (2)].textintval).value; + } + break; + + case 36: +#line 430 "getdate.y" + { + pc->month = (yyvsp[(1) - (4)].intval); + pc->day = (yyvsp[(2) - (4)].textintval).value; + pc->year = (yyvsp[(4) - (4)].textintval); + } + break; + + case 37: +#line 436 "getdate.y" + { + pc->day = (yyvsp[(1) - (2)].textintval).value; + pc->month = (yyvsp[(2) - (2)].intval); + } + break; + + case 38: +#line 441 "getdate.y" + { + pc->day = (yyvsp[(1) - (3)].textintval).value; + pc->month = (yyvsp[(2) - (3)].intval); + pc->year = (yyvsp[(3) - (3)].textintval); + } + break; + + case 39: +#line 450 "getdate.y" + { + pc->rel.ns -= (yyvsp[(1) - (2)].rel).ns; + pc->rel.seconds -= (yyvsp[(1) - (2)].rel).seconds; + pc->rel.minutes -= (yyvsp[(1) - (2)].rel).minutes; + pc->rel.hour -= (yyvsp[(1) - (2)].rel).hour; + pc->rel.day -= (yyvsp[(1) - (2)].rel).day; + pc->rel.month -= (yyvsp[(1) - (2)].rel).month; + pc->rel.year -= (yyvsp[(1) - (2)].rel).year; + } + break; + + case 40: +#line 460 "getdate.y" + { + pc->rel.ns += (yyvsp[(1) - (1)].rel).ns; + pc->rel.seconds += (yyvsp[(1) - (1)].rel).seconds; + pc->rel.minutes += (yyvsp[(1) - (1)].rel).minutes; + pc->rel.hour += (yyvsp[(1) - (1)].rel).hour; + pc->rel.day += (yyvsp[(1) - (1)].rel).day; + pc->rel.month += (yyvsp[(1) - (1)].rel).month; + pc->rel.year += (yyvsp[(1) - (1)].rel).year; + } + break; + + case 41: +#line 473 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].intval); } + break; + + case 42: +#line 475 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 43: +#line 477 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = 1; } + break; + + case 44: +#line 479 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].intval); } + break; + + case 45: +#line 481 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 46: +#line 483 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = 1; } + break; + + case 47: +#line 485 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); } + break; + + case 48: +#line 487 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); } + break; + + case 49: +#line 489 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); } + break; + + case 50: +#line 491 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].intval); } + break; + + case 51: +#line 493 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 52: +#line 495 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = 1; } + break; + + case 53: +#line 497 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].intval); } + break; + + case 54: +#line 499 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 55: +#line 501 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = 1; } + break; + + case 56: +#line 503 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].intval); } + break; + + case 57: +#line 505 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 58: +#line 507 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; } + break; + + case 59: +#line 509 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; } + break; + + case 60: +#line 511 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = 1; } + break; + + case 62: +#line 517 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 63: +#line 519 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 64: +#line 521 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); } + break; + + case 65: +#line 523 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 66: +#line 525 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 67: +#line 527 "getdate.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 71: +#line 535 "getdate.y" + { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; } + break; + + case 73: +#line 541 "getdate.y" + { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; } + break; + + case 74: +#line 546 "getdate.y" + { + if (pc->dates_seen && ! pc->year.digits + && ! pc->rels_seen && (pc->times_seen || 2 < (yyvsp[(1) - (1)].textintval).digits)) + pc->year = (yyvsp[(1) - (1)].textintval); + else + { + if (4 < (yyvsp[(1) - (1)].textintval).digits) + { + pc->dates_seen++; + pc->day = (yyvsp[(1) - (1)].textintval).value % 100; + pc->month = ((yyvsp[(1) - (1)].textintval).value / 100) % 100; + pc->year.value = (yyvsp[(1) - (1)].textintval).value / 10000; + pc->year.digits = (yyvsp[(1) - (1)].textintval).digits - 4; + } + else + { + pc->times_seen++; + if ((yyvsp[(1) - (1)].textintval).digits <= 2) + { + pc->hour = (yyvsp[(1) - (1)].textintval).value; + pc->minutes = 0; + } + else + { + pc->hour = (yyvsp[(1) - (1)].textintval).value / 100; + pc->minutes = (yyvsp[(1) - (1)].textintval).value % 100; + } + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = MER24; + } + } + } + break; + + case 75: +#line 583 "getdate.y" + { (yyval.intval) = -1; } + break; + + case 76: +#line 585 "getdate.y" + { (yyval.intval) = (yyvsp[(2) - (2)].textintval).value; } + break; + + case 77: +#line 590 "getdate.y" + { (yyval.intval) = MER24; } + break; + + case 78: +#line 592 "getdate.y" + { (yyval.intval) = (yyvsp[(1) - (1)].intval); } + break; + + +/* Line 1267 of yacc.c. */ +#line 2149 "getdate.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (pc, YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (pc, yymsg); + } + else + { + yyerror (pc, YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, pc); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, pc); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (pc, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, pc); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, pc); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 595 "getdate.y" + + +static table const meridian_table[] = +{ + { "AM", tMERIDIAN, MERam }, + { "A.M.", tMERIDIAN, MERam }, + { "PM", tMERIDIAN, MERpm }, + { "P.M.", tMERIDIAN, MERpm }, + { NULL, 0, 0 } +}; + +static table const dst_table[] = +{ + { "DST", tDST, 0 } +}; + +static table const month_and_day_table[] = +{ + { "JANUARY", tMONTH, 1 }, + { "FEBRUARY", tMONTH, 2 }, + { "MARCH", tMONTH, 3 }, + { "APRIL", tMONTH, 4 }, + { "MAY", tMONTH, 5 }, + { "JUNE", tMONTH, 6 }, + { "JULY", tMONTH, 7 }, + { "AUGUST", tMONTH, 8 }, + { "SEPTEMBER",tMONTH, 9 }, + { "SEPT", tMONTH, 9 }, + { "OCTOBER", tMONTH, 10 }, + { "NOVEMBER", tMONTH, 11 }, + { "DECEMBER", tMONTH, 12 }, + { "SUNDAY", tDAY, 0 }, + { "MONDAY", tDAY, 1 }, + { "TUESDAY", tDAY, 2 }, + { "TUES", tDAY, 2 }, + { "WEDNESDAY",tDAY, 3 }, + { "WEDNES", tDAY, 3 }, + { "THURSDAY", tDAY, 4 }, + { "THUR", tDAY, 4 }, + { "THURS", tDAY, 4 }, + { "FRIDAY", tDAY, 5 }, + { "SATURDAY", tDAY, 6 }, + { NULL, 0, 0 } +}; + +static table const time_units_table[] = +{ + { "YEAR", tYEAR_UNIT, 1 }, + { "MONTH", tMONTH_UNIT, 1 }, + { "FORTNIGHT",tDAY_UNIT, 14 }, + { "WEEK", tDAY_UNIT, 7 }, + { "DAY", tDAY_UNIT, 1 }, + { "HOUR", tHOUR_UNIT, 1 }, + { "MINUTE", tMINUTE_UNIT, 1 }, + { "MIN", tMINUTE_UNIT, 1 }, + { "SECOND", tSEC_UNIT, 1 }, + { "SEC", tSEC_UNIT, 1 }, + { NULL, 0, 0 } +}; + +/* Assorted relative-time words. */ +static table const relative_time_table[] = +{ + { "TOMORROW", tDAY_UNIT, 1 }, + { "YESTERDAY",tDAY_UNIT, -1 }, + { "TODAY", tDAY_UNIT, 0 }, + { "NOW", tDAY_UNIT, 0 }, + { "LAST", tORDINAL, -1 }, + { "THIS", tORDINAL, 0 }, + { "NEXT", tORDINAL, 1 }, + { "FIRST", tORDINAL, 1 }, +/*{ "SECOND", tORDINAL, 2 }, */ + { "THIRD", tORDINAL, 3 }, + { "FOURTH", tORDINAL, 4 }, + { "FIFTH", tORDINAL, 5 }, + { "SIXTH", tORDINAL, 6 }, + { "SEVENTH", tORDINAL, 7 }, + { "EIGHTH", tORDINAL, 8 }, + { "NINTH", tORDINAL, 9 }, + { "TENTH", tORDINAL, 10 }, + { "ELEVENTH", tORDINAL, 11 }, + { "TWELFTH", tORDINAL, 12 }, + { "AGO", tAGO, 1 }, + { NULL, 0, 0 } +}; + +/* The universal time zone table. These labels can be used even for + time stamps that would not otherwise be valid, e.g., GMT time + stamps in London during summer. */ +static table const universal_time_zone_table[] = +{ + { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */ + { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ + { "UTC", tZONE, HOUR ( 0) }, + { NULL, 0, 0 } +}; + +/* The time zone table. This table is necessarily incomplete, as time + zone abbreviations are ambiguous; e.g. Australians interpret "EST" + as Eastern time in Australia, not as US Eastern Standard Time. + You cannot rely on getdate to handle arbitrary time zone + abbreviations; use numeric abbreviations like `-0500' instead. */ +static table const time_zone_table[] = +{ + { "WET", tZONE, HOUR ( 0) }, /* Western European */ + { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */ + { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */ + { "ART", tZONE, -HOUR ( 3) }, /* Argentina */ + { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */ + { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */ + { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */ + { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */ + { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */ + { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */ + { "CLT", tZONE, -HOUR ( 4) }, /* Chile */ + { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */ + { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */ + { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */ + { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */ + { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */ + { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */ + { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */ + { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */ + { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */ + { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */ + { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */ + { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */ + { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */ + { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */ + { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */ + { "WAT", tZONE, HOUR ( 1) }, /* West Africa */ + { "CET", tZONE, HOUR ( 1) }, /* Central European */ + { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */ + { "MET", tZONE, HOUR ( 1) }, /* Middle European */ + { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */ + { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ + { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ + { "EET", tZONE, HOUR ( 2) }, /* Eastern European */ + { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */ + { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */ + { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */ + { "EAT", tZONE, HOUR ( 3) }, /* East Africa */ + { "MSK", tZONE, HOUR ( 3) }, /* Moscow */ + { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */ + { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */ + { "SGT", tZONE, HOUR ( 8) }, /* Singapore */ + { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */ + { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */ + { "GST", tZONE, HOUR (10) }, /* Guam Standard */ + { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */ + { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */ + { NULL, 0, 0 } +}; + +/* Military time zone table. */ +static table const military_table[] = +{ + { "A", tZONE, -HOUR ( 1) }, + { "B", tZONE, -HOUR ( 2) }, + { "C", tZONE, -HOUR ( 3) }, + { "D", tZONE, -HOUR ( 4) }, + { "E", tZONE, -HOUR ( 5) }, + { "F", tZONE, -HOUR ( 6) }, + { "G", tZONE, -HOUR ( 7) }, + { "H", tZONE, -HOUR ( 8) }, + { "I", tZONE, -HOUR ( 9) }, + { "K", tZONE, -HOUR (10) }, + { "L", tZONE, -HOUR (11) }, + { "M", tZONE, -HOUR (12) }, + { "N", tZONE, HOUR ( 1) }, + { "O", tZONE, HOUR ( 2) }, + { "P", tZONE, HOUR ( 3) }, + { "Q", tZONE, HOUR ( 4) }, + { "R", tZONE, HOUR ( 5) }, + { "S", tZONE, HOUR ( 6) }, + { "T", tZONE, HOUR ( 7) }, + { "U", tZONE, HOUR ( 8) }, + { "V", tZONE, HOUR ( 9) }, + { "W", tZONE, HOUR (10) }, + { "X", tZONE, HOUR (11) }, + { "Y", tZONE, HOUR (12) }, + { "Z", tZONE, HOUR ( 0) }, + { NULL, 0, 0 } +}; + + + +/* Convert a time zone expressed as HH:MM into an integer count of + minutes. If MM is negative, then S is of the form HHMM and needs + to be picked apart; otherwise, S is of the form HH. */ + +static long int +time_zone_hhmm (textint s, long int mm) +{ + if (mm < 0) + return (s.value / 100) * 60 + s.value % 100; + else + return s.value * 60 + (s.negative ? -mm : mm); +} + +static int +to_hour (long int hours, int meridian) +{ + switch (meridian) + { + default: /* Pacify GCC. */ + case MER24: + return 0 <= hours && hours < 24 ? hours : -1; + case MERam: + return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1; + case MERpm: + return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1; + } +} + +static long int +to_year (textint textyear) +{ + long int year = textyear.value; + + if (year < 0) + year = -year; + + /* XPG4 suggests that years 00-68 map to 2000-2068, and + years 69-99 map to 1969-1999. */ + else if (textyear.digits == 2) + year += year < 69 ? 2000 : 1900; + + return year; +} + +static table const * +lookup_zone (parser_control const *pc, char const *name) +{ + table const *tp; + + for (tp = universal_time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + /* Try local zone abbreviations before those in time_zone_table, as + the local ones are more likely to be right. */ + for (tp = pc->local_time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + for (tp = time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + return NULL; +} + +#if ! HAVE_TM_GMTOFF +/* Yield the difference between *A and *B, + measured in seconds, ignoring leap seconds. + The body of this function is taken directly from the GNU C Library; + see src/strftime.c. */ +static long int +tm_diff (struct tm const *a, struct tm const *b) +{ + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid int overflow in leap day calculations. */ + int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); + int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + long int ayear = a->tm_year; + long int years = ayear - b->tm_year; + long int days = (365 * years + intervening_leap_days + + (a->tm_yday - b->tm_yday)); + return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + + (a->tm_min - b->tm_min)) + + (a->tm_sec - b->tm_sec)); +} +#endif /* ! HAVE_TM_GMTOFF */ + +static table const * +lookup_word (parser_control const *pc, char *word) +{ + char *p; + char *q; + size_t wordlen; + table const *tp; + bool period_found; + bool abbrev; + + /* Make it uppercase. */ + for (p = word; *p; p++) + { + unsigned char ch = *p; + *p = toupper (ch); + } + + for (tp = meridian_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* See if we have an abbreviation for a month. */ + wordlen = strlen (word); + abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.'); + + for (tp = month_and_day_table; tp->name; tp++) + if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0) + return tp; + + if ((tp = lookup_zone (pc, word))) + return tp; + + if (strcmp (word, dst_table[0].name) == 0) + return dst_table; + + for (tp = time_units_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* Strip off any plural and try the units table again. */ + if (word[wordlen - 1] == 'S') + { + word[wordlen - 1] = '\0'; + for (tp = time_units_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */ + } + + for (tp = relative_time_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* Military time zones. */ + if (wordlen == 1) + for (tp = military_table; tp->name; tp++) + if (word[0] == tp->name[0]) + return tp; + + /* Drop out any periods and try the time zone table again. */ + for (period_found = false, p = q = word; (*p = *q); q++) + if (*q == '.') + period_found = true; + else + p++; + if (period_found && (tp = lookup_zone (pc, word))) + return tp; + + return NULL; +} + +static int +yylex (YYSTYPE *lvalp, parser_control *pc) +{ + unsigned char c; + size_t count; + + for (;;) + { + while (c = *pc->input, isspace (c)) + pc->input++; + + if (ISDIGIT (c) || c == '-' || c == '+') + { + char const *p; + int sign; + unsigned long int value; + if (c == '-' || c == '+') + { + sign = c == '-' ? -1 : 1; + while (c = *++pc->input, isspace (c)) + continue; + if (! ISDIGIT (c)) + /* skip the '-' sign */ + continue; + } + else + sign = 0; + p = pc->input; + for (value = 0; ; value *= 10) + { + unsigned long int value1 = value + (c - '0'); + if (value1 < value) + return '?'; + value = value1; + c = *++p; + if (! ISDIGIT (c)) + break; + if (ULONG_MAX / 10 < value) + return '?'; + } + if ((c == '.' || c == ',') && ISDIGIT (p[1])) + { + time_t s; + int ns; + int digits; + unsigned long int value1; + + /* Check for overflow when converting value to time_t. */ + if (sign < 0) + { + s = - value; + if (0 < s) + return '?'; + value1 = -s; + } + else + { + s = value; + if (s < 0) + return '?'; + value1 = s; + } + if (value != value1) + return '?'; + + /* Accumulate fraction, to ns precision. */ + p++; + ns = *p++ - '0'; + for (digits = 2; digits <= LOG10_BILLION; digits++) + { + ns *= 10; + if (ISDIGIT (*p)) + ns += *p++ - '0'; + } + + /* Skip excess digits, truncating toward -Infinity. */ + if (sign < 0) + for (; ISDIGIT (*p); p++) + if (*p != '0') + { + ns++; + break; + } + while (ISDIGIT (*p)) + p++; + + /* Adjust to the timespec convention, which is that + tv_nsec is always a positive offset even if tv_sec is + negative. */ + if (sign < 0 && ns) + { + s--; + if (! (s < 0)) + return '?'; + ns = BILLION - ns; + } + + lvalp->timespec.tv_sec = s; + lvalp->timespec.tv_nsec = ns; + pc->input = p; + return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER; + } + else + { + lvalp->textintval.negative = sign < 0; + if (sign < 0) + { + lvalp->textintval.value = - value; + if (0 < lvalp->textintval.value) + return '?'; + } + else + { + lvalp->textintval.value = value; + if (lvalp->textintval.value < 0) + return '?'; + } + lvalp->textintval.digits = p - pc->input; + pc->input = p; + return sign ? tSNUMBER : tUNUMBER; + } + } + + if (isalpha (c)) + { + char buff[20]; + char *p = buff; + table const *tp; + + do + { + if (p < buff + sizeof buff - 1) + *p++ = c; + c = *++pc->input; + } + while (isalpha (c) || c == '.'); + + *p = '\0'; + tp = lookup_word (pc, buff); + if (! tp) + return '?'; + lvalp->intval = tp->value; + return tp->type; + } + + if (c != '(') + return *pc->input++; + count = 0; + do + { + c = *pc->input++; + if (c == '\0') + return c; + if (c == '(') + count++; + else if (c == ')') + count--; + } + while (count != 0); + } +} + +/* Do nothing if the parser reports an error. */ +static int +yyerror (parser_control const *pc ATTRIBUTE_UNUSED, + char const *s ATTRIBUTE_UNUSED) +{ + return 0; +} + +/* If *TM0 is the old and *TM1 is the new value of a struct tm after + passing it to mktime, return true if it's OK that mktime returned T. + It's not OK if *TM0 has out-of-range members. */ + +static bool +mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t) +{ + if (t == (time_t) -1) + { + /* Guard against falsely reporting an error when parsing a time + stamp that happens to equal (time_t) -1, on a host that + supports such a time stamp. */ + tm1 = localtime (&t); + if (!tm1) + return false; + } + + return ! ((tm0->tm_sec ^ tm1->tm_sec) + | (tm0->tm_min ^ tm1->tm_min) + | (tm0->tm_hour ^ tm1->tm_hour) + | (tm0->tm_mday ^ tm1->tm_mday) + | (tm0->tm_mon ^ tm1->tm_mon) + | (tm0->tm_year ^ tm1->tm_year)); +} + +/* A reasonable upper bound for the size of ordinary TZ strings. + Use heap allocation if TZ's length exceeds this. */ +enum { TZBUFSIZE = 100 }; + +/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated + otherwise. */ +static char * +get_tz (char tzbuf[TZBUFSIZE]) +{ + char *tz = getenv ("TZ"); + if (tz) + { + size_t tzsize = strlen (tz) + 1; + tz = (tzsize <= TZBUFSIZE + ? memcpy (tzbuf, tz, tzsize) + : xmemdup (tz, tzsize)); + } + return tz; +} + +/* Parse a date/time string, storing the resulting time value into *RESULT. + The string itself is pointed to by P. Return true if successful. + P can be an incomplete or relative time specification; if so, use + *NOW as the basis for the returned time. */ +bool +get_date (struct timespec *result, char const *p, struct timespec const *now) +{ + time_t Start; + long int Start_ns; + struct tm const *tmp; + struct tm tm; + struct tm tm0; + parser_control pc; + struct timespec gettime_buffer; + unsigned char c; + bool tz_was_altered = false; + char *tz0 = NULL; + char tz0buf[TZBUFSIZE]; + bool ok = true; + + if (! now) + { + gettime (&gettime_buffer); + now = &gettime_buffer; + } + + Start = now->tv_sec; + Start_ns = now->tv_nsec; + + tmp = localtime (&now->tv_sec); + if (! tmp) + return false; + + while (c = *p, isspace (c)) + p++; + + if (strncmp (p, "TZ=\"", 4) == 0) + { + char const *tzbase = p + 4; + size_t tzsize = 1; + char const *s; + + for (s = tzbase; *s; s++, tzsize++) + if (*s == '\\') + { + s++; + if (! (*s == '\\' || *s == '"')) + break; + } + else if (*s == '"') + { + char *z; + char *tz1; + char tz1buf[TZBUFSIZE]; + bool large_tz = TZBUFSIZE < tzsize; + bool setenv_ok; + tz0 = get_tz (tz0buf); + z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf; + for (s = tzbase; *s != '"'; s++) + *z++ = *(s += *s == '\\'); + *z = '\0'; + setenv_ok = setenv ("TZ", tz1, 1) == 0; + if (large_tz) + free (tz1); + if (!setenv_ok) + goto fail; + tz_was_altered = true; + p = s + 1; + } + } + + pc.input = p; + pc.year.value = tmp->tm_year; + pc.year.value += TM_YEAR_BASE; + pc.year.digits = 0; + pc.month = tmp->tm_mon + 1; + pc.day = tmp->tm_mday; + pc.hour = tmp->tm_hour; + pc.minutes = tmp->tm_min; + pc.seconds.tv_sec = tmp->tm_sec; + pc.seconds.tv_nsec = Start_ns; + tm.tm_isdst = tmp->tm_isdst; + + pc.meridian = MER24; + pc.rel = RELATIVE_TIME_0; + pc.timespec_seen = false; + pc.rels_seen = false; + pc.dates_seen = 0; + pc.days_seen = 0; + pc.times_seen = 0; + pc.local_zones_seen = 0; + pc.dsts_seen = 0; + pc.zones_seen = 0; + +#if HAVE_STRUCT_TM_TM_ZONE + pc.local_time_zone_table[0].name = tmp->tm_zone; + pc.local_time_zone_table[0].type = tLOCAL_ZONE; + pc.local_time_zone_table[0].value = tmp->tm_isdst; + pc.local_time_zone_table[1].name = NULL; + + /* Probe the names used in the next three calendar quarters, looking + for a tm_isdst different from the one we already have. */ + { + int quarter; + for (quarter = 1; quarter <= 3; quarter++) + { + time_t probe = Start + quarter * (90 * 24 * 60 * 60); + struct tm const *probe_tm = localtime (&probe); + if (probe_tm && probe_tm->tm_zone + && probe_tm->tm_isdst != pc.local_time_zone_table[0].value) + { + { + pc.local_time_zone_table[1].name = probe_tm->tm_zone; + pc.local_time_zone_table[1].type = tLOCAL_ZONE; + pc.local_time_zone_table[1].value = probe_tm->tm_isdst; + pc.local_time_zone_table[2].name = NULL; + } + break; + } + } + } +#else +#if HAVE_TZNAME + { +# ifndef tzname + extern char *tzname[]; +# endif + int i; + for (i = 0; i < 2; i++) + { + pc.local_time_zone_table[i].name = tzname[i]; + pc.local_time_zone_table[i].type = tLOCAL_ZONE; + pc.local_time_zone_table[i].value = i; + } + pc.local_time_zone_table[i].name = NULL; + } +#else + pc.local_time_zone_table[0].name = NULL; +#endif +#endif + + if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name + && ! strcmp (pc.local_time_zone_table[0].name, + pc.local_time_zone_table[1].name)) + { + /* This locale uses the same abbrevation for standard and + daylight times. So if we see that abbreviation, we don't + know whether it's daylight time. */ + pc.local_time_zone_table[0].value = -1; + pc.local_time_zone_table[1].name = NULL; + } + + if (yyparse (&pc) != 0) + goto fail; + + if (pc.timespec_seen) + *result = pc.seconds; + else + { + if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen + | (pc.local_zones_seen + pc.zones_seen))) + goto fail; + + tm.tm_year = to_year (pc.year) - TM_YEAR_BASE; + tm.tm_mon = pc.month - 1; + tm.tm_mday = pc.day; + if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen)) + { + tm.tm_hour = to_hour (pc.hour, pc.meridian); + if (tm.tm_hour < 0) + goto fail; + tm.tm_min = pc.minutes; + tm.tm_sec = pc.seconds.tv_sec; + } + else + { + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + pc.seconds.tv_nsec = 0; + } + + /* Let mktime deduce tm_isdst if we have an absolute time stamp. */ + if (pc.dates_seen | pc.days_seen | pc.times_seen) + tm.tm_isdst = -1; + + /* But if the input explicitly specifies local time with or without + DST, give mktime that information. */ + if (pc.local_zones_seen) + tm.tm_isdst = pc.local_isdst; + + tm0 = tm; + + Start = mktime (&tm); + + if (! mktime_ok (&tm0, &tm, Start)) + { + if (! pc.zones_seen) + goto fail; + else + { + /* Guard against falsely reporting errors near the time_t + boundaries when parsing times in other time zones. For + example, suppose the input string "1969-12-31 23:00:00 -0100", + the current time zone is 8 hours ahead of UTC, and the min + time_t value is 1970-01-01 00:00:00 UTC. Then the min + localtime value is 1970-01-01 08:00:00, and mktime will + therefore fail on 1969-12-31 23:00:00. To work around the + problem, set the time zone to 1 hour behind UTC temporarily + by setting TZ="XXX1:00" and try mktime again. */ + + long int time_zone = pc.time_zone; + long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone; + long int abs_time_zone_hour = abs_time_zone / 60; + int abs_time_zone_min = abs_time_zone % 60; + char tz1buf[sizeof "XXX+0:00" + + sizeof pc.time_zone * CHAR_BIT / 3]; + if (!tz_was_altered) + tz0 = get_tz (tz0buf); + sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0), + abs_time_zone_hour, abs_time_zone_min); + if (setenv ("TZ", tz1buf, 1) != 0) + goto fail; + tz_was_altered = true; + tm = tm0; + Start = mktime (&tm); + if (! mktime_ok (&tm0, &tm, Start)) + goto fail; + } + } + + if (pc.days_seen && ! pc.dates_seen) + { + tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 + + 7 * (pc.day_ordinal - (0 < pc.day_ordinal))); + tm.tm_isdst = -1; + Start = mktime (&tm); + if (Start == (time_t) -1) + goto fail; + } + + if (pc.zones_seen) + { + long int delta = pc.time_zone * 60; + time_t t1; +#ifdef HAVE_TM_GMTOFF + delta -= tm.tm_gmtoff; +#else + time_t t = Start; + struct tm const *gmt = gmtime (&t); + if (! gmt) + goto fail; + delta -= tm_diff (&tm, gmt); +#endif + t1 = Start - delta; + if ((Start < t1) != (delta < 0)) + goto fail; /* time_t overflow */ + Start = t1; + } + + /* Add relative date. */ + if (pc.rel.year | pc.rel.month | pc.rel.day) + { + int year = tm.tm_year + pc.rel.year; + int month = tm.tm_mon + pc.rel.month; + int day = tm.tm_mday + pc.rel.day; + if (((year < tm.tm_year) ^ (pc.rel.year < 0)) + | ((month < tm.tm_mon) ^ (pc.rel.month < 0)) + | ((day < tm.tm_mday) ^ (pc.rel.day < 0))) + goto fail; + tm.tm_year = year; + tm.tm_mon = month; + tm.tm_mday = day; + tm.tm_hour = tm0.tm_hour; + tm.tm_min = tm0.tm_min; + tm.tm_sec = tm0.tm_sec; + tm.tm_isdst = tm0.tm_isdst; + Start = mktime (&tm); + if (Start == (time_t) -1) + goto fail; + } + + /* Add relative hours, minutes, and seconds. On hosts that support + leap seconds, ignore the possibility of leap seconds; e.g., + "+ 10 minutes" adds 600 seconds, even if one of them is a + leap second. Typically this is not what the user wants, but it's + too hard to do it the other way, because the time zone indicator + must be applied before relative times, and if mktime is applied + again the time zone will be lost. */ + { + long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns; + long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION; + time_t t0 = Start; + long int d1 = 60 * 60 * pc.rel.hour; + time_t t1 = t0 + d1; + long int d2 = 60 * pc.rel.minutes; + time_t t2 = t1 + d2; + long int d3 = pc.rel.seconds; + time_t t3 = t2 + d3; + long int d4 = (sum_ns - normalized_ns) / BILLION; + time_t t4 = t3 + d4; + + if ((d1 / (60 * 60) ^ pc.rel.hour) + | (d2 / 60 ^ pc.rel.minutes) + | ((t1 < t0) ^ (d1 < 0)) + | ((t2 < t1) ^ (d2 < 0)) + | ((t3 < t2) ^ (d3 < 0)) + | ((t4 < t3) ^ (d4 < 0))) + goto fail; + + result->tv_sec = t4; + result->tv_nsec = normalized_ns; + } + } + + goto done; + + fail: + ok = false; + done: + if (tz_was_altered) + ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0; + if (tz0 != tz0buf) + free (tz0); + return ok; +} + +#if TEST + +int +main (int ac, char **av) +{ + char buff[BUFSIZ]; + + printf ("Enter date, or blank line to exit.\n\t> "); + fflush (stdout); + + buff[BUFSIZ - 1] = '\0'; + while (fgets (buff, BUFSIZ - 1, stdin) && buff[0]) + { + struct timespec d; + struct tm const *tm; + if (! get_date (&d, buff, NULL)) + printf ("Bad format - couldn't convert.\n"); + else if (! (tm = localtime (&d.tv_sec))) + { + long int sec = d.tv_sec; + printf ("localtime (%ld) failed\n", sec); + } + else + { + int ns = d.tv_nsec; + printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n", + tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec, ns); + } + printf ("\t> "); + fflush (stdout); + } + return 0; +} +#endif /* TEST */ + diff --git a/gnulib/lib/getdate.h b/gnulib/lib/getdate.h new file mode 100644 index 0000000..142231e --- /dev/null +++ b/gnulib/lib/getdate.h @@ -0,0 +1,23 @@ +/* Parse a string into an internal time stamp. + + Copyright (C) 1995, 1997, 1998, 2003, 2004, 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 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. */ + +#include +#include + +bool get_date (struct timespec *, char const *, struct timespec const *); diff --git a/gnulib/lib/getdate.y b/gnulib/lib/getdate.y new file mode 100644 index 0000000..cbf3ca1 --- /dev/null +++ b/gnulib/lib/getdate.y @@ -0,0 +1,1520 @@ +%{ +/* Parse a string into an internal time stamp. + + Copyright (C) 1999, 2000, 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 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. */ + +/* Originally written by Steven M. Bellovin while + at the University of North Carolina at Chapel Hill. Later tweaked by + a couple of people on Usenet. Completely overhauled by Rich $alz + and Jim Berets in August, 1990. + + Modified by Paul Eggert in August 1999 to do + the right thing about local DST. Also modified by Paul Eggert + in February 2004 to support + nanosecond-resolution time stamps, and in October 2004 to support + TZ strings in dates. */ + +/* FIXME: Check for arithmetic overflow in all cases, not just + some of them. */ + +#include + +#include "getdate.h" +#include "timespec.h" + +/* There's no need to extend the stack, so there's no need to involve + alloca. */ +#define YYSTACK_USE_ALLOCA 0 + +/* Tell Bison how much stack space is needed. 20 should be plenty for + this grammar, which is not right recursive. Beware setting it too + high, since that might cause problems on machines whose + implementations have lame stack-overflow checking. */ +#define YYMAXDEPTH 20 +#define YYINITDEPTH YYMAXDEPTH + +/* Since the code of getdate.y is not included in the Emacs executable + itself, there is no need to #define static in this file. Even if + the code were included in the Emacs executable, it probably + wouldn't do any harm to #undef it here; this will only cause + problems if we try to write to a static variable, which I don't + think this code needs to do. */ +#ifdef emacs +# undef static +#endif + +#include +#include +#include +#include +#include + +#include "setenv.h" +#include "xalloc.h" + + +/* ISDIGIT differs from isdigit, as follows: + - Its arg may be any int or unsigned int; it need not be an unsigned char + or EOF. + - It's typically faster. + POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to + isdigit unless it's important to use the locale's definition + of `digit' even when the host does not conform to POSIX. */ +#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) + +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) +# endif +#endif + +#ifndef ATTRIBUTE_UNUSED +# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +#define EPOCH_YEAR 1970 +#define TM_YEAR_BASE 1900 + +#define HOUR(x) ((x) * 60) + +/* An integer value, and the number of digits in its textual + representation. */ +typedef struct +{ + bool negative; + long int value; + size_t digits; +} textint; + +/* An entry in the lexical lookup table. */ +typedef struct +{ + char const *name; + int type; + int value; +} table; + +/* Meridian: am, pm, or 24-hour style. */ +enum { MERam, MERpm, MER24 }; + +enum { BILLION = 1000000000, LOG10_BILLION = 9 }; + +/* Relative times. */ +typedef struct +{ + /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ + long int year; + long int month; + long int day; + long int hour; + long int minutes; + long int seconds; + long int ns; +} relative_time; + +#if HAVE_COMPOUND_LITERALS +# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 }) +#else +static relative_time const RELATIVE_TIME_0; +#endif + +/* Information passed to and from the parser. */ +typedef struct +{ + /* The input string remaining to be parsed. */ + const char *input; + + /* N, if this is the Nth Tuesday. */ + long int day_ordinal; + + /* Day of week; Sunday is 0. */ + int day_number; + + /* tm_isdst flag for the local zone. */ + int local_isdst; + + /* Time zone, in minutes east of UTC. */ + long int time_zone; + + /* Style used for time. */ + int meridian; + + /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds. */ + textint year; + long int month; + long int day; + long int hour; + long int minutes; + struct timespec seconds; /* includes nanoseconds */ + + /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ + relative_time rel; + + /* Presence or counts of nonterminals of various flavors parsed so far. */ + bool timespec_seen; + bool rels_seen; + size_t dates_seen; + size_t days_seen; + size_t local_zones_seen; + size_t dsts_seen; + size_t times_seen; + size_t zones_seen; + + /* Table of local time zone abbrevations, terminated by a null entry. */ + table local_time_zone_table[3]; +} parser_control; + +union YYSTYPE; +static int yylex (union YYSTYPE *, parser_control *); +static int yyerror (parser_control const *, char const *); +static long int time_zone_hhmm (textint, long int); + +%} + +/* We want a reentrant parser, even if the TZ manipulation and the calls to + localtime and gmtime are not reentrant. */ +%pure-parser +%parse-param { parser_control *pc } +%lex-param { parser_control *pc } + +/* This grammar has 20 shift/reduce conflicts. */ +%expect 20 + +%union +{ + long int intval; + textint textintval; + struct timespec timespec; + relative_time rel; +} + +%token tAGO tDST + +%token tYEAR_UNIT tMONTH_UNIT tHOUR_UNIT tMINUTE_UNIT tSEC_UNIT +%token tDAY_UNIT + +%token tDAY tDAYZONE tLOCAL_ZONE tMERIDIAN +%token tMONTH tORDINAL tZONE + +%token tSNUMBER tUNUMBER +%token tSDECIMAL_NUMBER tUDECIMAL_NUMBER + +%type o_colon_minutes o_merid +%type seconds signed_seconds unsigned_seconds + +%type relunit relunit_snumber + +%% + +spec: + timespec + | items + ; + +timespec: + '@' seconds + { + pc->seconds = $2; + pc->timespec_seen = true; + } + ; + +items: + /* empty */ + | items item + ; + +item: + time + { pc->times_seen++; } + | local_zone + { pc->local_zones_seen++; } + | zone + { pc->zones_seen++; } + | date + { pc->dates_seen++; } + | day + { pc->days_seen++; } + | rel + { pc->rels_seen = true; } + | number + ; + +time: + tUNUMBER tMERIDIAN + { + pc->hour = $1.value; + pc->minutes = 0; + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = $2; + } + | tUNUMBER ':' tUNUMBER o_merid + { + pc->hour = $1.value; + pc->minutes = $3.value; + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = $4; + } + | tUNUMBER ':' tUNUMBER tSNUMBER o_colon_minutes + { + pc->hour = $1.value; + pc->minutes = $3.value; + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = MER24; + pc->zones_seen++; + pc->time_zone = time_zone_hhmm ($4, $5); + } + | tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_merid + { + pc->hour = $1.value; + pc->minutes = $3.value; + pc->seconds = $5; + pc->meridian = $6; + } + | tUNUMBER ':' tUNUMBER ':' unsigned_seconds tSNUMBER o_colon_minutes + { + pc->hour = $1.value; + pc->minutes = $3.value; + pc->seconds = $5; + pc->meridian = MER24; + pc->zones_seen++; + pc->time_zone = time_zone_hhmm ($6, $7); + } + ; + +local_zone: + tLOCAL_ZONE + { + pc->local_isdst = $1; + pc->dsts_seen += (0 < $1); + } + | tLOCAL_ZONE tDST + { + pc->local_isdst = 1; + pc->dsts_seen += (0 < $1) + 1; + } + ; + +zone: + tZONE + { pc->time_zone = $1; } + | tZONE relunit_snumber + { pc->time_zone = $1; + pc->rel.ns += $2.ns; + pc->rel.seconds += $2.seconds; + pc->rel.minutes += $2.minutes; + pc->rel.hour += $2.hour; + pc->rel.day += $2.day; + pc->rel.month += $2.month; + pc->rel.year += $2.year; + pc->rels_seen = true; } + | tZONE tSNUMBER o_colon_minutes + { pc->time_zone = $1 + time_zone_hhmm ($2, $3); } + | tDAYZONE + { pc->time_zone = $1 + 60; } + | tZONE tDST + { pc->time_zone = $1 + 60; } + ; + +day: + tDAY + { + pc->day_ordinal = 1; + pc->day_number = $1; + } + | tDAY ',' + { + pc->day_ordinal = 1; + pc->day_number = $1; + } + | tORDINAL tDAY + { + pc->day_ordinal = $1; + pc->day_number = $2; + } + | tUNUMBER tDAY + { + pc->day_ordinal = $1.value; + pc->day_number = $2; + } + ; + +date: + tUNUMBER '/' tUNUMBER + { + pc->month = $1.value; + pc->day = $3.value; + } + | tUNUMBER '/' tUNUMBER '/' tUNUMBER + { + /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, + otherwise as MM/DD/YY. + The goal in recognizing YYYY/MM/DD is solely to support legacy + machine-generated dates like those in an RCS log listing. If + you want portability, use the ISO 8601 format. */ + if (4 <= $1.digits) + { + pc->year = $1; + pc->month = $3.value; + pc->day = $5.value; + } + else + { + pc->month = $1.value; + pc->day = $3.value; + pc->year = $5; + } + } + | tUNUMBER tSNUMBER tSNUMBER + { + /* ISO 8601 format. YYYY-MM-DD. */ + pc->year = $1; + pc->month = -$2.value; + pc->day = -$3.value; + } + | tUNUMBER tMONTH tSNUMBER + { + /* e.g. 17-JUN-1992. */ + pc->day = $1.value; + pc->month = $2; + pc->year.value = -$3.value; + pc->year.digits = $3.digits; + } + | tMONTH tSNUMBER tSNUMBER + { + /* e.g. JUN-17-1992. */ + pc->month = $1; + pc->day = -$2.value; + pc->year.value = -$3.value; + pc->year.digits = $3.digits; + } + | tMONTH tUNUMBER + { + pc->month = $1; + pc->day = $2.value; + } + | tMONTH tUNUMBER ',' tUNUMBER + { + pc->month = $1; + pc->day = $2.value; + pc->year = $4; + } + | tUNUMBER tMONTH + { + pc->day = $1.value; + pc->month = $2; + } + | tUNUMBER tMONTH tUNUMBER + { + pc->day = $1.value; + pc->month = $2; + pc->year = $3; + } + ; + +rel: + relunit tAGO + { + pc->rel.ns -= $1.ns; + pc->rel.seconds -= $1.seconds; + pc->rel.minutes -= $1.minutes; + pc->rel.hour -= $1.hour; + pc->rel.day -= $1.day; + pc->rel.month -= $1.month; + pc->rel.year -= $1.year; + } + | relunit + { + pc->rel.ns += $1.ns; + pc->rel.seconds += $1.seconds; + pc->rel.minutes += $1.minutes; + pc->rel.hour += $1.hour; + pc->rel.day += $1.day; + pc->rel.month += $1.month; + pc->rel.year += $1.year; + } + ; + +relunit: + tORDINAL tYEAR_UNIT + { $$ = RELATIVE_TIME_0; $$.year = $1; } + | tUNUMBER tYEAR_UNIT + { $$ = RELATIVE_TIME_0; $$.year = $1.value; } + | tYEAR_UNIT + { $$ = RELATIVE_TIME_0; $$.year = 1; } + | tORDINAL tMONTH_UNIT + { $$ = RELATIVE_TIME_0; $$.month = $1; } + | tUNUMBER tMONTH_UNIT + { $$ = RELATIVE_TIME_0; $$.month = $1.value; } + | tMONTH_UNIT + { $$ = RELATIVE_TIME_0; $$.month = 1; } + | tORDINAL tDAY_UNIT + { $$ = RELATIVE_TIME_0; $$.day = $1 * $2; } + | tUNUMBER tDAY_UNIT + { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; } + | tDAY_UNIT + { $$ = RELATIVE_TIME_0; $$.day = $1; } + | tORDINAL tHOUR_UNIT + { $$ = RELATIVE_TIME_0; $$.hour = $1; } + | tUNUMBER tHOUR_UNIT + { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } + | tHOUR_UNIT + { $$ = RELATIVE_TIME_0; $$.hour = 1; } + | tORDINAL tMINUTE_UNIT + { $$ = RELATIVE_TIME_0; $$.minutes = $1; } + | tUNUMBER tMINUTE_UNIT + { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } + | tMINUTE_UNIT + { $$ = RELATIVE_TIME_0; $$.minutes = 1; } + | tORDINAL tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1; } + | tUNUMBER tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } + | tSDECIMAL_NUMBER tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } + | tUDECIMAL_NUMBER tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } + | tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = 1; } + | relunit_snumber + ; + +relunit_snumber: + tSNUMBER tYEAR_UNIT + { $$ = RELATIVE_TIME_0; $$.year = $1.value; } + | tSNUMBER tMONTH_UNIT + { $$ = RELATIVE_TIME_0; $$.month = $1.value; } + | tSNUMBER tDAY_UNIT + { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; } + | tSNUMBER tHOUR_UNIT + { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } + | tSNUMBER tMINUTE_UNIT + { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } + | tSNUMBER tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } + ; + +seconds: signed_seconds | unsigned_seconds; + +signed_seconds: + tSDECIMAL_NUMBER + | tSNUMBER + { $$.tv_sec = $1.value; $$.tv_nsec = 0; } + ; + +unsigned_seconds: + tUDECIMAL_NUMBER + | tUNUMBER + { $$.tv_sec = $1.value; $$.tv_nsec = 0; } + ; + +number: + tUNUMBER + { + if (pc->dates_seen && ! pc->year.digits + && ! pc->rels_seen && (pc->times_seen || 2 < $1.digits)) + pc->year = $1; + else + { + if (4 < $1.digits) + { + pc->dates_seen++; + pc->day = $1.value % 100; + pc->month = ($1.value / 100) % 100; + pc->year.value = $1.value / 10000; + pc->year.digits = $1.digits - 4; + } + else + { + pc->times_seen++; + if ($1.digits <= 2) + { + pc->hour = $1.value; + pc->minutes = 0; + } + else + { + pc->hour = $1.value / 100; + pc->minutes = $1.value % 100; + } + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = MER24; + } + } + } + ; + +o_colon_minutes: + /* empty */ + { $$ = -1; } + | ':' tUNUMBER + { $$ = $2.value; } + ; + +o_merid: + /* empty */ + { $$ = MER24; } + | tMERIDIAN + { $$ = $1; } + ; + +%% + +static table const meridian_table[] = +{ + { "AM", tMERIDIAN, MERam }, + { "A.M.", tMERIDIAN, MERam }, + { "PM", tMERIDIAN, MERpm }, + { "P.M.", tMERIDIAN, MERpm }, + { NULL, 0, 0 } +}; + +static table const dst_table[] = +{ + { "DST", tDST, 0 } +}; + +static table const month_and_day_table[] = +{ + { "JANUARY", tMONTH, 1 }, + { "FEBRUARY", tMONTH, 2 }, + { "MARCH", tMONTH, 3 }, + { "APRIL", tMONTH, 4 }, + { "MAY", tMONTH, 5 }, + { "JUNE", tMONTH, 6 }, + { "JULY", tMONTH, 7 }, + { "AUGUST", tMONTH, 8 }, + { "SEPTEMBER",tMONTH, 9 }, + { "SEPT", tMONTH, 9 }, + { "OCTOBER", tMONTH, 10 }, + { "NOVEMBER", tMONTH, 11 }, + { "DECEMBER", tMONTH, 12 }, + { "SUNDAY", tDAY, 0 }, + { "MONDAY", tDAY, 1 }, + { "TUESDAY", tDAY, 2 }, + { "TUES", tDAY, 2 }, + { "WEDNESDAY",tDAY, 3 }, + { "WEDNES", tDAY, 3 }, + { "THURSDAY", tDAY, 4 }, + { "THUR", tDAY, 4 }, + { "THURS", tDAY, 4 }, + { "FRIDAY", tDAY, 5 }, + { "SATURDAY", tDAY, 6 }, + { NULL, 0, 0 } +}; + +static table const time_units_table[] = +{ + { "YEAR", tYEAR_UNIT, 1 }, + { "MONTH", tMONTH_UNIT, 1 }, + { "FORTNIGHT",tDAY_UNIT, 14 }, + { "WEEK", tDAY_UNIT, 7 }, + { "DAY", tDAY_UNIT, 1 }, + { "HOUR", tHOUR_UNIT, 1 }, + { "MINUTE", tMINUTE_UNIT, 1 }, + { "MIN", tMINUTE_UNIT, 1 }, + { "SECOND", tSEC_UNIT, 1 }, + { "SEC", tSEC_UNIT, 1 }, + { NULL, 0, 0 } +}; + +/* Assorted relative-time words. */ +static table const relative_time_table[] = +{ + { "TOMORROW", tDAY_UNIT, 1 }, + { "YESTERDAY",tDAY_UNIT, -1 }, + { "TODAY", tDAY_UNIT, 0 }, + { "NOW", tDAY_UNIT, 0 }, + { "LAST", tORDINAL, -1 }, + { "THIS", tORDINAL, 0 }, + { "NEXT", tORDINAL, 1 }, + { "FIRST", tORDINAL, 1 }, +/*{ "SECOND", tORDINAL, 2 }, */ + { "THIRD", tORDINAL, 3 }, + { "FOURTH", tORDINAL, 4 }, + { "FIFTH", tORDINAL, 5 }, + { "SIXTH", tORDINAL, 6 }, + { "SEVENTH", tORDINAL, 7 }, + { "EIGHTH", tORDINAL, 8 }, + { "NINTH", tORDINAL, 9 }, + { "TENTH", tORDINAL, 10 }, + { "ELEVENTH", tORDINAL, 11 }, + { "TWELFTH", tORDINAL, 12 }, + { "AGO", tAGO, 1 }, + { NULL, 0, 0 } +}; + +/* The universal time zone table. These labels can be used even for + time stamps that would not otherwise be valid, e.g., GMT time + stamps in London during summer. */ +static table const universal_time_zone_table[] = +{ + { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */ + { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ + { "UTC", tZONE, HOUR ( 0) }, + { NULL, 0, 0 } +}; + +/* The time zone table. This table is necessarily incomplete, as time + zone abbreviations are ambiguous; e.g. Australians interpret "EST" + as Eastern time in Australia, not as US Eastern Standard Time. + You cannot rely on getdate to handle arbitrary time zone + abbreviations; use numeric abbreviations like `-0500' instead. */ +static table const time_zone_table[] = +{ + { "WET", tZONE, HOUR ( 0) }, /* Western European */ + { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */ + { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */ + { "ART", tZONE, -HOUR ( 3) }, /* Argentina */ + { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */ + { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */ + { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */ + { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */ + { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */ + { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */ + { "CLT", tZONE, -HOUR ( 4) }, /* Chile */ + { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */ + { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */ + { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */ + { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */ + { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */ + { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */ + { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */ + { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */ + { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */ + { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */ + { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */ + { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */ + { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */ + { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */ + { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */ + { "WAT", tZONE, HOUR ( 1) }, /* West Africa */ + { "CET", tZONE, HOUR ( 1) }, /* Central European */ + { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */ + { "MET", tZONE, HOUR ( 1) }, /* Middle European */ + { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */ + { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ + { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ + { "EET", tZONE, HOUR ( 2) }, /* Eastern European */ + { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */ + { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */ + { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */ + { "EAT", tZONE, HOUR ( 3) }, /* East Africa */ + { "MSK", tZONE, HOUR ( 3) }, /* Moscow */ + { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */ + { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */ + { "SGT", tZONE, HOUR ( 8) }, /* Singapore */ + { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */ + { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */ + { "GST", tZONE, HOUR (10) }, /* Guam Standard */ + { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */ + { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */ + { NULL, 0, 0 } +}; + +/* Military time zone table. */ +static table const military_table[] = +{ + { "A", tZONE, -HOUR ( 1) }, + { "B", tZONE, -HOUR ( 2) }, + { "C", tZONE, -HOUR ( 3) }, + { "D", tZONE, -HOUR ( 4) }, + { "E", tZONE, -HOUR ( 5) }, + { "F", tZONE, -HOUR ( 6) }, + { "G", tZONE, -HOUR ( 7) }, + { "H", tZONE, -HOUR ( 8) }, + { "I", tZONE, -HOUR ( 9) }, + { "K", tZONE, -HOUR (10) }, + { "L", tZONE, -HOUR (11) }, + { "M", tZONE, -HOUR (12) }, + { "N", tZONE, HOUR ( 1) }, + { "O", tZONE, HOUR ( 2) }, + { "P", tZONE, HOUR ( 3) }, + { "Q", tZONE, HOUR ( 4) }, + { "R", tZONE, HOUR ( 5) }, + { "S", tZONE, HOUR ( 6) }, + { "T", tZONE, HOUR ( 7) }, + { "U", tZONE, HOUR ( 8) }, + { "V", tZONE, HOUR ( 9) }, + { "W", tZONE, HOUR (10) }, + { "X", tZONE, HOUR (11) }, + { "Y", tZONE, HOUR (12) }, + { "Z", tZONE, HOUR ( 0) }, + { NULL, 0, 0 } +}; + + + +/* Convert a time zone expressed as HH:MM into an integer count of + minutes. If MM is negative, then S is of the form HHMM and needs + to be picked apart; otherwise, S is of the form HH. */ + +static long int +time_zone_hhmm (textint s, long int mm) +{ + if (mm < 0) + return (s.value / 100) * 60 + s.value % 100; + else + return s.value * 60 + (s.negative ? -mm : mm); +} + +static int +to_hour (long int hours, int meridian) +{ + switch (meridian) + { + default: /* Pacify GCC. */ + case MER24: + return 0 <= hours && hours < 24 ? hours : -1; + case MERam: + return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1; + case MERpm: + return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1; + } +} + +static long int +to_year (textint textyear) +{ + long int year = textyear.value; + + if (year < 0) + year = -year; + + /* XPG4 suggests that years 00-68 map to 2000-2068, and + years 69-99 map to 1969-1999. */ + else if (textyear.digits == 2) + year += year < 69 ? 2000 : 1900; + + return year; +} + +static table const * +lookup_zone (parser_control const *pc, char const *name) +{ + table const *tp; + + for (tp = universal_time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + /* Try local zone abbreviations before those in time_zone_table, as + the local ones are more likely to be right. */ + for (tp = pc->local_time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + for (tp = time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + return NULL; +} + +#if ! HAVE_TM_GMTOFF +/* Yield the difference between *A and *B, + measured in seconds, ignoring leap seconds. + The body of this function is taken directly from the GNU C Library; + see src/strftime.c. */ +static long int +tm_diff (struct tm const *a, struct tm const *b) +{ + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid int overflow in leap day calculations. */ + int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); + int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + long int ayear = a->tm_year; + long int years = ayear - b->tm_year; + long int days = (365 * years + intervening_leap_days + + (a->tm_yday - b->tm_yday)); + return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + + (a->tm_min - b->tm_min)) + + (a->tm_sec - b->tm_sec)); +} +#endif /* ! HAVE_TM_GMTOFF */ + +static table const * +lookup_word (parser_control const *pc, char *word) +{ + char *p; + char *q; + size_t wordlen; + table const *tp; + bool period_found; + bool abbrev; + + /* Make it uppercase. */ + for (p = word; *p; p++) + { + unsigned char ch = *p; + *p = toupper (ch); + } + + for (tp = meridian_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* See if we have an abbreviation for a month. */ + wordlen = strlen (word); + abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.'); + + for (tp = month_and_day_table; tp->name; tp++) + if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0) + return tp; + + if ((tp = lookup_zone (pc, word))) + return tp; + + if (strcmp (word, dst_table[0].name) == 0) + return dst_table; + + for (tp = time_units_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* Strip off any plural and try the units table again. */ + if (word[wordlen - 1] == 'S') + { + word[wordlen - 1] = '\0'; + for (tp = time_units_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */ + } + + for (tp = relative_time_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* Military time zones. */ + if (wordlen == 1) + for (tp = military_table; tp->name; tp++) + if (word[0] == tp->name[0]) + return tp; + + /* Drop out any periods and try the time zone table again. */ + for (period_found = false, p = q = word; (*p = *q); q++) + if (*q == '.') + period_found = true; + else + p++; + if (period_found && (tp = lookup_zone (pc, word))) + return tp; + + return NULL; +} + +static int +yylex (YYSTYPE *lvalp, parser_control *pc) +{ + unsigned char c; + size_t count; + + for (;;) + { + while (c = *pc->input, isspace (c)) + pc->input++; + + if (ISDIGIT (c) || c == '-' || c == '+') + { + char const *p; + int sign; + unsigned long int value; + if (c == '-' || c == '+') + { + sign = c == '-' ? -1 : 1; + while (c = *++pc->input, isspace (c)) + continue; + if (! ISDIGIT (c)) + /* skip the '-' sign */ + continue; + } + else + sign = 0; + p = pc->input; + for (value = 0; ; value *= 10) + { + unsigned long int value1 = value + (c - '0'); + if (value1 < value) + return '?'; + value = value1; + c = *++p; + if (! ISDIGIT (c)) + break; + if (ULONG_MAX / 10 < value) + return '?'; + } + if ((c == '.' || c == ',') && ISDIGIT (p[1])) + { + time_t s; + int ns; + int digits; + unsigned long int value1; + + /* Check for overflow when converting value to time_t. */ + if (sign < 0) + { + s = - value; + if (0 < s) + return '?'; + value1 = -s; + } + else + { + s = value; + if (s < 0) + return '?'; + value1 = s; + } + if (value != value1) + return '?'; + + /* Accumulate fraction, to ns precision. */ + p++; + ns = *p++ - '0'; + for (digits = 2; digits <= LOG10_BILLION; digits++) + { + ns *= 10; + if (ISDIGIT (*p)) + ns += *p++ - '0'; + } + + /* Skip excess digits, truncating toward -Infinity. */ + if (sign < 0) + for (; ISDIGIT (*p); p++) + if (*p != '0') + { + ns++; + break; + } + while (ISDIGIT (*p)) + p++; + + /* Adjust to the timespec convention, which is that + tv_nsec is always a positive offset even if tv_sec is + negative. */ + if (sign < 0 && ns) + { + s--; + if (! (s < 0)) + return '?'; + ns = BILLION - ns; + } + + lvalp->timespec.tv_sec = s; + lvalp->timespec.tv_nsec = ns; + pc->input = p; + return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER; + } + else + { + lvalp->textintval.negative = sign < 0; + if (sign < 0) + { + lvalp->textintval.value = - value; + if (0 < lvalp->textintval.value) + return '?'; + } + else + { + lvalp->textintval.value = value; + if (lvalp->textintval.value < 0) + return '?'; + } + lvalp->textintval.digits = p - pc->input; + pc->input = p; + return sign ? tSNUMBER : tUNUMBER; + } + } + + if (isalpha (c)) + { + char buff[20]; + char *p = buff; + table const *tp; + + do + { + if (p < buff + sizeof buff - 1) + *p++ = c; + c = *++pc->input; + } + while (isalpha (c) || c == '.'); + + *p = '\0'; + tp = lookup_word (pc, buff); + if (! tp) + return '?'; + lvalp->intval = tp->value; + return tp->type; + } + + if (c != '(') + return *pc->input++; + count = 0; + do + { + c = *pc->input++; + if (c == '\0') + return c; + if (c == '(') + count++; + else if (c == ')') + count--; + } + while (count != 0); + } +} + +/* Do nothing if the parser reports an error. */ +static int +yyerror (parser_control const *pc ATTRIBUTE_UNUSED, + char const *s ATTRIBUTE_UNUSED) +{ + return 0; +} + +/* If *TM0 is the old and *TM1 is the new value of a struct tm after + passing it to mktime, return true if it's OK that mktime returned T. + It's not OK if *TM0 has out-of-range members. */ + +static bool +mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t) +{ + if (t == (time_t) -1) + { + /* Guard against falsely reporting an error when parsing a time + stamp that happens to equal (time_t) -1, on a host that + supports such a time stamp. */ + tm1 = localtime (&t); + if (!tm1) + return false; + } + + return ! ((tm0->tm_sec ^ tm1->tm_sec) + | (tm0->tm_min ^ tm1->tm_min) + | (tm0->tm_hour ^ tm1->tm_hour) + | (tm0->tm_mday ^ tm1->tm_mday) + | (tm0->tm_mon ^ tm1->tm_mon) + | (tm0->tm_year ^ tm1->tm_year)); +} + +/* A reasonable upper bound for the size of ordinary TZ strings. + Use heap allocation if TZ's length exceeds this. */ +enum { TZBUFSIZE = 100 }; + +/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated + otherwise. */ +static char * +get_tz (char tzbuf[TZBUFSIZE]) +{ + char *tz = getenv ("TZ"); + if (tz) + { + size_t tzsize = strlen (tz) + 1; + tz = (tzsize <= TZBUFSIZE + ? memcpy (tzbuf, tz, tzsize) + : xmemdup (tz, tzsize)); + } + return tz; +} + +/* Parse a date/time string, storing the resulting time value into *RESULT. + The string itself is pointed to by P. Return true if successful. + P can be an incomplete or relative time specification; if so, use + *NOW as the basis for the returned time. */ +bool +get_date (struct timespec *result, char const *p, struct timespec const *now) +{ + time_t Start; + long int Start_ns; + struct tm const *tmp; + struct tm tm; + struct tm tm0; + parser_control pc; + struct timespec gettime_buffer; + unsigned char c; + bool tz_was_altered = false; + char *tz0 = NULL; + char tz0buf[TZBUFSIZE]; + bool ok = true; + + if (! now) + { + gettime (&gettime_buffer); + now = &gettime_buffer; + } + + Start = now->tv_sec; + Start_ns = now->tv_nsec; + + tmp = localtime (&now->tv_sec); + if (! tmp) + return false; + + while (c = *p, isspace (c)) + p++; + + if (strncmp (p, "TZ=\"", 4) == 0) + { + char const *tzbase = p + 4; + size_t tzsize = 1; + char const *s; + + for (s = tzbase; *s; s++, tzsize++) + if (*s == '\\') + { + s++; + if (! (*s == '\\' || *s == '"')) + break; + } + else if (*s == '"') + { + char *z; + char *tz1; + char tz1buf[TZBUFSIZE]; + bool large_tz = TZBUFSIZE < tzsize; + bool setenv_ok; + tz0 = get_tz (tz0buf); + z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf; + for (s = tzbase; *s != '"'; s++) + *z++ = *(s += *s == '\\'); + *z = '\0'; + setenv_ok = setenv ("TZ", tz1, 1) == 0; + if (large_tz) + free (tz1); + if (!setenv_ok) + goto fail; + tz_was_altered = true; + p = s + 1; + } + } + + pc.input = p; + pc.year.value = tmp->tm_year; + pc.year.value += TM_YEAR_BASE; + pc.year.digits = 0; + pc.month = tmp->tm_mon + 1; + pc.day = tmp->tm_mday; + pc.hour = tmp->tm_hour; + pc.minutes = tmp->tm_min; + pc.seconds.tv_sec = tmp->tm_sec; + pc.seconds.tv_nsec = Start_ns; + tm.tm_isdst = tmp->tm_isdst; + + pc.meridian = MER24; + pc.rel = RELATIVE_TIME_0; + pc.timespec_seen = false; + pc.rels_seen = false; + pc.dates_seen = 0; + pc.days_seen = 0; + pc.times_seen = 0; + pc.local_zones_seen = 0; + pc.dsts_seen = 0; + pc.zones_seen = 0; + +#if HAVE_STRUCT_TM_TM_ZONE + pc.local_time_zone_table[0].name = tmp->tm_zone; + pc.local_time_zone_table[0].type = tLOCAL_ZONE; + pc.local_time_zone_table[0].value = tmp->tm_isdst; + pc.local_time_zone_table[1].name = NULL; + + /* Probe the names used in the next three calendar quarters, looking + for a tm_isdst different from the one we already have. */ + { + int quarter; + for (quarter = 1; quarter <= 3; quarter++) + { + time_t probe = Start + quarter * (90 * 24 * 60 * 60); + struct tm const *probe_tm = localtime (&probe); + if (probe_tm && probe_tm->tm_zone + && probe_tm->tm_isdst != pc.local_time_zone_table[0].value) + { + { + pc.local_time_zone_table[1].name = probe_tm->tm_zone; + pc.local_time_zone_table[1].type = tLOCAL_ZONE; + pc.local_time_zone_table[1].value = probe_tm->tm_isdst; + pc.local_time_zone_table[2].name = NULL; + } + break; + } + } + } +#else +#if HAVE_TZNAME + { +# ifndef tzname + extern char *tzname[]; +# endif + int i; + for (i = 0; i < 2; i++) + { + pc.local_time_zone_table[i].name = tzname[i]; + pc.local_time_zone_table[i].type = tLOCAL_ZONE; + pc.local_time_zone_table[i].value = i; + } + pc.local_time_zone_table[i].name = NULL; + } +#else + pc.local_time_zone_table[0].name = NULL; +#endif +#endif + + if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name + && ! strcmp (pc.local_time_zone_table[0].name, + pc.local_time_zone_table[1].name)) + { + /* This locale uses the same abbrevation for standard and + daylight times. So if we see that abbreviation, we don't + know whether it's daylight time. */ + pc.local_time_zone_table[0].value = -1; + pc.local_time_zone_table[1].name = NULL; + } + + if (yyparse (&pc) != 0) + goto fail; + + if (pc.timespec_seen) + *result = pc.seconds; + else + { + if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen + | (pc.local_zones_seen + pc.zones_seen))) + goto fail; + + tm.tm_year = to_year (pc.year) - TM_YEAR_BASE; + tm.tm_mon = pc.month - 1; + tm.tm_mday = pc.day; + if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen)) + { + tm.tm_hour = to_hour (pc.hour, pc.meridian); + if (tm.tm_hour < 0) + goto fail; + tm.tm_min = pc.minutes; + tm.tm_sec = pc.seconds.tv_sec; + } + else + { + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + pc.seconds.tv_nsec = 0; + } + + /* Let mktime deduce tm_isdst if we have an absolute time stamp. */ + if (pc.dates_seen | pc.days_seen | pc.times_seen) + tm.tm_isdst = -1; + + /* But if the input explicitly specifies local time with or without + DST, give mktime that information. */ + if (pc.local_zones_seen) + tm.tm_isdst = pc.local_isdst; + + tm0 = tm; + + Start = mktime (&tm); + + if (! mktime_ok (&tm0, &tm, Start)) + { + if (! pc.zones_seen) + goto fail; + else + { + /* Guard against falsely reporting errors near the time_t + boundaries when parsing times in other time zones. For + example, suppose the input string "1969-12-31 23:00:00 -0100", + the current time zone is 8 hours ahead of UTC, and the min + time_t value is 1970-01-01 00:00:00 UTC. Then the min + localtime value is 1970-01-01 08:00:00, and mktime will + therefore fail on 1969-12-31 23:00:00. To work around the + problem, set the time zone to 1 hour behind UTC temporarily + by setting TZ="XXX1:00" and try mktime again. */ + + long int time_zone = pc.time_zone; + long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone; + long int abs_time_zone_hour = abs_time_zone / 60; + int abs_time_zone_min = abs_time_zone % 60; + char tz1buf[sizeof "XXX+0:00" + + sizeof pc.time_zone * CHAR_BIT / 3]; + if (!tz_was_altered) + tz0 = get_tz (tz0buf); + sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0), + abs_time_zone_hour, abs_time_zone_min); + if (setenv ("TZ", tz1buf, 1) != 0) + goto fail; + tz_was_altered = true; + tm = tm0; + Start = mktime (&tm); + if (! mktime_ok (&tm0, &tm, Start)) + goto fail; + } + } + + if (pc.days_seen && ! pc.dates_seen) + { + tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 + + 7 * (pc.day_ordinal - (0 < pc.day_ordinal))); + tm.tm_isdst = -1; + Start = mktime (&tm); + if (Start == (time_t) -1) + goto fail; + } + + if (pc.zones_seen) + { + long int delta = pc.time_zone * 60; + time_t t1; +#ifdef HAVE_TM_GMTOFF + delta -= tm.tm_gmtoff; +#else + time_t t = Start; + struct tm const *gmt = gmtime (&t); + if (! gmt) + goto fail; + delta -= tm_diff (&tm, gmt); +#endif + t1 = Start - delta; + if ((Start < t1) != (delta < 0)) + goto fail; /* time_t overflow */ + Start = t1; + } + + /* Add relative date. */ + if (pc.rel.year | pc.rel.month | pc.rel.day) + { + int year = tm.tm_year + pc.rel.year; + int month = tm.tm_mon + pc.rel.month; + int day = tm.tm_mday + pc.rel.day; + if (((year < tm.tm_year) ^ (pc.rel.year < 0)) + | ((month < tm.tm_mon) ^ (pc.rel.month < 0)) + | ((day < tm.tm_mday) ^ (pc.rel.day < 0))) + goto fail; + tm.tm_year = year; + tm.tm_mon = month; + tm.tm_mday = day; + tm.tm_hour = tm0.tm_hour; + tm.tm_min = tm0.tm_min; + tm.tm_sec = tm0.tm_sec; + tm.tm_isdst = tm0.tm_isdst; + Start = mktime (&tm); + if (Start == (time_t) -1) + goto fail; + } + + /* Add relative hours, minutes, and seconds. On hosts that support + leap seconds, ignore the possibility of leap seconds; e.g., + "+ 10 minutes" adds 600 seconds, even if one of them is a + leap second. Typically this is not what the user wants, but it's + too hard to do it the other way, because the time zone indicator + must be applied before relative times, and if mktime is applied + again the time zone will be lost. */ + { + long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns; + long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION; + time_t t0 = Start; + long int d1 = 60 * 60 * pc.rel.hour; + time_t t1 = t0 + d1; + long int d2 = 60 * pc.rel.minutes; + time_t t2 = t1 + d2; + long int d3 = pc.rel.seconds; + time_t t3 = t2 + d3; + long int d4 = (sum_ns - normalized_ns) / BILLION; + time_t t4 = t3 + d4; + + if ((d1 / (60 * 60) ^ pc.rel.hour) + | (d2 / 60 ^ pc.rel.minutes) + | ((t1 < t0) ^ (d1 < 0)) + | ((t2 < t1) ^ (d2 < 0)) + | ((t3 < t2) ^ (d3 < 0)) + | ((t4 < t3) ^ (d4 < 0))) + goto fail; + + result->tv_sec = t4; + result->tv_nsec = normalized_ns; + } + } + + goto done; + + fail: + ok = false; + done: + if (tz_was_altered) + ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0; + if (tz0 != tz0buf) + free (tz0); + return ok; +} + +#if TEST + +int +main (int ac, char **av) +{ + char buff[BUFSIZ]; + + printf ("Enter date, or blank line to exit.\n\t> "); + fflush (stdout); + + buff[BUFSIZ - 1] = '\0'; + while (fgets (buff, BUFSIZ - 1, stdin) && buff[0]) + { + struct timespec d; + struct tm const *tm; + if (! get_date (&d, buff, NULL)) + printf ("Bad format - couldn't convert.\n"); + else if (! (tm = localtime (&d.tv_sec))) + { + long int sec = d.tv_sec; + printf ("localtime (%ld) failed\n", sec); + } + else + { + int ns = d.tv_nsec; + printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n", + tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec, ns); + } + printf ("\t> "); + fflush (stdout); + } + return 0; +} +#endif /* TEST */ diff --git a/gnulib/lib/getdelim.c b/gnulib/lib/getdelim.c new file mode 100644 index 0000000..e0b8a70 --- /dev/null +++ b/gnulib/lib/getdelim.c @@ -0,0 +1,126 @@ +/* getdelim.c --- Implementation of replacement getdelim function. + Copyright (C) 1994, 1996, 1997, 1998, 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 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. */ + +/* Ported from glibc by Simon Josefsson. */ + +#include + +#include "getdelim.h" + +#include +#include +#include + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif +#if !HAVE_FLOCKFILE +# undef flockfile +# define flockfile(x) ((void) 0) +#endif +#if !HAVE_FUNLOCKFILE +# undef funlockfile +# define funlockfile(x) ((void) 0) +#endif + +/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and + NUL-terminate it). *LINEPTR is a pointer returned from malloc (or + NULL), pointing to *N characters of space. It is realloc'ed as + necessary. Returns the number of characters read (not including + the null terminator), or -1 on error or EOF. */ + +ssize_t +getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) +{ + ssize_t result; + size_t cur_len = 0; + + if (lineptr == NULL || n == NULL || fp == NULL) + { + errno = EINVAL; + return -1; + } + + flockfile (fp); + + if (*lineptr == NULL || *n == 0) + { + *n = 120; + *lineptr = (char *) malloc (*n); + if (*lineptr == NULL) + { + result = -1; + goto unlock_return; + } + } + + for (;;) + { + int i; + + i = getc (fp); + if (i == EOF) + { + result = -1; + break; + } + + /* Make enough space for len+1 (for final NUL) bytes. */ + if (cur_len + 1 >= *n) + { + size_t needed_max = + SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; + size_t needed = 2 * *n + 1; /* Be generous. */ + char *new_lineptr; + + if (needed_max < needed) + needed = needed_max; + if (cur_len + 1 >= needed) + { + result = -1; + goto unlock_return; + } + + new_lineptr = (char *) realloc (*lineptr, needed); + if (new_lineptr == NULL) + { + result = -1; + goto unlock_return; + } + + *lineptr = new_lineptr; + *n = needed; + } + + (*lineptr)[cur_len] = i; + cur_len++; + + if (i == delimiter) + break; + } + (*lineptr)[cur_len] = '\0'; + result = cur_len ? cur_len : result; + + unlock_return: + funlockfile (fp); + return result; +} diff --git a/gnulib/lib/getdelim.h b/gnulib/lib/getdelim.h new file mode 100644 index 0000000..8bc6130 --- /dev/null +++ b/gnulib/lib/getdelim.h @@ -0,0 +1,28 @@ +/* getdelim.h --- Prototype for replacement getdelim function. + 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 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. */ + +/* Written by Simon Josefsson. */ + +/* Get size_t, FILE, ssize_t. And getdelim, if available. */ +# include +# include +# include + +#if !HAVE_DECL_GETDELIM +ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream); +#endif /* !HAVE_GETDELIM */ diff --git a/gnulib/lib/getline.c b/gnulib/lib/getline.c new file mode 100644 index 0000000..c8c9244 --- /dev/null +++ b/gnulib/lib/getline.c @@ -0,0 +1,30 @@ +/* getline.c --- Implementation of replacement getline function. + 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 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. */ + +/* Written by Simon Josefsson. */ + +#include + +#include "getdelim.h" +#include "getline.h" + +ssize_t +getline (char **lineptr, size_t *n, FILE *stream) +{ + return getdelim (lineptr, n, '\n', stream); +} diff --git a/gnulib/lib/getline.h b/gnulib/lib/getline.h new file mode 100644 index 0000000..f0f61c4 --- /dev/null +++ b/gnulib/lib/getline.h @@ -0,0 +1,28 @@ +/* getline.h --- Prototype for replacement getline function. + 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 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. */ + +/* Written by Simon Josefsson. */ + +/* Get size_t, FILE, ssize_t. And getline, if available. */ +# include +# include +# include + +#if !HAVE_DECL_GETLINE +ssize_t getline (char **lineptr, size_t *n, FILE *stream); +#endif /* !HAVE_GETLINE */ diff --git a/gnulib/lib/getopt.c b/gnulib/lib/getopt.c new file mode 100644 index 0000000..3580ad8 --- /dev/null +++ b/gnulib/lib/getopt.c @@ -0,0 +1,1191 @@ +/* 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 + 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 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. */ + +#ifndef _LIBC +# include +#endif + +#include "getopt.h" + +#include +#include +#include +#include + +#ifdef __VMS +# include +#endif + +#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 */ diff --git a/gnulib/lib/getopt1.c b/gnulib/lib/getopt1.c new file mode 100644 index 0000000..cc0746e --- /dev/null +++ b/gnulib/lib/getopt1.c @@ -0,0 +1,171 @@ +/* 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 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. */ + +#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 */ diff --git a/gnulib/lib/getopt_.h b/gnulib/lib/getopt_.h new file mode 100644 index 0000000..615ef9a --- /dev/null +++ b/gnulib/lib/getopt_.h @@ -0,0 +1,226 @@ +/* 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 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. */ + +#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 */ diff --git a/gnulib/lib/getopt_int.h b/gnulib/lib/getopt_int.h new file mode 100644 index 0000000..401579f --- /dev/null +++ b/gnulib/lib/getopt_int.h @@ -0,0 +1,131 @@ +/* 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 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. */ + +#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 */ diff --git a/gnulib/lib/gettext.h b/gnulib/lib/gettext.h new file mode 100644 index 0000000..9d76ec9 --- /dev/null +++ b/gnulib/lib/gettext.h @@ -0,0 +1,270 @@ +/* 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 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. */ + +#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 */ diff --git a/gnulib/lib/gettime.c b/gnulib/lib/gettime.c new file mode 100644 index 0000000..86bd325 --- /dev/null +++ b/gnulib/lib/gettime.c @@ -0,0 +1,49 @@ +/* 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 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. */ + +/* 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 +} diff --git a/gnulib/lib/gettimeofday.c b/gnulib/lib/gettimeofday.c new file mode 100644 index 0000000..bd5576c --- /dev/null +++ b/gnulib/lib/gettimeofday.c @@ -0,0 +1,142 @@ +/* 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 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. */ + +/* 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; + +/* 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 * +localtime (time_t const *timep) +{ +#undef localtime + extern struct tm *localtime (time_t const *); + 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 * +gmtime (time_t const *timep) +{ +#undef gmtime + extern struct tm *gmtime (time_t const *); + 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 +/* This is a wrapper for tzset, for systems on which tzset may clobber + the static buffer used for localtime's result. */ +void +tzset (void) +{ +#undef tzset + extern void 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 +} diff --git a/gnulib/lib/hash.c b/gnulib/lib/hash.c new file mode 100644 index 0000000..f4ab12f --- /dev/null +++ b/gnulib/lib/hash.c @@ -0,0 +1,1048 @@ +/* hash - hashing table processing. + + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free + Software Foundation, Inc. + + Written by Jim Meyering, 1992. + + 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. */ + +/* A generic hash table package. */ + +/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead + of malloc. If you change USE_OBSTACK, you have to recompile! */ + +#include + +#include "hash.h" +#include "xalloc.h" + +#include +#include +#include + +#if USE_OBSTACK +# include "obstack.h" +# ifndef obstack_chunk_alloc +# define obstack_chunk_alloc malloc +# endif +# ifndef obstack_chunk_free +# define obstack_chunk_free free +# endif +#endif + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +struct hash_table + { + /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1, + for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets + are not empty, there are N_ENTRIES active entries in the table. */ + struct hash_entry *bucket; + struct hash_entry const *bucket_limit; + size_t n_buckets; + size_t n_buckets_used; + size_t n_entries; + + /* Tuning arguments, kept in a physicaly separate structure. */ + const Hash_tuning *tuning; + + /* Three functions are given to `hash_initialize', see the documentation + block for this function. In a word, HASHER randomizes a user entry + into a number up from 0 up to some maximum minus 1; COMPARATOR returns + true if two user entries compare equally; and DATA_FREER is the cleanup + function for a user entry. */ + Hash_hasher hasher; + Hash_comparator comparator; + Hash_data_freer data_freer; + + /* A linked list of freed struct hash_entry structs. */ + struct hash_entry *free_entry_list; + +#if USE_OBSTACK + /* Whenever obstacks are used, it is possible to allocate all overflowed + entries into a single stack, so they all can be freed in a single + operation. It is not clear if the speedup is worth the trouble. */ + struct obstack entry_stack; +#endif + }; + +/* A hash table contains many internal entries, each holding a pointer to + some user provided data (also called a user entry). An entry indistinctly + refers to both the internal entry and its associated user entry. A user + entry contents may be hashed by a randomization function (the hashing + function, or just `hasher' for short) into a number (or `slot') between 0 + and the current table size. At each slot position in the hash table, + starts a linked chain of entries for which the user data all hash to this + slot. A bucket is the collection of all entries hashing to the same slot. + + A good `hasher' function will distribute entries rather evenly in buckets. + In the ideal case, the length of each bucket is roughly the number of + entries divided by the table size. Finding the slot for a data is usually + done in constant time by the `hasher', and the later finding of a precise + entry is linear in time with the size of the bucket. Consequently, a + larger hash table size (that is, a larger number of buckets) is prone to + yielding shorter chains, *given* the `hasher' function behaves properly. + + Long buckets slow down the lookup algorithm. One might use big hash table + sizes in hope to reduce the average length of buckets, but this might + become inordinate, as unused slots in the hash table take some space. The + best bet is to make sure you are using a good `hasher' function (beware + that those are not that easy to write! :-), and to use a table size + larger than the actual number of entries. */ + +/* If an insertion makes the ratio of nonempty buckets to table size larger + than the growth threshold (a number between 0.0 and 1.0), then increase + the table size by multiplying by the growth factor (a number greater than + 1.0). The growth threshold defaults to 0.8, and the growth factor + defaults to 1.414, meaning that the table will have doubled its size + every second time 80% of the buckets get used. */ +#define DEFAULT_GROWTH_THRESHOLD 0.8 +#define DEFAULT_GROWTH_FACTOR 1.414 + +/* If a deletion empties a bucket and causes the ratio of used buckets to + table size to become smaller than the shrink threshold (a number between + 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a + number greater than the shrink threshold but smaller than 1.0). The shrink + threshold and factor default to 0.0 and 1.0, meaning that the table never + shrinks. */ +#define DEFAULT_SHRINK_THRESHOLD 0.0 +#define DEFAULT_SHRINK_FACTOR 1.0 + +/* Use this to initialize or reset a TUNING structure to + some sensible values. */ +static const Hash_tuning default_tuning = + { + DEFAULT_SHRINK_THRESHOLD, + DEFAULT_SHRINK_FACTOR, + DEFAULT_GROWTH_THRESHOLD, + DEFAULT_GROWTH_FACTOR, + false + }; + +/* Information and lookup. */ + +/* The following few functions provide information about the overall hash + table organization: the number of entries, number of buckets and maximum + length of buckets. */ + +/* Return the number of buckets in the hash table. The table size, the total + number of buckets (used plus unused), or the maximum number of slots, are + the same quantity. */ + +size_t +hash_get_n_buckets (const Hash_table *table) +{ + return table->n_buckets; +} + +/* Return the number of slots in use (non-empty buckets). */ + +size_t +hash_get_n_buckets_used (const Hash_table *table) +{ + return table->n_buckets_used; +} + +/* Return the number of active entries. */ + +size_t +hash_get_n_entries (const Hash_table *table) +{ + return table->n_entries; +} + +/* Return the length of the longest chain (bucket). */ + +size_t +hash_get_max_bucket_length (const Hash_table *table) +{ + struct hash_entry const *bucket; + size_t max_bucket_length = 0; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + struct hash_entry const *cursor = bucket; + size_t bucket_length = 1; + + while (cursor = cursor->next, cursor) + bucket_length++; + + if (bucket_length > max_bucket_length) + max_bucket_length = bucket_length; + } + } + + return max_bucket_length; +} + +/* Do a mild validation of a hash table, by traversing it and checking two + statistics. */ + +bool +hash_table_ok (const Hash_table *table) +{ + struct hash_entry const *bucket; + size_t n_buckets_used = 0; + size_t n_entries = 0; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + struct hash_entry const *cursor = bucket; + + /* Count bucket head. */ + n_buckets_used++; + n_entries++; + + /* Count bucket overflow. */ + while (cursor = cursor->next, cursor) + n_entries++; + } + } + + if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries) + return true; + + return false; +} + +void +hash_print_statistics (const Hash_table *table, FILE *stream) +{ + size_t n_entries = hash_get_n_entries (table); + size_t n_buckets = hash_get_n_buckets (table); + size_t n_buckets_used = hash_get_n_buckets_used (table); + size_t max_bucket_length = hash_get_max_bucket_length (table); + + fprintf (stream, "# entries: %lu\n", (unsigned long int) n_entries); + fprintf (stream, "# buckets: %lu\n", (unsigned long int) n_buckets); + fprintf (stream, "# buckets used: %lu (%.2f%%)\n", + (unsigned long int) n_buckets_used, + (100.0 * n_buckets_used) / n_buckets); + fprintf (stream, "max bucket length: %lu\n", + (unsigned long int) max_bucket_length); +} + +/* If ENTRY matches an entry already in the hash table, return the + entry from the table. Otherwise, return NULL. */ + +void * +hash_lookup (const Hash_table *table, const void *entry) +{ + struct hash_entry const *bucket + = table->bucket + table->hasher (entry, table->n_buckets); + struct hash_entry const *cursor; + + if (! (bucket < table->bucket_limit)) + abort (); + + if (bucket->data == NULL) + return NULL; + + for (cursor = bucket; cursor; cursor = cursor->next) + if (table->comparator (entry, cursor->data)) + return cursor->data; + + return NULL; +} + +/* Walking. */ + +/* The functions in this page traverse the hash table and process the + contained entries. For the traversal to work properly, the hash table + should not be resized nor modified while any particular entry is being + processed. In particular, entries should not be added or removed. */ + +/* Return the first data in the table, or NULL if the table is empty. */ + +void * +hash_get_first (const Hash_table *table) +{ + struct hash_entry const *bucket; + + if (table->n_entries == 0) + return NULL; + + for (bucket = table->bucket; ; bucket++) + if (! (bucket < table->bucket_limit)) + abort (); + else if (bucket->data) + return bucket->data; +} + +/* Return the user data for the entry following ENTRY, where ENTRY has been + returned by a previous call to either `hash_get_first' or `hash_get_next'. + Return NULL if there are no more entries. */ + +void * +hash_get_next (const Hash_table *table, const void *entry) +{ + struct hash_entry const *bucket + = table->bucket + table->hasher (entry, table->n_buckets); + struct hash_entry const *cursor; + + if (! (bucket < table->bucket_limit)) + abort (); + + /* Find next entry in the same bucket. */ + for (cursor = bucket; cursor; cursor = cursor->next) + if (cursor->data == entry && cursor->next) + return cursor->next->data; + + /* Find first entry in any subsequent bucket. */ + while (++bucket < table->bucket_limit) + if (bucket->data) + return bucket->data; + + /* None found. */ + return NULL; +} + +/* Fill BUFFER with pointers to active user entries in the hash table, then + return the number of pointers copied. Do not copy more than BUFFER_SIZE + pointers. */ + +size_t +hash_get_entries (const Hash_table *table, void **buffer, + size_t buffer_size) +{ + size_t counter = 0; + struct hash_entry const *bucket; + struct hash_entry const *cursor; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + for (cursor = bucket; cursor; cursor = cursor->next) + { + if (counter >= buffer_size) + return counter; + buffer[counter++] = cursor->data; + } + } + } + + return counter; +} + +/* Call a PROCESSOR function for each entry of a hash table, and return the + number of entries for which the processor function returned success. A + pointer to some PROCESSOR_DATA which will be made available to each call to + the processor function. The PROCESSOR accepts two arguments: the first is + the user entry being walked into, the second is the value of PROCESSOR_DATA + as received. The walking continue for as long as the PROCESSOR function + returns nonzero. When it returns zero, the walking is interrupted. */ + +size_t +hash_do_for_each (const Hash_table *table, Hash_processor processor, + void *processor_data) +{ + size_t counter = 0; + struct hash_entry const *bucket; + struct hash_entry const *cursor; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + for (cursor = bucket; cursor; cursor = cursor->next) + { + if (!(*processor) (cursor->data, processor_data)) + return counter; + counter++; + } + } + } + + return counter; +} + +/* Allocation and clean-up. */ + +/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1. + This is a convenience routine for constructing other hashing functions. */ + +#if USE_DIFF_HASH + +/* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see + B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm, + Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash + algorithms tend to be domain-specific, so what's good for [diffutils'] io.c + may not be good for your application." */ + +size_t +hash_string (const char *string, size_t n_buckets) +{ +# define ROTATE_LEFT(Value, Shift) \ + ((Value) << (Shift) | (Value) >> ((sizeof (size_t) * CHAR_BIT) - (Shift))) +# define HASH_ONE_CHAR(Value, Byte) \ + ((Byte) + ROTATE_LEFT (Value, 7)) + + size_t value = 0; + unsigned char ch; + + for (; (ch = *string); string++) + value = HASH_ONE_CHAR (value, ch); + return value % n_buckets; + +# undef ROTATE_LEFT +# undef HASH_ONE_CHAR +} + +#else /* not USE_DIFF_HASH */ + +/* This one comes from `recode', and performs a bit better than the above as + per a few experiments. It is inspired from a hashing routine found in the + very old Cyber `snoop', itself written in typical Greg Mansfield style. + (By the way, what happened to this excellent man? Is he still alive?) */ + +size_t +hash_string (const char *string, size_t n_buckets) +{ + size_t value = 0; + unsigned char ch; + + for (; (ch = *string); string++) + value = (value * 31 + ch) % n_buckets; + return value; +} + +#endif /* not USE_DIFF_HASH */ + +/* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd + number at least equal to 11. */ + +static bool +is_prime (size_t candidate) +{ + size_t divisor = 3; + size_t square = divisor * divisor; + + while (square < candidate && (candidate % divisor)) + { + divisor++; + square += 4 * divisor; + divisor++; + } + + return (candidate % divisor ? true : false); +} + +/* Round a given CANDIDATE number up to the nearest prime, and return that + prime. Primes lower than 10 are merely skipped. */ + +static size_t +next_prime (size_t candidate) +{ + /* Skip small primes. */ + if (candidate < 10) + candidate = 10; + + /* Make it definitely odd. */ + candidate |= 1; + + while (!is_prime (candidate)) + candidate += 2; + + return candidate; +} + +void +hash_reset_tuning (Hash_tuning *tuning) +{ + *tuning = default_tuning; +} + +/* For the given hash TABLE, check the user supplied tuning structure for + reasonable values, and return true if there is no gross error with it. + Otherwise, definitively reset the TUNING field to some acceptable default + in the hash table (that is, the user loses the right of further modifying + tuning arguments), and return false. */ + +static bool +check_tuning (Hash_table *table) +{ + const Hash_tuning *tuning = table->tuning; + + /* Be a bit stricter than mathematics would require, so that + rounding errors in size calculations do not cause allocations to + fail to grow or shrink as they should. The smallest allocation + is 11 (due to next_prime's algorithm), so an epsilon of 0.1 + should be good enough. */ + float epsilon = 0.1f; + + if (epsilon < tuning->growth_threshold + && tuning->growth_threshold < 1 - epsilon + && 1 + epsilon < tuning->growth_factor + && 0 <= tuning->shrink_threshold + && tuning->shrink_threshold + epsilon < tuning->shrink_factor + && tuning->shrink_factor <= 1 + && tuning->shrink_threshold + epsilon < tuning->growth_threshold) + return true; + + table->tuning = &default_tuning; + return false; +} + +/* Allocate and return a new hash table, or NULL upon failure. The initial + number of buckets is automatically selected so as to _guarantee_ that you + may insert at least CANDIDATE different user entries before any growth of + the hash table size occurs. So, if have a reasonably tight a-priori upper + bound on the number of entries you intend to insert in the hash table, you + may save some table memory and insertion time, by specifying it here. If + the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE + argument has its meaning changed to the wanted number of buckets. + + TUNING points to a structure of user-supplied values, in case some fine + tuning is wanted over the default behavior of the hasher. If TUNING is + NULL, the default tuning parameters are used instead. + + The user-supplied HASHER function should be provided. It accepts two + arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a + slot number for that entry which should be in the range 0..TABLE_SIZE-1. + This slot number is then returned. + + The user-supplied COMPARATOR function should be provided. It accepts two + arguments pointing to user data, it then returns true for a pair of entries + that compare equal, or false otherwise. This function is internally called + on entries which are already known to hash to the same bucket index. + + The user-supplied DATA_FREER function, when not NULL, may be later called + with the user data as an argument, just before the entry containing the + data gets freed. This happens from within `hash_free' or `hash_clear'. + You should specify this function only if you want these functions to free + all of your `data' data. This is typically the case when your data is + simply an auxiliary struct that you have malloc'd to aggregate several + values. */ + +Hash_table * +hash_initialize (size_t candidate, const Hash_tuning *tuning, + Hash_hasher hasher, Hash_comparator comparator, + Hash_data_freer data_freer) +{ + Hash_table *table; + + if (hasher == NULL || comparator == NULL) + return NULL; + + table = malloc (sizeof *table); + if (table == NULL) + return NULL; + + if (!tuning) + tuning = &default_tuning; + table->tuning = tuning; + if (!check_tuning (table)) + { + /* Fail if the tuning options are invalid. This is the only occasion + when the user gets some feedback about it. Once the table is created, + if the user provides invalid tuning options, we silently revert to + using the defaults, and ignore further request to change the tuning + options. */ + goto fail; + } + + if (!tuning->is_n_buckets) + { + float new_candidate = candidate / tuning->growth_threshold; + if (SIZE_MAX <= new_candidate) + goto fail; + candidate = new_candidate; + } + + if (xalloc_oversized (candidate, sizeof *table->bucket)) + goto fail; + table->n_buckets = next_prime (candidate); + if (xalloc_oversized (table->n_buckets, sizeof *table->bucket)) + goto fail; + + table->bucket = calloc (table->n_buckets, sizeof *table->bucket); + table->bucket_limit = table->bucket + table->n_buckets; + table->n_buckets_used = 0; + table->n_entries = 0; + + table->hasher = hasher; + table->comparator = comparator; + table->data_freer = data_freer; + + table->free_entry_list = NULL; +#if USE_OBSTACK + obstack_init (&table->entry_stack); +#endif + return table; + + fail: + free (table); + return NULL; +} + +/* Make all buckets empty, placing any chained entries on the free list. + Apply the user-specified function data_freer (if any) to the datas of any + affected entries. */ + +void +hash_clear (Hash_table *table) +{ + struct hash_entry *bucket; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + struct hash_entry *cursor; + struct hash_entry *next; + + /* Free the bucket overflow. */ + for (cursor = bucket->next; cursor; cursor = next) + { + if (table->data_freer) + (*table->data_freer) (cursor->data); + cursor->data = NULL; + + next = cursor->next; + /* Relinking is done one entry at a time, as it is to be expected + that overflows are either rare or short. */ + cursor->next = table->free_entry_list; + table->free_entry_list = cursor; + } + + /* Free the bucket head. */ + if (table->data_freer) + (*table->data_freer) (bucket->data); + bucket->data = NULL; + bucket->next = NULL; + } + } + + table->n_buckets_used = 0; + table->n_entries = 0; +} + +/* Reclaim all storage associated with a hash table. If a data_freer + function has been supplied by the user when the hash table was created, + this function applies it to the data of each entry before freeing that + entry. */ + +void +hash_free (Hash_table *table) +{ + struct hash_entry *bucket; + struct hash_entry *cursor; + struct hash_entry *next; + + /* Call the user data_freer function. */ + if (table->data_freer && table->n_entries) + { + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + for (cursor = bucket; cursor; cursor = cursor->next) + { + (*table->data_freer) (cursor->data); + } + } + } + } + +#if USE_OBSTACK + + obstack_free (&table->entry_stack, NULL); + +#else + + /* Free all bucket overflowed entries. */ + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + for (cursor = bucket->next; cursor; cursor = next) + { + next = cursor->next; + free (cursor); + } + } + + /* Also reclaim the internal list of previously freed entries. */ + for (cursor = table->free_entry_list; cursor; cursor = next) + { + next = cursor->next; + free (cursor); + } + +#endif + + /* Free the remainder of the hash table structure. */ + free (table->bucket); + free (table); +} + +/* Insertion and deletion. */ + +/* Get a new hash entry for a bucket overflow, possibly by reclying a + previously freed one. If this is not possible, allocate a new one. */ + +static struct hash_entry * +allocate_entry (Hash_table *table) +{ + struct hash_entry *new; + + if (table->free_entry_list) + { + new = table->free_entry_list; + table->free_entry_list = new->next; + } + else + { +#if USE_OBSTACK + new = obstack_alloc (&table->entry_stack, sizeof *new); +#else + new = malloc (sizeof *new); +#endif + } + + return new; +} + +/* Free a hash entry which was part of some bucket overflow, + saving it for later recycling. */ + +static void +free_entry (Hash_table *table, struct hash_entry *entry) +{ + entry->data = NULL; + entry->next = table->free_entry_list; + table->free_entry_list = entry; +} + +/* This private function is used to help with insertion and deletion. When + ENTRY matches an entry in the table, return a pointer to the corresponding + user data and set *BUCKET_HEAD to the head of the selected bucket. + Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in + the table, unlink the matching entry. */ + +static void * +hash_find_entry (Hash_table *table, const void *entry, + struct hash_entry **bucket_head, bool delete) +{ + struct hash_entry *bucket + = table->bucket + table->hasher (entry, table->n_buckets); + struct hash_entry *cursor; + + if (! (bucket < table->bucket_limit)) + abort (); + + *bucket_head = bucket; + + /* Test for empty bucket. */ + if (bucket->data == NULL) + return NULL; + + /* See if the entry is the first in the bucket. */ + if ((*table->comparator) (entry, bucket->data)) + { + void *data = bucket->data; + + if (delete) + { + if (bucket->next) + { + struct hash_entry *next = bucket->next; + + /* Bump the first overflow entry into the bucket head, then save + the previous first overflow entry for later recycling. */ + *bucket = *next; + free_entry (table, next); + } + else + { + bucket->data = NULL; + } + } + + return data; + } + + /* Scan the bucket overflow. */ + for (cursor = bucket; cursor->next; cursor = cursor->next) + { + if ((*table->comparator) (entry, cursor->next->data)) + { + void *data = cursor->next->data; + + if (delete) + { + struct hash_entry *next = cursor->next; + + /* Unlink the entry to delete, then save the freed entry for later + recycling. */ + cursor->next = next->next; + free_entry (table, next); + } + + return data; + } + } + + /* No entry found. */ + return NULL; +} + +/* For an already existing hash table, change the number of buckets through + specifying CANDIDATE. The contents of the hash table are preserved. The + new number of buckets is automatically selected so as to _guarantee_ that + the table may receive at least CANDIDATE different user entries, including + those already in the table, before any other growth of the hash table size + occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the + exact number of buckets desired. */ + +bool +hash_rehash (Hash_table *table, size_t candidate) +{ + Hash_table *new_table; + struct hash_entry *bucket; + struct hash_entry *cursor; + struct hash_entry *next; + + new_table = hash_initialize (candidate, table->tuning, table->hasher, + table->comparator, table->data_freer); + if (new_table == NULL) + return false; + + /* Merely reuse the extra old space into the new table. */ +#if USE_OBSTACK + obstack_free (&new_table->entry_stack, NULL); + new_table->entry_stack = table->entry_stack; +#endif + new_table->free_entry_list = table->free_entry_list; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + if (bucket->data) + for (cursor = bucket; cursor; cursor = next) + { + void *data = cursor->data; + struct hash_entry *new_bucket + = (new_table->bucket + + new_table->hasher (data, new_table->n_buckets)); + + if (! (new_bucket < new_table->bucket_limit)) + abort (); + + next = cursor->next; + + if (new_bucket->data) + { + if (cursor == bucket) + { + /* Allocate or recycle an entry, when moving from a bucket + header into a bucket overflow. */ + struct hash_entry *new_entry = allocate_entry (new_table); + + if (new_entry == NULL) + return false; + + new_entry->data = data; + new_entry->next = new_bucket->next; + new_bucket->next = new_entry; + } + else + { + /* Merely relink an existing entry, when moving from a + bucket overflow into a bucket overflow. */ + cursor->next = new_bucket->next; + new_bucket->next = cursor; + } + } + else + { + /* Free an existing entry, when moving from a bucket + overflow into a bucket header. Also take care of the + simple case of moving from a bucket header into a bucket + header. */ + new_bucket->data = data; + new_table->n_buckets_used++; + if (cursor != bucket) + free_entry (new_table, cursor); + } + } + + free (table->bucket); + table->bucket = new_table->bucket; + table->bucket_limit = new_table->bucket_limit; + table->n_buckets = new_table->n_buckets; + table->n_buckets_used = new_table->n_buckets_used; + table->free_entry_list = new_table->free_entry_list; + /* table->n_entries already holds its value. */ +#if USE_OBSTACK + table->entry_stack = new_table->entry_stack; +#endif + free (new_table); + + return true; +} + +/* If ENTRY matches an entry already in the hash table, return the pointer + to the entry from the table. Otherwise, insert ENTRY and return ENTRY. + Return NULL if the storage required for insertion cannot be allocated. */ + +void * +hash_insert (Hash_table *table, const void *entry) +{ + void *data; + struct hash_entry *bucket; + + /* The caller cannot insert a NULL entry. */ + if (! entry) + abort (); + + /* If there's a matching entry already in the table, return that. */ + if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL) + return data; + + /* ENTRY is not matched, it should be inserted. */ + + if (bucket->data) + { + struct hash_entry *new_entry = allocate_entry (table); + + if (new_entry == NULL) + return NULL; + + /* Add ENTRY in the overflow of the bucket. */ + + new_entry->data = (void *) entry; + new_entry->next = bucket->next; + bucket->next = new_entry; + table->n_entries++; + return (void *) entry; + } + + /* Add ENTRY right in the bucket head. */ + + bucket->data = (void *) entry; + table->n_entries++; + table->n_buckets_used++; + + /* If the growth threshold of the buckets in use has been reached, increase + the table size and rehash. There's no point in checking the number of + entries: if the hashing function is ill-conditioned, rehashing is not + likely to improve it. */ + + if (table->n_buckets_used + > table->tuning->growth_threshold * table->n_buckets) + { + /* Check more fully, before starting real work. If tuning arguments + became invalid, the second check will rely on proper defaults. */ + check_tuning (table); + if (table->n_buckets_used + > table->tuning->growth_threshold * table->n_buckets) + { + const Hash_tuning *tuning = table->tuning; + float candidate = + (tuning->is_n_buckets + ? (table->n_buckets * tuning->growth_factor) + : (table->n_buckets * tuning->growth_factor + * tuning->growth_threshold)); + + if (SIZE_MAX <= candidate) + return NULL; + + /* If the rehash fails, arrange to return NULL. */ + if (!hash_rehash (table, candidate)) + entry = NULL; + } + } + + return (void *) entry; +} + +/* If ENTRY is already in the table, remove it and return the just-deleted + data (the user may want to deallocate its storage). If ENTRY is not in the + table, don't modify the table and return NULL. */ + +void * +hash_delete (Hash_table *table, const void *entry) +{ + void *data; + struct hash_entry *bucket; + + data = hash_find_entry (table, entry, &bucket, true); + if (!data) + return NULL; + + table->n_entries--; + if (!bucket->data) + { + table->n_buckets_used--; + + /* If the shrink threshold of the buckets in use has been reached, + rehash into a smaller table. */ + + if (table->n_buckets_used + < table->tuning->shrink_threshold * table->n_buckets) + { + /* Check more fully, before starting real work. If tuning arguments + became invalid, the second check will rely on proper defaults. */ + check_tuning (table); + if (table->n_buckets_used + < table->tuning->shrink_threshold * table->n_buckets) + { + const Hash_tuning *tuning = table->tuning; + size_t candidate = + (tuning->is_n_buckets + ? table->n_buckets * tuning->shrink_factor + : (table->n_buckets * tuning->shrink_factor + * tuning->growth_threshold)); + + hash_rehash (table, candidate); + } + } + } + + return data; +} + +/* Testing. */ + +#if TESTING + +void +hash_print (const Hash_table *table) +{ + struct hash_entry const *bucket; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + struct hash_entry *cursor; + + if (bucket) + printf ("%lu:\n", (unsigned long int) (bucket - table->bucket)); + + for (cursor = bucket; cursor; cursor = cursor->next) + { + char const *s = cursor->data; + /* FIXME */ + if (s) + printf (" %s\n", s); + } + } +} + +#endif /* TESTING */ diff --git a/gnulib/lib/hash.h b/gnulib/lib/hash.h new file mode 100644 index 0000000..ab63a86 --- /dev/null +++ b/gnulib/lib/hash.h @@ -0,0 +1,88 @@ +/* hash - hashing table processing. + Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. + Written by Jim Meyering , 1998. + + 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. */ + +/* A generic hash table package. */ + +/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use + obstacks instead of malloc, and recompile `hash.c' with same setting. */ + +#ifndef HASH_H_ +# define HASH_H_ + +# include +# include + +typedef size_t (*Hash_hasher) (const void *, size_t); +typedef bool (*Hash_comparator) (const void *, const void *); +typedef void (*Hash_data_freer) (void *); +typedef bool (*Hash_processor) (void *, void *); + +struct hash_entry + { + void *data; + struct hash_entry *next; + }; + +struct hash_tuning + { + /* This structure is mainly used for `hash_initialize', see the block + documentation of `hash_reset_tuning' for more complete comments. */ + + float shrink_threshold; /* ratio of used buckets to trigger a shrink */ + float shrink_factor; /* ratio of new smaller size to original size */ + float growth_threshold; /* ratio of used buckets to trigger a growth */ + float growth_factor; /* ratio of new bigger size to original size */ + bool is_n_buckets; /* if CANDIDATE really means table size */ + }; + +typedef struct hash_tuning Hash_tuning; + +struct hash_table; + +typedef struct hash_table Hash_table; + +/* Information and lookup. */ +size_t hash_get_n_buckets (const Hash_table *); +size_t hash_get_n_buckets_used (const Hash_table *); +size_t hash_get_n_entries (const Hash_table *); +size_t hash_get_max_bucket_length (const Hash_table *); +bool hash_table_ok (const Hash_table *); +void hash_print_statistics (const Hash_table *, FILE *); +void *hash_lookup (const Hash_table *, const void *); + +/* Walking. */ +void *hash_get_first (const Hash_table *); +void *hash_get_next (const Hash_table *, const void *); +size_t hash_get_entries (const Hash_table *, void **, size_t); +size_t hash_do_for_each (const Hash_table *, Hash_processor, void *); + +/* Allocation and clean-up. */ +size_t hash_string (const char *, size_t); +void hash_reset_tuning (Hash_tuning *); +Hash_table *hash_initialize (size_t, const Hash_tuning *, + Hash_hasher, Hash_comparator, + Hash_data_freer); +void hash_clear (Hash_table *); +void hash_free (Hash_table *); + +/* Insertion and deletion. */ +bool hash_rehash (Hash_table *, size_t); +void *hash_insert (Hash_table *, const void *); +void *hash_delete (Hash_table *, const void *); + +#endif diff --git a/gnulib/lib/human.c b/gnulib/lib/human.c new file mode 100644 index 0000000..ecf4c97 --- /dev/null +++ b/gnulib/lib/human.c @@ -0,0 +1,479 @@ +/* human.c -- print human readable file size + + Copyright (C) 1996, 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 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. */ + +/* Written by Paul Eggert and Larry McVoy. */ + +#include + +#include "human.h" + +#include +#include +#include +#include + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +#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; +} + +int +human_options (char const *spec, bool report_errors, uintmax_t *block_size) +{ + int opts; + strtol_error e = humblock (spec, block_size, &opts); + if (*block_size == 0) + { + *block_size = default_block_size (); + e = LONGINT_INVALID; + } + if (e != LONGINT_OK && report_errors) + STRTOL_FATAL_ERROR (spec, _("block size"), e); + return opts; +} diff --git a/gnulib/lib/human.h b/gnulib/lib/human.h new file mode 100644 index 0000000..44b8b36 --- /dev/null +++ b/gnulib/lib/human.h @@ -0,0 +1,83 @@ +/* human.h -- print human readable file size + + Copyright (C) 1996, 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 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. */ + +/* Written by Paul Eggert and Larry McVoy. */ + +#ifndef HUMAN_H_ +# define HUMAN_H_ 1 + +# 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); + +int human_options (char const *, bool, uintmax_t *); + +#endif /* HUMAN_H_ */ diff --git a/gnulib/lib/i-ring.c b/gnulib/lib/i-ring.c new file mode 100644 index 0000000..457b838 --- /dev/null +++ b/gnulib/lib/i-ring.c @@ -0,0 +1,69 @@ +/* a simple ring buffer + 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 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. */ + +/* written by Jim Meyering */ + +#include +#include "i-ring.h" + +#include + +void +i_ring_init (I_ring *ir, int default_val) +{ + int i; + ir->ir_empty = true; + ir->ir_front = 0; + ir->ir_back = 0; + for (i = 0; i < I_RING_SIZE; i++) + ir->ir_data[i] = default_val; + ir->ir_default_val = default_val; +} + +bool +i_ring_empty (I_ring const *ir) +{ + return ir->ir_empty; +} + +int +i_ring_push (I_ring *ir, int val) +{ + unsigned int dest_idx = (ir->ir_front + !ir->ir_empty) % I_RING_SIZE; + int old_val = ir->ir_data[dest_idx]; + ir->ir_data[dest_idx] = val; + ir->ir_front = dest_idx; + if (dest_idx == ir->ir_back) + ir->ir_back = (ir->ir_back + !ir->ir_empty) % I_RING_SIZE; + ir->ir_empty = false; + return old_val; +} + +int +i_ring_pop (I_ring *ir) +{ + int top_val; + if (i_ring_empty (ir)) + abort (); + top_val = ir->ir_data[ir->ir_front]; + ir->ir_data[ir->ir_front] = ir->ir_default_val; + if (ir->ir_front == ir->ir_back) + ir->ir_empty = true; + else + ir->ir_front = ((ir->ir_front + I_RING_SIZE - 1) % I_RING_SIZE); + return top_val; +} diff --git a/gnulib/lib/i-ring.h b/gnulib/lib/i-ring.h new file mode 100644 index 0000000..fadfa2b --- /dev/null +++ b/gnulib/lib/i-ring.h @@ -0,0 +1,45 @@ +/* definitions for a simple ring buffer + 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 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. */ + +#include +#include "verify.h" + +enum { I_RING_SIZE = 4 }; +verify (1 <= I_RING_SIZE); + +/* When ir_empty is true, the ring is empty. + Otherwise, ir_data[B..F] are defined, where B..F is the contiguous + range of indices, modulo I_RING_SIZE, from back to front, inclusive. + Undefined elements of ir_data are always set to ir_default_val. + Popping from an empty ring aborts. + Pushing onto a full ring returns the displaced value. + An empty ring has F==B and ir_empty == true. + A ring with one entry still has F==B, but now ir_empty == false. */ +struct I_ring +{ + int ir_data[I_RING_SIZE]; + int ir_default_val; + unsigned int ir_front; + unsigned int ir_back; + bool ir_empty; +}; +typedef struct I_ring I_ring; + +void i_ring_init (I_ring *ir, int ir_default_val); +int i_ring_push (I_ring *ir, int val); +int i_ring_pop (I_ring *ir); +bool i_ring_empty (I_ring const *ir); diff --git a/gnulib/lib/idcache.c b/gnulib/lib/idcache.c new file mode 100644 index 0000000..0706f00 --- /dev/null +++ b/gnulib/lib/idcache.c @@ -0,0 +1,221 @@ +/* idcache.c -- map user and group IDs, cached for speed + + Copyright (C) 1985, 1988, 1989, 1990, 1997, 1998, 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 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. */ + +#include + +#include +#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]; +}; + +static struct userid *user_alist; + +/* Each entry on list is a user name for which the first lookup failed. */ +static struct userid *nouser_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; +} + +/* 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 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; +} diff --git a/gnulib/lib/intprops.h b/gnulib/lib/intprops.h new file mode 100644 index 0000000..34f971c --- /dev/null +++ b/gnulib/lib/intprops.h @@ -0,0 +1,78 @@ +/* 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 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. */ + +/* 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) diff --git a/gnulib/lib/inttypes_.h b/gnulib/lib/inttypes_.h new file mode 100644 index 0000000..be2bdab --- /dev/null +++ b/gnulib/lib/inttypes_.h @@ -0,0 +1,1099 @@ +/* Copyright (C) 2006-2007 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 Lesser General Public License as published by + the Free Software Foundation; either version 2.1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser 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 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. */ +#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H +# if @HAVE_INTTYPES_H@ +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_INTTYPES_H@ +# endif +# endif +#endif + +#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H +#define INTTYPES_H + +/* + * ISO C 99 for platforms that lack it. + * + */ + +/* 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 INT64_MAX == 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 UINT64_MAX == 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 INTMAX_MAX > INT32_MAX +# define PRIdMAX PRId64 +# else +# define PRIdMAX "ld" +# endif +# endif +# if !defined PRIiMAX || @PRI_MACROS_BROKEN@ +# undef PRIiMAX +# if INTMAX_MAX > INT32_MAX +# define PRIiMAX PRIi64 +# else +# define PRIiMAX "li" +# endif +# endif +# if !defined PRIoMAX || @PRI_MACROS_BROKEN@ +# undef PRIoMAX +# if UINTMAX_MAX > UINT32_MAX +# define PRIoMAX PRIo64 +# else +# define PRIoMAX "lo" +# endif +# endif +# if !defined PRIuMAX || @PRI_MACROS_BROKEN@ +# undef PRIuMAX +# if UINTMAX_MAX > UINT32_MAX +# define PRIuMAX PRIu64 +# else +# define PRIuMAX "lu" +# endif +# endif +# if !defined PRIxMAX || @PRI_MACROS_BROKEN@ +# undef PRIxMAX +# if UINTMAX_MAX > UINT32_MAX +# define PRIxMAX PRIx64 +# else +# define PRIxMAX "lx" +# endif +# endif +# if !defined PRIXMAX || @PRI_MACROS_BROKEN@ +# undef PRIXMAX +# if UINTMAX_MAX > UINT32_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 INT64_MAX == 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 UINT64_MAX == 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 INTMAX_MAX > INT32_MAX +# define SCNdMAX SCNd64 +# else +# define SCNdMAX "ld" +# endif +# endif +# if !defined SCNiMAX || @PRI_MACROS_BROKEN@ +# undef SCNiMAX +# if INTMAX_MAX > INT32_MAX +# define SCNiMAX SCNi64 +# else +# define SCNiMAX "li" +# endif +# endif +# if !defined SCNoMAX || @PRI_MACROS_BROKEN@ +# undef SCNoMAX +# if UINTMAX_MAX > UINT32_MAX +# define SCNoMAX SCNo64 +# else +# define SCNoMAX "lo" +# endif +# endif +# if !defined SCNuMAX || @PRI_MACROS_BROKEN@ +# undef SCNuMAX +# if UINTMAX_MAX > UINT32_MAX +# define SCNuMAX SCNu64 +# else +# define SCNuMAX "lu" +# endif +# endif +# if !defined SCNxMAX || @PRI_MACROS_BROKEN@ +# undef SCNxMAX +# if UINTMAX_MAX > UINT32_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 /* INTTYPES_H */ diff --git a/gnulib/lib/lchown.c b/gnulib/lib/lchown.c new file mode 100644 index 0000000..fa0826e --- /dev/null +++ b/gnulib/lib/lchown.c @@ -0,0 +1,47 @@ +/* Provide a stub lchown function for systems that lack it. + + Copyright (C) 1998, 1999, 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 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. */ + +/* written by Jim Meyering */ + +#include + +#include "lchown.h" + +#include + +/* Work just like chown, except when FILE is a symbolic link. + In that case, set errno to EOPNOTSUPP and return -1. + But if autoconf tests determined that chown modifies + symlinks, then just call chown. */ + +int +lchown (const char *file, uid_t uid, gid_t gid) +{ +#if ! CHOWN_MODIFIES_SYMLINK + struct stat stats; + + if (lstat (file, &stats) == 0 && S_ISLNK (stats.st_mode)) + { + errno = EOPNOTSUPP; + return -1; + } +#endif + + return chown (file, uid, gid); +} diff --git a/gnulib/lib/lchown.h b/gnulib/lib/lchown.h new file mode 100644 index 0000000..6816d1f --- /dev/null +++ b/gnulib/lib/lchown.h @@ -0,0 +1,42 @@ +/* Declare a replacement for lchown on hosts that lack it. + + 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 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. */ + +/* Written by Jim Meyering. */ + +#include +#include +#include + +#if HAVE_DECL_LCHOWN +# if ! HAVE_LCHOWN +# undef lchown +# define lchown rpl_chown +# endif +#else +int lchown (char const *, uid_t, gid_t); +#endif + +/* Some systems don't have EOPNOTSUPP. */ +#ifndef EOPNOTSUPP +# ifdef ENOTSUP +# define EOPNOTSUPP ENOTSUP +# else +/* Some systems don't have ENOTSUP either. */ +# define EOPNOTSUPP EINVAL +# endif +#endif diff --git a/gnulib/lib/localcharset.c b/gnulib/lib/localcharset.c new file mode 100644 index 0000000..a0f7cca --- /dev/null +++ b/gnulib/lib/localcharset.c @@ -0,0 +1,460 @@ +/* Determine a canonical name for the current locale's character encoding. + + Copyright (C) 2000-2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Bruno Haible . */ + +#include + +/* Specification. */ +#include "localcharset.h" + +#include +#include +#include +#include + +#if defined _WIN32 || defined __WIN32__ +# define WIN32_NATIVE +#endif + +#if defined __EMX__ +/* Assume EMX program runs on OS/2, even if compiled under DOS. */ +# define OS2 +#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 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 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; +} diff --git a/gnulib/lib/localcharset.h b/gnulib/lib/localcharset.h new file mode 100644 index 0000000..5030210 --- /dev/null +++ b/gnulib/lib/localcharset.h @@ -0,0 +1,41 @@ +/* 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 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. */ + +#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 */ diff --git a/gnulib/lib/lstat.c b/gnulib/lib/lstat.c new file mode 100644 index 0000000..77dd228 --- /dev/null +++ b/gnulib/lib/lstat.c @@ -0,0 +1,76 @@ +/* Work around a bug of lstat on some systems + + Copyright (C) 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 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. */ + +/* written by Jim Meyering */ + +#include + +/* The specification of these functions is in sys_stat.h. But we cannot + include this include file here, because on some systems, a + "#define lstat lstat64" is being used, and sys_stat.h deletes this + definition. */ + +#include +#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 = 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; +} diff --git a/gnulib/lib/lstat.h b/gnulib/lib/lstat.h new file mode 100644 index 0000000..6a83fbf --- /dev/null +++ b/gnulib/lib/lstat.h @@ -0,0 +1,24 @@ +/* Retrieving information about files. + 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 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. */ + +#include + +#if !LSTAT_FOLLOWS_SLASHED_SYMLINK +extern int rpl_lstat (const char *name, struct stat *buf); +# undef lstat +# define lstat rpl_lstat +#endif diff --git a/gnulib/lib/malloc.c b/gnulib/lib/malloc.c new file mode 100644 index 0000000..d4dae3e --- /dev/null +++ b/gnulib/lib/malloc.c @@ -0,0 +1,35 @@ +/* malloc() function that is glibc compatible. + + Copyright (C) 1997, 1998, 2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* written by Jim Meyering */ + +#include +#undef malloc + +#include + +/* 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) +{ + if (n == 0) + n = 1; + return malloc (n); +} diff --git a/gnulib/lib/mbchar.c b/gnulib/lib/mbchar.c new file mode 100644 index 0000000..95373f5 --- /dev/null +++ b/gnulib/lib/mbchar.c @@ -0,0 +1,36 @@ +/* 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + +#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 */ diff --git a/gnulib/lib/mbchar.h b/gnulib/lib/mbchar.h new file mode 100644 index 0000000..f3e28ef --- /dev/null +++ b/gnulib/lib/mbchar.h @@ -0,0 +1,353 @@ +/* Multibyte character data type. + Copyright (C) 2001, 2005-2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* 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 + +#include "wcwidth.h" + +#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 */ diff --git a/gnulib/lib/mbscasestr.c b/gnulib/lib/mbscasestr.c new file mode 100644 index 0000000..ce28342 --- /dev/null +++ b/gnulib/lib/mbscasestr.c @@ -0,0 +1,464 @@ +/* Case-insensitive searching in a string. + Copyright (C) 2005-2007 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 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. */ + +#include + +/* Specification. */ +#include + +#include +#include +#include /* for NULL, in case a nonstandard string.h lacks it */ + +#include "allocsa.h" +#if HAVE_MBRTOWC +# include "mbuiter.h" +#endif + +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) + +/* Knuth-Morris-Pratt algorithm. + See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm + Return a boolean indicating success. */ + +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 *) allocsa (m * sizeof (size_t)); + if (table == NULL) + return false; + /* Fill the table. + For 0 < i < m: + 0 < table[i] <= i is defined such that + rhaystack[0..i-1] == needle[0..i-1] and rhaystack[i] != needle[i] + implies + forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1], + and table[i] is as large as possible with this property. + table[0] remains uninitialized. */ + { + size_t i, j; + + table[1] = 1; + j = 0; + for (i = 2; i < m; i++) + { + unsigned char b = TOLOWER ((unsigned char) needle[i - 1]); + + for (;;) + { + if (b == TOLOWER ((unsigned char) needle[j])) + { + table[i] = i - ++j; + break; + } + if (j == 0) + { + table[i] = i; + break; + } + j = j - table[j]; + } + } + } + + /* 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 (TOLOWER ((unsigned char) needle[j]) + == TOLOWER ((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++; + } + } + + freesa (table); + return true; +} + +#if HAVE_MBRTOWC +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 *) allocsa (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)); + if (needle_mbchars[j].wc_valid) + needle_mbchars[j].wc = towlower (needle_mbchars[j].wc); + } + } + + /* Fill the table. + For 0 < i < m: + 0 < table[i] <= i is defined such that + rhaystack[0..i-1] == needle[0..i-1] and rhaystack[i] != needle[i] + implies + forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1], + and table[i] is as large as possible with this property. + table[0] remains uninitialized. */ + { + size_t i, j; + + table[1] = 1; + j = 0; + for (i = 2; i < m; i++) + { + mbchar_t *b = &needle_mbchars[i - 1]; + + for (;;) + { + if (mb_equal (*b, needle_mbchars[j])) + { + table[i] = i - ++j; + break; + } + if (j == 0) + { + table[i] = i; + break; + } + j = j - table[j]; + } + } + } + + /* 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)) + { + mbchar_t c; + + mb_copy (&c, &mbui_cur (phaystack)); + if (c.wc_valid) + c.wc = towlower (c.wc); + if (mb_equal (needle_mbchars[j], c)) + { + 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); + } + } + } + + freesa (memory); + return true; +} +#endif + +/* 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) ! */ +char * +mbscasestr (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 HAVE_MBRTOWC + 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 */ + + mbchar_t b; + mbui_iterator_t iter_haystack; + + mbui_init (iter_needle_last_ccount, needle); + + mb_copy (&b, &mbui_cur (iter_needle)); + if (b.wc_valid) + b.wc = towlower (b.wc); + + mbui_init (iter_haystack, haystack); + for (;; mbui_advance (iter_haystack)) + { + mbchar_t c; + + 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++; + mb_copy (&c, &mbui_cur (iter_haystack)); + if (c.wc_valid) + c.wc = towlower (c.wc); + if (mb_equal (c, b)) + /* 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_caseequal (mbui_cur (rhaystack), + mbui_cur (rneedle))) + /* Nothing in this round. */ + break; + } + } + } + } + else + return (char *) haystack; + } + else +#endif + { + 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. */ + unsigned char b = TOLOWER ((unsigned char) *needle); + + 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 (TOLOWER ((unsigned char) *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 (TOLOWER ((unsigned char) *rhaystack) + != TOLOWER ((unsigned char) *rneedle)) + /* Nothing in this round. */ + break; + } + } + } + } + else + return (char *) haystack; + } +} diff --git a/gnulib/lib/mbslen.c b/gnulib/lib/mbslen.c new file mode 100644 index 0000000..41c219f --- /dev/null +++ b/gnulib/lib/mbslen.c @@ -0,0 +1,47 @@ +/* Counting the multibyte characters in a string. + Copyright (C) 2007 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 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. */ + +#include + +/* Specification. */ +#include + +#if HAVE_MBRTOWC +# include "mbuiter.h" +#endif + +/* Return the number of multibyte characters in the character string STRING. */ +size_t +mbslen (const char *string) +{ +#if HAVE_MBRTOWC + 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 +#endif + return strlen (string); +} diff --git a/gnulib/lib/mbsstr.c b/gnulib/lib/mbsstr.c new file mode 100644 index 0000000..1876e6e --- /dev/null +++ b/gnulib/lib/mbsstr.c @@ -0,0 +1,433 @@ +/* Searching in a string. + Copyright (C) 2005-2007 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 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. */ + +#include + +/* Specification. */ +#include + +#include +#include /* for NULL, in case a nonstandard string.h lacks it */ + +#include "allocsa.h" +#if HAVE_MBRTOWC +# include "mbuiter.h" +#endif + +/* Knuth-Morris-Pratt algorithm. + See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm + Return a boolean indicating success. */ + +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 *) allocsa (m * sizeof (size_t)); + if (table == NULL) + return false; + /* Fill the table. + For 0 < i < m: + 0 < table[i] <= i is defined such that + rhaystack[0..i-1] == needle[0..i-1] and rhaystack[i] != needle[i] + implies + forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1], + and table[i] is as large as possible with this property. + table[0] remains uninitialized. */ + { + size_t i, j; + + table[1] = 1; + j = 0; + for (i = 2; i < m; i++) + { + unsigned char b = (unsigned char) needle[i - 1]; + + for (;;) + { + if (b == (unsigned char) needle[j]) + { + table[i] = i - ++j; + break; + } + if (j == 0) + { + table[i] = i; + break; + } + j = j - table[j]; + } + } + } + + /* 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 ((unsigned char) needle[j] == (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++; + } + } + + freesa (table); + return true; +} + +#if HAVE_MBRTOWC +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 *) allocsa (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 + rhaystack[0..i-1] == needle[0..i-1] and rhaystack[i] != needle[i] + implies + forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1], + and table[i] is as large as possible with this property. + table[0] remains uninitialized. */ + { + size_t i, j; + + table[1] = 1; + j = 0; + for (i = 2; i < m; i++) + { + mbchar_t *b = &needle_mbchars[i - 1]; + + for (;;) + { + if (mb_equal (*b, needle_mbchars[j])) + { + table[i] = i - ++j; + break; + } + if (j == 0) + { + table[i] = i; + break; + } + j = j - table[j]; + } + } + } + + /* 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); + } + } + + freesa (memory); + return true; +} +#endif + +/* 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 HAVE_MBRTOWC + 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 +#endif + { + 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; + } +} diff --git a/gnulib/lib/mbuiter.h b/gnulib/lib/mbuiter.h new file mode 100644 index 0000000..e6ad488 --- /dev/null +++ b/gnulib/lib/mbuiter.h @@ -0,0 +1,222 @@ +/* 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* 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 + +/* 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 */ diff --git a/gnulib/lib/memchr.c b/gnulib/lib/memchr.c new file mode 100644 index 0000000..d44ad6d --- /dev/null +++ b/gnulib/lib/memchr.c @@ -0,0 +1,201 @@ +/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006 Free + Software Foundation, Inc. + + Based on strlen implementation by Torbjorn Granlund (tege@sics.se), + with help from Dan Sahlin (dan@sics.se) and + commentary by Jim Blandy (jimb@ai.mit.edu); + adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), + and implemented by Roland McGrath (roland@ai.mit.edu). + +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 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. */ + +#ifndef _LIBC +# include +#endif + +#include + +#include + +#if defined _LIBC +# include +#else +# define reg_char char +#endif + +#include + +#if HAVE_BP_SYM_H || defined _LIBC +# include +#else +# define BP_SYM(sym) sym +#endif + +#undef memchr +#undef __memchr + +/* Search no more than N bytes of S for C. */ +void * +__memchr (void const *s, int c_in, size_t n) +{ + const unsigned char *char_ptr; + const unsigned long int *longword_ptr; + unsigned long int longword, magic_bits, charmask; + unsigned reg_char c; + int i; + + c = (unsigned char) c_in; + + /* Handle the first few characters by reading one character at a time. + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = (const unsigned char *) s; + n > 0 && (size_t) char_ptr % sizeof longword != 0; + --n, ++char_ptr) + if (*char_ptr == c) + return (void *) char_ptr; + + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to any size longwords. */ + + longword_ptr = (const unsigned long int *) char_ptr; + + /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits + the "holes." Note that there is a hole just to the left of + each byte, with an extra at the end: + + bits: 01111110 11111110 11111110 11111111 + bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ + + /* Set MAGIC_BITS to be this pattern of 1 and 0 bits. + Set CHARMASK to be a longword, each of whose bytes is C. */ + + magic_bits = 0xfefefefe; + charmask = c | (c << 8); + charmask |= charmask << 16; +#if 0xffffffffU < ULONG_MAX + magic_bits |= magic_bits << 32; + charmask |= charmask << 32; + if (8 < sizeof longword) + for (i = 64; i < sizeof longword * 8; i *= 2) + { + magic_bits |= magic_bits << i; + charmask |= charmask << i; + } +#endif + magic_bits = (ULONG_MAX >> 1) & (magic_bits | 1); + + /* Instead of the traditional loop which tests each character, + we will test a longword at a time. The tricky part is testing + if *any of the four* bytes in the longword in question are zero. */ + while (n >= sizeof longword) + { + /* We tentatively exit the loop if adding MAGIC_BITS to + LONGWORD fails to change any of the hole bits of LONGWORD. + + 1) Is this safe? Will it catch all the zero bytes? + Suppose there is a byte with all zeros. Any carry bits + propagating from its left will fall into the hole at its + least significant bit and stop. Since there will be no + carry from its most significant bit, the LSB of the + byte to the left will be unchanged, and the zero will be + detected. + + 2) Is this worthwhile? Will it ignore everything except + zero bytes? Suppose every byte of LONGWORD has a bit set + somewhere. There will be a carry into bit 8. If bit 8 + is set, this will carry into bit 16. If bit 8 is clear, + one of bits 9-15 must be set, so there will be a carry + into bit 16. Similarly, there will be a carry into bit + 24. If one of bits 24-30 is set, there will be a carry + into bit 31, so all of the hole bits will be changed. + + The one misfire occurs when bits 24-30 are clear and bit + 31 is set; in this case, the hole at bit 31 is not + changed. If we had access to the processor carry flag, + we could close this loophole by putting the fourth hole + at bit 32! + + So it ignores everything except 128's, when they're aligned + properly. + + 3) But wait! Aren't we looking for C, not zero? + Good point. So what we do is XOR LONGWORD with a longword, + each of whose bytes is C. This turns each byte that is C + into a zero. */ + + longword = *longword_ptr++ ^ charmask; + + /* Add MAGIC_BITS to LONGWORD. */ + if ((((longword + magic_bits) + + /* Set those bits that were unchanged by the addition. */ + ^ ~longword) + + /* Look at only the hole bits. If any of the hole bits + are unchanged, most likely one of the bytes was a + zero. */ + & ~magic_bits) != 0) + { + /* Which of the bytes was C? If none of them were, it was + a misfire; continue the search. */ + + const unsigned char *cp = (const unsigned char *) (longword_ptr - 1); + + if (cp[0] == c) + return (void *) cp; + if (cp[1] == c) + return (void *) &cp[1]; + if (cp[2] == c) + return (void *) &cp[2]; + if (cp[3] == c) + return (void *) &cp[3]; + if (4 < sizeof longword && cp[4] == c) + return (void *) &cp[4]; + if (5 < sizeof longword && cp[5] == c) + return (void *) &cp[5]; + if (6 < sizeof longword && cp[6] == c) + return (void *) &cp[6]; + if (7 < sizeof longword && cp[7] == c) + return (void *) &cp[7]; + if (8 < sizeof longword) + for (i = 8; i < sizeof longword; i++) + if (cp[i] == c) + return (void *) &cp[i]; + } + + n -= sizeof longword; + } + + char_ptr = (const unsigned char *) longword_ptr; + + while (n-- > 0) + { + if (*char_ptr == c) + return (void *) char_ptr; + else + ++char_ptr; + } + + return 0; +} +#ifdef weak_alias +weak_alias (__memchr, BP_SYM (memchr)) +#endif diff --git a/gnulib/lib/memcmp.c b/gnulib/lib/memcmp.c new file mode 100644 index 0000000..cf98bfa --- /dev/null +++ b/gnulib/lib/memcmp.c @@ -0,0 +1,363 @@ +/* Copyright (C) 1991, 1993, 1995, 1997, 1998, 2003, 2006 Free Software + Foundation, Inc. + + Contributed by Torbjorn Granlund (tege@sics.se). + + 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 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. */ + +#ifndef _LIBC +# include +#endif + +#include + +#undef memcmp + +#ifdef _LIBC + +# include +# include + +# if __BYTE_ORDER == __BIG_ENDIAN +# define WORDS_BIGENDIAN +# endif + +#else /* Not in the GNU C library. */ + +# include + +/* Type to use for aligned memory operations. + This should normally be the biggest type supported by a single load + and store. Must be an unsigned type. */ +# define op_t unsigned long int +# define OPSIZ (sizeof(op_t)) + +/* Threshold value for when to enter the unrolled loops. */ +# define OP_T_THRES 16 + +/* Type to use for unaligned operations. */ +typedef unsigned char byte; + +# ifndef WORDS_BIGENDIAN +# define MERGE(w0, sh_1, w1, sh_2) (((w0) >> (sh_1)) | ((w1) << (sh_2))) +# else +# define MERGE(w0, sh_1, w1, sh_2) (((w0) << (sh_1)) | ((w1) >> (sh_2))) +# endif + +#endif /* In the GNU C library. */ + +#ifdef WORDS_BIGENDIAN +# define CMP_LT_OR_GT(a, b) ((a) > (b) ? 1 : -1) +#else +# define CMP_LT_OR_GT(a, b) memcmp_bytes ((a), (b)) +#endif + +/* BE VERY CAREFUL IF YOU CHANGE THIS CODE! */ + +/* The strategy of this memcmp is: + + 1. Compare bytes until one of the block pointers is aligned. + + 2. Compare using memcmp_common_alignment or + memcmp_not_common_alignment, regarding the alignment of the other + block after the initial byte operations. The maximum number of + full words (of type op_t) are compared in this way. + + 3. Compare the few remaining bytes. */ + +#ifndef WORDS_BIGENDIAN +/* memcmp_bytes -- Compare A and B bytewise in the byte order of the machine. + A and B are known to be different. + This is needed only on little-endian machines. */ + +# ifdef __GNUC__ +__inline +# endif +static int +memcmp_bytes (long unsigned int a, long unsigned int b) +{ + long int srcp1 = (long int) &a; + long int srcp2 = (long int) &b; + op_t a0, b0; + + do + { + a0 = ((byte *) srcp1)[0]; + b0 = ((byte *) srcp2)[0]; + srcp1 += 1; + srcp2 += 1; + } + while (a0 == b0); + return a0 - b0; +} +#endif + +/* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t' + objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for + memory operations on `op_t's. */ +#ifdef __GNUC__ +__inline +#endif +static int +memcmp_common_alignment (long int srcp1, long int srcp2, size_t len) +{ + op_t a0, a1; + op_t b0, b1; + + switch (len % 4) + { + default: /* Avoid warning about uninitialized local variables. */ + case 2: + a0 = ((op_t *) srcp1)[0]; + b0 = ((op_t *) srcp2)[0]; + srcp1 -= 2 * OPSIZ; + srcp2 -= 2 * OPSIZ; + len += 2; + goto do1; + case 3: + a1 = ((op_t *) srcp1)[0]; + b1 = ((op_t *) srcp2)[0]; + srcp1 -= OPSIZ; + srcp2 -= OPSIZ; + len += 1; + goto do2; + case 0: + if (OP_T_THRES <= 3 * OPSIZ && len == 0) + return 0; + a0 = ((op_t *) srcp1)[0]; + b0 = ((op_t *) srcp2)[0]; + goto do3; + case 1: + a1 = ((op_t *) srcp1)[0]; + b1 = ((op_t *) srcp2)[0]; + srcp1 += OPSIZ; + srcp2 += OPSIZ; + len -= 1; + if (OP_T_THRES <= 3 * OPSIZ && len == 0) + goto do0; + /* Fall through. */ + } + + do + { + a0 = ((op_t *) srcp1)[0]; + b0 = ((op_t *) srcp2)[0]; + if (a1 != b1) + return CMP_LT_OR_GT (a1, b1); + + do3: + a1 = ((op_t *) srcp1)[1]; + b1 = ((op_t *) srcp2)[1]; + if (a0 != b0) + return CMP_LT_OR_GT (a0, b0); + + do2: + a0 = ((op_t *) srcp1)[2]; + b0 = ((op_t *) srcp2)[2]; + if (a1 != b1) + return CMP_LT_OR_GT (a1, b1); + + do1: + a1 = ((op_t *) srcp1)[3]; + b1 = ((op_t *) srcp2)[3]; + if (a0 != b0) + return CMP_LT_OR_GT (a0, b0); + + srcp1 += 4 * OPSIZ; + srcp2 += 4 * OPSIZ; + len -= 4; + } + while (len != 0); + + /* This is the right position for do0. Please don't move + it into the loop. */ + do0: + if (a1 != b1) + return CMP_LT_OR_GT (a1, b1); + return 0; +} + +/* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN + `op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory + operations on `op_t', but SRCP1 *should be unaligned*. */ +#ifdef __GNUC__ +__inline +#endif +static int +memcmp_not_common_alignment (long int srcp1, long int srcp2, size_t len) +{ + op_t a0, a1, a2, a3; + op_t b0, b1, b2, b3; + op_t x; + int shl, shr; + + /* Calculate how to shift a word read at the memory operation + aligned srcp1 to make it aligned for comparison. */ + + shl = 8 * (srcp1 % OPSIZ); + shr = 8 * OPSIZ - shl; + + /* Make SRCP1 aligned by rounding it down to the beginning of the `op_t' + it points in the middle of. */ + srcp1 &= -OPSIZ; + + switch (len % 4) + { + default: /* Avoid warning about uninitialized local variables. */ + case 2: + a1 = ((op_t *) srcp1)[0]; + a2 = ((op_t *) srcp1)[1]; + b2 = ((op_t *) srcp2)[0]; + srcp1 -= 1 * OPSIZ; + srcp2 -= 2 * OPSIZ; + len += 2; + goto do1; + case 3: + a0 = ((op_t *) srcp1)[0]; + a1 = ((op_t *) srcp1)[1]; + b1 = ((op_t *) srcp2)[0]; + srcp2 -= 1 * OPSIZ; + len += 1; + goto do2; + case 0: + if (OP_T_THRES <= 3 * OPSIZ && len == 0) + return 0; + a3 = ((op_t *) srcp1)[0]; + a0 = ((op_t *) srcp1)[1]; + b0 = ((op_t *) srcp2)[0]; + srcp1 += 1 * OPSIZ; + goto do3; + case 1: + a2 = ((op_t *) srcp1)[0]; + a3 = ((op_t *) srcp1)[1]; + b3 = ((op_t *) srcp2)[0]; + srcp1 += 2 * OPSIZ; + srcp2 += 1 * OPSIZ; + len -= 1; + if (OP_T_THRES <= 3 * OPSIZ && len == 0) + goto do0; + /* Fall through. */ + } + + do + { + a0 = ((op_t *) srcp1)[0]; + b0 = ((op_t *) srcp2)[0]; + x = MERGE(a2, shl, a3, shr); + if (x != b3) + return CMP_LT_OR_GT (x, b3); + + do3: + a1 = ((op_t *) srcp1)[1]; + b1 = ((op_t *) srcp2)[1]; + x = MERGE(a3, shl, a0, shr); + if (x != b0) + return CMP_LT_OR_GT (x, b0); + + do2: + a2 = ((op_t *) srcp1)[2]; + b2 = ((op_t *) srcp2)[2]; + x = MERGE(a0, shl, a1, shr); + if (x != b1) + return CMP_LT_OR_GT (x, b1); + + do1: + a3 = ((op_t *) srcp1)[3]; + b3 = ((op_t *) srcp2)[3]; + x = MERGE(a1, shl, a2, shr); + if (x != b2) + return CMP_LT_OR_GT (x, b2); + + srcp1 += 4 * OPSIZ; + srcp2 += 4 * OPSIZ; + len -= 4; + } + while (len != 0); + + /* This is the right position for do0. Please don't move + it into the loop. */ + do0: + x = MERGE(a2, shl, a3, shr); + if (x != b3) + return CMP_LT_OR_GT (x, b3); + return 0; +} + +int +rpl_memcmp (const void *s1, const void *s2, size_t len) +{ + op_t a0; + op_t b0; + long int srcp1 = (long int) s1; + long int srcp2 = (long int) s2; + op_t res; + + if (len >= OP_T_THRES) + { + /* There are at least some bytes to compare. No need to test + for LEN == 0 in this alignment loop. */ + while (srcp2 % OPSIZ != 0) + { + a0 = ((byte *) srcp1)[0]; + b0 = ((byte *) srcp2)[0]; + srcp1 += 1; + srcp2 += 1; + res = a0 - b0; + if (res != 0) + return res; + len -= 1; + } + + /* SRCP2 is now aligned for memory operations on `op_t'. + SRCP1 alignment determines if we can do a simple, + aligned compare or need to shuffle bits. */ + + if (srcp1 % OPSIZ == 0) + res = memcmp_common_alignment (srcp1, srcp2, len / OPSIZ); + else + res = memcmp_not_common_alignment (srcp1, srcp2, len / OPSIZ); + if (res != 0) + return res; + + /* Number of bytes remaining in the interval [0..OPSIZ-1]. */ + srcp1 += len & -OPSIZ; + srcp2 += len & -OPSIZ; + len %= OPSIZ; + } + + /* There are just a few bytes to compare. Use byte memory operations. */ + while (len != 0) + { + a0 = ((byte *) srcp1)[0]; + b0 = ((byte *) srcp2)[0]; + srcp1 += 1; + srcp2 += 1; + res = a0 - b0; + if (res != 0) + return res; + len -= 1; + } + + return 0; +} + +#ifdef weak_alias +# undef bcmp +weak_alias (memcmp, bcmp) +#endif diff --git a/gnulib/lib/mempcpy.c b/gnulib/lib/mempcpy.c new file mode 100644 index 0000000..1c702c7 --- /dev/null +++ b/gnulib/lib/mempcpy.c @@ -0,0 +1,29 @@ +/* Copy memory area and return pointer after last written byte. + 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 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. */ + +#include + +/* Specification. */ +#include + +/* Copy N bytes of SRC to DEST, return pointer to bytes after the + last written byte. */ +void * +mempcpy (void *dest, const void *src, size_t n) +{ + return (char *) memcpy (dest, src, n) + n; +} diff --git a/gnulib/lib/memrchr.c b/gnulib/lib/memrchr.c new file mode 100644 index 0000000..29fd531 --- /dev/null +++ b/gnulib/lib/memrchr.c @@ -0,0 +1,190 @@ +/* memrchr -- find the last occurrence of a byte in a memory block + + Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2005, + 2006, 2007 Free Software Foundation, Inc. + + Based on strlen implementation by Torbjorn Granlund (tege@sics.se), + with help from Dan Sahlin (dan@sics.se) and + commentary by Jim Blandy (jimb@ai.mit.edu); + adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), + and implemented by Roland McGrath (roland@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 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. */ + +#if defined _LIBC +# include +#else +# include +# define reg_char char +#endif + +#include +#include + +#undef __memrchr +#undef memrchr + +#ifndef weak_alias +# define __memrchr memrchr +#endif + +/* Search no more than N bytes of S for C. */ +void * +__memrchr (void const *s, int c_in, size_t n) +{ + const unsigned char *char_ptr; + const unsigned long int *longword_ptr; + unsigned long int longword, magic_bits, charmask; + unsigned reg_char c; + int i; + + c = (unsigned char) c_in; + + /* Handle the last few characters by reading one character at a time. + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = (const unsigned char *) s + n; + n > 0 && (size_t) char_ptr % sizeof longword != 0; + --n) + if (*--char_ptr == c) + return (void *) char_ptr; + + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to any size longwords. */ + + longword_ptr = (const unsigned long int *) char_ptr; + + /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits + the "holes." Note that there is a hole just to the left of + each byte, with an extra at the end: + + bits: 01111110 11111110 11111110 11111111 + bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD + + The 1-bits make sure that carries propagate to the next 0-bit. + The 0-bits provide holes for carries to fall into. */ + + /* Set MAGIC_BITS to be this pattern of 1 and 0 bits. + Set CHARMASK to be a longword, each of whose bytes is C. */ + + magic_bits = 0xfefefefe; + charmask = c | (c << 8); + charmask |= charmask << 16; +#if 0xffffffffU < ULONG_MAX + magic_bits |= magic_bits << 32; + charmask |= charmask << 32; + if (8 < sizeof longword) + for (i = 64; i < sizeof longword * 8; i *= 2) + { + magic_bits |= magic_bits << i; + charmask |= charmask << i; + } +#endif + magic_bits = (ULONG_MAX >> 1) & (magic_bits | 1); + + /* Instead of the traditional loop which tests each character, + we will test a longword at a time. The tricky part is testing + if *any of the four* bytes in the longword in question are zero. */ + while (n >= sizeof longword) + { + /* We tentatively exit the loop if adding MAGIC_BITS to + LONGWORD fails to change any of the hole bits of LONGWORD. + + 1) Is this safe? Will it catch all the zero bytes? + Suppose there is a byte with all zeros. Any carry bits + propagating from its left will fall into the hole at its + least significant bit and stop. Since there will be no + carry from its most significant bit, the LSB of the + byte to the left will be unchanged, and the zero will be + detected. + + 2) Is this worthwhile? Will it ignore everything except + zero bytes? Suppose every byte of LONGWORD has a bit set + somewhere. There will be a carry into bit 8. If bit 8 + is set, this will carry into bit 16. If bit 8 is clear, + one of bits 9-15 must be set, so there will be a carry + into bit 16. Similarly, there will be a carry into bit + 24. If one of bits 24-30 is set, there will be a carry + into bit 31, so all of the hole bits will be changed. + + The one misfire occurs when bits 24-30 are clear and bit + 31 is set; in this case, the hole at bit 31 is not + changed. If we had access to the processor carry flag, + we could close this loophole by putting the fourth hole + at bit 32! + + So it ignores everything except 128's, when they're aligned + properly. + + 3) But wait! Aren't we looking for C, not zero? + Good point. So what we do is XOR LONGWORD with a longword, + each of whose bytes is C. This turns each byte that is C + into a zero. */ + + longword = *--longword_ptr ^ charmask; + + /* Add MAGIC_BITS to LONGWORD. */ + if ((((longword + magic_bits) + + /* Set those bits that were unchanged by the addition. */ + ^ ~longword) + + /* Look at only the hole bits. If any of the hole bits + are unchanged, most likely one of the bytes was a + zero. */ + & ~magic_bits) != 0) + { + /* Which of the bytes was C? If none of them were, it was + a misfire; continue the search. */ + + const unsigned char *cp = (const unsigned char *) longword_ptr; + + if (8 < sizeof longword) + for (i = sizeof longword - 1; 8 <= i; i--) + if (cp[i] == c) + return (void *) &cp[i]; + if (7 < sizeof longword && cp[7] == c) + return (void *) &cp[7]; + if (6 < sizeof longword && cp[6] == c) + return (void *) &cp[6]; + if (5 < sizeof longword && cp[5] == c) + return (void *) &cp[5]; + if (4 < sizeof longword && cp[4] == c) + return (void *) &cp[4]; + if (cp[3] == c) + return (void *) &cp[3]; + if (cp[2] == c) + return (void *) &cp[2]; + if (cp[1] == c) + return (void *) &cp[1]; + if (cp[0] == c) + return (void *) cp; + } + + n -= sizeof longword; + } + + char_ptr = (const unsigned char *) longword_ptr; + + while (n-- > 0) + { + if (*--char_ptr == c) + return (void *) char_ptr; + } + + return 0; +} +#ifdef weak_alias +weak_alias (__memrchr, memrchr) +#endif diff --git a/gnulib/lib/memset.c b/gnulib/lib/memset.c new file mode 100644 index 0000000..890cbf1 --- /dev/null +++ b/gnulib/lib/memset.c @@ -0,0 +1,28 @@ +/* memset.c -- set an area of memory to a given value + Copyright (C) 1991, 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 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. */ + +#include + +void * +memset (void *str, int c, size_t len) +{ + register char *st = str; + + while (len-- > 0) + *st++ = c; + return str; +} diff --git a/gnulib/lib/mkdirat.c b/gnulib/lib/mkdirat.c new file mode 100644 index 0000000..da0b262 --- /dev/null +++ b/gnulib/lib/mkdirat.c @@ -0,0 +1,43 @@ +/* fd-relative mkdir + 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 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. */ + +/* written by Jim Meyering */ + +#include + +#include "openat.h" + +#include + +#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ +#include "save-cwd.h" +#include "openat-priv.h" + +/* Solaris 10 has no function like this. + Create a subdirectory, FILE, with mode MODE, in the directory + open on descriptor FD. If possible, do it without changing the + working directory. Otherwise, resort to using save_cwd/fchdir, + then mkdir/restore_cwd. If either the save_cwd or the restore_cwd + fails, then give a diagnostic and exit nonzero. */ + +#define AT_FUNC_NAME mkdirat +#define AT_FUNC_F1 mkdir +#define AT_FUNC_F2 mkdir +#define AT_FUNC_USE_F1_COND 1 +#define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode +#define AT_FUNC_POST_FILE_ARGS , mode +#include "at-func.c" diff --git a/gnulib/lib/mktime.c b/gnulib/lib/mktime.c new file mode 100644 index 0000000..a91fb20 --- /dev/null +++ b/gnulib/lib/mktime.c @@ -0,0 +1,663 @@ +/* Convert a `struct tm' to a time_t value. + Copyright (C) 1993-1999, 2002-2005, 2006, 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Eggert . + + 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. */ + +/* Define this to have a standalone program to test this implementation of + mktime. */ +/* #define DEBUG 1 */ + +#ifndef _LIBC +# include +#endif + +/* Assume that leap seconds are possible, unless told otherwise. + If the host has a `zic' command with a `-L leapsecondfilename' option, + then it supports leap seconds; otherwise it probably doesn't. */ +#ifndef LEAP_SECONDS_POSSIBLE +# define LEAP_SECONDS_POSSIBLE 1 +#endif + +#include + +#include + +#include /* For the real memcpy prototype. */ + +#if DEBUG +# include +# include +/* Make it work even if the system's libc has its own mktime routine. */ +# define mktime my_mktime +#endif /* DEBUG */ + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +/* 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)))) + +#ifndef TIME_T_MIN +# define TIME_T_MIN TYPE_MINIMUM (time_t) +#endif +#ifndef TIME_T_MAX +# define TIME_T_MAX TYPE_MAXIMUM (time_t) +#endif +#define TIME_T_MIDPOINT (SHR (TIME_T_MIN + TIME_T_MAX, 1) + 1) + +/* Verify a requirement at compile-time (unlike assert, which is runtime). */ +#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } + +verify (time_t_is_integer, TYPE_IS_INTEGER (time_t)); +verify (twos_complement_arithmetic, TYPE_TWOS_COMPLEMENT (int)); +/* The code also assumes that signed integer overflow silently wraps + around, but this assumption can't be stated without causing a + diagnostic on some hosts. */ + +#define EPOCH_YEAR 1970 +#define TM_YEAR_BASE 1900 +verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0); + +/* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */ +static inline int +leapyear (long int year) +{ + /* Don't add YEAR to TM_YEAR_BASE, as that might overflow. + Also, work even if YEAR is negative. */ + return + ((year & 3) == 0 + && (year % 100 != 0 + || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3))); +} + +/* How many days come before each month (0-12). */ +#ifndef _LIBC +static +#endif +const unsigned short int __mon_yday[2][13] = + { + /* Normal years. */ + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, + /* Leap years. */ + { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } + }; + + +#ifndef _LIBC +/* Portable standalone applications should supply a that + declares a POSIX-compliant localtime_r, for the benefit of older + implementations that lack localtime_r or have a nonstandard one. + See the gnulib time_r module for one way to implement this. */ +# undef __localtime_r +# define __localtime_r localtime_r +# define __mktime_internal mktime_internal +#endif + +/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) - + (YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks + were not adjusted between the time stamps. + + The YEAR values uses the same numbering as TP->tm_year. Values + need not be in the usual range. However, YEAR1 must not be less + than 2 * INT_MIN or greater than 2 * INT_MAX. + + The result may overflow. It is the caller's responsibility to + detect overflow. */ + +static inline time_t +ydhms_diff (long int year1, long int yday1, int hour1, int min1, int sec1, + int year0, int yday0, int hour0, int min0, int sec0) +{ + verify (C99_integer_division, -1 / 2 == 0); + verify (long_int_year_and_yday_are_wide_enough, + INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX); + + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid integer overflow here. */ + int a4 = SHR (year1, 2) + SHR (TM_YEAR_BASE, 2) - ! (year1 & 3); + int b4 = SHR (year0, 2) + SHR (TM_YEAR_BASE, 2) - ! (year0 & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + + /* Compute the desired time in time_t precision. Overflow might + occur here. */ + time_t tyear1 = year1; + time_t years = tyear1 - year0; + time_t days = 365 * years + yday1 - yday0 + intervening_leap_days; + time_t hours = 24 * days + hour1 - hour0; + time_t minutes = 60 * hours + min1 - min0; + time_t seconds = 60 * minutes + sec1 - sec0; + return seconds; +} + + +/* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC), + assuming that *T corresponds to *TP and that no clock adjustments + occurred between *TP and the desired time. + If TP is null, return a value not equal to *T; this avoids false matches. + If overflow occurs, yield the minimal or maximal value, except do not + yield a value equal to *T. */ +static time_t +guess_time_tm (long int year, long int yday, int hour, int min, int sec, + const time_t *t, const struct tm *tp) +{ + if (tp) + { + time_t d = ydhms_diff (year, yday, hour, min, sec, + tp->tm_year, tp->tm_yday, + tp->tm_hour, tp->tm_min, tp->tm_sec); + time_t t1 = *t + d; + if ((t1 < *t) == (TYPE_SIGNED (time_t) ? d < 0 : TIME_T_MAX / 2 < d)) + return t1; + } + + /* Overflow occurred one way or another. Return the nearest result + that is actually in range, except don't report a zero difference + if the actual difference is nonzero, as that would cause a false + match; and don't oscillate between two values, as that would + confuse the spring-forward gap detector. */ + return (*t < TIME_T_MIDPOINT + ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN) + : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX)); +} + +/* Use CONVERT to convert *T to a broken down time in *TP. + If *T is out of range for conversion, adjust it so that + it is the nearest in-range value and then convert that. */ +static struct tm * +ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), + time_t *t, struct tm *tp) +{ + struct tm *r = convert (t, tp); + + if (!r && *t) + { + time_t bad = *t; + time_t ok = 0; + + /* BAD is a known unconvertible time_t, and OK is a known good one. + Use binary search to narrow the range between BAD and OK until + they differ by 1. */ + while (bad != ok + (bad < 0 ? -1 : 1)) + { + time_t mid = *t = (bad < 0 + ? bad + ((ok - bad) >> 1) + : ok + ((bad - ok) >> 1)); + r = convert (t, tp); + if (r) + ok = mid; + else + bad = mid; + } + + if (!r && ok) + { + /* The last conversion attempt failed; + revert to the most recent successful attempt. */ + *t = ok; + r = convert (t, tp); + } + } + + return r; +} + + +/* Convert *TP to a time_t value, inverting + the monotonic and mostly-unit-linear conversion function CONVERT. + Use *OFFSET to keep track of a guess at the offset of the result, + compared to what the result would be for UTC without leap seconds. + If *OFFSET's guess is correct, only one CONVERT call is needed. + This function is external because it is used also by timegm.c. */ +time_t +__mktime_internal (struct tm *tp, + struct tm *(*convert) (const time_t *, struct tm *), + time_t *offset) +{ + time_t t, gt, t0, t1, t2; + struct tm tm; + + /* The maximum number of probes (calls to CONVERT) should be enough + to handle any combinations of time zone rule changes, solar time, + leap seconds, and oscillations around a spring-forward gap. + POSIX.1 prohibits leap seconds, but some hosts have them anyway. */ + int remaining_probes = 6; + + /* Time requested. Copy it in case CONVERT modifies *TP; this can + occur if TP is localtime's returned value and CONVERT is localtime. */ + int sec = tp->tm_sec; + int min = tp->tm_min; + int hour = tp->tm_hour; + int mday = tp->tm_mday; + int mon = tp->tm_mon; + int year_requested = tp->tm_year; + int isdst = tp->tm_isdst; + + /* 1 if the previous probe was DST. */ + int dst2; + + /* Ensure that mon is in range, and set year accordingly. */ + int mon_remainder = mon % 12; + int negative_mon_remainder = mon_remainder < 0; + int mon_years = mon / 12 - negative_mon_remainder; + long int lyear_requested = year_requested; + long int year = lyear_requested + mon_years; + + /* The other values need not be in range: + the remaining code handles minor overflows correctly, + assuming int and time_t arithmetic wraps around. + Major overflows are caught at the end. */ + + /* Calculate day of year from year, month, and day of month. + The result need not be in range. */ + int mon_yday = ((__mon_yday[leapyear (year)] + [mon_remainder + 12 * negative_mon_remainder]) + - 1); + long int lmday = mday; + long int yday = mon_yday + lmday; + + time_t guessed_offset = *offset; + + int sec_requested = sec; + + if (LEAP_SECONDS_POSSIBLE) + { + /* Handle out-of-range seconds specially, + since ydhms_tm_diff assumes every minute has 60 seconds. */ + if (sec < 0) + sec = 0; + if (59 < sec) + sec = 59; + } + + /* Invert CONVERT by probing. First assume the same offset as last + time. */ + + t0 = ydhms_diff (year, yday, hour, min, sec, + EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset); + + if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) + { + /* time_t isn't large enough to rule out overflows, so check + for major overflows. A gross check suffices, since if t0 + has overflowed, it is off by a multiple of TIME_T_MAX - + TIME_T_MIN + 1. So ignore any component of the difference + that is bounded by a small value. */ + + /* Approximate log base 2 of the number of time units per + biennium. A biennium is 2 years; use this unit instead of + years to avoid integer overflow. For example, 2 average + Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds, + which is 63113904 seconds, and rint (log2 (63113904)) is + 26. */ + int ALOG2_SECONDS_PER_BIENNIUM = 26; + int ALOG2_MINUTES_PER_BIENNIUM = 20; + int ALOG2_HOURS_PER_BIENNIUM = 14; + int ALOG2_DAYS_PER_BIENNIUM = 10; + int LOG2_YEARS_PER_BIENNIUM = 1; + + int approx_requested_biennia = + (SHR (year_requested, LOG2_YEARS_PER_BIENNIUM) + - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM) + + SHR (mday, ALOG2_DAYS_PER_BIENNIUM) + + SHR (hour, ALOG2_HOURS_PER_BIENNIUM) + + SHR (min, ALOG2_MINUTES_PER_BIENNIUM) + + (LEAP_SECONDS_POSSIBLE + ? 0 + : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM))); + + int approx_biennia = SHR (t0, ALOG2_SECONDS_PER_BIENNIUM); + int diff = approx_biennia - approx_requested_biennia; + int abs_diff = diff < 0 ? - diff : diff; + + /* IRIX 4.0.5 cc miscaculates TIME_T_MIN / 3: it erroneously + gives a positive value of 715827882. Setting a variable + first then doing math on it seems to work. + (ghazi@caip.rutgers.edu) */ + time_t time_t_max = TIME_T_MAX; + time_t time_t_min = TIME_T_MIN; + time_t overflow_threshold = + (time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM; + + if (overflow_threshold < abs_diff) + { + /* Overflow occurred. Try repairing it; this might work if + the time zone offset is enough to undo the overflow. */ + time_t repaired_t0 = -1 - t0; + approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM); + diff = approx_biennia - approx_requested_biennia; + abs_diff = diff < 0 ? - diff : diff; + if (overflow_threshold < abs_diff) + return -1; + guessed_offset += repaired_t0 - t0; + t0 = repaired_t0; + } + } + + /* Repeatedly use the error to improve the guess. */ + + for (t = t1 = t2 = t0, dst2 = 0; + (gt = guess_time_tm (year, yday, hour, min, sec, &t, + ranged_convert (convert, &t, &tm)), + t != gt); + t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0) + if (t == t1 && t != t2 + && (tm.tm_isdst < 0 + || (isdst < 0 + ? dst2 <= (tm.tm_isdst != 0) + : (isdst != 0) != (tm.tm_isdst != 0)))) + /* We can't possibly find a match, as we are oscillating + between two values. The requested time probably falls + within a spring-forward gap of size GT - T. Follow the common + practice in this case, which is to return a time that is GT - T + away from the requested time, preferring a time whose + tm_isdst differs from the requested value. (If no tm_isdst + was requested and only one of the two values has a nonzero + tm_isdst, prefer that value.) In practice, this is more + useful than returning -1. */ + goto offset_found; + else if (--remaining_probes == 0) + return -1; + + /* We have a match. Check whether tm.tm_isdst has the requested + value, if any. */ + if (isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst) + { + /* tm.tm_isdst has the wrong value. Look for a neighboring + time with the right value, and use its UTC offset. + + Heuristic: probe the adjacent timestamps in both directions, + looking for the desired isdst. This should work for all real + time zone histories in the tz database. */ + + /* Distance between probes when looking for a DST boundary. In + tzdata2003a, the shortest period of DST is 601200 seconds + (e.g., America/Recife starting 2000-10-08 01:00), and the + shortest period of non-DST surrounded by DST is 694800 + seconds (Africa/Tunis starting 1943-04-17 01:00). Use the + minimum of these two values, so we don't miss these short + periods when probing. */ + int stride = 601200; + + /* The longest period of DST in tzdata2003a is 536454000 seconds + (e.g., America/Jujuy starting 1946-10-01 01:00). The longest + period of non-DST is much longer, but it makes no real sense + to search for more than a year of non-DST, so use the DST + max. */ + int duration_max = 536454000; + + /* Search in both directions, so the maximum distance is half + the duration; add the stride to avoid off-by-1 problems. */ + int delta_bound = duration_max / 2 + stride; + + int delta, direction; + + for (delta = stride; delta < delta_bound; delta += stride) + for (direction = -1; direction <= 1; direction += 2) + { + time_t ot = t + delta * direction; + if ((ot < t) == (direction < 0)) + { + struct tm otm; + ranged_convert (convert, &ot, &otm); + if (otm.tm_isdst == isdst) + { + /* We found the desired tm_isdst. + Extrapolate back to the desired time. */ + t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm); + ranged_convert (convert, &t, &tm); + goto offset_found; + } + } + } + } + + offset_found: + *offset = guessed_offset + t - t0; + + if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec) + { + /* Adjust time to reflect the tm_sec requested, not the normalized value. + Also, repair any damage from a false match due to a leap second. */ + int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec; + t1 = t + sec_requested; + t2 = t1 + sec_adjustment; + if (((t1 < t) != (sec_requested < 0)) + | ((t2 < t1) != (sec_adjustment < 0)) + | ! convert (&t2, &tm)) + return -1; + t = t2; + } + + *tp = tm; + return t; +} + + +/* FIXME: This should use a signed type wide enough to hold any UTC + offset in seconds. 'int' should be good enough for GNU code. We + can't fix this unilaterally though, as other modules invoke + __mktime_internal. */ +static time_t localtime_offset; + +/* Convert *TP to a time_t value. */ +time_t +mktime (struct tm *tp) +{ +#ifdef _LIBC + /* POSIX.1 8.1.1 requires that whenever mktime() is called, the + time zone names contained in the external variable `tzname' shall + be set as if the tzset() function had been called. */ + __tzset (); +#endif + + return __mktime_internal (tp, __localtime_r, &localtime_offset); +} + +#ifdef weak_alias +weak_alias (mktime, timelocal) +#endif + +#ifdef _LIBC +libc_hidden_def (mktime) +libc_hidden_weak (timelocal) +#endif + +#if DEBUG + +static int +not_equal_tm (const struct tm *a, const struct tm *b) +{ + return ((a->tm_sec ^ b->tm_sec) + | (a->tm_min ^ b->tm_min) + | (a->tm_hour ^ b->tm_hour) + | (a->tm_mday ^ b->tm_mday) + | (a->tm_mon ^ b->tm_mon) + | (a->tm_year ^ b->tm_year) + | (a->tm_yday ^ b->tm_yday) + | (a->tm_isdst ^ b->tm_isdst)); +} + +static void +print_tm (const struct tm *tp) +{ + if (tp) + printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", + tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, + tp->tm_hour, tp->tm_min, tp->tm_sec, + tp->tm_yday, tp->tm_wday, tp->tm_isdst); + else + printf ("0"); +} + +static int +check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt) +{ + if (tk != tl || !lt || not_equal_tm (&tmk, lt)) + { + printf ("mktime ("); + print_tm (lt); + printf (")\nyields ("); + print_tm (&tmk); + printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl); + return 1; + } + + return 0; +} + +int +main (int argc, char **argv) +{ + int status = 0; + struct tm tm, tmk, tml; + struct tm *lt; + time_t tk, tl, tl1; + char trailer; + + if ((argc == 3 || argc == 4) + && (sscanf (argv[1], "%d-%d-%d%c", + &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) + == 3) + && (sscanf (argv[2], "%d:%d:%d%c", + &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) + == 3)) + { + tm.tm_year -= TM_YEAR_BASE; + tm.tm_mon--; + tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); + tmk = tm; + tl = mktime (&tmk); + lt = localtime (&tl); + if (lt) + { + tml = *lt; + lt = &tml; + } + printf ("mktime returns %ld == ", (long int) tl); + print_tm (&tmk); + printf ("\n"); + status = check_result (tl, tmk, tl, lt); + } + else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) + { + time_t from = atol (argv[1]); + time_t by = atol (argv[2]); + time_t to = atol (argv[3]); + + if (argc == 4) + for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) + { + lt = localtime (&tl); + if (lt) + { + tmk = tml = *lt; + tk = mktime (&tmk); + status |= check_result (tk, tmk, tl, &tml); + } + else + { + printf ("localtime (%ld) yields 0\n", (long int) tl); + status = 1; + } + tl1 = tl + by; + if ((tl1 < tl) != (by < 0)) + break; + } + else + for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) + { + /* Null benchmark. */ + lt = localtime (&tl); + if (lt) + { + tmk = tml = *lt; + tk = tl; + status |= check_result (tk, tmk, tl, &tml); + } + else + { + printf ("localtime (%ld) yields 0\n", (long int) tl); + status = 1; + } + tl1 = tl + by; + if ((tl1 < tl) != (by < 0)) + break; + } + } + else + printf ("Usage:\ +\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ +\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ +\t%s FROM BY TO - # Do not test those values (for benchmark).\n", + argv[0], argv[0], argv[0]); + + return status; +} + +#endif /* DEBUG */ + +/* +Local Variables: +compile-command: "gcc -DDEBUG -Wall -W -O -g mktime.c -o mktime" +End: +*/ diff --git a/gnulib/lib/modechange.c b/gnulib/lib/modechange.c new file mode 100644 index 0000000..e1f7ceb --- /dev/null +++ b/gnulib/lib/modechange.c @@ -0,0 +1,386 @@ +/* modechange.c -- file mode manipulation + + Copyright (C) 1989, 1990, 1997, 1998, 1999, 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 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. */ + +/* Written by David MacKenzie */ + +/* The ASCII mode string is compiled into an array of `struct + modechange', which can then be applied to each file to be changed. + We do this instead of re-parsing the ASCII string for each file + because the compiled form requires less computation to use; when + changing the mode of many files, this probably results in a + performance gain. */ + +#include + +#include "modechange.h" +#include +#include "stat-macros.h" +#include "xalloc.h" +#include + +/* The traditional octal values corresponding to each mode bit. */ +#define SUID 04000 +#define SGID 02000 +#define SVTX 01000 +#define RUSR 00400 +#define WUSR 00200 +#define XUSR 00100 +#define RGRP 00040 +#define WGRP 00020 +#define XGRP 00010 +#define ROTH 00004 +#define WOTH 00002 +#define XOTH 00001 +#define ALLM 07777 /* all octal mode bits */ + +/* Convert OCTAL, which uses one of the traditional octal values, to + an internal mode_t value. */ +static mode_t +octal_to_mode (unsigned int octal) +{ + /* Help the compiler optimize the usual case where mode_t uses + the traditional octal representation. */ + return ((S_ISUID == SUID && S_ISGID == SGID && S_ISVTX == SVTX + && S_IRUSR == RUSR && S_IWUSR == WUSR && S_IXUSR == XUSR + && S_IRGRP == RGRP && S_IWGRP == WGRP && S_IXGRP == XGRP + && S_IROTH == ROTH && S_IWOTH == WOTH && S_IXOTH == XOTH) + ? octal + : (mode_t) ((octal & SUID ? S_ISUID : 0) + | (octal & SGID ? S_ISGID : 0) + | (octal & SVTX ? S_ISVTX : 0) + | (octal & RUSR ? S_IRUSR : 0) + | (octal & WUSR ? S_IWUSR : 0) + | (octal & XUSR ? S_IXUSR : 0) + | (octal & RGRP ? S_IRGRP : 0) + | (octal & WGRP ? S_IWGRP : 0) + | (octal & XGRP ? S_IXGRP : 0) + | (octal & ROTH ? S_IROTH : 0) + | (octal & WOTH ? S_IWOTH : 0) + | (octal & XOTH ? S_IXOTH : 0))); +} + +/* Special operations flags. */ +enum + { + /* For the sentinel at the end of the mode changes array. */ + MODE_DONE, + + /* The typical case. */ + MODE_ORDINARY_CHANGE, + + /* In addition to the typical case, affect the execute bits if at + least one execute bit is set already, or if the file is a + directory. */ + MODE_X_IF_ANY_X, + + /* Instead of the typical case, copy some existing permissions for + u, g, or o onto the other two. Which of u, g, or o is copied + is determined by which bits are set in the `value' field. */ + MODE_COPY_EXISTING + }; + +/* Description of a mode change. */ +struct mode_change +{ + char op; /* One of "=+-". */ + char flag; /* Special operations flag. */ + mode_t affected; /* Set for u, g, o, or a. */ + mode_t value; /* Bits to add/remove. */ + mode_t mentioned; /* Bits explicitly mentioned. */ +}; + +/* Return a mode_change array with the specified `=ddd'-style + mode change operation, where NEW_MODE is `ddd' and MENTIONED + contains the bits explicitly mentioned in the mode are MENTIONED. */ + +static struct mode_change * +make_node_op_equals (mode_t new_mode, mode_t mentioned) +{ + struct mode_change *p = xmalloc (2 * sizeof *p); + p->op = '='; + p->flag = MODE_ORDINARY_CHANGE; + p->affected = CHMOD_MODE_BITS; + p->value = new_mode; + p->mentioned = mentioned; + p[1].flag = MODE_DONE; + return p; +} + +/* Return a pointer to an array of file mode change operations created from + MODE_STRING, an ASCII string that contains either an octal number + specifying an absolute mode, or symbolic mode change operations with + the form: + [ugoa...][[+-=][rwxXstugo...]...][,...] + + Return NULL if `mode_string' does not contain a valid + representation of file mode change operations. */ + +struct mode_change * +mode_compile (char const *mode_string) +{ + /* The array of mode-change directives to be returned. */ + struct mode_change *mc; + size_t used = 0; + + if ('0' <= *mode_string && *mode_string < '8') + { + unsigned int octal_mode = 0; + mode_t mode; + mode_t mentioned; + + do + { + octal_mode = 8 * octal_mode + *mode_string++ - '0'; + if (ALLM < octal_mode) + return NULL; + } + while ('0' <= *mode_string && *mode_string < '8'); + + if (*mode_string) + return NULL; + + mode = octal_to_mode (octal_mode); + mentioned = (mode & (S_ISUID | S_ISGID)) | S_ISVTX | S_IRWXUGO; + return make_node_op_equals (mode, mentioned); + } + + /* Allocate enough space to hold the result. */ + { + size_t needed = 1; + char const *p; + for (p = mode_string; *p; p++) + needed += (*p == '=' || *p == '+' || *p == '-'); + mc = xnmalloc (needed, sizeof *mc); + } + + /* One loop iteration for each `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'. */ + for (;; mode_string++) + { + /* Which bits in the mode are operated on. */ + mode_t affected = 0; + + /* Turn on all the bits in `affected' for each group given. */ + for (;; mode_string++) + switch (*mode_string) + { + default: + goto invalid; + case 'u': + affected |= S_ISUID | S_IRWXU; + break; + case 'g': + affected |= S_ISGID | S_IRWXG; + break; + case 'o': + affected |= S_ISVTX | S_IRWXO; + break; + case 'a': + affected |= CHMOD_MODE_BITS; + break; + case '=': case '+': case '-': + goto no_more_affected; + } + no_more_affected:; + + do + { + char op = *mode_string++; + mode_t value; + char flag = MODE_COPY_EXISTING; + struct mode_change *change; + + switch (*mode_string++) + { + case 'u': + /* Set the affected bits to the value of the `u' bits + on the same file. */ + value = S_IRWXU; + break; + case 'g': + /* Set the affected bits to the value of the `g' bits + on the same file. */ + value = S_IRWXG; + break; + case 'o': + /* Set the affected bits to the value of the `o' bits + on the same file. */ + value = S_IRWXO; + break; + + default: + value = 0; + flag = MODE_ORDINARY_CHANGE; + + for (mode_string--;; mode_string++) + switch (*mode_string) + { + case 'r': + value |= S_IRUSR | S_IRGRP | S_IROTH; + break; + case 'w': + value |= S_IWUSR | S_IWGRP | S_IWOTH; + break; + case 'x': + value |= S_IXUSR | S_IXGRP | S_IXOTH; + break; + case 'X': + flag = MODE_X_IF_ANY_X; + break; + case 's': + /* Set the setuid/gid bits if `u' or `g' is selected. */ + value |= S_ISUID | S_ISGID; + break; + case 't': + /* Set the "save text image" bit if `o' is selected. */ + value |= S_ISVTX; + break; + default: + goto no_more_values; + } + no_more_values:; + } + + change = &mc[used++]; + change->op = op; + change->flag = flag; + change->affected = affected; + change->value = value; + change->mentioned = (affected ? affected & value : value); + } + while (*mode_string == '=' || *mode_string == '+' + || *mode_string == '-'); + + if (*mode_string != ',') + break; + } + + if (*mode_string == 0) + { + mc[used].flag = MODE_DONE; + return mc; + } + +invalid: + free (mc); + return NULL; +} + +/* Return a file mode change operation that sets permissions to match those + of REF_FILE. Return NULL (setting errno) if REF_FILE can't be accessed. */ + +struct mode_change * +mode_create_from_ref (const char *ref_file) +{ + struct stat ref_stats; + + if (stat (ref_file, &ref_stats) != 0) + return NULL; + return make_node_op_equals (ref_stats.st_mode, CHMOD_MODE_BITS); +} + +/* Return the file mode bits of OLDMODE (which is the mode of a + directory if DIR), assuming the umask is UMASK_VALUE, adjusted as + indicated by the list of change operations CHANGES. If DIR, the + type 'X' change affects the returned value even if no execute bits + were set in OLDMODE, and set user and group ID bits are preserved + unless CHANGES mentioned them. If PMODE_BITS is not null, store into + *PMODE_BITS a mask denoting file mode bits that are affected by + CHANGES. + + The returned value and *PMODE_BITS contain only file mode bits. + For example, they have the S_IFMT bits cleared on a standard + Unix-like host. */ + +mode_t +mode_adjust (mode_t oldmode, bool dir, mode_t umask_value, + struct mode_change const *changes, mode_t *pmode_bits) +{ + /* The adjusted mode. */ + mode_t newmode = oldmode & CHMOD_MODE_BITS; + + /* File mode bits that CHANGES cares about. */ + mode_t mode_bits = 0; + + for (; changes->flag != MODE_DONE; changes++) + { + mode_t affected = changes->affected; + mode_t omit_change = + (dir ? S_ISUID | S_ISGID : 0) & ~ changes->mentioned; + mode_t value = changes->value; + + switch (changes->flag) + { + case MODE_ORDINARY_CHANGE: + break; + + case MODE_COPY_EXISTING: + /* Isolate in `value' the bits in `newmode' to copy. */ + value &= newmode; + + /* Copy the isolated bits to the other two parts. */ + value |= ((value & (S_IRUSR | S_IRGRP | S_IROTH) + ? S_IRUSR | S_IRGRP | S_IROTH : 0) + | (value & (S_IWUSR | S_IWGRP | S_IWOTH) + ? S_IWUSR | S_IWGRP | S_IWOTH : 0) + | (value & (S_IXUSR | S_IXGRP | S_IXOTH) + ? S_IXUSR | S_IXGRP | S_IXOTH : 0)); + break; + + case MODE_X_IF_ANY_X: + /* Affect the execute bits if execute bits are already set + or if the file is a directory. */ + if ((newmode & (S_IXUSR | S_IXGRP | S_IXOTH)) | dir) + value |= S_IXUSR | S_IXGRP | S_IXOTH; + break; + } + + /* If WHO was specified, limit the change to the affected bits. + Otherwise, apply the umask. Either way, omit changes as + requested. */ + value &= (affected ? affected : ~umask_value) & ~ omit_change; + + switch (changes->op) + { + case '=': + /* If WHO was specified, preserve the previous values of + bits that are not affected by this change operation. + Otherwise, clear all the bits. */ + { + mode_t preserved = (affected ? ~affected : 0) | omit_change; + mode_bits |= CHMOD_MODE_BITS & ~preserved; + newmode = (newmode & preserved) | value; + break; + } + + case '+': + mode_bits |= value; + newmode |= value; + break; + + case '-': + mode_bits |= value; + newmode &= ~value; + break; + } + } + + if (pmode_bits) + *pmode_bits = mode_bits; + return newmode; +} diff --git a/gnulib/lib/modechange.h b/gnulib/lib/modechange.h new file mode 100644 index 0000000..76e0178 --- /dev/null +++ b/gnulib/lib/modechange.h @@ -0,0 +1,31 @@ +/* modechange.h -- definitions for file mode manipulation + + Copyright (C) 1989, 1990, 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 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. */ + +#if ! defined MODECHANGE_H_ +# define MODECHANGE_H_ + +# include +# include + +struct mode_change *mode_compile (const char *); +struct mode_change *mode_create_from_ref (const char *); +mode_t mode_adjust (mode_t, bool, mode_t, struct mode_change const *, + mode_t *); + +#endif diff --git a/gnulib/lib/mountlist.c b/gnulib/lib/mountlist.c new file mode 100644 index 0000000..a50828e --- /dev/null +++ b/gnulib/lib/mountlist.c @@ -0,0 +1,885 @@ +/* mountlist.c -- return a list of mounted file systems + + Copyright (C) 1991, 1992, 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 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. */ + +#include + +#include "mountlist.h" + +#include +#include +#include +#include + +#include "xalloc.h" + +#include + +#include + +#include + +#if HAVE_SYS_PARAM_H +# include +#endif + +#if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ +# if HAVE_SYS_UCRED_H +# include /* needed on OSF V4.0 for definition of NGROUPS, + NGROUPS is used as an array dimension in ucred.h */ +# include /* needed by powerpc-apple-darwin1.3.7 */ +# endif +# if HAVE_SYS_MOUNT_H +# include +# endif +# if HAVE_SYS_FS_TYPES_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +# endif +# if HAVE_STRUCT_FSSTAT_F_FSTYPENAME +# define FS_TYPE(Ent) ((Ent).f_fstypename) +# else +# define FS_TYPE(Ent) mnt_names[(Ent).f_type] +# endif +#endif /* MOUNTED_GETFSSTAT */ + +#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ +# include +# if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ +# define MOUNTED MNT_MNTTAB +# endif +# if defined MNTTABNAME /* Dynix. */ +# define MOUNTED MNTTABNAME +# endif +# endif +#endif + +#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ +# include +#endif + +#ifdef MOUNTED_GETMNTINFO2 /* NetBSD 3.0. */ +# include +#endif + +#ifdef MOUNTED_GETMNT /* Ultrix. */ +# include +# include +#endif + +#ifdef MOUNTED_FS_STAT_DEV /* BeOS. */ +# include +# include +#endif + +#ifdef MOUNTED_FREAD /* SVR2. */ +# include +#endif + +#ifdef MOUNTED_FREAD_FSTYP /* SVR3. */ +# include +# include +# include +#endif + +#ifdef MOUNTED_LISTMNTENT +# include +#endif + +#ifdef MOUNTED_GETMNTENT2 /* SVR4. */ +# include +#endif + +#ifdef MOUNTED_VMOUNT /* AIX. */ +# include +# include +#endif + +#ifdef DOLPHIN +/* So special that it's not worth putting this in autoconf. */ +# undef MOUNTED_FREAD_FSTYP +# define MOUNTED_GETMNTTBL +#endif + +#if HAVE_SYS_MNTENT_H +/* This is to get MNTOPT_IGNORE on e.g. SVR4. */ +# include +#endif + +#undef MNT_IGNORE +#if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT +# define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE) +#else +# define MNT_IGNORE(M) 0 +#endif + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#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 + +/* The results of opendir() in this file are not used with dirfd and fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef opendir +#undef closedir + +#ifndef ME_DUMMY +# define ME_DUMMY(Fs_name, Fs_type) \ + (strcmp (Fs_type, "autofs") == 0 \ + || strcmp (Fs_type, "none") == 0 \ + || strcmp (Fs_type, "proc") == 0 \ + || strcmp (Fs_type, "subfs") == 0 \ + /* for NetBSD 3.0 */ \ + || strcmp (Fs_type, "kernfs") == 0 \ + /* for Irix 6.5 */ \ + || strcmp (Fs_type, "ignore") == 0) +#endif + +#ifndef ME_REMOTE +/* A file system is `remote' if its Fs_name contains a `:' + or if (it is of type (smbfs or cifs) and its Fs_name starts with `//'). */ +# define ME_REMOTE(Fs_name, Fs_type) \ + (strchr (Fs_name, ':') != NULL \ + || ((Fs_name)[0] == '/' \ + && (Fs_name)[1] == '/' \ + && (strcmp (Fs_type, "smbfs") == 0 \ + || strcmp (Fs_type, "cifs") == 0))) +#endif + +#if MOUNTED_GETMNTINFO + +# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME +static char * +fstype_to_string (short int t) +{ + switch (t) + { +# ifdef MOUNT_PC + case MOUNT_PC: + return "pc"; +# endif +# ifdef MOUNT_MFS + case MOUNT_MFS: + return "mfs"; +# endif +# ifdef MOUNT_LO + case MOUNT_LO: + return "lo"; +# endif +# ifdef MOUNT_TFS + case MOUNT_TFS: + return "tfs"; +# endif +# ifdef MOUNT_TMP + case MOUNT_TMP: + return "tmp"; +# endif +# ifdef MOUNT_UFS + case MOUNT_UFS: + return "ufs" ; +# endif +# ifdef MOUNT_NFS + case MOUNT_NFS: + return "nfs" ; +# endif +# ifdef MOUNT_MSDOS + case MOUNT_MSDOS: + return "msdos" ; +# endif +# ifdef MOUNT_LFS + case MOUNT_LFS: + return "lfs" ; +# endif +# ifdef MOUNT_LOFS + case MOUNT_LOFS: + return "lofs" ; +# endif +# ifdef MOUNT_FDESC + case MOUNT_FDESC: + return "fdesc" ; +# endif +# ifdef MOUNT_PORTAL + case MOUNT_PORTAL: + return "portal" ; +# endif +# ifdef MOUNT_NULL + case MOUNT_NULL: + return "null" ; +# endif +# ifdef MOUNT_UMAP + case MOUNT_UMAP: + return "umap" ; +# endif +# ifdef MOUNT_KERNFS + case MOUNT_KERNFS: + return "kernfs" ; +# endif +# ifdef MOUNT_PROCFS + case MOUNT_PROCFS: + return "procfs" ; +# endif +# ifdef MOUNT_AFS + case MOUNT_AFS: + return "afs" ; +# endif +# ifdef MOUNT_CD9660 + case MOUNT_CD9660: + return "cd9660" ; +# endif +# ifdef MOUNT_UNION + case MOUNT_UNION: + return "union" ; +# endif +# ifdef MOUNT_DEVFS + case MOUNT_DEVFS: + return "devfs" ; +# endif +# ifdef MOUNT_EXT2FS + case MOUNT_EXT2FS: + return "ext2fs" ; +# endif + default: + return "?"; + } +} +# endif + +static char * +fsp_to_string (const struct statfs *fsp) +{ +# if HAVE_STRUCT_STATFS_F_FSTYPENAME + return (char *) (fsp->f_fstypename); +# else + return fstype_to_string (fsp->f_type); +# endif +} + +#endif /* MOUNTED_GETMNTINFO */ + +#ifdef MOUNTED_VMOUNT /* AIX. */ +static char * +fstype_to_string (int t) +{ + struct vfs_ent *e; + + e = getvfsbytype (t); + if (!e || !e->vfsent_name) + return "none"; + else + return e->vfsent_name; +} +#endif /* MOUNTED_VMOUNT */ + + +#if defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2 + +/* Return the device number from MOUNT_OPTIONS, if possible. + Otherwise return (dev_t) -1. */ + +static dev_t +dev_from_mount_options (char const *mount_options) +{ + /* GNU/Linux allows file system implementations to define their own + meaning for "dev=" mount options, so don't trust the meaning + here. */ +# ifndef __linux__ + + static char const dev_pattern[] = ",dev="; + char const *devopt = strstr (mount_options, dev_pattern); + + if (devopt) + { + char const *optval = devopt + sizeof dev_pattern - 1; + char *optvalend; + unsigned long int dev; + errno = 0; + dev = strtoul (optval, &optvalend, 16); + if (optval != optvalend + && (*optvalend == '\0' || *optvalend == ',') + && ! (dev == ULONG_MAX && errno == ERANGE) + && dev == (dev_t) dev) + return dev; + } + +# endif + + return -1; +} + +#endif + +/* Return a list of the currently mounted file systems, or NULL on error. + Add each entry to the tail of the list so that they stay in order. + If NEED_FS_TYPE is true, ensure that the file system type fields in + the returned list are valid. Otherwise, they might not be. */ + +struct mount_entry * +read_file_system_list (bool need_fs_type) +{ + struct mount_entry *mount_list; + struct mount_entry *me; + struct mount_entry **mtail = &mount_list; + +#ifdef MOUNTED_LISTMNTENT + { + struct tabmntent *mntlist, *p; + struct mntent *mnt; + struct mount_entry *me; + + /* the third and fourth arguments could be used to filter mounts, + but Crays doesn't seem to have any mounts that we want to + remove. Specifically, automount create normal NFS mounts. + */ + + if (listmntent (&mntlist, KMTAB, NULL, NULL) < 0) + return NULL; + for (p = mntlist; p; p = p->next) { + mnt = p->ment; + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt->mnt_fsname); + me->me_mountdir = xstrdup (mnt->mnt_dir); + me->me_type = xstrdup (mnt->mnt_type); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = -1; + *mtail = me; + mtail = &me->me_next; + } + freemntlist (mntlist); + } +#endif + +#ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ + { + struct mntent *mnt; + char *table = MOUNTED; + FILE *fp; + + fp = setmntent (table, "r"); + if (fp == NULL) + return NULL; + + while ((mnt = getmntent (fp))) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt->mnt_fsname); + me->me_mountdir = xstrdup (mnt->mnt_dir); + me->me_type = xstrdup (mnt->mnt_type); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = dev_from_mount_options (mnt->mnt_opts); + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + + if (endmntent (fp) == 0) + goto free_then_fail; + } +#endif /* MOUNTED_GETMNTENT1. */ + +#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ + { + struct statfs *fsp; + int entries; + + entries = getmntinfo (&fsp, MNT_NOWAIT); + if (entries < 0) + return NULL; + for (; entries-- > 0; fsp++) + { + char *fs_type = fsp_to_string (fsp); + + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsp->f_mntfromname); + me->me_mountdir = xstrdup (fsp->f_mntonname); + me->me_type = fs_type; + me->me_type_malloced = 0; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + } +#endif /* MOUNTED_GETMNTINFO */ + +#ifdef MOUNTED_GETMNTINFO2 /* NetBSD 3.0. */ + { + struct statvfs *fsp; + int entries; + + entries = getmntinfo (&fsp, MNT_NOWAIT); + if (entries < 0) + return NULL; + for (; entries-- > 0; fsp++) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsp->f_mntfromname); + me->me_mountdir = xstrdup (fsp->f_mntonname); + me->me_type = xstrdup (fsp->f_fstypename); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + } +#endif /* MOUNTED_GETMNTINFO2 */ + +#ifdef MOUNTED_GETMNT /* Ultrix. */ + { + int offset = 0; + int val; + struct fs_data fsd; + + while (errno = 0, + 0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY, + (char *) 0))) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsd.fd_req.devname); + me->me_mountdir = xstrdup (fsd.fd_req.path); + me->me_type = gt_names[fsd.fd_req.fstype]; + me->me_type_malloced = 0; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = fsd.fd_req.dev; + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + if (val < 0) + goto free_then_fail; + } +#endif /* MOUNTED_GETMNT. */ + +#if defined MOUNTED_FS_STAT_DEV /* BeOS */ + { + /* The next_dev() and fs_stat_dev() system calls give the list of + all file systems, including the information returned by statvfs() + (fs type, total blocks, free blocks etc.), but without the mount + point. But on BeOS all file systems except / are mounted in the + rootfs, directly under /. + The directory name of the mount point is often, but not always, + identical to the volume name of the device. + We therefore get the list of subdirectories of /, and the list + of all file systems, and match the two lists. */ + + DIR *dirp; + struct rootdir_entry + { + char *name; + dev_t dev; + ino_t ino; + struct rootdir_entry *next; + }; + struct rootdir_entry *rootdir_list; + struct rootdir_entry **rootdir_tail; + int32 pos; + dev_t dev; + fs_info fi; + + /* All volumes are mounted in the rootfs, directly under /. */ + rootdir_list = NULL; + rootdir_tail = &rootdir_list; + dirp = opendir ("/"); + if (dirp) + { + struct dirent *d; + + while ((d = readdir (dirp)) != NULL) + { + char *name; + struct stat statbuf; + + if (strcmp (d->d_name, "..") == 0) + continue; + + if (strcmp (d->d_name, ".") == 0) + name = xstrdup ("/"); + else + { + name = xmalloc (1 + strlen (d->d_name) + 1); + name[0] = '/'; + strcpy (name + 1, d->d_name); + } + + if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) + { + struct rootdir_entry *re = xmalloc (sizeof *re); + re->name = name; + re->dev = statbuf.st_dev; + re->ino = statbuf.st_ino; + + /* Add to the linked list. */ + *rootdir_tail = re; + rootdir_tail = &re->next; + } + else + free (name); + } + closedir (dirp); + } + *rootdir_tail = NULL; + + for (pos = 0; (dev = next_dev (&pos)) >= 0; ) + if (fs_stat_dev (dev, &fi) >= 0) + { + /* Note: fi.dev == dev. */ + struct rootdir_entry *re; + + for (re = rootdir_list; re; re = re->next) + if (re->dev == fi.dev && re->ino == fi.root) + break; + + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fi.device_name[0] != '\0' ? fi.device_name : fi.fsh_name); + me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name); + me->me_type = xstrdup (fi.fsh_name); + me->me_type_malloced = 1; + me->me_dev = fi.dev; + me->me_dummy = 0; + me->me_remote = (fi.flags & B_FS_IS_SHARED) != 0; + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + *mtail = NULL; + + while (rootdir_list != NULL) + { + struct rootdir_entry *re = rootdir_list; + rootdir_list = re->next; + free (re->name); + free (re); + } + } +#endif /* MOUNTED_FS_STAT_DEV */ + +#if defined MOUNTED_GETFSSTAT /* __alpha running OSF_1 */ + { + int numsys, counter; + size_t bufsize; + struct statfs *stats; + + numsys = getfsstat ((struct statfs *)0, 0L, MNT_NOWAIT); + if (numsys < 0) + return (NULL); + if (SIZE_MAX / sizeof *stats <= numsys) + xalloc_die (); + + bufsize = (1 + numsys) * sizeof *stats; + stats = xmalloc (bufsize); + numsys = getfsstat (stats, bufsize, MNT_NOWAIT); + + if (numsys < 0) + { + free (stats); + return (NULL); + } + + for (counter = 0; counter < numsys; counter++) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (stats[counter].f_mntfromname); + me->me_mountdir = xstrdup (stats[counter].f_mntonname); + me->me_type = xstrdup (FS_TYPE (stats[counter])); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + + free (stats); + } +#endif /* MOUNTED_GETFSSTAT */ + +#if defined MOUNTED_FREAD || defined MOUNTED_FREAD_FSTYP /* SVR[23]. */ + { + struct mnttab mnt; + char *table = "/etc/mnttab"; + FILE *fp; + + fp = fopen (table, "r"); + if (fp == NULL) + return NULL; + + while (fread (&mnt, sizeof mnt, 1, fp) > 0) + { + me = xmalloc (sizeof *me); +# ifdef GETFSTYP /* SVR3. */ + me->me_devname = xstrdup (mnt.mt_dev); +# else + me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6); + strcpy (me->me_devname, "/dev/"); + strcpy (me->me_devname + 5, mnt.mt_dev); +# endif + me->me_mountdir = xstrdup (mnt.mt_filsys); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + me->me_type = ""; + me->me_type_malloced = 0; +# ifdef GETFSTYP /* SVR3. */ + if (need_fs_type) + { + struct statfs fsd; + char typebuf[FSTYPSZ]; + + if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 + && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) + { + me->me_type = xstrdup (typebuf); + me->me_type_malloced = 1; + } + } +# endif + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + + if (ferror (fp)) + { + /* The last fread() call must have failed. */ + int saved_errno = errno; + fclose (fp); + errno = saved_errno; + goto free_then_fail; + } + + if (fclose (fp) == EOF) + goto free_then_fail; + } +#endif /* MOUNTED_FREAD || MOUNTED_FREAD_FSTYP. */ + +#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes its own way. */ + { + struct mntent **mnttbl = getmnttbl (), **ent; + for (ent=mnttbl;*ent;ent++) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup ( (*ent)->mt_resource); + me->me_mountdir = xstrdup ( (*ent)->mt_directory); + me->me_type = xstrdup ((*ent)->mt_fstype); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + endmnttbl (); + } +#endif + +#ifdef MOUNTED_GETMNTENT2 /* SVR4. */ + { + struct mnttab mnt; + char *table = MNTTAB; + FILE *fp; + int ret; + int lockfd = -1; + +# if defined F_RDLCK && defined F_SETLKW + /* MNTTAB_LOCK is a macro name of our own invention; it's not present in + e.g. Solaris 2.6. If the SVR4 folks ever define a macro + for this file name, we should use their macro name instead. + (Why not just lock MNTTAB directly? We don't know.) */ +# ifndef MNTTAB_LOCK +# define MNTTAB_LOCK "/etc/.mnttab.lock" +# endif + lockfd = open (MNTTAB_LOCK, O_RDONLY); + if (0 <= lockfd) + { + struct flock flock; + flock.l_type = F_RDLCK; + flock.l_whence = SEEK_SET; + flock.l_start = 0; + flock.l_len = 0; + while (fcntl (lockfd, F_SETLKW, &flock) == -1) + if (errno != EINTR) + { + int saved_errno = errno; + close (lockfd); + errno = saved_errno; + return NULL; + } + } + else if (errno != ENOENT) + return NULL; +# endif + + errno = 0; + fp = fopen (table, "r"); + if (fp == NULL) + ret = errno; + else + { + while ((ret = getmntent (fp, &mnt)) == 0) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt.mnt_special); + me->me_mountdir = xstrdup (mnt.mnt_mountp); + me->me_type = xstrdup (mnt.mnt_fstype); + me->me_type_malloced = 1; + me->me_dummy = MNT_IGNORE (&mnt) != 0; + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = dev_from_mount_options (mnt.mnt_mntopts); + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + + ret = fclose (fp) == EOF ? errno : 0 < ret ? 0 : -1; + } + + if (0 <= lockfd && close (lockfd) != 0) + ret = errno; + + if (0 <= ret) + { + errno = ret; + goto free_then_fail; + } + } +#endif /* MOUNTED_GETMNTENT2. */ + +#ifdef MOUNTED_VMOUNT /* AIX. */ + { + int bufsize; + char *entries, *thisent; + struct vmount *vmp; + int n_entries; + int i; + + /* Ask how many bytes to allocate for the mounted file system info. */ + if (mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize) != 0) + return NULL; + entries = xmalloc (bufsize); + + /* Get the list of mounted file systems. */ + n_entries = mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries); + if (n_entries < 0) + { + int saved_errno = errno; + free (entries); + errno = saved_errno; + return NULL; + } + + for (i = 0, thisent = entries; + i < n_entries; + i++, thisent += vmp->vmt_length) + { + char *options, *ignore; + + vmp = (struct vmount *) thisent; + me = xmalloc (sizeof *me); + if (vmp->vmt_flags & MNT_REMOTE) + { + char *host, *dir; + + me->me_remote = 1; + /* Prepend the remote dirname. */ + host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off; + dir = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off; + me->me_devname = xmalloc (strlen (host) + strlen (dir) + 2); + strcpy (me->me_devname, host); + strcat (me->me_devname, ":"); + strcat (me->me_devname, dir); + } + else + { + me->me_remote = 0; + me->me_devname = xstrdup (thisent + + vmp->vmt_data[VMT_OBJECT].vmt_off); + } + me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off); + me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype)); + me->me_type_malloced = 1; + options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off; + ignore = strstr (options, "ignore"); + me->me_dummy = (ignore + && (ignore == options || ignore[-1] == ',') + && (ignore[sizeof "ignore" - 1] == ',' + || ignore[sizeof "ignore" - 1] == '\0')); + me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + free (entries); + } +#endif /* MOUNTED_VMOUNT. */ + + *mtail = NULL; + return mount_list; + + + free_then_fail: + { + int saved_errno = errno; + *mtail = NULL; + + while (mount_list) + { + me = mount_list->me_next; + free (mount_list->me_devname); + free (mount_list->me_mountdir); + if (mount_list->me_type_malloced) + free (mount_list->me_type); + free (mount_list); + mount_list = me; + } + + errno = saved_errno; + return NULL; + } +} diff --git a/gnulib/lib/mountlist.h b/gnulib/lib/mountlist.h new file mode 100644 index 0000000..7f5a6f7 --- /dev/null +++ b/gnulib/lib/mountlist.h @@ -0,0 +1,41 @@ +/* mountlist.h -- declarations for list of mounted file systems + + Copyright (C) 1991, 1992, 1998, 2000, 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 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. */ + +#ifndef MOUNTLIST_H_ +# define MOUNTLIST_H_ + +# include +# include + +/* A mount table entry. */ +struct mount_entry +{ + char *me_devname; /* Device node name, including "/dev/". */ + char *me_mountdir; /* Mount point directory name. */ + char *me_type; /* "nfs", "4.2", etc. */ + dev_t me_dev; /* Device number of me_mountdir. */ + unsigned int me_dummy : 1; /* Nonzero for dummy file systems. */ + unsigned int me_remote : 1; /* Nonzero for remote fileystems. */ + unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */ + struct mount_entry *me_next; +}; + +struct mount_entry *read_file_system_list (bool need_fs_type); + +#endif diff --git a/gnulib/lib/open-safer.c b/gnulib/lib/open-safer.c new file mode 100644 index 0000000..04a72eb --- /dev/null +++ b/gnulib/lib/open-safer.c @@ -0,0 +1,50 @@ +/* Invoke open, but avoid some glitches. + + 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 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. */ + +/* Written by Paul Eggert. */ + +#include + +#include "fcntl-safer.h" + +#include +#include +#include "unistd-safer.h" + +int +open_safer (char const *file, int flags, ...) +{ + mode_t mode = 0; + + if (flags & O_CREAT) + { + va_list ap; + va_start (ap, flags); + + /* Assume mode_t promotes to int if and only if it is smaller. + This assumption isn't guaranteed by the C standard, but we + don't know of any real-world counterexamples. */ + mode = (sizeof (mode_t) < sizeof (int) + ? va_arg (ap, int) + : va_arg (ap, mode_t)); + + va_end (ap); + } + + return fd_safer (open (file, flags, mode)); +} diff --git a/gnulib/lib/openat-die.c b/gnulib/lib/openat-die.c new file mode 100644 index 0000000..7a28570 --- /dev/null +++ b/gnulib/lib/openat-die.c @@ -0,0 +1,51 @@ +/* Report a save- or restore-cwd failure in our openat replacement and then exit. + + 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 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. */ + +#include + +#include + +#include "error.h" +#include "exitfail.h" + +#include "gettext.h" +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + +void +openat_save_fail (int errno) +{ + error (exit_failure, errno, + _("unable to record current working directory")); + + /* The `noreturn' attribute cannot be applied to error, since it returns + when its first argument is 0. To help compilers understand that this + function does not return, call abort. Also, the abort is a + safety feature if exit_failure is 0 (which shouldn't happen). */ + abort (); +} + +void +openat_restore_fail (int errno) +{ + error (exit_failure, errno, + _("failed to return to initial working directory")); + + /* As above. */ + abort (); +} diff --git a/gnulib/lib/openat-priv.h b/gnulib/lib/openat-priv.h new file mode 100644 index 0000000..2d98821 --- /dev/null +++ b/gnulib/lib/openat-priv.h @@ -0,0 +1,55 @@ +/* Internals for openat-like functions. + + 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 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. */ + +/* written by Jim Meyering */ + +#include +#include + +#define OPENAT_BUFFER_SIZE 512 +char *openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file); + +/* Some systems don't have ENOSYS. */ +#ifndef ENOSYS +# ifdef ENOTSUP +# define ENOSYS ENOTSUP +# else +/* Some systems don't have ENOTSUP either. */ +# define ENOSYS EINVAL +# endif +#endif + +/* Some systems don't have EOPNOTSUPP. */ +#ifndef EOPNOTSUPP +# ifdef ENOTSUP +# define EOPNOTSUPP ENOTSUP +# else +/* Some systems don't have ENOTSUP either. */ +# define EOPNOTSUPP EINVAL +# endif +#endif + +/* Trying to access a BUILD_PROC_NAME file will fail on systems without + /proc support, and even on systems *with* ProcFS support. Return + nonzero if the failure may be legitimate, e.g., because /proc is not + readable, or the particular .../fd/N directory is not present. */ +#define EXPECTED_ERRNO(Errno) \ + ((Errno) == ENOTDIR || (Errno) == ENOENT \ + || (Errno) == EPERM || (Errno) == EACCES \ + || (Errno) == ENOSYS /* Solaris 8 */ \ + || (Errno) == EOPNOTSUPP /* FreeBSD */) diff --git a/gnulib/lib/openat-proc.c b/gnulib/lib/openat-proc.c new file mode 100644 index 0000000..ff2fff0 --- /dev/null +++ b/gnulib/lib/openat-proc.c @@ -0,0 +1,95 @@ +/* Create /proc/self/fd-related names for subfiles of open directories. + + 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 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. */ + +/* Written by Paul Eggert. */ + +#include + +#include "openat-priv.h" + +#include +#include +#include + +#include +#include + +#include "dirname.h" +#include "intprops.h" +#include "same-inode.h" +#include "xalloc.h" + +/* The results of open() in this file are not used with fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef open +#undef close + +#define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s" + +#define PROC_SELF_FD_NAME_SIZE_BOUND(len) \ + (sizeof PROC_SELF_FD_FORMAT - sizeof "%d%s" \ + + INT_STRLEN_BOUND (int) + (len) + 1) + + +/* Set BUF to the expansion of PROC_SELF_FD_FORMAT, using FD and FILE + respectively for %d and %s. If successful, return BUF if the + result fits in BUF, dynamically allocated memory otherwise. But + return NULL if /proc is not reliable. */ +char * +openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file) +{ + static int proc_status = 0; + + if (! proc_status) + { + /* Set PROC_STATUS to a positive value if /proc/self/fd is + reliable, and a negative value otherwise. Solaris 10 + /proc/self/fd mishandles "..", and any file name might expand + to ".." after symbolic link expansion, so avoid /proc/self/fd + if it mishandles "..". Solaris 10 has openat, but this + problem is exhibited on code that built on Solaris 8 and + running on Solaris 10. */ + + int proc_self_fd = open ("/proc/self/fd", O_RDONLY); + if (proc_self_fd < 0) + proc_status = -1; + else + { + struct stat proc_self_fd_dotdot_st; + struct stat proc_self_st; + char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof ".." - 1)]; + sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, ".."); + proc_status = + ((stat (dotdot_buf, &proc_self_fd_dotdot_st) == 0 + && stat ("/proc/self", &proc_self_st) == 0 + && SAME_INODE (proc_self_fd_dotdot_st, proc_self_st)) + ? 1 : -1); + close (proc_self_fd); + } + } + + if (proc_status < 0) + return NULL; + else + { + size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file)); + char *result = (bufsize < OPENAT_BUFFER_SIZE ? buf : xmalloc (bufsize)); + sprintf (result, PROC_SELF_FD_FORMAT, fd, file); + return result; + } +} diff --git a/gnulib/lib/openat.c b/gnulib/lib/openat.c new file mode 100644 index 0000000..cd49654 --- /dev/null +++ b/gnulib/lib/openat.c @@ -0,0 +1,270 @@ +/* provide a replacement openat function + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* written by Jim Meyering */ + +#include + +#include "openat.h" + +#include +#include + +#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ +#include "fcntl--.h" +#include "lchown.h" +#include "lstat.h" +#include "openat-priv.h" +#include "save-cwd.h" + +/* Replacement for Solaris' openat function. + + First, try to simulate it via open ("/proc/self/fd/FD/FILE"). + Failing that, simulate it by doing save_cwd/fchdir/open/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. + Otherwise, upon failure, set errno and return -1, as openat does. + Upon successful completion, return a file descriptor. */ +int +openat (int fd, char const *file, int flags, ...) +{ + mode_t 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); + } + + return openat_permissive (fd, file, flags, mode, NULL); +} + +/* Like openat (FD, FILE, FLAGS, MODE), but if CWD_ERRNO is + nonnull, set *CWD_ERRNO to an errno value if unable to save + or restore the initial working directory. This is needed only + the first time remove.c's remove_dir opens a command-line + directory argument. + + If a previous attempt to restore the current working directory + failed, then we must not even try to access a `.'-relative name. + It is the caller's responsibility not to call this function + in that case. */ + +int +openat_permissive (int fd, char const *file, int flags, mode_t mode, + int *cwd_errno) +{ + struct saved_cwd saved_cwd; + int saved_errno; + int err; + bool save_ok; + + if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) + return open (file, flags, mode); + + { + char buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (buf, fd, file); + if (proc_file) + { + int open_result = open (proc_file, flags, mode); + int open_errno = errno; + if (proc_file != buf) + free (proc_file); + /* If the syscall succeeds, or if it fails with an unexpected + errno value, then return right away. Otherwise, fall through + and resort to using save_cwd/restore_cwd. */ + if (0 <= open_result || ! EXPECTED_ERRNO (open_errno)) + { + errno = open_errno; + return open_result; + } + } + } + + save_ok = (save_cwd (&saved_cwd) == 0); + if (! save_ok) + { + if (! cwd_errno) + openat_save_fail (errno); + *cwd_errno = errno; + } + + err = fchdir (fd); + saved_errno = errno; + + if (! err) + { + err = open (file, flags, mode); + saved_errno = errno; + if (save_ok && restore_cwd (&saved_cwd) != 0) + { + if (! cwd_errno) + openat_restore_fail (errno); + *cwd_errno = errno; + } + } + + free_cwd (&saved_cwd); + errno = saved_errno; + return err; +} + +/* Return true if our openat implementation must resort to + using save_cwd and restore_cwd. */ +bool +openat_needs_fchdir (void) +{ + bool needs_fchdir = true; + int fd = open ("/", O_RDONLY); + + if (0 <= fd) + { + char buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (buf, fd, "."); + if (proc_file) + { + needs_fchdir = false; + if (proc_file != buf) + free (proc_file); + } + close (fd); + } + + return needs_fchdir; +} + +#if !HAVE_FDOPENDIR + +/* Replacement for Solaris' function by the same name. + + First, try to simulate it via opendir ("/proc/self/fd/FD"). Failing + that, simulate it by doing save_cwd/fchdir/opendir(".")/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. + Otherwise, this function works just like Solaris' fdopendir. + + W A R N I N G: + Unlike the other fd-related functions here, this one + effectively consumes its FD parameter. The caller should not + close or otherwise manipulate FD if this function returns successfully. */ +DIR * +fdopendir (int fd) +{ + struct saved_cwd saved_cwd; + int saved_errno; + DIR *dir; + + char buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (buf, fd, "."); + if (proc_file) + { + dir = opendir (proc_file); + saved_errno = errno; + } + else + { + dir = NULL; + saved_errno = EOPNOTSUPP; + } + + /* If the syscall fails with an expected errno value, resort to + save_cwd/restore_cwd. */ + if (! dir && EXPECTED_ERRNO (saved_errno)) + { + if (save_cwd (&saved_cwd) != 0) + openat_save_fail (errno); + + if (fchdir (fd) != 0) + { + dir = NULL; + saved_errno = errno; + } + else + { + dir = opendir ("."); + saved_errno = errno; + + if (restore_cwd (&saved_cwd) != 0) + openat_restore_fail (errno); + } + + free_cwd (&saved_cwd); + } + + if (dir) + close (fd); + if (proc_file != buf) + free (proc_file); + errno = saved_errno; + return dir; +} + +#endif + +/* Replacement for Solaris' function by the same name. + + First, try to simulate it via l?stat ("/proc/self/fd/FD/FILE"). + Failing that, simulate it via save_cwd/fchdir/(stat|lstat)/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. + Otherwise, this function works just like Solaris' fstatat. */ + +#define AT_FUNC_NAME fstatat +#define AT_FUNC_F1 lstat +#define AT_FUNC_F2 stat +#define AT_FUNC_USE_F1_COND flag == AT_SYMLINK_NOFOLLOW +#define AT_FUNC_POST_FILE_PARAM_DECLS , struct stat *st, int flag +#define AT_FUNC_POST_FILE_ARGS , st +#include "at-func.c" +#undef AT_FUNC_NAME +#undef AT_FUNC_F1 +#undef AT_FUNC_F2 +#undef AT_FUNC_USE_F1_COND +#undef AT_FUNC_POST_FILE_PARAM_DECLS +#undef AT_FUNC_POST_FILE_ARGS + +/* Replacement for Solaris' function by the same name. + + First, try to simulate it via (unlink|rmdir) ("/proc/self/fd/FD/FILE"). + Failing that, simulate it via save_cwd/fchdir/(unlink|rmdir)/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. + Otherwise, this function works just like Solaris' unlinkat. */ + +#define AT_FUNC_NAME unlinkat +#define AT_FUNC_F1 rmdir +#define AT_FUNC_F2 unlink +#define AT_FUNC_USE_F1_COND flag == AT_REMOVEDIR +#define AT_FUNC_POST_FILE_PARAM_DECLS , int flag +#define AT_FUNC_POST_FILE_ARGS /* empty */ +#include "at-func.c" +#undef AT_FUNC_NAME +#undef AT_FUNC_F1 +#undef AT_FUNC_F2 +#undef AT_FUNC_USE_F1_COND +#undef AT_FUNC_POST_FILE_PARAM_DECLS +#undef AT_FUNC_POST_FILE_ARGS diff --git a/gnulib/lib/openat.h b/gnulib/lib/openat.h new file mode 100644 index 0000000..f8333f0 --- /dev/null +++ b/gnulib/lib/openat.h @@ -0,0 +1,127 @@ +/* provide a replacement openat function + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* written by Jim Meyering */ + +#include + +#include +#include +#include +#include +#include + +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) /* empty */ +# endif +#endif + +#ifndef ATTRIBUTE_NORETURN +# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +#endif + +/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its + value exceeds INT_MAX, so its use as an int doesn't conform to the + C standard, and GCC and Sun C complain in some cases. If the bug + is present, undef AT_FDCWD here, so it can be redefined below. */ +#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 +# undef AT_FDCWD +#endif + +/* Use the same bit pattern as Solaris 9, but with the proper + signedness. The bit pattern is important, in case this actually is + Solaris with the above workaround. */ +#ifndef AT_FDCWD +# define AT_FDCWD (-3041965) +#endif + +/* Use the same values as Solaris 9. This shouldn't matter, but + there's no real reason to differ. */ +#ifndef AT_SYMLINK_NOFOLLOW +# define AT_SYMLINK_NOFOLLOW 4096 +# define AT_REMOVEDIR 1 +#endif + +#ifdef __OPENAT_PREFIX + +# undef openat +# define __OPENAT_CONCAT(x, y) x ## y +# define __OPENAT_XCONCAT(x, y) __OPENAT_CONCAT (x, y) +# define __OPENAT_ID(y) __OPENAT_XCONCAT (__OPENAT_PREFIX, y) +# define openat __OPENAT_ID (openat) +int openat (int fd, char const *file, int flags, /* mode_t mode */ ...); +int openat_permissive (int fd, char const *file, int flags, mode_t mode, + int *cwd_errno); +# if ! HAVE_FDOPENDIR +# define fdopendir __OPENAT_ID (fdopendir) +# endif +DIR *fdopendir (int fd); +# define fstatat __OPENAT_ID (fstatat) +int fstatat (int fd, char const *file, struct stat *st, int flag); +# define unlinkat __OPENAT_ID (unlinkat) +int unlinkat (int fd, char const *file, int flag); +bool openat_needs_fchdir (void); + +#else + +# define openat_permissive(Fd, File, Flags, Mode, Cwd_errno) \ + openat (Fd, File, Flags, Mode) +# define openat_needs_fchdir() false + +#endif + +#if HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK +int rpl_fstatat (int fd, char const *file, struct stat *st, int flag); +# if !COMPILING_FSTATAT +# undef fstatat +# define fstatat rpl_fstatat +# endif +#endif + +int mkdirat (int fd, char const *file, mode_t mode); +void openat_restore_fail (int) ATTRIBUTE_NORETURN; +void openat_save_fail (int) ATTRIBUTE_NORETURN; +int fchmodat (int fd, char const *file, mode_t mode, int flag); +int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag); + +/* Using these function names makes application code + slightly more readable than it would be with + fchownat (..., 0) or fchownat (..., AT_SYMLINK_NOFOLLOW). */ +static inline int +chownat (int fd, char const *file, uid_t owner, gid_t group) +{ + return fchownat (fd, file, owner, group, 0); +} + +static inline int +lchownat (int fd, char const *file, uid_t owner, gid_t group) +{ + return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW); +} + +static inline int +chmodat (int fd, char const *file, mode_t mode) +{ + return fchmodat (fd, file, mode, 0); +} + +static inline int +lchmodat (int fd, char const *file, mode_t mode) +{ + return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW); +} diff --git a/gnulib/lib/pathmax.h b/gnulib/lib/pathmax.h new file mode 100644 index 0000000..6941e45 --- /dev/null +++ b/gnulib/lib/pathmax.h @@ -0,0 +1,47 @@ +/* Define PATH_MAX somehow. Requires sys/types.h. + Copyright (C) 1992, 1999, 2001, 2003, 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. */ + +#ifndef _PATHMAX_H +# define _PATHMAX_H + +# include + +# include + +# ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 256 +# endif + +# if !defined PATH_MAX && defined _PC_PATH_MAX +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \ + : pathconf ("/", _PC_PATH_MAX)) +# endif + +/* Don't include sys/param.h if it already has been. */ +# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +# endif + +# if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# endif + +# ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +# endif + +#endif /* _PATHMAX_H */ diff --git a/gnulib/lib/pipe-safer.c b/gnulib/lib/pipe-safer.c new file mode 100644 index 0000000..e4431b3 --- /dev/null +++ b/gnulib/lib/pipe-safer.c @@ -0,0 +1,57 @@ +/* Invoke pipe, but avoid some glitches. + 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 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. */ + +/* Written by Jim Meyering. */ + +#include + +#include "unistd-safer.h" + +#include +#include + +/* Like pipe, but ensure that neither of the file descriptors is + STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. Fail with ENOSYS on + platforms that lack pipe. */ + +int +pipe_safer (int fd[2]) +{ +#if HAVE_PIPE + if (pipe (fd) == 0) + { + int i; + for (i = 0; i < 2; i++) + { + fd[i] = fd_safer (fd[i]); + if (fd[i] < 0) + { + int e = errno; + close (fd[1 - i]); + errno = e; + return -1; + } + } + + return 0; + } +#else + errno = ENOSYS; +#endif + + return -1; +} diff --git a/gnulib/lib/progname.c b/gnulib/lib/progname.c new file mode 100644 index 0000000..df52f60 --- /dev/null +++ b/gnulib/lib/progname.c @@ -0,0 +1,50 @@ +/* Program name management. + Copyright (C) 2001-2003, 2005-2006 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 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. */ + + +#include + +/* Specification. */ +#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */ +#include "progname.h" + +#include + + +/* String containing name the program is called with. + To be initialized by main(). */ +const char *program_name = NULL; + +/* Set program_name, based on argv[0]. */ +void +set_program_name (const char *argv0) +{ + /* libtool creates a temporary executable whose name is sometimes prefixed + with "lt-" (depends on the platform). It also makes argv[0] absolute. + Remove this "/.libs/" or "/.libs/lt-" prefix here. */ + const char *slash; + const char *base; + + slash = strrchr (argv0, '/'); + base = (slash != NULL ? slash + 1 : argv0); + if (base - argv0 >= 7 && memcmp (base - 7, "/.libs/", 7) == 0) + argv0 = base; + if (strncmp (base, "lt-", 3) == 0) + argv0 = base + 3; + program_name = argv0; +} diff --git a/gnulib/lib/progname.h b/gnulib/lib/progname.h new file mode 100644 index 0000000..206c2cc --- /dev/null +++ b/gnulib/lib/progname.h @@ -0,0 +1,61 @@ +/* Program name management. + Copyright (C) 2001-2004, 2006 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 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. */ + +#ifndef _PROGNAME_H +#define _PROGNAME_H + +/* Programs using this file should do the following in main(): + set_program_name (argv[0]); + */ + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* String containing name the program is called with. */ +extern const char *program_name; + +/* Set program_name, based on argv[0]. */ +extern void set_program_name (const char *argv0); + +#if ENABLE_RELOCATABLE + +/* Set program_name, based on argv[0], and original installation prefix and + directory, for relocatability. */ +extern void set_program_name_and_installdir (const char *argv0, + const char *orig_installprefix, + const char *orig_installdir); +#undef set_program_name +#define set_program_name(ARG0) \ + set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) + +/* Return the full pathname of the current executable, based on the earlier + call to set_program_name_and_installdir. Return NULL if unknown. */ +extern char *get_full_program_name (void); + +#endif + + +#ifdef __cplusplus +} +#endif + + +#endif /* _PROGNAME_H */ diff --git a/gnulib/lib/quote.c b/gnulib/lib/quote.c new file mode 100644 index 0000000..119be72 --- /dev/null +++ b/gnulib/lib/quote.c @@ -0,0 +1,41 @@ +/* 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 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. */ + +/* 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); +} diff --git a/gnulib/lib/quote.h b/gnulib/lib/quote.h new file mode 100644 index 0000000..5400ead --- /dev/null +++ b/gnulib/lib/quote.h @@ -0,0 +1,22 @@ +/* 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 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. */ + + +char const *quote_n (int n, char const *name); +char const *quote (char const *name); diff --git a/gnulib/lib/quotearg.c b/gnulib/lib/quotearg.c new file mode 100644 index 0000000..f7f326a --- /dev/null +++ b/gnulib/lib/quotearg.c @@ -0,0 +1,697 @@ +/* quotearg.c - quote arguments for output + + Copyright (C) 1998, 1999, 2000, 2001, 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 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. */ + +/* 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 + +#if !HAVE_MBRTOWC +/* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the + other macros are defined only for documentation and to satisfy C + syntax. */ +# undef MB_CUR_MAX +# define MB_CUR_MAX 1 +# undef mbstate_t +# define mbstate_t int +# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0) +# define iswprint(wc) isprint ((unsigned char) (wc)) +# undef HAVE_MBSINIT +#endif + +#if !defined mbsinit && !HAVE_MBSINIT +# define mbsinit(ps) 1 +#endif + +#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; + + /* 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", + "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, + 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; +} + +/* 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 and the + non-quoting-style part of O 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 uses QUOTING_STYLE instead of the quoting + style specified by O, and O may not be null. */ + +static size_t +quotearg_buffer_restyled (char *buffer, size_t buffersize, + char const *arg, size_t argsize, + enum quoting_style quoting_style, + struct quoting_options const *o) +{ + 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; + +#define STORE(c) \ + do \ + { \ + if (len < buffersize) \ + buffer[len] = (c); \ + len++; \ + } \ + while (0) + + switch (quoting_style) + { + case c_quoting_style: + STORE ('"'); + backslash_escapes = true; + quote_string = "\""; + quote_string_len = 1; + break; + + case escape_quoting_style: + backslash_escapes = true; + 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); + 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_always_quoting_style: + STORE ('\''); + quote_string = "'"; + quote_string_len = 1; + break; + + default: + break; + } + + 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) + STORE ('\\'); + + c = arg[i]; + switch (c) + { + case '\0': + if (backslash_escapes) + { + STORE ('\\'); + STORE ('0'); + STORE ('0'); + c = '0'; + } + break; + + case '?': + switch (quoting_style) + { + case shell_quoting_style: + goto use_shell_always_quoting_style; + + case c_quoting_style: + if (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. */ + c = arg[i + 2]; + i += 2; + 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; goto c_and_shell_escape; + + c_and_shell_escape: + if (quoting_style == shell_quoting_style) + goto use_shell_always_quoting_style; + 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_quoting_style) + goto use_shell_always_quoting_style; + break; + + case '\'': + switch (quoting_style) + { + case shell_quoting_style: + goto use_shell_always_quoting_style; + + case shell_always_quoting_style: + STORE ('\''); + STORE ('\\'); + STORE ('\''); + break; + + default: + break; + } + 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 && quoting_style == shell_quoting_style) + { + size_t j; + for (j = 1; j < bytes; j++) + switch (arg[i + m + j]) + { + case '[': case '\\': case '^': + case '`': case '|': + goto use_shell_always_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) + { + 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 + && o->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))) + goto store_c; + + store_escape: + STORE ('\\'); + + store_c: + STORE (c); + } + + if (i == 0 && quoting_style == shell_quoting_style) + goto use_shell_always_quoting_style; + + if (quote_string) + for (; *quote_string; quote_string++) + STORE (*quote_string); + + if (len < buffersize) + buffer[len] = '\0'; + return len; + + use_shell_always_quoting_style: + return quotearg_buffer_restyled (buffer, buffersize, arg, argsize, + shell_always_quoting_style, o); +} + +/* 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); + errno = e; + return r; +} + +/* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly + allocated storage containing the quoted string. */ +char * +quotearg_alloc (char const *arg, size_t argsize, + struct quoting_options const *o) +{ + int e = errno; + size_t bufsize = quotearg_buffer (0, 0, arg, argsize, o) + 1; + char *buf = xcharalloc (bufsize); + quotearg_buffer (buf, bufsize, arg, argsize, o); + errno = e; + 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; + size_t qsize = quotearg_buffer (val, size, arg, argsize, options); + + if (size <= qsize) + { + sv[n].size = size = qsize + 1; + if (val != slot0) + free (val); + sv[n].val = val = xcharalloc (size); + quotearg_buffer (val, size, arg, argsize, options); + } + + 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 (char const *arg) +{ + return quotearg_n (0, arg); +} + +/* 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; + memset (o.quote_these_too, 0, sizeof o.quote_these_too); + return o; +} + +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_char (char const *arg, char ch) +{ + struct quoting_options options; + options = default_quoting_options; + set_char_quoting (&options, ch, 1); + return quotearg_n_options (0, arg, SIZE_MAX, &options); +} + +char * +quotearg_colon (char const *arg) +{ + return quotearg_char (arg, ':'); +} diff --git a/gnulib/lib/quotearg.h b/gnulib/lib/quotearg.h new file mode 100644 index 0000000..4887df3 --- /dev/null +++ b/gnulib/lib/quotearg.h @@ -0,0 +1,140 @@ +/* quotearg.h - quote arguments for output + + Copyright (C) 1998, 1999, 2000, 2001, 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 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. */ + +/* Written by Paul Eggert */ + +#ifndef QUOTEARG_H_ +# define QUOTEARG_H_ 1 + +# include + +/* Basic quoting styles. */ +enum quoting_style + { + /* Output names as-is (ls --quoting-style=literal). */ + literal_quoting_style, + + /* Quote names for the shell if they contain shell metacharacters + or would cause ambiguous output (ls --quoting-style=shell). */ + shell_quoting_style, + + /* Quote names for the shell, even if they would normally not + require quoting (ls --quoting-style=shell-always). */ + shell_always_quoting_style, + + /* Quote names as for a C language string (ls --quoting-style=c). */ + c_quoting_style, + + /* Like c_quoting_style except omit the surrounding double-quote + characters (ls --quoting-style=escape). */ + escape_quoting_style, + + /* Like clocale_quoting_style, but quote `like this' instead of + "like this" in the default C locale (ls --quoting-style=locale). */ + locale_quoting_style, + + /* Like c_quoting_style except use quotation marks appropriate for + the locale (ls --quoting-style=clocale). */ + clocale_quoting_style + }; + +/* 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); + +/* 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. */ +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. */ +char *quotearg_alloc (char const *arg, size_t argsize, + 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. */ +char *quotearg_n (int n, char const *arg); + +/* Equivalent to quotearg_n (0, ARG). */ +char *quotearg (char const *arg); + +/* 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); + +/* Like quotearg (ARG), except also quote any instances of CH. */ +char *quotearg_char (char const *arg, char ch); + +/* Equivalent to quotearg_char (ARG, ':'). */ +char *quotearg_colon (char const *arg); + +/* Free any dynamically allocated memory. */ +void quotearg_free (void); + +#endif /* !QUOTEARG_H_ */ diff --git a/gnulib/lib/readlink.c b/gnulib/lib/readlink.c new file mode 100644 index 0000000..3cbdc1c --- /dev/null +++ b/gnulib/lib/readlink.c @@ -0,0 +1,50 @@ +/* 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 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. */ + +#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 diff --git a/gnulib/lib/realloc.c b/gnulib/lib/realloc.c new file mode 100644 index 0000000..c1fe9e5 --- /dev/null +++ b/gnulib/lib/realloc.c @@ -0,0 +1,45 @@ +/* realloc() function that is glibc compatible. + + Copyright (C) 1997, 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 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. */ + +/* written by Jim Meyering */ + +#include +#undef realloc + +#include + +/* Change the size of an allocated block of memory P to N bytes, + with error checking. If N is zero, change it to 1. If P is NULL, + use malloc. */ + +void * +rpl_realloc (void *p, size_t n) +{ + if (n == 0) + { + n = 1; + + /* In theory realloc might fail, so don't rely on it to free. */ + free (p); + p = NULL; + } + + if (p == NULL) + return malloc (n); + return realloc (p, n); +} diff --git a/gnulib/lib/ref-add.sin b/gnulib/lib/ref-add.sin new file mode 100644 index 0000000..bc5cc79 --- /dev/null +++ b/gnulib/lib/ref-add.sin @@ -0,0 +1,30 @@ +# 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 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. +# +# 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:/ +} diff --git a/gnulib/lib/ref-del.sin b/gnulib/lib/ref-del.sin new file mode 100644 index 0000000..e9301bf --- /dev/null +++ b/gnulib/lib/ref-del.sin @@ -0,0 +1,25 @@ +# 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 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. +# +# Written by Bruno Haible . +# +/^# Packages using this file: / { + s/# Packages using this file:// + s/ @PACKAGE@ / / + s/^/# Packages using this file:/ +} diff --git a/gnulib/lib/regcomp.c b/gnulib/lib/regcomp.c new file mode 100644 index 0000000..fe4d243 --- /dev/null +++ b/gnulib/lib/regcomp.c @@ -0,0 +1,3832 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + 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. */ + +static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, + size_t length, reg_syntax_t syntax); +static void re_compile_fastmap_iter (regex_t *bufp, + const re_dfastate_t *init_state, + char *fastmap); +static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); +#ifdef RE_ENABLE_I18N +static void free_charset (re_charset_t *cset); +#endif /* RE_ENABLE_I18N */ +static void free_workarea_compile (regex_t *preg); +static reg_errcode_t create_initial_state (re_dfa_t *dfa); +#ifdef RE_ENABLE_I18N +static void optimize_utf8 (re_dfa_t *dfa); +#endif +static reg_errcode_t analyze (regex_t *preg); +static reg_errcode_t preorder (bin_tree_t *root, + reg_errcode_t (fn (void *, bin_tree_t *)), + void *extra); +static reg_errcode_t postorder (bin_tree_t *root, + reg_errcode_t (fn (void *, bin_tree_t *)), + void *extra); +static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); +static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); +static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, + bin_tree_t *node); +static reg_errcode_t calc_first (void *extra, bin_tree_t *node); +static reg_errcode_t calc_next (void *extra, bin_tree_t *node); +static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); +static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint); +static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, + unsigned int constraint); +static reg_errcode_t calc_eclosure (re_dfa_t *dfa); +static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, + Idx node, bool root); +static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); +static Idx fetch_number (re_string_t *input, re_token_t *token, + reg_syntax_t syntax); +static int peek_token (re_token_t *token, re_string_t *input, + reg_syntax_t syntax) internal_function; +static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, + reg_syntax_t syntax, reg_errcode_t *err); +static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, + re_token_t *token, reg_syntax_t syntax, + Idx nest, reg_errcode_t *err); +static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, + re_token_t *token, reg_syntax_t syntax, + Idx nest, reg_errcode_t *err); +static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, + re_token_t *token, reg_syntax_t syntax, + Idx nest, reg_errcode_t *err); +static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, + re_token_t *token, reg_syntax_t syntax, + Idx nest, reg_errcode_t *err); +static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, + re_dfa_t *dfa, re_token_t *token, + reg_syntax_t syntax, reg_errcode_t *err); +static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, + re_token_t *token, reg_syntax_t syntax, + reg_errcode_t *err); +static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, + re_string_t *regexp, + re_token_t *token, int token_len, + re_dfa_t *dfa, + reg_syntax_t syntax, + bool accept_hyphen); +static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, + re_string_t *regexp, + re_token_t *token); +#ifdef RE_ENABLE_I18N +static reg_errcode_t build_equiv_class (bitset_t sbcset, + re_charset_t *mbcset, + Idx *equiv_class_alloc, + const unsigned char *name); +static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, + bitset_t sbcset, + re_charset_t *mbcset, + Idx *char_class_alloc, + const unsigned char *class_name, + reg_syntax_t syntax); +#else /* not RE_ENABLE_I18N */ +static reg_errcode_t build_equiv_class (bitset_t sbcset, + const unsigned char *name); +static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, + bitset_t sbcset, + const unsigned char *class_name, + reg_syntax_t syntax); +#endif /* not RE_ENABLE_I18N */ +static bin_tree_t *build_charclass_op (re_dfa_t *dfa, + RE_TRANSLATE_TYPE trans, + const unsigned char *class_name, + const unsigned char *extra, + bool non_match, reg_errcode_t *err); +static bin_tree_t *create_tree (re_dfa_t *dfa, + bin_tree_t *left, bin_tree_t *right, + re_token_type_t type); +static bin_tree_t *create_token_tree (re_dfa_t *dfa, + bin_tree_t *left, bin_tree_t *right, + const re_token_t *token); +static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); +static void free_token (re_token_t *node); +static reg_errcode_t free_tree (void *extra, bin_tree_t *node); +static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); + +/* This table gives an error message for each of the error codes listed + in regex.h. Obviously the order here has to be same as there. + POSIX doesn't require that we do anything for REG_NOERROR, + but why not be nice? */ + +static const char __re_error_msgid[] = + { +#define REG_NOERROR_IDX 0 + gettext_noop ("Success") /* REG_NOERROR */ + "\0" +#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") + gettext_noop ("No match") /* REG_NOMATCH */ + "\0" +#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") + gettext_noop ("Invalid regular expression") /* REG_BADPAT */ + "\0" +#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") + gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ + "\0" +#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") + gettext_noop ("Invalid character class name") /* REG_ECTYPE */ + "\0" +#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") + gettext_noop ("Trailing backslash") /* REG_EESCAPE */ + "\0" +#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") + gettext_noop ("Invalid back reference") /* REG_ESUBREG */ + "\0" +#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") + gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ + "\0" +#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") + gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ + "\0" +#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") + gettext_noop ("Unmatched \\{") /* REG_EBRACE */ + "\0" +#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") + gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ + "\0" +#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") + gettext_noop ("Invalid range end") /* REG_ERANGE */ + "\0" +#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") + gettext_noop ("Memory exhausted") /* REG_ESPACE */ + "\0" +#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") + gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ + "\0" +#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") + gettext_noop ("Premature end of regular expression") /* REG_EEND */ + "\0" +#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") + gettext_noop ("Regular expression too big") /* REG_ESIZE */ + "\0" +#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") + gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ + }; + +static const size_t __re_error_msgid_idx[] = + { + REG_NOERROR_IDX, + REG_NOMATCH_IDX, + REG_BADPAT_IDX, + REG_ECOLLATE_IDX, + REG_ECTYPE_IDX, + REG_EESCAPE_IDX, + REG_ESUBREG_IDX, + REG_EBRACK_IDX, + REG_EPAREN_IDX, + REG_EBRACE_IDX, + REG_BADBR_IDX, + REG_ERANGE_IDX, + REG_ESPACE_IDX, + REG_BADRPT_IDX, + REG_EEND_IDX, + REG_ESIZE_IDX, + REG_ERPAREN_IDX + }; + +/* Entry points for GNU code. */ + +/* re_compile_pattern is the GNU regular expression compiler: it + compiles PATTERN (of length LENGTH) and puts the result in BUFP. + Returns 0 if the pattern was valid, otherwise an error string. + + Assumes the `allocated' (and perhaps `buffer') and `translate' fields + are set in BUFP on entry. */ + +#ifdef _LIBC +const char * +re_compile_pattern (pattern, length, bufp) + const char *pattern; + size_t length; + struct re_pattern_buffer *bufp; +#else /* size_t might promote */ +const char * +re_compile_pattern (const char *pattern, size_t length, + struct re_pattern_buffer *bufp) +#endif +{ + reg_errcode_t ret; + + /* And GNU code determines whether or not to get register information + by passing null for the REGS argument to re_match, etc., not by + setting no_sub, unless RE_NO_SUB is set. */ + bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); + + /* Match anchors at newline. */ + bufp->newline_anchor = 1; + + ret = re_compile_internal (bufp, pattern, length, re_syntax_options); + + if (!ret) + return NULL; + return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); +} +#ifdef _LIBC +weak_alias (__re_compile_pattern, re_compile_pattern) +#endif + +/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can + also be assigned to arbitrarily: each pattern buffer stores its own + syntax, so it can be changed between regex compilations. */ +/* This has no initializer because initialized variables in Emacs + become read-only after dumping. */ +reg_syntax_t re_syntax_options; + + +/* Specify the precise syntax of regexps for compilation. This provides + for compatibility for various utilities which historically have + different, incompatible syntaxes. + + The argument SYNTAX is a bit mask comprised of the various bits + defined in regex.h. We return the old syntax. */ + +reg_syntax_t +re_set_syntax (syntax) + reg_syntax_t syntax; +{ + reg_syntax_t ret = re_syntax_options; + + re_syntax_options = syntax; + return ret; +} +#ifdef _LIBC +weak_alias (__re_set_syntax, re_set_syntax) +#endif + +int +re_compile_fastmap (bufp) + struct re_pattern_buffer *bufp; +{ + re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; + char *fastmap = bufp->fastmap; + + memset (fastmap, '\0', sizeof (char) * SBC_MAX); + re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); + if (dfa->init_state != dfa->init_state_word) + re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); + if (dfa->init_state != dfa->init_state_nl) + re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); + if (dfa->init_state != dfa->init_state_begbuf) + re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); + bufp->fastmap_accurate = 1; + return 0; +} +#ifdef _LIBC +weak_alias (__re_compile_fastmap, re_compile_fastmap) +#endif + +static inline void +__attribute ((always_inline)) +re_set_fastmap (char *fastmap, bool icase, int ch) +{ + fastmap[ch] = 1; + if (icase) + fastmap[tolower (ch)] = 1; +} + +/* Helper function for re_compile_fastmap. + Compile fastmap for the initial_state INIT_STATE. */ + +static void +re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, + char *fastmap) +{ + re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; + Idx node_cnt; + bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); + for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) + { + Idx node = init_state->nodes.elems[node_cnt]; + re_token_type_t type = dfa->nodes[node].type; + + if (type == CHARACTER) + { + re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); +#ifdef RE_ENABLE_I18N + if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) + { + unsigned char buf[MB_LEN_MAX]; + unsigned char *p; + wchar_t wc; + mbstate_t state; + + p = buf; + *p++ = dfa->nodes[node].opr.c; + while (++node < dfa->nodes_len + && dfa->nodes[node].type == CHARACTER + && dfa->nodes[node].mb_partial) + *p++ = dfa->nodes[node].opr.c; + memset (&state, '\0', sizeof (state)); + if (mbrtowc (&wc, (const char *) buf, p - buf, + &state) == p - buf + && (__wcrtomb ((char *) buf, towlower (wc), &state) + != (size_t) -1)) + re_set_fastmap (fastmap, false, buf[0]); + } +#endif + } + else if (type == SIMPLE_BRACKET) + { + int i, ch; + for (i = 0, ch = 0; i < BITSET_WORDS; ++i) + { + int j; + bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; + for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) + if (w & ((bitset_word_t) 1 << j)) + re_set_fastmap (fastmap, icase, ch); + } + } +#ifdef RE_ENABLE_I18N + else if (type == COMPLEX_BRACKET) + { + Idx i; + re_charset_t *cset = dfa->nodes[node].opr.mbcset; + if (cset->non_match || cset->ncoll_syms || cset->nequiv_classes + || cset->nranges || cset->nchar_classes) + { +# ifdef _LIBC + if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0) + { + /* In this case we want to catch the bytes which are + the first byte of any collation elements. + e.g. In da_DK, we want to catch 'a' since "aa" + is a valid collation element, and don't catch + 'b' since 'b' is the only collation element + which starts from 'b'. */ + const int32_t *table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + for (i = 0; i < SBC_MAX; ++i) + if (table[i] < 0) + re_set_fastmap (fastmap, icase, i); + } +# else + if (dfa->mb_cur_max > 1) + for (i = 0; i < SBC_MAX; ++i) + if (__btowc (i) == WEOF) + re_set_fastmap (fastmap, icase, i); +# endif /* not _LIBC */ + } + for (i = 0; i < cset->nmbchars; ++i) + { + char buf[256]; + mbstate_t state; + memset (&state, '\0', sizeof (state)); + if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) + re_set_fastmap (fastmap, icase, *(unsigned char *) buf); + if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) + { + if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) + != (size_t) -1) + re_set_fastmap (fastmap, false, *(unsigned char *) buf); + } + } + } +#endif /* RE_ENABLE_I18N */ + else if (type == OP_PERIOD +#ifdef RE_ENABLE_I18N + || type == OP_UTF8_PERIOD +#endif /* RE_ENABLE_I18N */ + || type == END_OF_RE) + { + memset (fastmap, '\1', sizeof (char) * SBC_MAX); + if (type == END_OF_RE) + bufp->can_be_null = 1; + return; + } + } +} + +/* Entry point for POSIX code. */ +/* regcomp takes a regular expression as a string and compiles it. + + PREG is a regex_t *. We do not expect any fields to be initialized, + since POSIX says we shouldn't. Thus, we set + + `buffer' to the compiled pattern; + `used' to the length of the compiled pattern; + `syntax' to RE_SYNTAX_POSIX_EXTENDED if the + REG_EXTENDED bit in CFLAGS is set; otherwise, to + RE_SYNTAX_POSIX_BASIC; + `newline_anchor' to REG_NEWLINE being set in CFLAGS; + `fastmap' to an allocated space for the fastmap; + `fastmap_accurate' to zero; + `re_nsub' to the number of subexpressions in PATTERN. + + PATTERN is the address of the pattern string. + + CFLAGS is a series of bits which affect compilation. + + If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we + use POSIX basic syntax. + + If REG_NEWLINE is set, then . and [^...] don't match newline. + Also, regexec will try a match beginning after every newline. + + If REG_ICASE is set, then we considers upper- and lowercase + versions of letters to be equivalent when matching. + + If REG_NOSUB is set, then when PREG is passed to regexec, that + routine will report only success or failure, and nothing about the + registers. + + It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for + the return codes and their meanings.) */ + +int +regcomp (preg, pattern, cflags) + regex_t *_Restrict_ preg; + const char *_Restrict_ pattern; + int cflags; +{ + reg_errcode_t ret; + reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED + : RE_SYNTAX_POSIX_BASIC); + + preg->buffer = NULL; + preg->allocated = 0; + preg->used = 0; + + /* Try to allocate space for the fastmap. */ + preg->fastmap = re_malloc (char, SBC_MAX); + if (BE (preg->fastmap == NULL, 0)) + return REG_ESPACE; + + syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; + + /* If REG_NEWLINE is set, newlines are treated differently. */ + if (cflags & REG_NEWLINE) + { /* REG_NEWLINE implies neither . nor [^...] match newline. */ + syntax &= ~RE_DOT_NEWLINE; + syntax |= RE_HAT_LISTS_NOT_NEWLINE; + /* It also changes the matching behavior. */ + preg->newline_anchor = 1; + } + else + preg->newline_anchor = 0; + preg->no_sub = !!(cflags & REG_NOSUB); + preg->translate = NULL; + + ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); + + /* POSIX doesn't distinguish between an unmatched open-group and an + unmatched close-group: both are REG_EPAREN. */ + if (ret == REG_ERPAREN) + ret = REG_EPAREN; + + /* We have already checked preg->fastmap != NULL. */ + if (BE (ret == REG_NOERROR, 1)) + /* Compute the fastmap now, since regexec cannot modify the pattern + buffer. This function never fails in this implementation. */ + (void) re_compile_fastmap (preg); + else + { + /* Some error occurred while compiling the expression. */ + re_free (preg->fastmap); + preg->fastmap = NULL; + } + + return (int) ret; +} +#ifdef _LIBC +weak_alias (__regcomp, regcomp) +#endif + +/* Returns a message corresponding to an error code, ERRCODE, returned + from either regcomp or regexec. We don't use PREG here. */ + +#ifdef _LIBC +size_t +regerror (errcode, preg, errbuf, errbuf_size) + int errcode; + const regex_t *_Restrict_ preg; + char *_Restrict_ errbuf; + size_t errbuf_size; +#else /* size_t might promote */ +size_t +regerror (int errcode, const regex_t *_Restrict_ preg, + char *_Restrict_ errbuf, size_t errbuf_size) +#endif +{ + const char *msg; + size_t msg_size; + + if (BE (errcode < 0 + || errcode >= (int) (sizeof (__re_error_msgid_idx) + / sizeof (__re_error_msgid_idx[0])), 0)) + /* Only error codes returned by the rest of the code should be passed + to this routine. If we are given anything else, or if other regex + code generates an invalid error code, then the program has a bug. + Dump core so we can fix it. */ + abort (); + + msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); + + msg_size = strlen (msg) + 1; /* Includes the null. */ + + if (BE (errbuf_size != 0, 1)) + { + size_t cpy_size = msg_size; + if (BE (msg_size > errbuf_size, 0)) + { + cpy_size = errbuf_size - 1; + errbuf[cpy_size] = '\0'; + } + memcpy (errbuf, msg, cpy_size); + } + + return msg_size; +} +#ifdef _LIBC +weak_alias (__regerror, regerror) +#endif + + +#ifdef RE_ENABLE_I18N +/* This static array is used for the map to single-byte characters when + UTF-8 is used. Otherwise we would allocate memory just to initialize + it the same all the time. UTF-8 is the preferred encoding so this is + a worthwhile optimization. */ +static const bitset_t utf8_sb_map = +{ + /* Set the first 128 bits. */ +# if 4 * BITSET_WORD_BITS < ASCII_CHARS +# error "bitset_word_t is narrower than 32 bits" +# elif 3 * BITSET_WORD_BITS < ASCII_CHARS + BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, +# elif 2 * BITSET_WORD_BITS < ASCII_CHARS + BITSET_WORD_MAX, BITSET_WORD_MAX, +# elif 1 * BITSET_WORD_BITS < ASCII_CHARS + BITSET_WORD_MAX, +# endif + (BITSET_WORD_MAX + >> (SBC_MAX % BITSET_WORD_BITS == 0 + ? 0 + : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) +}; +#endif + + +static void +free_dfa_content (re_dfa_t *dfa) +{ + Idx i, j; + + if (dfa->nodes) + for (i = 0; i < dfa->nodes_len; ++i) + free_token (dfa->nodes + i); + re_free (dfa->nexts); + for (i = 0; i < dfa->nodes_len; ++i) + { + if (dfa->eclosures != NULL) + re_node_set_free (dfa->eclosures + i); + if (dfa->inveclosures != NULL) + re_node_set_free (dfa->inveclosures + i); + if (dfa->edests != NULL) + re_node_set_free (dfa->edests + i); + } + re_free (dfa->edests); + re_free (dfa->eclosures); + re_free (dfa->inveclosures); + re_free (dfa->nodes); + + if (dfa->state_table) + for (i = 0; i <= dfa->state_hash_mask; ++i) + { + struct re_state_table_entry *entry = dfa->state_table + i; + for (j = 0; j < entry->num; ++j) + { + re_dfastate_t *state = entry->array[j]; + free_state (state); + } + re_free (entry->array); + } + re_free (dfa->state_table); +#ifdef RE_ENABLE_I18N + if (dfa->sb_char != utf8_sb_map) + re_free (dfa->sb_char); +#endif + re_free (dfa->subexp_map); +#ifdef DEBUG + re_free (dfa->re_str); +#endif + + re_free (dfa); +} + + +/* Free dynamically allocated space used by PREG. */ + +void +regfree (preg) + regex_t *preg; +{ + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + if (BE (dfa != NULL, 1)) + free_dfa_content (dfa); + preg->buffer = NULL; + preg->allocated = 0; + + re_free (preg->fastmap); + preg->fastmap = NULL; + + re_free (preg->translate); + preg->translate = NULL; +} +#ifdef _LIBC +weak_alias (__regfree, regfree) +#endif + +/* Entry points compatible with 4.2 BSD regex library. We don't define + them unless specifically requested. */ + +#if defined _REGEX_RE_COMP || defined _LIBC + +/* BSD has one and only one pattern buffer. */ +static struct re_pattern_buffer re_comp_buf; + +char * +# ifdef _LIBC +/* Make these definitions weak in libc, so POSIX programs can redefine + these names if they don't use our functions, and still use + regcomp/regexec above without link errors. */ +weak_function +# endif +re_comp (s) + const char *s; +{ + reg_errcode_t ret; + char *fastmap; + + if (!s) + { + if (!re_comp_buf.buffer) + return gettext ("No previous regular expression"); + return 0; + } + + if (re_comp_buf.buffer) + { + fastmap = re_comp_buf.fastmap; + re_comp_buf.fastmap = NULL; + __regfree (&re_comp_buf); + memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); + re_comp_buf.fastmap = fastmap; + } + + if (re_comp_buf.fastmap == NULL) + { + re_comp_buf.fastmap = (char *) malloc (SBC_MAX); + if (re_comp_buf.fastmap == NULL) + return (char *) gettext (__re_error_msgid + + __re_error_msgid_idx[(int) REG_ESPACE]); + } + + /* Since `re_exec' always passes NULL for the `regs' argument, we + don't need to initialize the pattern buffer fields which affect it. */ + + /* Match anchors at newlines. */ + re_comp_buf.newline_anchor = 1; + + ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); + + if (!ret) + return NULL; + + /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ + return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); +} + +#ifdef _LIBC +libc_freeres_fn (free_mem) +{ + __regfree (&re_comp_buf); +} +#endif + +#endif /* _REGEX_RE_COMP */ + +/* Internal entry point. + Compile the regular expression PATTERN, whose length is LENGTH. + SYNTAX indicate regular expression's syntax. */ + +static reg_errcode_t +re_compile_internal (regex_t *preg, const char * pattern, size_t length, + reg_syntax_t syntax) +{ + reg_errcode_t err = REG_NOERROR; + re_dfa_t *dfa; + re_string_t regexp; + + /* Initialize the pattern buffer. */ + preg->fastmap_accurate = 0; + preg->syntax = syntax; + preg->not_bol = preg->not_eol = 0; + preg->used = 0; + preg->re_nsub = 0; + preg->can_be_null = 0; + preg->regs_allocated = REGS_UNALLOCATED; + + /* Initialize the dfa. */ + dfa = (re_dfa_t *) preg->buffer; + if (BE (preg->allocated < sizeof (re_dfa_t), 0)) + { + /* If zero allocated, but buffer is non-null, try to realloc + enough space. This loses if buffer's address is bogus, but + that is the user's responsibility. If ->buffer is NULL this + is a simple allocation. */ + dfa = re_realloc (preg->buffer, re_dfa_t, 1); + if (dfa == NULL) + return REG_ESPACE; + preg->allocated = sizeof (re_dfa_t); + preg->buffer = (unsigned char *) dfa; + } + preg->used = sizeof (re_dfa_t); + + err = init_dfa (dfa, length); + if (BE (err != REG_NOERROR, 0)) + { + free_dfa_content (dfa); + preg->buffer = NULL; + preg->allocated = 0; + return err; + } +#ifdef DEBUG + /* Note: length+1 will not overflow since it is checked in init_dfa. */ + dfa->re_str = re_malloc (char, length + 1); + strncpy (dfa->re_str, pattern, length + 1); +#endif + + __libc_lock_init (dfa->lock); + + err = re_string_construct (®exp, pattern, length, preg->translate, + syntax & RE_ICASE, dfa); + if (BE (err != REG_NOERROR, 0)) + { + re_compile_internal_free_return: + free_workarea_compile (preg); + re_string_destruct (®exp); + free_dfa_content (dfa); + preg->buffer = NULL; + preg->allocated = 0; + return err; + } + + /* Parse the regular expression, and build a structure tree. */ + preg->re_nsub = 0; + dfa->str_tree = parse (®exp, preg, syntax, &err); + if (BE (dfa->str_tree == NULL, 0)) + goto re_compile_internal_free_return; + + /* Analyze the tree and create the nfa. */ + err = analyze (preg); + if (BE (err != REG_NOERROR, 0)) + goto re_compile_internal_free_return; + +#ifdef RE_ENABLE_I18N + /* If possible, do searching in single byte encoding to speed things up. */ + if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) + optimize_utf8 (dfa); +#endif + + /* Then create the initial state of the dfa. */ + err = create_initial_state (dfa); + + /* Release work areas. */ + free_workarea_compile (preg); + re_string_destruct (®exp); + + if (BE (err != REG_NOERROR, 0)) + { + free_dfa_content (dfa); + preg->buffer = NULL; + preg->allocated = 0; + } + + return err; +} + +/* Initialize DFA. We use the length of the regular expression PAT_LEN + as the initial length of some arrays. */ + +static reg_errcode_t +init_dfa (re_dfa_t *dfa, size_t pat_len) +{ + __re_size_t table_size; +#ifdef RE_ENABLE_I18N + size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); +#else + size_t max_i18n_object_size = 0; +#endif + size_t max_object_size = + MAX (sizeof (struct re_state_table_entry), + MAX (sizeof (re_token_t), + MAX (sizeof (re_node_set), + MAX (sizeof (regmatch_t), + max_i18n_object_size)))); + + memset (dfa, '\0', sizeof (re_dfa_t)); + + /* Force allocation of str_tree_storage the first time. */ + dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; + + /* Avoid overflows. The extra "/ 2" is for the table_size doubling + calculation below, and for similar doubling calculations + elsewhere. And it's <= rather than <, because some of the + doubling calculations add 1 afterwards. */ + if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0)) + return REG_ESPACE; + + dfa->nodes_alloc = pat_len + 1; + dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); + + /* table_size = 2 ^ ceil(log pat_len) */ + for (table_size = 1; ; table_size <<= 1) + if (table_size > pat_len) + break; + + dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); + dfa->state_hash_mask = table_size - 1; + + dfa->mb_cur_max = MB_CUR_MAX; +#ifdef _LIBC + if (dfa->mb_cur_max == 6 + && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) + dfa->is_utf8 = 1; + dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) + != 0); +#else + if (strcmp (locale_charset (), "UTF-8") == 0) + dfa->is_utf8 = 1; + + /* We check exhaustively in the loop below if this charset is a + superset of ASCII. */ + dfa->map_notascii = 0; +#endif + +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + { + if (dfa->is_utf8) + dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; + else + { + int i, j, ch; + + dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); + if (BE (dfa->sb_char == NULL, 0)) + return REG_ESPACE; + + /* Set the bits corresponding to single byte chars. */ + for (i = 0, ch = 0; i < BITSET_WORDS; ++i) + for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) + { + wint_t wch = __btowc (ch); + if (wch != WEOF) + dfa->sb_char[i] |= (bitset_word_t) 1 << j; +# ifndef _LIBC + if (isascii (ch) && wch != ch) + dfa->map_notascii = 1; +# endif + } + } + } +#endif + + if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) + return REG_ESPACE; + return REG_NOERROR; +} + +/* Initialize WORD_CHAR table, which indicate which character is + "word". In this case "word" means that it is the word construction + character used by some operators like "\<", "\>", etc. */ + +static void +internal_function +init_word_char (re_dfa_t *dfa) +{ + int i, j, ch; + dfa->word_ops_used = 1; + for (i = 0, ch = 0; i < BITSET_WORDS; ++i) + for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) + if (isalnum (ch) || ch == '_') + dfa->word_char[i] |= (bitset_word_t) 1 << j; +} + +/* Free the work area which are only used while compiling. */ + +static void +free_workarea_compile (regex_t *preg) +{ + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + bin_tree_storage_t *storage, *next; + for (storage = dfa->str_tree_storage; storage; storage = next) + { + next = storage->next; + re_free (storage); + } + dfa->str_tree_storage = NULL; + dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; + dfa->str_tree = NULL; + re_free (dfa->org_indices); + dfa->org_indices = NULL; +} + +/* Create initial states for all contexts. */ + +static reg_errcode_t +create_initial_state (re_dfa_t *dfa) +{ + Idx first, i; + reg_errcode_t err; + re_node_set init_nodes; + + /* Initial states have the epsilon closure of the node which is + the first node of the regular expression. */ + first = dfa->str_tree->first->node_idx; + dfa->init_node = first; + err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); + if (BE (err != REG_NOERROR, 0)) + return err; + + /* The back-references which are in initial states can epsilon transit, + since in this case all of the subexpressions can be null. + Then we add epsilon closures of the nodes which are the next nodes of + the back-references. */ + if (dfa->nbackref > 0) + for (i = 0; i < init_nodes.nelem; ++i) + { + Idx node_idx = init_nodes.elems[i]; + re_token_type_t type = dfa->nodes[node_idx].type; + + Idx clexp_idx; + if (type != OP_BACK_REF) + continue; + for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) + { + re_token_t *clexp_node; + clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; + if (clexp_node->type == OP_CLOSE_SUBEXP + && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) + break; + } + if (clexp_idx == init_nodes.nelem) + continue; + + if (type == OP_BACK_REF) + { + Idx dest_idx = dfa->edests[node_idx].elems[0]; + if (!re_node_set_contains (&init_nodes, dest_idx)) + { + re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); + i = 0; + } + } + } + + /* It must be the first time to invoke acquire_state. */ + dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); + /* We don't check ERR here, since the initial state must not be NULL. */ + if (BE (dfa->init_state == NULL, 0)) + return err; + if (dfa->init_state->has_constraint) + { + dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, + CONTEXT_WORD); + dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, + CONTEXT_NEWLINE); + dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, + &init_nodes, + CONTEXT_NEWLINE + | CONTEXT_BEGBUF); + if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL + || dfa->init_state_begbuf == NULL, 0)) + return err; + } + else + dfa->init_state_word = dfa->init_state_nl + = dfa->init_state_begbuf = dfa->init_state; + + re_node_set_free (&init_nodes); + return REG_NOERROR; +} + +#ifdef RE_ENABLE_I18N +/* If it is possible to do searching in single byte encoding instead of UTF-8 + to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change + DFA nodes where needed. */ + +static void +optimize_utf8 (re_dfa_t *dfa) +{ + Idx node; + int i; + bool mb_chars = false; + bool has_period = false; + + for (node = 0; node < dfa->nodes_len; ++node) + switch (dfa->nodes[node].type) + { + case CHARACTER: + if (dfa->nodes[node].opr.c >= ASCII_CHARS) + mb_chars = true; + break; + case ANCHOR: + switch (dfa->nodes[node].opr.idx) + { + case LINE_FIRST: + case LINE_LAST: + case BUF_FIRST: + case BUF_LAST: + break; + default: + /* Word anchors etc. cannot be handled. */ + return; + } + break; + case OP_PERIOD: + has_period = true; + break; + case OP_BACK_REF: + case OP_ALT: + case END_OF_RE: + case OP_DUP_ASTERISK: + case OP_OPEN_SUBEXP: + case OP_CLOSE_SUBEXP: + break; + case COMPLEX_BRACKET: + return; + case SIMPLE_BRACKET: + /* Just double check. */ + { + int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 + ? 0 + : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); + for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) + { + if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) + return; + rshift = 0; + } + } + break; + default: + abort (); + } + + if (mb_chars || has_period) + for (node = 0; node < dfa->nodes_len; ++node) + { + if (dfa->nodes[node].type == CHARACTER + && dfa->nodes[node].opr.c >= ASCII_CHARS) + dfa->nodes[node].mb_partial = 0; + else if (dfa->nodes[node].type == OP_PERIOD) + dfa->nodes[node].type = OP_UTF8_PERIOD; + } + + /* The search can be in single byte locale. */ + dfa->mb_cur_max = 1; + dfa->is_utf8 = 0; + dfa->has_mb_node = dfa->nbackref > 0 || has_period; +} +#endif + +/* Analyze the structure tree, and calculate "first", "next", "edest", + "eclosure", and "inveclosure". */ + +static reg_errcode_t +analyze (regex_t *preg) +{ + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + reg_errcode_t ret; + + /* Allocate arrays. */ + dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); + dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); + dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); + dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); + if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL + || dfa->eclosures == NULL, 0)) + return REG_ESPACE; + + dfa->subexp_map = re_malloc (Idx, preg->re_nsub); + if (dfa->subexp_map != NULL) + { + Idx i; + for (i = 0; i < preg->re_nsub; i++) + dfa->subexp_map[i] = i; + preorder (dfa->str_tree, optimize_subexps, dfa); + for (i = 0; i < preg->re_nsub; i++) + if (dfa->subexp_map[i] != i) + break; + if (i == preg->re_nsub) + { + free (dfa->subexp_map); + dfa->subexp_map = NULL; + } + } + + ret = postorder (dfa->str_tree, lower_subexps, preg); + if (BE (ret != REG_NOERROR, 0)) + return ret; + ret = postorder (dfa->str_tree, calc_first, dfa); + if (BE (ret != REG_NOERROR, 0)) + return ret; + preorder (dfa->str_tree, calc_next, dfa); + ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); + if (BE (ret != REG_NOERROR, 0)) + return ret; + ret = calc_eclosure (dfa); + if (BE (ret != REG_NOERROR, 0)) + return ret; + + /* We only need this during the prune_impossible_nodes pass in regexec.c; + skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ + if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) + || dfa->nbackref) + { + dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); + if (BE (dfa->inveclosures == NULL, 0)) + return REG_ESPACE; + ret = calc_inveclosure (dfa); + } + + return ret; +} + +/* Our parse trees are very unbalanced, so we cannot use a stack to + implement parse tree visits. Instead, we use parent pointers and + some hairy code in these two functions. */ +static reg_errcode_t +postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), + void *extra) +{ + bin_tree_t *node, *prev; + + for (node = root; ; ) + { + /* Descend down the tree, preferably to the left (or to the right + if that's the only child). */ + while (node->left || node->right) + if (node->left) + node = node->left; + else + node = node->right; + + do + { + reg_errcode_t err = fn (extra, node); + if (BE (err != REG_NOERROR, 0)) + return err; + if (node->parent == NULL) + return REG_NOERROR; + prev = node; + node = node->parent; + } + /* Go up while we have a node that is reached from the right. */ + while (node->right == prev || node->right == NULL); + node = node->right; + } +} + +static reg_errcode_t +preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), + void *extra) +{ + bin_tree_t *node; + + for (node = root; ; ) + { + reg_errcode_t err = fn (extra, node); + if (BE (err != REG_NOERROR, 0)) + return err; + + /* Go to the left node, or up and to the right. */ + if (node->left) + node = node->left; + else + { + bin_tree_t *prev = NULL; + while (node->right == prev || node->right == NULL) + { + prev = node; + node = node->parent; + if (!node) + return REG_NOERROR; + } + node = node->right; + } + } +} + +/* Optimization pass: if a SUBEXP is entirely contained, strip it and tell + re_search_internal to map the inner one's opr.idx to this one's. Adjust + backreferences as well. Requires a preorder visit. */ +static reg_errcode_t +optimize_subexps (void *extra, bin_tree_t *node) +{ + re_dfa_t *dfa = (re_dfa_t *) extra; + + if (node->token.type == OP_BACK_REF && dfa->subexp_map) + { + int idx = node->token.opr.idx; + node->token.opr.idx = dfa->subexp_map[idx]; + dfa->used_bkref_map |= 1 << node->token.opr.idx; + } + + else if (node->token.type == SUBEXP + && node->left && node->left->token.type == SUBEXP) + { + Idx other_idx = node->left->token.opr.idx; + + node->left = node->left->left; + if (node->left) + node->left->parent = node; + + dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; + if (other_idx < BITSET_WORD_BITS) + dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); + } + + return REG_NOERROR; +} + +/* Lowering pass: Turn each SUBEXP node into the appropriate concatenation + of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ +static reg_errcode_t +lower_subexps (void *extra, bin_tree_t *node) +{ + regex_t *preg = (regex_t *) extra; + reg_errcode_t err = REG_NOERROR; + + if (node->left && node->left->token.type == SUBEXP) + { + node->left = lower_subexp (&err, preg, node->left); + if (node->left) + node->left->parent = node; + } + if (node->right && node->right->token.type == SUBEXP) + { + node->right = lower_subexp (&err, preg, node->right); + if (node->right) + node->right->parent = node; + } + + return err; +} + +static bin_tree_t * +lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) +{ + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + bin_tree_t *body = node->left; + bin_tree_t *op, *cls, *tree1, *tree; + + if (preg->no_sub + /* We do not optimize empty subexpressions, because otherwise we may + have bad CONCAT nodes with NULL children. This is obviously not + very common, so we do not lose much. An example that triggers + this case is the sed "script" /\(\)/x. */ + && node->left != NULL + && (node->token.opr.idx >= BITSET_WORD_BITS + || !(dfa->used_bkref_map + & ((bitset_word_t) 1 << node->token.opr.idx)))) + return node->left; + + /* Convert the SUBEXP node to the concatenation of an + OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ + op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); + cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); + tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; + tree = create_tree (dfa, op, tree1, CONCAT); + if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + + op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; + op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; + return tree; +} + +/* Pass 1 in building the NFA: compute FIRST and create unlinked automaton + nodes. Requires a postorder visit. */ +static reg_errcode_t +calc_first (void *extra, bin_tree_t *node) +{ + re_dfa_t *dfa = (re_dfa_t *) extra; + if (node->token.type == CONCAT) + { + node->first = node->left->first; + node->node_idx = node->left->node_idx; + } + else + { + node->first = node; + node->node_idx = re_dfa_add_node (dfa, node->token); + if (BE (node->node_idx == REG_MISSING, 0)) + return REG_ESPACE; + } + return REG_NOERROR; +} + +/* Pass 2: compute NEXT on the tree. Preorder visit. */ +static reg_errcode_t +calc_next (void *extra, bin_tree_t *node) +{ + switch (node->token.type) + { + case OP_DUP_ASTERISK: + node->left->next = node; + break; + case CONCAT: + node->left->next = node->right->first; + node->right->next = node->next; + break; + default: + if (node->left) + node->left->next = node->next; + if (node->right) + node->right->next = node->next; + break; + } + return REG_NOERROR; +} + +/* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ +static reg_errcode_t +link_nfa_nodes (void *extra, bin_tree_t *node) +{ + re_dfa_t *dfa = (re_dfa_t *) extra; + Idx idx = node->node_idx; + reg_errcode_t err = REG_NOERROR; + + switch (node->token.type) + { + case CONCAT: + break; + + case END_OF_RE: + assert (node->next == NULL); + break; + + case OP_DUP_ASTERISK: + case OP_ALT: + { + Idx left, right; + dfa->has_plural_match = 1; + if (node->left != NULL) + left = node->left->first->node_idx; + else + left = node->next->node_idx; + if (node->right != NULL) + right = node->right->first->node_idx; + else + right = node->next->node_idx; + assert (REG_VALID_INDEX (left)); + assert (REG_VALID_INDEX (right)); + err = re_node_set_init_2 (dfa->edests + idx, left, right); + } + break; + + case ANCHOR: + case OP_OPEN_SUBEXP: + case OP_CLOSE_SUBEXP: + err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); + break; + + case OP_BACK_REF: + dfa->nexts[idx] = node->next->node_idx; + if (node->token.type == OP_BACK_REF) + re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); + break; + + default: + assert (!IS_EPSILON_NODE (node->token.type)); + dfa->nexts[idx] = node->next->node_idx; + break; + } + + return err; +} + +/* Duplicate the epsilon closure of the node ROOT_NODE. + Note that duplicated nodes have constraint INIT_CONSTRAINT in addition + to their own constraint. */ + +static reg_errcode_t +internal_function +duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, + Idx root_node, unsigned int init_constraint) +{ + Idx org_node, clone_node; + bool ok; + unsigned int constraint = init_constraint; + for (org_node = top_org_node, clone_node = top_clone_node;;) + { + Idx org_dest, clone_dest; + if (dfa->nodes[org_node].type == OP_BACK_REF) + { + /* If the back reference epsilon-transit, its destination must + also have the constraint. Then duplicate the epsilon closure + of the destination of the back reference, and store it in + edests of the back reference. */ + org_dest = dfa->nexts[org_node]; + re_node_set_empty (dfa->edests + clone_node); + clone_dest = duplicate_node (dfa, org_dest, constraint); + if (BE (clone_dest == REG_MISSING, 0)) + return REG_ESPACE; + dfa->nexts[clone_node] = dfa->nexts[org_node]; + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + } + else if (dfa->edests[org_node].nelem == 0) + { + /* In case of the node can't epsilon-transit, don't duplicate the + destination and store the original destination as the + destination of the node. */ + dfa->nexts[clone_node] = dfa->nexts[org_node]; + break; + } + else if (dfa->edests[org_node].nelem == 1) + { + /* In case of the node can epsilon-transit, and it has only one + destination. */ + org_dest = dfa->edests[org_node].elems[0]; + re_node_set_empty (dfa->edests + clone_node); + if (dfa->nodes[org_node].type == ANCHOR) + { + /* In case of the node has another constraint, append it. */ + if (org_node == root_node && clone_node != org_node) + { + /* ...but if the node is root_node itself, it means the + epsilon closure have a loop, then tie it to the + destination of the root_node. */ + ok = re_node_set_insert (dfa->edests + clone_node, org_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + break; + } + constraint |= dfa->nodes[org_node].opr.ctx_type; + } + clone_dest = duplicate_node (dfa, org_dest, constraint); + if (BE (clone_dest == REG_MISSING, 0)) + return REG_ESPACE; + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + } + else /* dfa->edests[org_node].nelem == 2 */ + { + /* In case of the node can epsilon-transit, and it has two + destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ + org_dest = dfa->edests[org_node].elems[0]; + re_node_set_empty (dfa->edests + clone_node); + /* Search for a duplicated node which satisfies the constraint. */ + clone_dest = search_duplicated_node (dfa, org_dest, constraint); + if (clone_dest == REG_MISSING) + { + /* There are no such a duplicated node, create a new one. */ + reg_errcode_t err; + clone_dest = duplicate_node (dfa, org_dest, constraint); + if (BE (clone_dest == REG_MISSING, 0)) + return REG_ESPACE; + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + err = duplicate_node_closure (dfa, org_dest, clone_dest, + root_node, constraint); + if (BE (err != REG_NOERROR, 0)) + return err; + } + else + { + /* There are a duplicated node which satisfy the constraint, + use it to avoid infinite loop. */ + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + } + + org_dest = dfa->edests[org_node].elems[1]; + clone_dest = duplicate_node (dfa, org_dest, constraint); + if (BE (clone_dest == REG_MISSING, 0)) + return REG_ESPACE; + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + } + org_node = org_dest; + clone_node = clone_dest; + } + return REG_NOERROR; +} + +/* Search for a node which is duplicated from the node ORG_NODE, and + satisfies the constraint CONSTRAINT. */ + +static Idx +search_duplicated_node (const re_dfa_t *dfa, Idx org_node, + unsigned int constraint) +{ + Idx idx; + for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) + { + if (org_node == dfa->org_indices[idx] + && constraint == dfa->nodes[idx].constraint) + return idx; /* Found. */ + } + return REG_MISSING; /* Not found. */ +} + +/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. + Return the index of the new node, or REG_MISSING if insufficient storage is + available. */ + +static Idx +duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) +{ + Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); + if (BE (dup_idx != REG_MISSING, 1)) + { + dfa->nodes[dup_idx].constraint = constraint; + if (dfa->nodes[org_idx].type == ANCHOR) + dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].opr.ctx_type; + dfa->nodes[dup_idx].duplicated = 1; + + /* Store the index of the original node. */ + dfa->org_indices[dup_idx] = org_idx; + } + return dup_idx; +} + +static reg_errcode_t +calc_inveclosure (re_dfa_t *dfa) +{ + Idx src, idx; + bool ok; + for (idx = 0; idx < dfa->nodes_len; ++idx) + re_node_set_init_empty (dfa->inveclosures + idx); + + for (src = 0; src < dfa->nodes_len; ++src) + { + Idx *elems = dfa->eclosures[src].elems; + for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) + { + ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); + if (BE (! ok, 0)) + return REG_ESPACE; + } + } + + return REG_NOERROR; +} + +/* Calculate "eclosure" for all the node in DFA. */ + +static reg_errcode_t +calc_eclosure (re_dfa_t *dfa) +{ + Idx node_idx; + bool incomplete; +#ifdef DEBUG + assert (dfa->nodes_len > 0); +#endif + incomplete = false; + /* For each nodes, calculate epsilon closure. */ + for (node_idx = 0; ; ++node_idx) + { + reg_errcode_t err; + re_node_set eclosure_elem; + if (node_idx == dfa->nodes_len) + { + if (!incomplete) + break; + incomplete = false; + node_idx = 0; + } + +#ifdef DEBUG + assert (dfa->eclosures[node_idx].nelem != REG_MISSING); +#endif + + /* If we have already calculated, skip it. */ + if (dfa->eclosures[node_idx].nelem != 0) + continue; + /* Calculate epsilon closure of `node_idx'. */ + err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); + if (BE (err != REG_NOERROR, 0)) + return err; + + if (dfa->eclosures[node_idx].nelem == 0) + { + incomplete = true; + re_node_set_free (&eclosure_elem); + } + } + return REG_NOERROR; +} + +/* Calculate epsilon closure of NODE. */ + +static reg_errcode_t +calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) +{ + reg_errcode_t err; + unsigned int constraint; + Idx i; + bool incomplete; + bool ok; + re_node_set eclosure; + incomplete = false; + err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); + if (BE (err != REG_NOERROR, 0)) + return err; + + /* This indicates that we are calculating this node now. + We reference this value to avoid infinite loop. */ + dfa->eclosures[node].nelem = REG_MISSING; + + constraint = ((dfa->nodes[node].type == ANCHOR) + ? dfa->nodes[node].opr.ctx_type : 0); + /* If the current node has constraints, duplicate all nodes. + Since they must inherit the constraints. */ + if (constraint + && dfa->edests[node].nelem + && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) + { + err = duplicate_node_closure (dfa, node, node, node, constraint); + if (BE (err != REG_NOERROR, 0)) + return err; + } + + /* Expand each epsilon destination nodes. */ + if (IS_EPSILON_NODE(dfa->nodes[node].type)) + for (i = 0; i < dfa->edests[node].nelem; ++i) + { + re_node_set eclosure_elem; + Idx edest = dfa->edests[node].elems[i]; + /* If calculating the epsilon closure of `edest' is in progress, + return intermediate result. */ + if (dfa->eclosures[edest].nelem == REG_MISSING) + { + incomplete = true; + continue; + } + /* If we haven't calculated the epsilon closure of `edest' yet, + calculate now. Otherwise use calculated epsilon closure. */ + if (dfa->eclosures[edest].nelem == 0) + { + err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); + if (BE (err != REG_NOERROR, 0)) + return err; + } + else + eclosure_elem = dfa->eclosures[edest]; + /* Merge the epsilon closure of `edest'. */ + re_node_set_merge (&eclosure, &eclosure_elem); + /* If the epsilon closure of `edest' is incomplete, + the epsilon closure of this node is also incomplete. */ + if (dfa->eclosures[edest].nelem == 0) + { + incomplete = true; + re_node_set_free (&eclosure_elem); + } + } + + /* Epsilon closures include itself. */ + ok = re_node_set_insert (&eclosure, node); + if (BE (! ok, 0)) + return REG_ESPACE; + if (incomplete && !root) + dfa->eclosures[node].nelem = 0; + else + dfa->eclosures[node] = eclosure; + *new_set = eclosure; + return REG_NOERROR; +} + +/* Functions for token which are used in the parser. */ + +/* Fetch a token from INPUT. + We must not use this function inside bracket expressions. */ + +static void +internal_function +fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) +{ + re_string_skip_bytes (input, peek_token (result, input, syntax)); +} + +/* Peek a token from INPUT, and return the length of the token. + We must not use this function inside bracket expressions. */ + +static int +internal_function +peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) +{ + unsigned char c; + + if (re_string_eoi (input)) + { + token->type = END_OF_RE; + return 0; + } + + c = re_string_peek_byte (input, 0); + token->opr.c = c; + + token->word_char = 0; +#ifdef RE_ENABLE_I18N + token->mb_partial = 0; + if (input->mb_cur_max > 1 && + !re_string_first_byte (input, re_string_cur_idx (input))) + { + token->type = CHARACTER; + token->mb_partial = 1; + return 1; + } +#endif + if (c == '\\') + { + unsigned char c2; + if (re_string_cur_idx (input) + 1 >= re_string_length (input)) + { + token->type = BACK_SLASH; + return 1; + } + + c2 = re_string_peek_byte_case (input, 1); + token->opr.c = c2; + token->type = CHARACTER; +#ifdef RE_ENABLE_I18N + if (input->mb_cur_max > 1) + { + wint_t wc = re_string_wchar_at (input, + re_string_cur_idx (input) + 1); + token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; + } + else +#endif + token->word_char = IS_WORD_CHAR (c2) != 0; + + switch (c2) + { + case '|': + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) + token->type = OP_ALT; + break; + case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + if (!(syntax & RE_NO_BK_REFS)) + { + token->type = OP_BACK_REF; + token->opr.idx = c2 - '1'; + } + break; + case '<': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = WORD_FIRST; + } + break; + case '>': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = WORD_LAST; + } + break; + case 'b': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = WORD_DELIM; + } + break; + case 'B': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = NOT_WORD_DELIM; + } + break; + case 'w': + if (!(syntax & RE_NO_GNU_OPS)) + token->type = OP_WORD; + break; + case 'W': + if (!(syntax & RE_NO_GNU_OPS)) + token->type = OP_NOTWORD; + break; + case 's': + if (!(syntax & RE_NO_GNU_OPS)) + token->type = OP_SPACE; + break; + case 'S': + if (!(syntax & RE_NO_GNU_OPS)) + token->type = OP_NOTSPACE; + break; + case '`': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = BUF_FIRST; + } + break; + case '\'': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = BUF_LAST; + } + break; + case '(': + if (!(syntax & RE_NO_BK_PARENS)) + token->type = OP_OPEN_SUBEXP; + break; + case ')': + if (!(syntax & RE_NO_BK_PARENS)) + token->type = OP_CLOSE_SUBEXP; + break; + case '+': + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) + token->type = OP_DUP_PLUS; + break; + case '?': + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) + token->type = OP_DUP_QUESTION; + break; + case '{': + if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) + token->type = OP_OPEN_DUP_NUM; + break; + case '}': + if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) + token->type = OP_CLOSE_DUP_NUM; + break; + default: + break; + } + return 2; + } + + token->type = CHARACTER; +#ifdef RE_ENABLE_I18N + if (input->mb_cur_max > 1) + { + wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); + token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; + } + else +#endif + token->word_char = IS_WORD_CHAR (token->opr.c); + + switch (c) + { + case '\n': + if (syntax & RE_NEWLINE_ALT) + token->type = OP_ALT; + break; + case '|': + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) + token->type = OP_ALT; + break; + case '*': + token->type = OP_DUP_ASTERISK; + break; + case '+': + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) + token->type = OP_DUP_PLUS; + break; + case '?': + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) + token->type = OP_DUP_QUESTION; + break; + case '{': + if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) + token->type = OP_OPEN_DUP_NUM; + break; + case '}': + if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) + token->type = OP_CLOSE_DUP_NUM; + break; + case '(': + if (syntax & RE_NO_BK_PARENS) + token->type = OP_OPEN_SUBEXP; + break; + case ')': + if (syntax & RE_NO_BK_PARENS) + token->type = OP_CLOSE_SUBEXP; + break; + case '[': + token->type = OP_OPEN_BRACKET; + break; + case '.': + token->type = OP_PERIOD; + break; + case '^': + if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && + re_string_cur_idx (input) != 0) + { + char prev = re_string_peek_byte (input, -1); + if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') + break; + } + token->type = ANCHOR; + token->opr.ctx_type = LINE_FIRST; + break; + case '$': + if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && + re_string_cur_idx (input) + 1 != re_string_length (input)) + { + re_token_t next; + re_string_skip_bytes (input, 1); + peek_token (&next, input, syntax); + re_string_skip_bytes (input, -1); + if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) + break; + } + token->type = ANCHOR; + token->opr.ctx_type = LINE_LAST; + break; + default: + break; + } + return 1; +} + +/* Peek a token from INPUT, and return the length of the token. + We must not use this function out of bracket expressions. */ + +static int +internal_function +peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) +{ + unsigned char c; + if (re_string_eoi (input)) + { + token->type = END_OF_RE; + return 0; + } + c = re_string_peek_byte (input, 0); + token->opr.c = c; + +#ifdef RE_ENABLE_I18N + if (input->mb_cur_max > 1 && + !re_string_first_byte (input, re_string_cur_idx (input))) + { + token->type = CHARACTER; + return 1; + } +#endif /* RE_ENABLE_I18N */ + + if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) + && re_string_cur_idx (input) + 1 < re_string_length (input)) + { + /* In this case, '\' escape a character. */ + unsigned char c2; + re_string_skip_bytes (input, 1); + c2 = re_string_peek_byte (input, 0); + token->opr.c = c2; + token->type = CHARACTER; + return 1; + } + if (c == '[') /* '[' is a special char in a bracket exps. */ + { + unsigned char c2; + int token_len; + if (re_string_cur_idx (input) + 1 < re_string_length (input)) + c2 = re_string_peek_byte (input, 1); + else + c2 = 0; + token->opr.c = c2; + token_len = 2; + switch (c2) + { + case '.': + token->type = OP_OPEN_COLL_ELEM; + break; + case '=': + token->type = OP_OPEN_EQUIV_CLASS; + break; + case ':': + if (syntax & RE_CHAR_CLASSES) + { + token->type = OP_OPEN_CHAR_CLASS; + break; + } + /* else fall through. */ + default: + token->type = CHARACTER; + token->opr.c = c; + token_len = 1; + break; + } + return token_len; + } + switch (c) + { + case '-': + token->type = OP_CHARSET_RANGE; + break; + case ']': + token->type = OP_CLOSE_BRACKET; + break; + case '^': + token->type = OP_NON_MATCH_LIST; + break; + default: + token->type = CHARACTER; + } + return 1; +} + +/* Functions for parser. */ + +/* Entry point of the parser. + Parse the regular expression REGEXP and return the structure tree. + If an error is occured, ERR is set by error code, and return NULL. + This function build the following tree, from regular expression : + CAT + / \ + / \ + EOR + + CAT means concatenation. + EOR means end of regular expression. */ + +static bin_tree_t * +parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, + reg_errcode_t *err) +{ + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + bin_tree_t *tree, *eor, *root; + re_token_t current_token; + dfa->syntax = syntax; + fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); + tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + eor = create_tree (dfa, NULL, NULL, END_OF_RE); + if (tree != NULL) + root = create_tree (dfa, tree, eor, CONCAT); + else + root = eor; + if (BE (eor == NULL || root == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + return root; +} + +/* This function build the following tree, from regular expression + |: + ALT + / \ + / \ + + + ALT means alternative, which represents the operator `|'. */ + +static bin_tree_t * +parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, + reg_syntax_t syntax, Idx nest, reg_errcode_t *err) +{ + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + bin_tree_t *tree, *branch = NULL; + tree = parse_branch (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + + while (token->type == OP_ALT) + { + fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); + if (token->type != OP_ALT && token->type != END_OF_RE + && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) + { + branch = parse_branch (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && branch == NULL, 0)) + return NULL; + } + else + branch = NULL; + tree = create_tree (dfa, tree, branch, OP_ALT); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } + return tree; +} + +/* This function build the following tree, from regular expression + : + CAT + / \ + / \ + + + CAT means concatenation. */ + +static bin_tree_t * +parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, + reg_syntax_t syntax, Idx nest, reg_errcode_t *err) +{ + bin_tree_t *tree, *expr; + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + tree = parse_expression (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + + while (token->type != OP_ALT && token->type != END_OF_RE + && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) + { + expr = parse_expression (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && expr == NULL, 0)) + { + return NULL; + } + if (tree != NULL && expr != NULL) + { + tree = create_tree (dfa, tree, expr, CONCAT); + if (tree == NULL) + { + *err = REG_ESPACE; + return NULL; + } + } + else if (tree == NULL) + tree = expr; + /* Otherwise expr == NULL, we don't need to create new tree. */ + } + return tree; +} + +/* This function build the following tree, from regular expression a*: + * + | + a +*/ + +static bin_tree_t * +parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, + reg_syntax_t syntax, Idx nest, reg_errcode_t *err) +{ + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + bin_tree_t *tree; + switch (token->type) + { + case CHARACTER: + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + { + while (!re_string_eoi (regexp) + && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) + { + bin_tree_t *mbc_remain; + fetch_token (token, regexp, syntax); + mbc_remain = create_token_tree (dfa, NULL, NULL, token); + tree = create_tree (dfa, tree, mbc_remain, CONCAT); + if (BE (mbc_remain == NULL || tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } + } +#endif + break; + case OP_OPEN_SUBEXP: + tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_OPEN_BRACKET: + tree = parse_bracket_exp (regexp, dfa, token, syntax, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_BACK_REF: + if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) + { + *err = REG_ESUBREG; + return NULL; + } + dfa->used_bkref_map |= 1 << token->opr.idx; + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + ++dfa->nbackref; + dfa->has_mb_node = 1; + break; + case OP_OPEN_DUP_NUM: + if (syntax & RE_CONTEXT_INVALID_DUP) + { + *err = REG_BADRPT; + return NULL; + } + /* FALLTHROUGH */ + case OP_DUP_ASTERISK: + case OP_DUP_PLUS: + case OP_DUP_QUESTION: + if (syntax & RE_CONTEXT_INVALID_OPS) + { + *err = REG_BADRPT; + return NULL; + } + else if (syntax & RE_CONTEXT_INDEP_OPS) + { + fetch_token (token, regexp, syntax); + return parse_expression (regexp, preg, token, syntax, nest, err); + } + /* else fall through */ + case OP_CLOSE_SUBEXP: + if ((token->type == OP_CLOSE_SUBEXP) && + !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) + { + *err = REG_ERPAREN; + return NULL; + } + /* else fall through */ + case OP_CLOSE_DUP_NUM: + /* We treat it as a normal character. */ + + /* Then we can these characters as normal characters. */ + token->type = CHARACTER; + /* mb_partial and word_char bits should be initialized already + by peek_token. */ + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + break; + case ANCHOR: + if ((token->opr.ctx_type + & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) + && dfa->word_ops_used == 0) + init_word_char (dfa); + if (token->opr.ctx_type == WORD_DELIM + || token->opr.ctx_type == NOT_WORD_DELIM) + { + bin_tree_t *tree_first, *tree_last; + if (token->opr.ctx_type == WORD_DELIM) + { + token->opr.ctx_type = WORD_FIRST; + tree_first = create_token_tree (dfa, NULL, NULL, token); + token->opr.ctx_type = WORD_LAST; + } + else + { + token->opr.ctx_type = INSIDE_WORD; + tree_first = create_token_tree (dfa, NULL, NULL, token); + token->opr.ctx_type = INSIDE_NOTWORD; + } + tree_last = create_token_tree (dfa, NULL, NULL, token); + tree = create_tree (dfa, tree_first, tree_last, OP_ALT); + if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } + else + { + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } + /* We must return here, since ANCHORs can't be followed + by repetition operators. + eg. RE"^*" is invalid or "", + it must not be "". */ + fetch_token (token, regexp, syntax); + return tree; + case OP_PERIOD: + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + if (dfa->mb_cur_max > 1) + dfa->has_mb_node = 1; + break; + case OP_WORD: + case OP_NOTWORD: + tree = build_charclass_op (dfa, regexp->trans, + (const unsigned char *) "alnum", + (const unsigned char *) "_", + token->type == OP_NOTWORD, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_SPACE: + case OP_NOTSPACE: + tree = build_charclass_op (dfa, regexp->trans, + (const unsigned char *) "space", + (const unsigned char *) "", + token->type == OP_NOTSPACE, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_ALT: + case END_OF_RE: + return NULL; + case BACK_SLASH: + *err = REG_EESCAPE; + return NULL; + default: + /* Must not happen? */ +#ifdef DEBUG + assert (0); +#endif + return NULL; + } + fetch_token (token, regexp, syntax); + + while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS + || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) + { + tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + /* In BRE consecutive duplications are not allowed. */ + if ((syntax & RE_CONTEXT_INVALID_DUP) + && (token->type == OP_DUP_ASTERISK + || token->type == OP_OPEN_DUP_NUM)) + { + *err = REG_BADRPT; + return NULL; + } + } + + return tree; +} + +/* This function build the following tree, from regular expression + (): + SUBEXP + | + +*/ + +static bin_tree_t * +parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, + reg_syntax_t syntax, Idx nest, reg_errcode_t *err) +{ + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + bin_tree_t *tree; + size_t cur_nsub; + cur_nsub = preg->re_nsub++; + + fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); + + /* The subexpression may be a null string. */ + if (token->type == OP_CLOSE_SUBEXP) + tree = NULL; + else + { + tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); + if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) + *err = REG_EPAREN; + if (BE (*err != REG_NOERROR, 0)) + return NULL; + } + + if (cur_nsub <= '9' - '1') + dfa->completed_bkref_map |= 1 << cur_nsub; + + tree = create_tree (dfa, tree, NULL, SUBEXP); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + tree->token.opr.idx = cur_nsub; + return tree; +} + +/* This function parse repetition operators like "*", "+", "{1,3}" etc. */ + +static bin_tree_t * +parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, + re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) +{ + bin_tree_t *tree = NULL, *old_tree = NULL; + Idx i, start, end, start_idx = re_string_cur_idx (regexp); + re_token_t start_token = *token; + + if (token->type == OP_OPEN_DUP_NUM) + { + end = 0; + start = fetch_number (regexp, token, syntax); + if (start == REG_MISSING) + { + if (token->type == CHARACTER && token->opr.c == ',') + start = 0; /* We treat "{,m}" as "{0,m}". */ + else + { + *err = REG_BADBR; /* {} is invalid. */ + return NULL; + } + } + if (BE (start != REG_ERROR, 1)) + { + /* We treat "{n}" as "{n,n}". */ + end = ((token->type == OP_CLOSE_DUP_NUM) ? start + : ((token->type == CHARACTER && token->opr.c == ',') + ? fetch_number (regexp, token, syntax) : REG_ERROR)); + } + if (BE (start == REG_ERROR || end == REG_ERROR, 0)) + { + /* Invalid sequence. */ + if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) + { + if (token->type == END_OF_RE) + *err = REG_EBRACE; + else + *err = REG_BADBR; + + return NULL; + } + + /* If the syntax bit is set, rollback. */ + re_string_set_index (regexp, start_idx); + *token = start_token; + token->type = CHARACTER; + /* mb_partial and word_char bits should be already initialized by + peek_token. */ + return elem; + } + + if (BE (end != REG_MISSING && start > end, 0)) + { + /* First number greater than second. */ + *err = REG_BADBR; + return NULL; + } + } + else + { + start = (token->type == OP_DUP_PLUS) ? 1 : 0; + end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING; + } + + fetch_token (token, regexp, syntax); + + if (BE (elem == NULL, 0)) + return NULL; + if (BE (start == 0 && end == 0, 0)) + { + postorder (elem, free_tree, NULL); + return NULL; + } + + /* Extract "{n,m}" to "...{0,}". */ + if (BE (start > 0, 0)) + { + tree = elem; + for (i = 2; i <= start; ++i) + { + elem = duplicate_tree (elem, dfa); + tree = create_tree (dfa, tree, elem, CONCAT); + if (BE (elem == NULL || tree == NULL, 0)) + goto parse_dup_op_espace; + } + + if (start == end) + return tree; + + /* Duplicate ELEM before it is marked optional. */ + elem = duplicate_tree (elem, dfa); + old_tree = tree; + } + else + old_tree = NULL; + + if (elem->token.type == SUBEXP) + postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); + + tree = create_tree (dfa, elem, NULL, + (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT)); + if (BE (tree == NULL, 0)) + goto parse_dup_op_espace; + + /* This loop is actually executed only when end != REG_MISSING, + to rewrite {0,n} as ((...?)?)?... We have + already created the start+1-th copy. */ + if ((Idx) -1 < 0 || end != REG_MISSING) + for (i = start + 2; i <= end; ++i) + { + elem = duplicate_tree (elem, dfa); + tree = create_tree (dfa, tree, elem, CONCAT); + if (BE (elem == NULL || tree == NULL, 0)) + goto parse_dup_op_espace; + + tree = create_tree (dfa, tree, NULL, OP_ALT); + if (BE (tree == NULL, 0)) + goto parse_dup_op_espace; + } + + if (old_tree) + tree = create_tree (dfa, old_tree, tree, CONCAT); + + return tree; + + parse_dup_op_espace: + *err = REG_ESPACE; + return NULL; +} + +/* Size of the names for collating symbol/equivalence_class/character_class. + I'm not sure, but maybe enough. */ +#define BRACKET_NAME_BUF_SIZE 32 + +#ifndef _LIBC + /* Local function for parse_bracket_exp only used in case of NOT _LIBC. + Build the range expression which starts from START_ELEM, and ends + at END_ELEM. The result are written to MBCSET and SBCSET. + RANGE_ALLOC is the allocated size of mbcset->range_starts, and + mbcset->range_ends, is a pointer argument sinse we may + update it. */ + +static reg_errcode_t +internal_function +# ifdef RE_ENABLE_I18N +build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc, + bracket_elem_t *start_elem, bracket_elem_t *end_elem) +# else /* not RE_ENABLE_I18N */ +build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem, + bracket_elem_t *end_elem) +# endif /* not RE_ENABLE_I18N */ +{ + unsigned int start_ch, end_ch; + /* Equivalence Classes and Character Classes can't be a range start/end. */ + if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS + || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, + 0)) + return REG_ERANGE; + + /* We can handle no multi character collating elements without libc + support. */ + if (BE ((start_elem->type == COLL_SYM + && strlen ((char *) start_elem->opr.name) > 1) + || (end_elem->type == COLL_SYM + && strlen ((char *) end_elem->opr.name) > 1), 0)) + return REG_ECOLLATE; + +# ifdef RE_ENABLE_I18N + { + wchar_t wc; + wint_t start_wc; + wint_t end_wc; + wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; + + start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch + : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] + : 0)); + end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch + : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] + : 0)); + start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) + ? __btowc (start_ch) : start_elem->opr.wch); + end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) + ? __btowc (end_ch) : end_elem->opr.wch); + if (start_wc == WEOF || end_wc == WEOF) + return REG_ECOLLATE; + cmp_buf[0] = start_wc; + cmp_buf[4] = end_wc; + if (wcscoll (cmp_buf, cmp_buf + 4) > 0) + return REG_ERANGE; + + /* Got valid collation sequence values, add them as a new entry. + However, for !_LIBC we have no collation elements: if the + character set is single byte, the single byte character set + that we build below suffices. parse_bracket_exp passes + no MBCSET if dfa->mb_cur_max == 1. */ + if (mbcset) + { + /* Check the space of the arrays. */ + if (BE (*range_alloc == mbcset->nranges, 0)) + { + /* There is not enough space, need realloc. */ + wchar_t *new_array_start, *new_array_end; + Idx new_nranges; + + /* +1 in case of mbcset->nranges is 0. */ + new_nranges = 2 * mbcset->nranges + 1; + /* Use realloc since mbcset->range_starts and mbcset->range_ends + are NULL if *range_alloc == 0. */ + new_array_start = re_realloc (mbcset->range_starts, wchar_t, + new_nranges); + new_array_end = re_realloc (mbcset->range_ends, wchar_t, + new_nranges); + + if (BE (new_array_start == NULL || new_array_end == NULL, 0)) + return REG_ESPACE; + + mbcset->range_starts = new_array_start; + mbcset->range_ends = new_array_end; + *range_alloc = new_nranges; + } + + mbcset->range_starts[mbcset->nranges] = start_wc; + mbcset->range_ends[mbcset->nranges++] = end_wc; + } + + /* Build the table for single byte characters. */ + for (wc = 0; wc < SBC_MAX; ++wc) + { + cmp_buf[2] = wc; + if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 + && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) + bitset_set (sbcset, wc); + } + } +# else /* not RE_ENABLE_I18N */ + { + unsigned int ch; + start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch + : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] + : 0)); + end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch + : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] + : 0)); + if (start_ch > end_ch) + return REG_ERANGE; + /* Build the table for single byte characters. */ + for (ch = 0; ch < SBC_MAX; ++ch) + if (start_ch <= ch && ch <= end_ch) + bitset_set (sbcset, ch); + } +# endif /* not RE_ENABLE_I18N */ + return REG_NOERROR; +} +#endif /* not _LIBC */ + +#ifndef _LIBC +/* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. + Build the collating element which is represented by NAME. + The result are written to MBCSET and SBCSET. + COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a + pointer argument since we may update it. */ + +static reg_errcode_t +internal_function +build_collating_symbol (bitset_t sbcset, +# ifdef RE_ENABLE_I18N + re_charset_t *mbcset, Idx *coll_sym_alloc, +# endif + const unsigned char *name) +{ + size_t name_len = strlen ((const char *) name); + if (BE (name_len != 1, 0)) + return REG_ECOLLATE; + else + { + bitset_set (sbcset, name[0]); + return REG_NOERROR; + } +} +#endif /* not _LIBC */ + +/* This function parse bracket expression like "[abc]", "[a-c]", + "[[.a-a.]]" etc. */ + +static bin_tree_t * +parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, + reg_syntax_t syntax, reg_errcode_t *err) +{ +#ifdef _LIBC + const unsigned char *collseqmb; + const char *collseqwc; + uint32_t nrules; + int32_t table_size; + const int32_t *symb_table; + const unsigned char *extra; + + /* Local function for parse_bracket_exp used in _LIBC environement. + Seek the collating symbol entry correspondings to NAME. + Return the index of the symbol in the SYMB_TABLE. */ + + auto inline int32_t + __attribute ((always_inline)) + seek_collating_symbol_entry (name, name_len) + const unsigned char *name; + size_t name_len; + { + int32_t hash = elem_hash ((const char *) name, name_len); + int32_t elem = hash % table_size; + if (symb_table[2 * elem] != 0) + { + int32_t second = hash % (table_size - 2) + 1; + + do + { + /* First compare the hashing value. */ + if (symb_table[2 * elem] == hash + /* Compare the length of the name. */ + && name_len == extra[symb_table[2 * elem + 1]] + /* Compare the name. */ + && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], + name_len) == 0) + { + /* Yep, this is the entry. */ + break; + } + + /* Next entry. */ + elem += second; + } + while (symb_table[2 * elem] != 0); + } + return elem; + } + + /* Local function for parse_bracket_exp used in _LIBC environement. + Look up the collation sequence value of BR_ELEM. + Return the value if succeeded, UINT_MAX otherwise. */ + + auto inline unsigned int + __attribute ((always_inline)) + lookup_collation_sequence_value (br_elem) + bracket_elem_t *br_elem; + { + if (br_elem->type == SB_CHAR) + { + /* + if (MB_CUR_MAX == 1) + */ + if (nrules == 0) + return collseqmb[br_elem->opr.ch]; + else + { + wint_t wc = __btowc (br_elem->opr.ch); + return __collseq_table_lookup (collseqwc, wc); + } + } + else if (br_elem->type == MB_CHAR) + { + return __collseq_table_lookup (collseqwc, br_elem->opr.wch); + } + else if (br_elem->type == COLL_SYM) + { + size_t sym_name_len = strlen ((char *) br_elem->opr.name); + if (nrules != 0) + { + int32_t elem, idx; + elem = seek_collating_symbol_entry (br_elem->opr.name, + sym_name_len); + if (symb_table[2 * elem] != 0) + { + /* We found the entry. */ + idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + /* Skip the byte sequence of the collating element. */ + idx += 1 + extra[idx]; + /* Adjust for the alignment. */ + idx = (idx + 3) & ~3; + /* Skip the multibyte collation sequence value. */ + idx += sizeof (unsigned int); + /* Skip the wide char sequence of the collating element. */ + idx += sizeof (unsigned int) * + (1 + *(unsigned int *) (extra + idx)); + /* Return the collation sequence value. */ + return *(unsigned int *) (extra + idx); + } + else if (symb_table[2 * elem] == 0 && sym_name_len == 1) + { + /* No valid character. Match it as a single byte + character. */ + return collseqmb[br_elem->opr.name[0]]; + } + } + else if (sym_name_len == 1) + return collseqmb[br_elem->opr.name[0]]; + } + return UINT_MAX; + } + + /* Local function for parse_bracket_exp used in _LIBC environement. + Build the range expression which starts from START_ELEM, and ends + at END_ELEM. The result are written to MBCSET and SBCSET. + RANGE_ALLOC is the allocated size of mbcset->range_starts, and + mbcset->range_ends, is a pointer argument sinse we may + update it. */ + + auto inline reg_errcode_t + __attribute ((always_inline)) + build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) + re_charset_t *mbcset; + Idx *range_alloc; + bitset_t sbcset; + bracket_elem_t *start_elem, *end_elem; + { + unsigned int ch; + uint32_t start_collseq; + uint32_t end_collseq; + + /* Equivalence Classes and Character Classes can't be a range + start/end. */ + if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS + || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, + 0)) + return REG_ERANGE; + + start_collseq = lookup_collation_sequence_value (start_elem); + end_collseq = lookup_collation_sequence_value (end_elem); + /* Check start/end collation sequence values. */ + if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) + return REG_ECOLLATE; + if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) + return REG_ERANGE; + + /* Got valid collation sequence values, add them as a new entry. + However, if we have no collation elements, and the character set + is single byte, the single byte character set that we + build below suffices. */ + if (nrules > 0 || dfa->mb_cur_max > 1) + { + /* Check the space of the arrays. */ + if (BE (*range_alloc == mbcset->nranges, 0)) + { + /* There is not enough space, need realloc. */ + uint32_t *new_array_start; + uint32_t *new_array_end; + Idx new_nranges; + + /* +1 in case of mbcset->nranges is 0. */ + new_nranges = 2 * mbcset->nranges + 1; + new_array_start = re_realloc (mbcset->range_starts, uint32_t, + new_nranges); + new_array_end = re_realloc (mbcset->range_ends, uint32_t, + new_nranges); + + if (BE (new_array_start == NULL || new_array_end == NULL, 0)) + return REG_ESPACE; + + mbcset->range_starts = new_array_start; + mbcset->range_ends = new_array_end; + *range_alloc = new_nranges; + } + + mbcset->range_starts[mbcset->nranges] = start_collseq; + mbcset->range_ends[mbcset->nranges++] = end_collseq; + } + + /* Build the table for single byte characters. */ + for (ch = 0; ch < SBC_MAX; ch++) + { + uint32_t ch_collseq; + /* + if (MB_CUR_MAX == 1) + */ + if (nrules == 0) + ch_collseq = collseqmb[ch]; + else + ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); + if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) + bitset_set (sbcset, ch); + } + return REG_NOERROR; + } + + /* Local function for parse_bracket_exp used in _LIBC environement. + Build the collating element which is represented by NAME. + The result are written to MBCSET and SBCSET. + COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a + pointer argument sinse we may update it. */ + + auto inline reg_errcode_t + __attribute ((always_inline)) + build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) + re_charset_t *mbcset; + Idx *coll_sym_alloc; + bitset_t sbcset; + const unsigned char *name; + { + int32_t elem, idx; + size_t name_len = strlen ((const char *) name); + if (nrules != 0) + { + elem = seek_collating_symbol_entry (name, name_len); + if (symb_table[2 * elem] != 0) + { + /* We found the entry. */ + idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + } + else if (symb_table[2 * elem] == 0 && name_len == 1) + { + /* No valid character, treat it as a normal + character. */ + bitset_set (sbcset, name[0]); + return REG_NOERROR; + } + else + return REG_ECOLLATE; + + /* Got valid collation sequence, add it as a new entry. */ + /* Check the space of the arrays. */ + if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) + { + /* Not enough, realloc it. */ + /* +1 in case of mbcset->ncoll_syms is 0. */ + Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; + /* Use realloc since mbcset->coll_syms is NULL + if *alloc == 0. */ + int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, + new_coll_sym_alloc); + if (BE (new_coll_syms == NULL, 0)) + return REG_ESPACE; + mbcset->coll_syms = new_coll_syms; + *coll_sym_alloc = new_coll_sym_alloc; + } + mbcset->coll_syms[mbcset->ncoll_syms++] = idx; + return REG_NOERROR; + } + else + { + if (BE (name_len != 1, 0)) + return REG_ECOLLATE; + else + { + bitset_set (sbcset, name[0]); + return REG_NOERROR; + } + } + } +#endif + + re_token_t br_token; + re_bitset_ptr_t sbcset; +#ifdef RE_ENABLE_I18N + re_charset_t *mbcset; + Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; + Idx equiv_class_alloc = 0, char_class_alloc = 0; +#endif /* not RE_ENABLE_I18N */ + bool non_match = false; + bin_tree_t *work_tree; + int token_len; + bool first_round = true; +#ifdef _LIBC + collseqmb = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); + nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + if (nrules) + { + /* + if (MB_CUR_MAX > 1) + */ + collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); + 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); + } +#endif + sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); +#ifdef RE_ENABLE_I18N + mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); +#endif /* RE_ENABLE_I18N */ +#ifdef RE_ENABLE_I18N + if (BE (sbcset == NULL || mbcset == NULL, 0)) +#else + if (BE (sbcset == NULL, 0)) +#endif /* RE_ENABLE_I18N */ + { + *err = REG_ESPACE; + return NULL; + } + + token_len = peek_token_bracket (token, regexp, syntax); + if (BE (token->type == END_OF_RE, 0)) + { + *err = REG_BADPAT; + goto parse_bracket_exp_free_return; + } + if (token->type == OP_NON_MATCH_LIST) + { +#ifdef RE_ENABLE_I18N + mbcset->non_match = 1; +#endif /* not RE_ENABLE_I18N */ + non_match = true; + if (syntax & RE_HAT_LISTS_NOT_NEWLINE) + bitset_set (sbcset, '\n'); + re_string_skip_bytes (regexp, token_len); /* Skip a token. */ + token_len = peek_token_bracket (token, regexp, syntax); + if (BE (token->type == END_OF_RE, 0)) + { + *err = REG_BADPAT; + goto parse_bracket_exp_free_return; + } + } + + /* We treat the first ']' as a normal character. */ + if (token->type == OP_CLOSE_BRACKET) + token->type = CHARACTER; + + while (1) + { + bracket_elem_t start_elem, end_elem; + unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; + unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; + reg_errcode_t ret; + int token_len2 = 0; + bool is_range_exp = false; + re_token_t token2; + + start_elem.opr.name = start_name_buf; + ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, + syntax, first_round); + if (BE (ret != REG_NOERROR, 0)) + { + *err = ret; + goto parse_bracket_exp_free_return; + } + first_round = false; + + /* Get information about the next token. We need it in any case. */ + token_len = peek_token_bracket (token, regexp, syntax); + + /* Do not check for ranges if we know they are not allowed. */ + if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) + { + if (BE (token->type == END_OF_RE, 0)) + { + *err = REG_EBRACK; + goto parse_bracket_exp_free_return; + } + if (token->type == OP_CHARSET_RANGE) + { + re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ + token_len2 = peek_token_bracket (&token2, regexp, syntax); + if (BE (token2.type == END_OF_RE, 0)) + { + *err = REG_EBRACK; + goto parse_bracket_exp_free_return; + } + if (token2.type == OP_CLOSE_BRACKET) + { + /* We treat the last '-' as a normal character. */ + re_string_skip_bytes (regexp, -token_len); + token->type = CHARACTER; + } + else + is_range_exp = true; + } + } + + if (is_range_exp == true) + { + end_elem.opr.name = end_name_buf; + ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, + dfa, syntax, true); + if (BE (ret != REG_NOERROR, 0)) + { + *err = ret; + goto parse_bracket_exp_free_return; + } + + token_len = peek_token_bracket (token, regexp, syntax); + +#ifdef _LIBC + *err = build_range_exp (sbcset, mbcset, &range_alloc, + &start_elem, &end_elem); +#else +# ifdef RE_ENABLE_I18N + *err = build_range_exp (sbcset, + dfa->mb_cur_max > 1 ? mbcset : NULL, + &range_alloc, &start_elem, &end_elem); +# else + *err = build_range_exp (sbcset, &start_elem, &end_elem); +# endif +#endif /* RE_ENABLE_I18N */ + if (BE (*err != REG_NOERROR, 0)) + goto parse_bracket_exp_free_return; + } + else + { + switch (start_elem.type) + { + case SB_CHAR: + bitset_set (sbcset, start_elem.opr.ch); + break; +#ifdef RE_ENABLE_I18N + case MB_CHAR: + /* Check whether the array has enough space. */ + if (BE (mbchar_alloc == mbcset->nmbchars, 0)) + { + wchar_t *new_mbchars; + /* Not enough, realloc it. */ + /* +1 in case of mbcset->nmbchars is 0. */ + mbchar_alloc = 2 * mbcset->nmbchars + 1; + /* Use realloc since array is NULL if *alloc == 0. */ + new_mbchars = re_realloc (mbcset->mbchars, wchar_t, + mbchar_alloc); + if (BE (new_mbchars == NULL, 0)) + goto parse_bracket_exp_espace; + mbcset->mbchars = new_mbchars; + } + mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; + break; +#endif /* RE_ENABLE_I18N */ + case EQUIV_CLASS: + *err = build_equiv_class (sbcset, +#ifdef RE_ENABLE_I18N + mbcset, &equiv_class_alloc, +#endif /* RE_ENABLE_I18N */ + start_elem.opr.name); + if (BE (*err != REG_NOERROR, 0)) + goto parse_bracket_exp_free_return; + break; + case COLL_SYM: + *err = build_collating_symbol (sbcset, +#ifdef RE_ENABLE_I18N + mbcset, &coll_sym_alloc, +#endif /* RE_ENABLE_I18N */ + start_elem.opr.name); + if (BE (*err != REG_NOERROR, 0)) + goto parse_bracket_exp_free_return; + break; + case CHAR_CLASS: + *err = build_charclass (regexp->trans, sbcset, +#ifdef RE_ENABLE_I18N + mbcset, &char_class_alloc, +#endif /* RE_ENABLE_I18N */ + start_elem.opr.name, syntax); + if (BE (*err != REG_NOERROR, 0)) + goto parse_bracket_exp_free_return; + break; + default: + assert (0); + break; + } + } + if (BE (token->type == END_OF_RE, 0)) + { + *err = REG_EBRACK; + goto parse_bracket_exp_free_return; + } + if (token->type == OP_CLOSE_BRACKET) + break; + } + + re_string_skip_bytes (regexp, token_len); /* Skip a token. */ + + /* If it is non-matching list. */ + if (non_match) + bitset_not (sbcset); + +#ifdef RE_ENABLE_I18N + /* Ensure only single byte characters are set. */ + if (dfa->mb_cur_max > 1) + bitset_mask (sbcset, dfa->sb_char); + + if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes + || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes + || mbcset->non_match))) + { + bin_tree_t *mbc_tree; + int sbc_idx; + /* Build a tree for complex bracket. */ + dfa->has_mb_node = 1; + br_token.type = COMPLEX_BRACKET; + br_token.opr.mbcset = mbcset; + mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (mbc_tree == NULL, 0)) + goto parse_bracket_exp_espace; + for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) + if (sbcset[sbc_idx]) + break; + /* If there are no bits set in sbcset, there is no point + of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ + if (sbc_idx < BITSET_WORDS) + { + /* Build a tree for simple bracket. */ + br_token.type = SIMPLE_BRACKET; + br_token.opr.sbcset = sbcset; + work_tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (work_tree == NULL, 0)) + goto parse_bracket_exp_espace; + + /* Then join them by ALT node. */ + work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); + if (BE (work_tree == NULL, 0)) + goto parse_bracket_exp_espace; + } + else + { + re_free (sbcset); + work_tree = mbc_tree; + } + } + else +#endif /* not RE_ENABLE_I18N */ + { +#ifdef RE_ENABLE_I18N + free_charset (mbcset); +#endif + /* Build a tree for simple bracket. */ + br_token.type = SIMPLE_BRACKET; + br_token.opr.sbcset = sbcset; + work_tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (work_tree == NULL, 0)) + goto parse_bracket_exp_espace; + } + return work_tree; + + parse_bracket_exp_espace: + *err = REG_ESPACE; + parse_bracket_exp_free_return: + re_free (sbcset); +#ifdef RE_ENABLE_I18N + free_charset (mbcset); +#endif /* RE_ENABLE_I18N */ + return NULL; +} + +/* Parse an element in the bracket expression. */ + +static reg_errcode_t +parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, + re_token_t *token, int token_len, re_dfa_t *dfa, + reg_syntax_t syntax, bool accept_hyphen) +{ +#ifdef RE_ENABLE_I18N + int cur_char_size; + cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); + if (cur_char_size > 1) + { + elem->type = MB_CHAR; + elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); + re_string_skip_bytes (regexp, cur_char_size); + return REG_NOERROR; + } +#endif /* RE_ENABLE_I18N */ + re_string_skip_bytes (regexp, token_len); /* Skip a token. */ + if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS + || token->type == OP_OPEN_EQUIV_CLASS) + return parse_bracket_symbol (elem, regexp, token); + if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) + { + /* A '-' must only appear as anything but a range indicator before + the closing bracket. Everything else is an error. */ + re_token_t token2; + (void) peek_token_bracket (&token2, regexp, syntax); + if (token2.type != OP_CLOSE_BRACKET) + /* The actual error value is not standardized since this whole + case is undefined. But ERANGE makes good sense. */ + return REG_ERANGE; + } + elem->type = SB_CHAR; + elem->opr.ch = token->opr.c; + return REG_NOERROR; +} + +/* Parse a bracket symbol in the bracket expression. Bracket symbols are + such as [::], [..], and + [==]. */ + +static reg_errcode_t +parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, + re_token_t *token) +{ + unsigned char ch, delim = token->opr.c; + int i = 0; + if (re_string_eoi(regexp)) + return REG_EBRACK; + for (;; ++i) + { + if (i >= BRACKET_NAME_BUF_SIZE) + return REG_EBRACK; + if (token->type == OP_OPEN_CHAR_CLASS) + ch = re_string_fetch_byte_case (regexp); + else + ch = re_string_fetch_byte (regexp); + if (re_string_eoi(regexp)) + return REG_EBRACK; + if (ch == delim && re_string_peek_byte (regexp, 0) == ']') + break; + elem->opr.name[i] = ch; + } + re_string_skip_bytes (regexp, 1); + elem->opr.name[i] = '\0'; + switch (token->type) + { + case OP_OPEN_COLL_ELEM: + elem->type = COLL_SYM; + break; + case OP_OPEN_EQUIV_CLASS: + elem->type = EQUIV_CLASS; + break; + case OP_OPEN_CHAR_CLASS: + elem->type = CHAR_CLASS; + break; + default: + break; + } + return REG_NOERROR; +} + + /* Helper function for parse_bracket_exp. + Build the equivalence class which is represented by NAME. + The result are written to MBCSET and SBCSET. + EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, + is a pointer argument sinse we may update it. */ + +static reg_errcode_t +#ifdef RE_ENABLE_I18N +build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, + Idx *equiv_class_alloc, const unsigned char *name) +#else /* not RE_ENABLE_I18N */ +build_equiv_class (bitset_t sbcset, const unsigned char *name) +#endif /* not RE_ENABLE_I18N */ +{ +#ifdef _LIBC + uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + if (nrules != 0) + { + const int32_t *table, *indirect; + const unsigned char *weights, *extra, *cp; + unsigned char char_buf[2]; + int32_t idx1, idx2; + unsigned int ch; + size_t len; + /* This #include defines a local function! */ +# include + /* Calculate the index for equivalence class. */ + cp = name; + 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); + idx1 = findidx (&cp); + if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0)) + /* This isn't a valid character. */ + return REG_ECOLLATE; + + /* Build single byte matcing table for this equivalence class. */ + char_buf[1] = (unsigned char) '\0'; + len = weights[idx1]; + for (ch = 0; ch < SBC_MAX; ++ch) + { + char_buf[0] = ch; + cp = char_buf; + idx2 = findidx (&cp); +/* + idx2 = table[ch]; +*/ + if (idx2 == 0) + /* This isn't a valid character. */ + continue; + if (len == weights[idx2]) + { + int cnt = 0; + while (cnt <= len && + weights[idx1 + 1 + cnt] == weights[idx2 + 1 + cnt]) + ++cnt; + + if (cnt > len) + bitset_set (sbcset, ch); + } + } + /* Check whether the array has enough space. */ + if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) + { + /* Not enough, realloc it. */ + /* +1 in case of mbcset->nequiv_classes is 0. */ + Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; + /* Use realloc since the array is NULL if *alloc == 0. */ + int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, + int32_t, + new_equiv_class_alloc); + if (BE (new_equiv_classes == NULL, 0)) + return REG_ESPACE; + mbcset->equiv_classes = new_equiv_classes; + *equiv_class_alloc = new_equiv_class_alloc; + } + mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; + } + else +#endif /* _LIBC */ + { + if (BE (strlen ((const char *) name) != 1, 0)) + return REG_ECOLLATE; + bitset_set (sbcset, *name); + } + return REG_NOERROR; +} + + /* Helper function for parse_bracket_exp. + Build the character class which is represented by NAME. + The result are written to MBCSET and SBCSET. + CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, + is a pointer argument sinse we may update it. */ + +static reg_errcode_t +#ifdef RE_ENABLE_I18N +build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, + re_charset_t *mbcset, Idx *char_class_alloc, + const unsigned char *class_name, reg_syntax_t syntax) +#else /* not RE_ENABLE_I18N */ +build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, + const unsigned char *class_name, reg_syntax_t syntax) +#endif /* not RE_ENABLE_I18N */ +{ + int i; + const char *name = (const char *) class_name; + + /* In case of REG_ICASE "upper" and "lower" match the both of + upper and lower cases. */ + if ((syntax & RE_ICASE) + && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) + name = "alpha"; + +#ifdef RE_ENABLE_I18N + /* Check the space of the arrays. */ + if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) + { + /* Not enough, realloc it. */ + /* +1 in case of mbcset->nchar_classes is 0. */ + Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; + /* Use realloc since array is NULL if *alloc == 0. */ + wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, + new_char_class_alloc); + if (BE (new_char_classes == NULL, 0)) + return REG_ESPACE; + mbcset->char_classes = new_char_classes; + *char_class_alloc = new_char_class_alloc; + } + mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); +#endif /* RE_ENABLE_I18N */ + +#define BUILD_CHARCLASS_LOOP(ctype_func) \ + do { \ + if (BE (trans != NULL, 0)) \ + { \ + for (i = 0; i < SBC_MAX; ++i) \ + if (ctype_func (i)) \ + bitset_set (sbcset, trans[i]); \ + } \ + else \ + { \ + for (i = 0; i < SBC_MAX; ++i) \ + if (ctype_func (i)) \ + bitset_set (sbcset, i); \ + } \ + } while (0) + + if (strcmp (name, "alnum") == 0) + BUILD_CHARCLASS_LOOP (isalnum); + else if (strcmp (name, "cntrl") == 0) + BUILD_CHARCLASS_LOOP (iscntrl); + else if (strcmp (name, "lower") == 0) + BUILD_CHARCLASS_LOOP (islower); + else if (strcmp (name, "space") == 0) + BUILD_CHARCLASS_LOOP (isspace); + else if (strcmp (name, "alpha") == 0) + BUILD_CHARCLASS_LOOP (isalpha); + else if (strcmp (name, "digit") == 0) + BUILD_CHARCLASS_LOOP (isdigit); + else if (strcmp (name, "print") == 0) + BUILD_CHARCLASS_LOOP (isprint); + else if (strcmp (name, "upper") == 0) + BUILD_CHARCLASS_LOOP (isupper); + else if (strcmp (name, "blank") == 0) + BUILD_CHARCLASS_LOOP (isblank); + else if (strcmp (name, "graph") == 0) + BUILD_CHARCLASS_LOOP (isgraph); + else if (strcmp (name, "punct") == 0) + BUILD_CHARCLASS_LOOP (ispunct); + else if (strcmp (name, "xdigit") == 0) + BUILD_CHARCLASS_LOOP (isxdigit); + else + return REG_ECTYPE; + + return REG_NOERROR; +} + +static bin_tree_t * +build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, + const unsigned char *class_name, + const unsigned char *extra, bool non_match, + reg_errcode_t *err) +{ + re_bitset_ptr_t sbcset; +#ifdef RE_ENABLE_I18N + re_charset_t *mbcset; + Idx alloc = 0; +#endif /* not RE_ENABLE_I18N */ + reg_errcode_t ret; + re_token_t br_token; + bin_tree_t *tree; + + sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); +#ifdef RE_ENABLE_I18N + mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); +#endif /* RE_ENABLE_I18N */ + +#ifdef RE_ENABLE_I18N + if (BE (sbcset == NULL || mbcset == NULL, 0)) +#else /* not RE_ENABLE_I18N */ + if (BE (sbcset == NULL, 0)) +#endif /* not RE_ENABLE_I18N */ + { + *err = REG_ESPACE; + return NULL; + } + + if (non_match) + { +#ifdef RE_ENABLE_I18N + mbcset->non_match = 1; +#endif /* not RE_ENABLE_I18N */ + } + + /* We don't care the syntax in this case. */ + ret = build_charclass (trans, sbcset, +#ifdef RE_ENABLE_I18N + mbcset, &alloc, +#endif /* RE_ENABLE_I18N */ + class_name, 0); + + if (BE (ret != REG_NOERROR, 0)) + { + re_free (sbcset); +#ifdef RE_ENABLE_I18N + free_charset (mbcset); +#endif /* RE_ENABLE_I18N */ + *err = ret; + return NULL; + } + /* \w match '_' also. */ + for (; *extra; extra++) + bitset_set (sbcset, *extra); + + /* If it is non-matching list. */ + if (non_match) + bitset_not (sbcset); + +#ifdef RE_ENABLE_I18N + /* Ensure only single byte characters are set. */ + if (dfa->mb_cur_max > 1) + bitset_mask (sbcset, dfa->sb_char); +#endif + + /* Build a tree for simple bracket. */ + br_token.type = SIMPLE_BRACKET; + br_token.opr.sbcset = sbcset; + tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (tree == NULL, 0)) + goto build_word_op_espace; + +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + { + bin_tree_t *mbc_tree; + /* Build a tree for complex bracket. */ + br_token.type = COMPLEX_BRACKET; + br_token.opr.mbcset = mbcset; + dfa->has_mb_node = 1; + mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (mbc_tree == NULL, 0)) + goto build_word_op_espace; + /* Then join them by ALT node. */ + tree = create_tree (dfa, tree, mbc_tree, OP_ALT); + if (BE (mbc_tree != NULL, 1)) + return tree; + } + else + { + free_charset (mbcset); + return tree; + } +#else /* not RE_ENABLE_I18N */ + return tree; +#endif /* not RE_ENABLE_I18N */ + + build_word_op_espace: + re_free (sbcset); +#ifdef RE_ENABLE_I18N + free_charset (mbcset); +#endif /* RE_ENABLE_I18N */ + *err = REG_ESPACE; + return NULL; +} + +/* This is intended for the expressions like "a{1,3}". + Fetch a number from `input', and return the number. + Return REG_MISSING if the number field is empty like "{,1}". + Return REG_ERROR if an error occurred. */ + +static Idx +fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) +{ + Idx num = REG_MISSING; + unsigned char c; + while (1) + { + fetch_token (token, input, syntax); + c = token->opr.c; + if (BE (token->type == END_OF_RE, 0)) + return REG_ERROR; + if (token->type == OP_CLOSE_DUP_NUM || c == ',') + break; + num = ((token->type != CHARACTER || c < '0' || '9' < c + || num == REG_ERROR) + ? REG_ERROR + : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0')); + num = (num > RE_DUP_MAX) ? REG_ERROR : num; + } + return num; +} + +#ifdef RE_ENABLE_I18N +static void +free_charset (re_charset_t *cset) +{ + re_free (cset->mbchars); +# ifdef _LIBC + re_free (cset->coll_syms); + re_free (cset->equiv_classes); + re_free (cset->range_starts); + re_free (cset->range_ends); +# endif + re_free (cset->char_classes); + re_free (cset); +} +#endif /* RE_ENABLE_I18N */ + +/* Functions for binary tree operation. */ + +/* Create a tree node. */ + +static bin_tree_t * +create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, + re_token_type_t type) +{ + re_token_t t; + t.type = type; + return create_token_tree (dfa, left, right, &t); +} + +static bin_tree_t * +create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, + const re_token_t *token) +{ + bin_tree_t *tree; + if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) + { + bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); + + if (storage == NULL) + return NULL; + storage->next = dfa->str_tree_storage; + dfa->str_tree_storage = storage; + dfa->str_tree_storage_idx = 0; + } + tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; + + tree->parent = NULL; + tree->left = left; + tree->right = right; + tree->token = *token; + tree->token.duplicated = 0; + tree->token.opt_subexp = 0; + tree->first = NULL; + tree->next = NULL; + tree->node_idx = REG_MISSING; + + if (left != NULL) + left->parent = tree; + if (right != NULL) + right->parent = tree; + return tree; +} + +/* Mark the tree SRC as an optional subexpression. + To be called from preorder or postorder. */ + +static reg_errcode_t +mark_opt_subexp (void *extra, bin_tree_t *node) +{ + Idx idx = (Idx) (long) extra; + if (node->token.type == SUBEXP && node->token.opr.idx == idx) + node->token.opt_subexp = 1; + + return REG_NOERROR; +} + +/* Free the allocated memory inside NODE. */ + +static void +free_token (re_token_t *node) +{ +#ifdef RE_ENABLE_I18N + if (node->type == COMPLEX_BRACKET && node->duplicated == 0) + free_charset (node->opr.mbcset); + else +#endif /* RE_ENABLE_I18N */ + if (node->type == SIMPLE_BRACKET && node->duplicated == 0) + re_free (node->opr.sbcset); +} + +/* Worker function for tree walking. Free the allocated memory inside NODE + and its children. */ + +static reg_errcode_t +free_tree (void *extra, bin_tree_t *node) +{ + free_token (&node->token); + return REG_NOERROR; +} + + +/* Duplicate the node SRC, and return new node. This is a preorder + visit similar to the one implemented by the generic visitor, but + we need more infrastructure to maintain two parallel trees --- so, + it's easier to duplicate. */ + +static bin_tree_t * +duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) +{ + const bin_tree_t *node; + bin_tree_t *dup_root; + bin_tree_t **p_new = &dup_root, *dup_node = root->parent; + + for (node = root; ; ) + { + /* Create a new tree and link it back to the current parent. */ + *p_new = create_token_tree (dfa, NULL, NULL, &node->token); + if (*p_new == NULL) + return NULL; + (*p_new)->parent = dup_node; + (*p_new)->token.duplicated = 1; + dup_node = *p_new; + + /* Go to the left node, or up and to the right. */ + if (node->left) + { + node = node->left; + p_new = &dup_node->left; + } + else + { + const bin_tree_t *prev = NULL; + while (node->right == prev || node->right == NULL) + { + prev = node; + node = node->parent; + dup_node = dup_node->parent; + if (!node) + return dup_root; + } + node = node->right; + p_new = &dup_node->right; + } + } +} diff --git a/gnulib/lib/regex.c b/gnulib/lib/regex.c new file mode 100644 index 0000000..d4eb726 --- /dev/null +++ b/gnulib/lib/regex.c @@ -0,0 +1,71 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + 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. */ + +#include + +/* Make sure noone compiles this code with a C++ compiler. */ +#if defined __cplusplus && defined _LIBC +# error "This is C code, use a C compiler" +#endif + +#ifdef _LIBC +/* We have to keep the namespace clean. */ +# define regfree(preg) __regfree (preg) +# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) +# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) +# define regerror(errcode, preg, errbuf, errbuf_size) \ + __regerror(errcode, preg, errbuf, errbuf_size) +# define re_set_registers(bu, re, nu, st, en) \ + __re_set_registers (bu, re, nu, st, en) +# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ + __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) +# define re_match(bufp, string, size, pos, regs) \ + __re_match (bufp, string, size, pos, regs) +# define re_search(bufp, string, size, startpos, range, regs) \ + __re_search (bufp, string, size, startpos, range, regs) +# define re_compile_pattern(pattern, length, bufp) \ + __re_compile_pattern (pattern, length, bufp) +# define re_set_syntax(syntax) __re_set_syntax (syntax) +# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ + __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) +# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) + +# include "../locale/localeinfo.h" +#endif + +/* On some systems, limits.h sets RE_DUP_MAX to a lower value than + GNU regex allows. Include it before , which correctly + #undefs RE_DUP_MAX and sets it to the right value. */ +#include + +#include +#include "regex_internal.h" + +#include "regex_internal.c" +#include "regcomp.c" +#include "regexec.c" + +/* Binary backward compatibility. */ +#if _LIBC +# include +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) +link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") +int re_max_failures = 2000; +# endif +#endif diff --git a/gnulib/lib/regex.h b/gnulib/lib/regex.h new file mode 100644 index 0000000..7a79ca3 --- /dev/null +++ b/gnulib/lib/regex.h @@ -0,0 +1,675 @@ +/* Definitions for data structures and routines for the regular + expression library. + Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,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 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. */ + +#ifndef _REGEX_H +#define _REGEX_H 1 + +#include + +/* Allow the use in C++ code. */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Define __USE_GNU_REGEX to declare GNU extensions that violate the + POSIX name space rules. */ +#undef __USE_GNU_REGEX +#if (defined _GNU_SOURCE \ + || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \ + && !defined _XOPEN_SOURCE)) +# define __USE_GNU_REGEX 1 +#endif + +#ifdef _REGEX_LARGE_OFFSETS + +/* Use types and values that are wide enough to represent signed and + unsigned byte offsets in memory. This currently works only when + the regex code is used outside of the GNU C library; it is not yet + supported within glibc itself, and glibc users should not define + _REGEX_LARGE_OFFSETS. */ + +/* The type of the offset of a byte within a string. + For historical reasons POSIX 1003.1-2004 requires that regoff_t be + at least as wide as off_t. However, many common POSIX platforms set + regoff_t to the more-sensible ssize_t and the Open Group has + signalled its intention to change the requirement to be that + regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN + 60 (2005-08-25). We don't know of any hosts where ssize_t or + ptrdiff_t is wider than ssize_t, so ssize_t is safe. */ +typedef ssize_t regoff_t; + +/* The type of nonnegative object indexes. Traditionally, GNU regex + uses 'int' for these. Code that uses __re_idx_t should work + regardless of whether the type is signed. */ +typedef size_t __re_idx_t; + +/* The type of object sizes. */ +typedef size_t __re_size_t; + +/* The type of object sizes, in places where the traditional code + uses unsigned long int. */ +typedef size_t __re_long_size_t; + +#else + +/* Use types that are binary-compatible with the traditional GNU regex + implementation, which mishandles strings longer than INT_MAX. */ + +typedef int regoff_t; +typedef int __re_idx_t; +typedef unsigned int __re_size_t; +typedef unsigned long int __re_long_size_t; + +#endif + +/* The following two types have to be signed and unsigned integer type + wide enough to hold a value of a pointer. For most ANSI compilers + ptrdiff_t and size_t should be likely OK. Still size of these two + types is 2 for Microsoft C. Ugh... */ +typedef long int s_reg_t; +typedef unsigned long int active_reg_t; + +/* The following bits are used to determine the regexp syntax we + recognize. The set/not-set meanings are chosen so that Emacs syntax + remains the value 0. The bits are given in alphabetical order, and + the definitions shifted by one from the previous bit; thus, when we + add or remove a bit, only one other definition need change. */ +typedef unsigned long int reg_syntax_t; + +#ifdef __USE_GNU_REGEX + +/* If this bit is not set, then \ inside a bracket expression is literal. + If set, then such a \ quotes the following character. */ +# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) + +/* If this bit is not set, then + and ? are operators, and \+ and \? are + literals. + If set, then \+ and \? are operators and + and ? are literals. */ +# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) + +/* If this bit is set, then character classes are supported. They are: + [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], + [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. + If not set, then character classes are not supported. */ +# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) + +/* If this bit is set, then ^ and $ are always anchors (outside bracket + expressions, of course). + If this bit is not set, then it depends: + ^ is an anchor if it is at the beginning of a regular + expression or after an open-group or an alternation operator; + $ is an anchor if it is at the end of a regular expression, or + before a close-group or an alternation operator. + + This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because + POSIX draft 11.2 says that * etc. in leading positions is undefined. + We already implemented a previous draft which made those constructs + invalid, though, so we haven't changed the code back. */ +# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) + +/* If this bit is set, then special characters are always special + regardless of where they are in the pattern. + If this bit is not set, then special characters are special only in + some contexts; otherwise they are ordinary. Specifically, + * + ? and intervals are only special when not after the beginning, + open-group, or alternation operator. */ +# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) + +/* If this bit is set, then *, +, ?, and { cannot be first in an re or + immediately after an alternation or begin-group operator. */ +# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) + +/* If this bit is set, then . matches newline. + If not set, then it doesn't. */ +# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) + +/* If this bit is set, then . doesn't match NUL. + If not set, then it does. */ +# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) + +/* If this bit is set, nonmatching lists [^...] do not match newline. + If not set, they do. */ +# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) + +/* If this bit is set, either \{...\} or {...} defines an + interval, depending on RE_NO_BK_BRACES. + If not set, \{, \}, {, and } are literals. */ +# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) + +/* If this bit is set, +, ? and | aren't recognized as operators. + If not set, they are. */ +# define RE_LIMITED_OPS (RE_INTERVALS << 1) + +/* If this bit is set, newline is an alternation operator. + If not set, newline is literal. */ +# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) + +/* If this bit is set, then `{...}' defines an interval, and \{ and \} + are literals. + If not set, then `\{...\}' defines an interval. */ +# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) + +/* If this bit is set, (...) defines a group, and \( and \) are literals. + If not set, \(...\) defines a group, and ( and ) are literals. */ +# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) + +/* If this bit is set, then \ matches . + If not set, then \ is a back-reference. */ +# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) + +/* If this bit is set, then | is an alternation operator, and \| is literal. + If not set, then \| is an alternation operator, and | is literal. */ +# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) + +/* If this bit is set, then an ending range point collating higher + than the starting range point, as in [z-a], is invalid. + If not set, then when ending range point collates higher than the + starting range point, the range is ignored. */ +# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) + +/* If this bit is set, then an unmatched ) is ordinary. + If not set, then an unmatched ) is invalid. */ +# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) + +/* If this bit is set, succeed as soon as we match the whole pattern, + without further backtracking. */ +# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) + +/* If this bit is set, do not process the GNU regex operators. + If not set, then the GNU regex operators are recognized. */ +# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) + +/* If this bit is set, turn on internal regex debugging. + If not set, and debugging was on, turn it off. + This only works if regex.c is compiled -DDEBUG. + We define this bit always, so that all that's needed to turn on + debugging is to recompile regex.c; the calling code can always have + this bit set, and it won't affect anything in the normal case. */ +# define RE_DEBUG (RE_NO_GNU_OPS << 1) + +/* If this bit is set, a syntactically invalid interval is treated as + a string of ordinary characters. For example, the ERE 'a{1' is + treated as 'a\{1'. */ +# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) + +/* If this bit is set, then ignore case when matching. + If not set, then case is significant. */ +# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) + +/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only + for ^, because it is difficult to scan the regex backwards to find + whether ^ should be special. */ +# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) + +/* If this bit is set, then \{ cannot be first in an bre or + immediately after an alternation or begin-group operator. */ +# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) + +/* If this bit is set, then no_sub will be set to 1 during + re_compile_pattern. */ +# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) + +#endif /* defined __USE_GNU_REGEX */ + +/* This global variable defines the particular regexp syntax to use (for + some interfaces). When a regexp is compiled, the syntax used is + stored in the pattern buffer, so changing this does not affect + already-compiled regexps. */ +extern reg_syntax_t re_syntax_options; + +#ifdef __USE_GNU_REGEX +/* Define combinations of the above bits for the standard possibilities. + (The [[[ comments delimit what gets put into the Texinfo file, so + don't delete them!) */ +/* [[[begin syntaxes]]] */ +# define RE_SYNTAX_EMACS 0 + +# define RE_SYNTAX_AWK \ + (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ + | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ + | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) + +# define RE_SYNTAX_GNU_AWK \ + ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ + & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ + | RE_CONTEXT_INVALID_OPS )) + +# define RE_SYNTAX_POSIX_AWK \ + (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ + | RE_INTERVALS | RE_NO_GNU_OPS) + +# define RE_SYNTAX_GREP \ + (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ + | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ + | RE_NEWLINE_ALT) + +# define RE_SYNTAX_EGREP \ + (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ + | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ + | RE_NO_BK_VBAR) + +# define RE_SYNTAX_POSIX_EGREP \ + (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ + | RE_INVALID_INTERVAL_ORD) + +/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ +# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC + +# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC + +/* Syntax bits common to both basic and extended POSIX regex syntax. */ +# define _RE_SYNTAX_POSIX_COMMON \ + (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ + | RE_INTERVALS | RE_NO_EMPTY_RANGES) + +# define RE_SYNTAX_POSIX_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) + +/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes + RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this + isn't minimal, since other operators, such as \`, aren't disabled. */ +# define RE_SYNTAX_POSIX_MINIMAL_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) + +# define RE_SYNTAX_POSIX_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) + +/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is + removed and RE_NO_BK_REFS is added. */ +# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) +/* [[[end syntaxes]]] */ + +#endif /* defined __USE_GNU_REGEX */ + +#ifdef __USE_GNU_REGEX + +/* Maximum number of duplicates an interval can allow. POSIX-conforming + systems might define this in , but we want our + value, so remove any previous define. */ +# ifdef RE_DUP_MAX +# undef RE_DUP_MAX +# endif + +/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored + the counter as a 2-byte signed integer. This is no longer true, so + RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to + ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined. + However, there would be a huge performance problem if someone + actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains + its historical value. */ +# define RE_DUP_MAX (0x7fff) + +#endif /* defined __USE_GNU_REGEX */ + + +/* POSIX `cflags' bits (i.e., information for `regcomp'). */ + +/* If this bit is set, then use extended regular expression syntax. + If not set, then use basic regular expression syntax. */ +#define REG_EXTENDED 1 + +/* If this bit is set, then ignore case when matching. + If not set, then case is significant. */ +#define REG_ICASE (1 << 1) + +/* If this bit is set, then anchors do not match at newline + characters in the string. + If not set, then anchors do match at newlines. */ +#define REG_NEWLINE (1 << 2) + +/* If this bit is set, then report only success or fail in regexec. + If not set, then returns differ between not matching and errors. */ +#define REG_NOSUB (1 << 3) + + +/* POSIX `eflags' bits (i.e., information for regexec). */ + +/* If this bit is set, then the beginning-of-line operator doesn't match + the beginning of the string (presumably because it's not the + beginning of a line). + If not set, then the beginning-of-line operator does match the + beginning of the string. */ +#define REG_NOTBOL 1 + +/* Like REG_NOTBOL, except for the end-of-line. */ +#define REG_NOTEOL (1 << 1) + +/* Use PMATCH[0] to delimit the start and end of the search in the + buffer. */ +#define REG_STARTEND (1 << 2) + + +/* If any error codes are removed, changed, or added, update the + `__re_error_msgid' table in regcomp.c. */ + +typedef enum +{ + _REG_ENOSYS = -1, /* This will never happen for this implementation. */ + _REG_NOERROR = 0, /* Success. */ + _REG_NOMATCH, /* Didn't find a match (for regexec). */ + + /* POSIX regcomp return error codes. (In the order listed in the + standard.) */ + _REG_BADPAT, /* Invalid pattern. */ + _REG_ECOLLATE, /* Invalid collating element. */ + _REG_ECTYPE, /* Invalid character class name. */ + _REG_EESCAPE, /* Trailing backslash. */ + _REG_ESUBREG, /* Invalid back reference. */ + _REG_EBRACK, /* Unmatched left bracket. */ + _REG_EPAREN, /* Parenthesis imbalance. */ + _REG_EBRACE, /* Unmatched \{. */ + _REG_BADBR, /* Invalid contents of \{\}. */ + _REG_ERANGE, /* Invalid range end. */ + _REG_ESPACE, /* Ran out of memory. */ + _REG_BADRPT, /* No preceding re for repetition op. */ + + /* Error codes we've added. */ + _REG_EEND, /* Premature end. */ + _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ + _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ +} reg_errcode_t; + +#ifdef _XOPEN_SOURCE +# define REG_ENOSYS _REG_ENOSYS +#endif +#define REG_NOERROR _REG_NOERROR +#define REG_NOMATCH _REG_NOMATCH +#define REG_BADPAT _REG_BADPAT +#define REG_ECOLLATE _REG_ECOLLATE +#define REG_ECTYPE _REG_ECTYPE +#define REG_EESCAPE _REG_EESCAPE +#define REG_ESUBREG _REG_ESUBREG +#define REG_EBRACK _REG_EBRACK +#define REG_EPAREN _REG_EPAREN +#define REG_EBRACE _REG_EBRACE +#define REG_BADBR _REG_BADBR +#define REG_ERANGE _REG_ERANGE +#define REG_ESPACE _REG_ESPACE +#define REG_BADRPT _REG_BADRPT +#define REG_EEND _REG_EEND +#define REG_ESIZE _REG_ESIZE +#define REG_ERPAREN _REG_ERPAREN + +/* struct re_pattern_buffer normally uses member names like `buffer' + that POSIX does not allow. In POSIX mode these members have names + with leading `re_' (e.g., `re_buffer'). */ +#ifdef __USE_GNU_REGEX +# define _REG_RE_NAME(id) id +# define _REG_RM_NAME(id) id +#else +# define _REG_RE_NAME(id) re_##id +# define _REG_RM_NAME(id) rm_##id +#endif + +/* The user can specify the type of the re_translate member by + defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned + char *. This pollutes the POSIX name space, so in POSIX mode just + use unsigned char *. */ +#ifdef __USE_GNU_REGEX +# ifndef RE_TRANSLATE_TYPE +# define RE_TRANSLATE_TYPE unsigned char * +# endif +# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE +#else +# define REG_TRANSLATE_TYPE unsigned char * +#endif + +/* This data structure represents a compiled pattern. Before calling + the pattern compiler, the fields `buffer', `allocated', `fastmap', + `translate', and `no_sub' can be set. After the pattern has been + compiled, the `re_nsub' field is available. All other fields are + private to the regex routines. */ + +struct re_pattern_buffer +{ + /* Space that holds the compiled pattern. It is declared as + `unsigned char *' because its elements are sometimes used as + array indexes. */ + unsigned char *_REG_RE_NAME (buffer); + + /* Number of bytes to which `buffer' points. */ + __re_long_size_t _REG_RE_NAME (allocated); + + /* Number of bytes actually used in `buffer'. */ + __re_long_size_t _REG_RE_NAME (used); + + /* Syntax setting with which the pattern was compiled. */ + reg_syntax_t _REG_RE_NAME (syntax); + + /* Pointer to a fastmap, if any, otherwise zero. re_search uses the + fastmap, if there is one, to skip over impossible starting points + for matches. */ + char *_REG_RE_NAME (fastmap); + + /* Either a translate table to apply to all characters before + comparing them, or zero for no translation. The translation is + applied to a pattern when it is compiled and to a string when it + is matched. */ + REG_TRANSLATE_TYPE _REG_RE_NAME (translate); + + /* Number of subexpressions found by the compiler. */ + size_t re_nsub; + + /* Zero if this pattern cannot match the empty string, one else. + Well, in truth it's used only in `re_search_2', to see whether or + not we should use the fastmap, so we don't set this absolutely + perfectly; see `re_compile_fastmap' (the `duplicate' case). */ + unsigned int _REG_RE_NAME (can_be_null) : 1; + + /* If REGS_UNALLOCATED, allocate space in the `regs' structure + for `max (RE_NREGS, re_nsub + 1)' groups. + If REGS_REALLOCATE, reallocate space if necessary. + If REGS_FIXED, use what's there. */ +#ifdef __USE_GNU_REGEX +# define REGS_UNALLOCATED 0 +# define REGS_REALLOCATE 1 +# define REGS_FIXED 2 +#endif + unsigned int _REG_RE_NAME (regs_allocated) : 2; + + /* Set to zero when `regex_compile' compiles a pattern; set to one + by `re_compile_fastmap' if it updates the fastmap. */ + unsigned int _REG_RE_NAME (fastmap_accurate) : 1; + + /* If set, `re_match_2' does not return information about + subexpressions. */ + unsigned int _REG_RE_NAME (no_sub) : 1; + + /* If set, a beginning-of-line anchor doesn't match at the beginning + of the string. */ + unsigned int _REG_RE_NAME (not_bol) : 1; + + /* Similarly for an end-of-line anchor. */ + unsigned int _REG_RE_NAME (not_eol) : 1; + + /* If true, an anchor at a newline matches. */ + unsigned int _REG_RE_NAME (newline_anchor) : 1; + +/* [[[end pattern_buffer]]] */ +}; + +typedef struct re_pattern_buffer regex_t; + +/* This is the structure we store register match data in. See + regex.texinfo for a full description of what registers match. */ +struct re_registers +{ + __re_size_t _REG_RM_NAME (num_regs); + regoff_t *_REG_RM_NAME (start); + regoff_t *_REG_RM_NAME (end); +}; + + +/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, + `re_match_2' returns information about at least this many registers + the first time a `regs' structure is passed. */ +#if !defined RE_NREGS && defined __USE_GNU_REGEX +# define RE_NREGS 30 +#endif + + +/* POSIX specification for registers. Aside from the different names than + `re_registers', POSIX uses an array of structures, instead of a + structure of arrays. */ +typedef struct +{ + regoff_t rm_so; /* Byte offset from string's start to substring's start. */ + regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ +} regmatch_t; + +/* Declarations for routines. */ + +/* Sets the current default syntax to SYNTAX, and return the old syntax. + You can also simply assign to the `re_syntax_options' variable. */ +extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); + +/* Compile the regular expression PATTERN, with length LENGTH + and syntax given by the global `re_syntax_options', into the buffer + BUFFER. Return NULL if successful, and an error string if not. */ +extern const char *re_compile_pattern (const char *__pattern, size_t __length, + struct re_pattern_buffer *__buffer); + + +/* Compile a fastmap for the compiled pattern in BUFFER; used to + accelerate searches. Return 0 if successful and -2 if was an + internal error. */ +extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); + + +/* Search in the string STRING (with length LENGTH) for the pattern + compiled into BUFFER. Start searching at position START, for RANGE + characters. Return the starting position of the match, -1 for no + match, or -2 for an internal error. Also return register + information in REGS (if REGS and BUFFER->no_sub are nonzero). */ +extern regoff_t re_search (struct re_pattern_buffer *__buffer, + const char *__string, __re_idx_t __length, + __re_idx_t __start, regoff_t __range, + struct re_registers *__regs); + + +/* Like `re_search', but search in the concatenation of STRING1 and + STRING2. Also, stop searching at index START + STOP. */ +extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, + const char *__string1, __re_idx_t __length1, + const char *__string2, __re_idx_t __length2, + __re_idx_t __start, regoff_t __range, + struct re_registers *__regs, + __re_idx_t __stop); + + +/* Like `re_search', but return how many characters in STRING the regexp + in BUFFER matched, starting at position START. */ +extern regoff_t re_match (struct re_pattern_buffer *__buffer, + const char *__string, __re_idx_t __length, + __re_idx_t __start, struct re_registers *__regs); + + +/* Relates to `re_match' as `re_search_2' relates to `re_search'. */ +extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, + const char *__string1, __re_idx_t __length1, + const char *__string2, __re_idx_t __length2, + __re_idx_t __start, struct re_registers *__regs, + __re_idx_t __stop); + + +/* Set REGS to hold NUM_REGS registers, storing them in STARTS and + ENDS. Subsequent matches using BUFFER and REGS will use this memory + for recording register information. STARTS and ENDS must be + allocated with malloc, and must each be at least `NUM_REGS * sizeof + (regoff_t)' bytes long. + + If NUM_REGS == 0, then subsequent matches should allocate their own + register data. + + Unless this function is called, the first search or match using + PATTERN_BUFFER will allocate its own register data, without + freeing the old data. */ +extern void re_set_registers (struct re_pattern_buffer *__buffer, + struct re_registers *__regs, + __re_size_t __num_regs, + regoff_t *__starts, regoff_t *__ends); + +#if defined _REGEX_RE_COMP || defined _LIBC +# ifndef _CRAY +/* 4.2 bsd compatibility. */ +extern char *re_comp (const char *); +extern int re_exec (const char *); +# endif +#endif + +/* GCC 2.95 and later have "__restrict"; C99 compilers have + "restrict", and "configure" may have defined "restrict". + Other compilers use __restrict, __restrict__, and _Restrict, and + 'configure' might #define 'restrict' to those words, so pick a + different name. */ +#ifndef _Restrict_ +# if 199901L <= __STDC_VERSION__ +# define _Restrict_ restrict +# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) +# define _Restrict_ __restrict +# else +# define _Restrict_ +# endif +#endif +/* gcc 3.1 and up support the [restrict] syntax. Don't trust + sys/cdefs.h's definition of __restrict_arr, though, as it + mishandles gcc -ansi -pedantic. */ +#ifndef _Restrict_arr_ +# if ((199901L <= __STDC_VERSION__ \ + || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ + && !__STRICT_ANSI__)) \ + && !defined __GNUG__) +# define _Restrict_arr_ _Restrict_ +# else +# define _Restrict_arr_ +# endif +#endif + +/* POSIX compatibility. */ +extern int regcomp (regex_t *_Restrict_ __preg, + const char *_Restrict_ __pattern, + int __cflags); + +extern int regexec (const regex_t *_Restrict_ __preg, + const char *_Restrict_ __string, size_t __nmatch, + regmatch_t __pmatch[_Restrict_arr_], + int __eflags); + +extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, + char *_Restrict_ __errbuf, size_t __errbuf_size); + +extern void regfree (regex_t *__preg); + + +#ifdef __cplusplus +} +#endif /* C++ */ + +#endif /* regex.h */ diff --git a/gnulib/lib/regex_internal.c b/gnulib/lib/regex_internal.c new file mode 100644 index 0000000..2129888 --- /dev/null +++ b/gnulib/lib/regex_internal.c @@ -0,0 +1,1741 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + 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. */ + +static void re_string_construct_common (const char *str, Idx len, + re_string_t *pstr, + RE_TRANSLATE_TYPE trans, bool icase, + const re_dfa_t *dfa) internal_function; +static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, + const re_node_set *nodes, + re_hashval_t hash) internal_function; +static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, + const re_node_set *nodes, + unsigned int context, + re_hashval_t hash) internal_function; + +/* Functions for string operation. */ + +/* This function allocate the buffers. It is necessary to call + re_string_reconstruct before using the object. */ + +static reg_errcode_t +internal_function +re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, + RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) +{ + reg_errcode_t ret; + Idx init_buf_len; + + /* Ensure at least one character fits into the buffers. */ + if (init_len < dfa->mb_cur_max) + init_len = dfa->mb_cur_max; + init_buf_len = (len + 1 < init_len) ? len + 1: init_len; + re_string_construct_common (str, len, pstr, trans, icase, dfa); + + ret = re_string_realloc_buffers (pstr, init_buf_len); + if (BE (ret != REG_NOERROR, 0)) + return ret; + + pstr->word_char = dfa->word_char; + pstr->word_ops_used = dfa->word_ops_used; + pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; + pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; + pstr->valid_raw_len = pstr->valid_len; + return REG_NOERROR; +} + +/* This function allocate the buffers, and initialize them. */ + +static reg_errcode_t +internal_function +re_string_construct (re_string_t *pstr, const char *str, Idx len, + RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) +{ + reg_errcode_t ret; + memset (pstr, '\0', sizeof (re_string_t)); + re_string_construct_common (str, len, pstr, trans, icase, dfa); + + if (len > 0) + { + ret = re_string_realloc_buffers (pstr, len + 1); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } + pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; + + if (icase) + { +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + { + while (1) + { + ret = build_wcs_upper_buffer (pstr); + if (BE (ret != REG_NOERROR, 0)) + return ret; + if (pstr->valid_raw_len >= len) + break; + if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) + break; + ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } + } + else +#endif /* RE_ENABLE_I18N */ + build_upper_buffer (pstr); + } + else + { +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + build_wcs_buffer (pstr); + else +#endif /* RE_ENABLE_I18N */ + { + if (trans != NULL) + re_string_translate_buffer (pstr); + else + { + pstr->valid_len = pstr->bufs_len; + pstr->valid_raw_len = pstr->bufs_len; + } + } + } + + return REG_NOERROR; +} + +/* Helper functions for re_string_allocate, and re_string_construct. */ + +static reg_errcode_t +internal_function +re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) +{ +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + { + wint_t *new_wcs; + + /* Avoid overflow. */ + size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); + if (BE (SIZE_MAX / max_object_size < new_buf_len, 0)) + return REG_ESPACE; + + new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); + if (BE (new_wcs == NULL, 0)) + return REG_ESPACE; + pstr->wcs = new_wcs; + if (pstr->offsets != NULL) + { + Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); + if (BE (new_offsets == NULL, 0)) + return REG_ESPACE; + pstr->offsets = new_offsets; + } + } +#endif /* RE_ENABLE_I18N */ + if (pstr->mbs_allocated) + { + unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, + new_buf_len); + if (BE (new_mbs == NULL, 0)) + return REG_ESPACE; + pstr->mbs = new_mbs; + } + pstr->bufs_len = new_buf_len; + return REG_NOERROR; +} + + +static void +internal_function +re_string_construct_common (const char *str, Idx len, re_string_t *pstr, + RE_TRANSLATE_TYPE trans, bool icase, + const re_dfa_t *dfa) +{ + pstr->raw_mbs = (const unsigned char *) str; + pstr->len = len; + pstr->raw_len = len; + pstr->trans = trans; + pstr->icase = icase; + pstr->mbs_allocated = (trans != NULL || icase); + pstr->mb_cur_max = dfa->mb_cur_max; + pstr->is_utf8 = dfa->is_utf8; + pstr->map_notascii = dfa->map_notascii; + pstr->stop = pstr->len; + pstr->raw_stop = pstr->stop; +} + +#ifdef RE_ENABLE_I18N + +/* Build wide character buffer PSTR->WCS. + If the byte sequence of the string are: + (0), (1), (0), (1), + Then wide character buffer will be: + , WEOF , , WEOF , + We use WEOF for padding, they indicate that the position isn't + a first byte of a multibyte character. + + Note that this function assumes PSTR->VALID_LEN elements are already + built and starts from PSTR->VALID_LEN. */ + +static void +internal_function +build_wcs_buffer (re_string_t *pstr) +{ +#ifdef _LIBC + unsigned char buf[MB_LEN_MAX]; + assert (MB_LEN_MAX >= pstr->mb_cur_max); +#else + unsigned char buf[64]; +#endif + mbstate_t prev_st; + Idx byte_idx, end_idx, remain_len; + size_t mbclen; + + /* Build the buffers from pstr->valid_len to either pstr->len or + pstr->bufs_len. */ + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + for (byte_idx = pstr->valid_len; byte_idx < end_idx;) + { + wchar_t wc; + const char *p; + + remain_len = end_idx - byte_idx; + prev_st = pstr->cur_state; + /* Apply the translation if we need. */ + if (BE (pstr->trans != NULL, 0)) + { + int i, ch; + + for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) + { + ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; + buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; + } + p = (const char *) buf; + } + else + p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; + mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state); + if (BE (mbclen == (size_t) -2, 0)) + { + /* The buffer doesn't have enough space, finish to build. */ + pstr->cur_state = prev_st; + break; + } + else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0)) + { + /* We treat these cases as a singlebyte character. */ + mbclen = 1; + wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; + if (BE (pstr->trans != NULL, 0)) + wc = pstr->trans[wc]; + pstr->cur_state = prev_st; + } + + /* Write wide character and padding. */ + pstr->wcs[byte_idx++] = wc; + /* Write paddings. */ + for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) + pstr->wcs[byte_idx++] = WEOF; + } + pstr->valid_len = byte_idx; + pstr->valid_raw_len = byte_idx; +} + +/* Build wide character buffer PSTR->WCS like build_wcs_buffer, + but for REG_ICASE. */ + +static reg_errcode_t +internal_function +build_wcs_upper_buffer (re_string_t *pstr) +{ + mbstate_t prev_st; + Idx src_idx, byte_idx, end_idx, remain_len; + size_t mbclen; +#ifdef _LIBC + char buf[MB_LEN_MAX]; + assert (MB_LEN_MAX >= pstr->mb_cur_max); +#else + char buf[64]; +#endif + + byte_idx = pstr->valid_len; + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + + /* The following optimization assumes that ASCII characters can be + mapped to wide characters with a simple cast. */ + if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) + { + while (byte_idx < end_idx) + { + wchar_t wc; + + if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) + && mbsinit (&pstr->cur_state)) + { + /* In case of a singlebyte character. */ + pstr->mbs[byte_idx] + = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); + /* The next step uses the assumption that wchar_t is encoded + ASCII-safe: all ASCII values can be converted like this. */ + pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; + ++byte_idx; + continue; + } + + remain_len = end_idx - byte_idx; + prev_st = pstr->cur_state; + mbclen = mbrtowc (&wc, + ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + + byte_idx), remain_len, &pstr->cur_state); + if (BE (mbclen < (size_t) -2, 1)) + { + wchar_t wcu = wc; + if (iswlower (wc)) + { + size_t mbcdlen; + + wcu = towupper (wc); + mbcdlen = wcrtomb (buf, wcu, &prev_st); + if (BE (mbclen == mbcdlen, 1)) + memcpy (pstr->mbs + byte_idx, buf, mbclen); + else + { + src_idx = byte_idx; + goto offsets_needed; + } + } + else + memcpy (pstr->mbs + byte_idx, + pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); + pstr->wcs[byte_idx++] = wcu; + /* Write paddings. */ + for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) + pstr->wcs[byte_idx++] = WEOF; + } + else if (mbclen == (size_t) -1 || mbclen == 0) + { + /* It is an invalid character or '\0'. Just use the byte. */ + int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; + pstr->mbs[byte_idx] = ch; + /* And also cast it to wide char. */ + pstr->wcs[byte_idx++] = (wchar_t) ch; + if (BE (mbclen == (size_t) -1, 0)) + pstr->cur_state = prev_st; + } + else + { + /* The buffer doesn't have enough space, finish to build. */ + pstr->cur_state = prev_st; + break; + } + } + pstr->valid_len = byte_idx; + pstr->valid_raw_len = byte_idx; + return REG_NOERROR; + } + else + for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) + { + wchar_t wc; + const char *p; + offsets_needed: + remain_len = end_idx - byte_idx; + prev_st = pstr->cur_state; + if (BE (pstr->trans != NULL, 0)) + { + int i, ch; + + for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) + { + ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; + buf[i] = pstr->trans[ch]; + } + p = (const char *) buf; + } + else + p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; + mbclen = mbrtowc (&wc, p, remain_len, &pstr->cur_state); + if (BE (mbclen < (size_t) -2, 1)) + { + wchar_t wcu = wc; + if (iswlower (wc)) + { + size_t mbcdlen; + + wcu = towupper (wc); + mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); + if (BE (mbclen == mbcdlen, 1)) + memcpy (pstr->mbs + byte_idx, buf, mbclen); + else if (mbcdlen != (size_t) -1) + { + size_t i; + + if (byte_idx + mbcdlen > pstr->bufs_len) + { + pstr->cur_state = prev_st; + break; + } + + if (pstr->offsets == NULL) + { + pstr->offsets = re_malloc (Idx, pstr->bufs_len); + + if (pstr->offsets == NULL) + return REG_ESPACE; + } + if (!pstr->offsets_needed) + { + for (i = 0; i < (size_t) byte_idx; ++i) + pstr->offsets[i] = i; + pstr->offsets_needed = 1; + } + + memcpy (pstr->mbs + byte_idx, buf, mbcdlen); + pstr->wcs[byte_idx] = wcu; + pstr->offsets[byte_idx] = src_idx; + for (i = 1; i < mbcdlen; ++i) + { + pstr->offsets[byte_idx + i] + = src_idx + (i < mbclen ? i : mbclen - 1); + pstr->wcs[byte_idx + i] = WEOF; + } + pstr->len += mbcdlen - mbclen; + if (pstr->raw_stop > src_idx) + pstr->stop += mbcdlen - mbclen; + end_idx = (pstr->bufs_len > pstr->len) + ? pstr->len : pstr->bufs_len; + byte_idx += mbcdlen; + src_idx += mbclen; + continue; + } + else + memcpy (pstr->mbs + byte_idx, p, mbclen); + } + else + memcpy (pstr->mbs + byte_idx, p, mbclen); + + if (BE (pstr->offsets_needed != 0, 0)) + { + size_t i; + for (i = 0; i < mbclen; ++i) + pstr->offsets[byte_idx + i] = src_idx + i; + } + src_idx += mbclen; + + pstr->wcs[byte_idx++] = wcu; + /* Write paddings. */ + for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) + pstr->wcs[byte_idx++] = WEOF; + } + else if (mbclen == (size_t) -1 || mbclen == 0) + { + /* It is an invalid character or '\0'. Just use the byte. */ + int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; + + if (BE (pstr->trans != NULL, 0)) + ch = pstr->trans [ch]; + pstr->mbs[byte_idx] = ch; + + if (BE (pstr->offsets_needed != 0, 0)) + pstr->offsets[byte_idx] = src_idx; + ++src_idx; + + /* And also cast it to wide char. */ + pstr->wcs[byte_idx++] = (wchar_t) ch; + if (BE (mbclen == (size_t) -1, 0)) + pstr->cur_state = prev_st; + } + else + { + /* The buffer doesn't have enough space, finish to build. */ + pstr->cur_state = prev_st; + break; + } + } + pstr->valid_len = byte_idx; + pstr->valid_raw_len = src_idx; + return REG_NOERROR; +} + +/* Skip characters until the index becomes greater than NEW_RAW_IDX. + Return the index. */ + +static Idx +internal_function +re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) +{ + mbstate_t prev_st; + Idx rawbuf_idx; + size_t mbclen; + wint_t wc = WEOF; + + /* Skip the characters which are not necessary to check. */ + for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; + rawbuf_idx < new_raw_idx;) + { + wchar_t wc2; + Idx remain_len; + remain_len = pstr->len - rawbuf_idx; + prev_st = pstr->cur_state; + mbclen = mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, + remain_len, &pstr->cur_state); + if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) + { + /* We treat these cases as a single byte character. */ + if (mbclen == 0 || remain_len == 0) + wc = L'\0'; + else + wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); + mbclen = 1; + pstr->cur_state = prev_st; + } + else + wc = wc2; + /* Then proceed the next character. */ + rawbuf_idx += mbclen; + } + *last_wc = wc; + return rawbuf_idx; +} +#endif /* RE_ENABLE_I18N */ + +/* Build the buffer PSTR->MBS, and apply the translation if we need. + This function is used in case of REG_ICASE. */ + +static void +internal_function +build_upper_buffer (re_string_t *pstr) +{ + Idx char_idx, end_idx; + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + + for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) + { + int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; + if (BE (pstr->trans != NULL, 0)) + ch = pstr->trans[ch]; + if (islower (ch)) + pstr->mbs[char_idx] = toupper (ch); + else + pstr->mbs[char_idx] = ch; + } + pstr->valid_len = char_idx; + pstr->valid_raw_len = char_idx; +} + +/* Apply TRANS to the buffer in PSTR. */ + +static void +internal_function +re_string_translate_buffer (re_string_t *pstr) +{ + Idx buf_idx, end_idx; + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + + for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) + { + int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; + pstr->mbs[buf_idx] = pstr->trans[ch]; + } + + pstr->valid_len = buf_idx; + pstr->valid_raw_len = buf_idx; +} + +/* This function re-construct the buffers. + Concretely, convert to wide character in case of pstr->mb_cur_max > 1, + convert to upper case in case of REG_ICASE, apply translation. */ + +static reg_errcode_t +internal_function +re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) +{ + Idx offset; + + if (BE (pstr->raw_mbs_idx <= idx, 0)) + offset = idx - pstr->raw_mbs_idx; + else + { + /* Reset buffer. */ +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); +#endif /* RE_ENABLE_I18N */ + pstr->len = pstr->raw_len; + pstr->stop = pstr->raw_stop; + pstr->valid_len = 0; + pstr->raw_mbs_idx = 0; + pstr->valid_raw_len = 0; + pstr->offsets_needed = 0; + pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF + : CONTEXT_NEWLINE | CONTEXT_BEGBUF); + if (!pstr->mbs_allocated) + pstr->mbs = (unsigned char *) pstr->raw_mbs; + offset = idx; + } + + if (BE (offset != 0, 1)) + { + /* Should the already checked characters be kept? */ + if (BE (offset < pstr->valid_raw_len, 1)) + { + /* Yes, move them to the front of the buffer. */ +#ifdef RE_ENABLE_I18N + if (BE (pstr->offsets_needed, 0)) + { + Idx low = 0, high = pstr->valid_len, mid; + do + { + mid = (high + low) / 2; + if (pstr->offsets[mid] > offset) + high = mid; + else if (pstr->offsets[mid] < offset) + low = mid + 1; + else + break; + } + while (low < high); + if (pstr->offsets[mid] < offset) + ++mid; + pstr->tip_context = re_string_context_at (pstr, mid - 1, + eflags); + /* This can be quite complicated, so handle specially + only the common and easy case where the character with + different length representation of lower and upper + case is present at or after offset. */ + if (pstr->valid_len > offset + && mid == offset && pstr->offsets[mid] == offset) + { + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); + memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; + for (low = 0; low < pstr->valid_len; low++) + pstr->offsets[low] = pstr->offsets[low + offset] - offset; + } + else + { + /* Otherwise, just find out how long the partial multibyte + character at offset is and fill it with WEOF/255. */ + pstr->len = pstr->raw_len - idx + offset; + pstr->stop = pstr->raw_stop - idx + offset; + pstr->offsets_needed = 0; + while (mid > 0 && pstr->offsets[mid - 1] == offset) + --mid; + while (mid < pstr->valid_len) + if (pstr->wcs[mid] != WEOF) + break; + else + ++mid; + if (mid == pstr->valid_len) + pstr->valid_len = 0; + else + { + pstr->valid_len = pstr->offsets[mid] - offset; + if (pstr->valid_len) + { + for (low = 0; low < pstr->valid_len; ++low) + pstr->wcs[low] = WEOF; + memset (pstr->mbs, 255, pstr->valid_len); + } + } + pstr->valid_raw_len = pstr->valid_len; + } + } + else +#endif + { + pstr->tip_context = re_string_context_at (pstr, offset - 1, + eflags); +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); +#endif /* RE_ENABLE_I18N */ + if (BE (pstr->mbs_allocated, 0)) + memmove (pstr->mbs, pstr->mbs + offset, + pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; +#if DEBUG + assert (pstr->valid_len > 0); +#endif + } + } + else + { + /* No, skip all characters until IDX. */ + Idx prev_valid_len = pstr->valid_len; + +#ifdef RE_ENABLE_I18N + if (BE (pstr->offsets_needed, 0)) + { + pstr->len = pstr->raw_len - idx + offset; + pstr->stop = pstr->raw_stop - idx + offset; + pstr->offsets_needed = 0; + } +#endif + pstr->valid_len = 0; +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + { + Idx wcs_idx; + wint_t wc = WEOF; + + if (pstr->is_utf8) + { + const unsigned char *raw, *p, *end; + + /* Special case UTF-8. Multi-byte chars start with any + byte other than 0x80 - 0xbf. */ + raw = pstr->raw_mbs + pstr->raw_mbs_idx; + end = raw + (offset - pstr->mb_cur_max); + if (end < pstr->raw_mbs) + end = pstr->raw_mbs; + p = raw + offset - 1; +#ifdef _LIBC + /* We know the wchar_t encoding is UCS4, so for the simple + case, ASCII characters, skip the conversion step. */ + if (isascii (*p) && BE (pstr->trans == NULL, 1)) + { + memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); + /* pstr->valid_len = 0; */ + wc = (wchar_t) *p; + } + else +#endif + for (; p >= end; --p) + if ((*p & 0xc0) != 0x80) + { + mbstate_t cur_state; + wchar_t wc2; + Idx mlen = raw + pstr->len - p; + unsigned char buf[6]; + size_t mbclen; + + if (BE (pstr->trans != NULL, 0)) + { + int i = mlen < 6 ? mlen : 6; + while (--i >= 0) + buf[i] = pstr->trans[p[i]]; + } + /* XXX Don't use mbrtowc, we know which conversion + to use (UTF-8 -> UCS4). */ + memset (&cur_state, 0, sizeof (cur_state)); + mbclen = mbrtowc (&wc2, (const char *) p, mlen, + &cur_state); + if (raw + offset - p <= mbclen + && mbclen < (size_t) -2) + { + memset (&pstr->cur_state, '\0', + sizeof (mbstate_t)); + pstr->valid_len = mbclen - (raw + offset - p); + wc = wc2; + } + break; + } + } + + if (wc == WEOF) + pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; + if (wc == WEOF) + pstr->tip_context + = re_string_context_at (pstr, prev_valid_len - 1, eflags); + else + pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) + && IS_WIDE_WORD_CHAR (wc)) + ? CONTEXT_WORD + : ((IS_WIDE_NEWLINE (wc) + && pstr->newline_anchor) + ? CONTEXT_NEWLINE : 0)); + if (BE (pstr->valid_len, 0)) + { + for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) + pstr->wcs[wcs_idx] = WEOF; + if (pstr->mbs_allocated) + memset (pstr->mbs, 255, pstr->valid_len); + } + pstr->valid_raw_len = pstr->valid_len; + } + else +#endif /* RE_ENABLE_I18N */ + { + int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; + pstr->valid_raw_len = 0; + if (pstr->trans) + c = pstr->trans[c]; + pstr->tip_context = (bitset_contain (pstr->word_char, c) + ? CONTEXT_WORD + : ((IS_NEWLINE (c) && pstr->newline_anchor) + ? CONTEXT_NEWLINE : 0)); + } + } + if (!BE (pstr->mbs_allocated, 0)) + pstr->mbs += offset; + } + pstr->raw_mbs_idx = idx; + pstr->len -= offset; + pstr->stop -= offset; + + /* Then build the buffers. */ +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + { + if (pstr->icase) + { + reg_errcode_t ret = build_wcs_upper_buffer (pstr); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } + else + build_wcs_buffer (pstr); + } + else +#endif /* RE_ENABLE_I18N */ + if (BE (pstr->mbs_allocated, 0)) + { + if (pstr->icase) + build_upper_buffer (pstr); + else if (pstr->trans != NULL) + re_string_translate_buffer (pstr); + } + else + pstr->valid_len = pstr->len; + + pstr->cur_idx = 0; + return REG_NOERROR; +} + +static unsigned char +internal_function __attribute ((pure)) +re_string_peek_byte_case (const re_string_t *pstr, Idx idx) +{ + int ch; + Idx off; + + /* Handle the common (easiest) cases first. */ + if (BE (!pstr->mbs_allocated, 1)) + return re_string_peek_byte (pstr, idx); + +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1 + && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) + return re_string_peek_byte (pstr, idx); +#endif + + off = pstr->cur_idx + idx; +#ifdef RE_ENABLE_I18N + if (pstr->offsets_needed) + off = pstr->offsets[off]; +#endif + + ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; + +#ifdef RE_ENABLE_I18N + /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I + this function returns CAPITAL LETTER I instead of first byte of + DOTLESS SMALL LETTER I. The latter would confuse the parser, + since peek_byte_case doesn't advance cur_idx in any way. */ + if (pstr->offsets_needed && !isascii (ch)) + return re_string_peek_byte (pstr, idx); +#endif + + return ch; +} + +static unsigned char +internal_function __attribute ((pure)) +re_string_fetch_byte_case (re_string_t *pstr) +{ + if (BE (!pstr->mbs_allocated, 1)) + return re_string_fetch_byte (pstr); + +#ifdef RE_ENABLE_I18N + if (pstr->offsets_needed) + { + Idx off; + int ch; + + /* For tr_TR.UTF-8 [[:islower:]] there is + [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip + in that case the whole multi-byte character and return + the original letter. On the other side, with + [[: DOTLESS SMALL LETTER I return [[:I, as doing + anything else would complicate things too much. */ + + if (!re_string_first_byte (pstr, pstr->cur_idx)) + return re_string_fetch_byte (pstr); + + off = pstr->offsets[pstr->cur_idx]; + ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; + + if (! isascii (ch)) + return re_string_fetch_byte (pstr); + + re_string_skip_bytes (pstr, + re_string_char_size_at (pstr, pstr->cur_idx)); + return ch; + } +#endif + + return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; +} + +static void +internal_function +re_string_destruct (re_string_t *pstr) +{ +#ifdef RE_ENABLE_I18N + re_free (pstr->wcs); + re_free (pstr->offsets); +#endif /* RE_ENABLE_I18N */ + if (pstr->mbs_allocated) + re_free (pstr->mbs); +} + +/* Return the context at IDX in INPUT. */ + +static unsigned int +internal_function +re_string_context_at (const re_string_t *input, Idx idx, int eflags) +{ + int c; + if (BE (! REG_VALID_INDEX (idx), 0)) + /* In this case, we use the value stored in input->tip_context, + since we can't know the character in input->mbs[-1] here. */ + return input->tip_context; + if (BE (idx == input->len, 0)) + return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF + : CONTEXT_NEWLINE | CONTEXT_ENDBUF); +#ifdef RE_ENABLE_I18N + if (input->mb_cur_max > 1) + { + wint_t wc; + Idx wc_idx = idx; + while(input->wcs[wc_idx] == WEOF) + { +#ifdef DEBUG + /* It must not happen. */ + assert (REG_VALID_INDEX (wc_idx)); +#endif + --wc_idx; + if (! REG_VALID_INDEX (wc_idx)) + return input->tip_context; + } + wc = input->wcs[wc_idx]; + if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) + return CONTEXT_WORD; + return (IS_WIDE_NEWLINE (wc) && input->newline_anchor + ? CONTEXT_NEWLINE : 0); + } + else +#endif + { + c = re_string_byte_at (input, idx); + if (bitset_contain (input->word_char, c)) + return CONTEXT_WORD; + return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; + } +} + +/* Functions for set operation. */ + +static reg_errcode_t +internal_function +re_node_set_alloc (re_node_set *set, Idx size) +{ + set->alloc = size; + set->nelem = 0; + set->elems = re_malloc (Idx, size); + if (BE (set->elems == NULL, 0)) + return REG_ESPACE; + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +re_node_set_init_1 (re_node_set *set, Idx elem) +{ + set->alloc = 1; + set->nelem = 1; + set->elems = re_malloc (Idx, 1); + if (BE (set->elems == NULL, 0)) + { + set->alloc = set->nelem = 0; + return REG_ESPACE; + } + set->elems[0] = elem; + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) +{ + set->alloc = 2; + set->elems = re_malloc (Idx, 2); + if (BE (set->elems == NULL, 0)) + return REG_ESPACE; + if (elem1 == elem2) + { + set->nelem = 1; + set->elems[0] = elem1; + } + else + { + set->nelem = 2; + if (elem1 < elem2) + { + set->elems[0] = elem1; + set->elems[1] = elem2; + } + else + { + set->elems[0] = elem2; + set->elems[1] = elem1; + } + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +re_node_set_init_copy (re_node_set *dest, const re_node_set *src) +{ + dest->nelem = src->nelem; + if (src->nelem > 0) + { + dest->alloc = dest->nelem; + dest->elems = re_malloc (Idx, dest->alloc); + if (BE (dest->elems == NULL, 0)) + { + dest->alloc = dest->nelem = 0; + return REG_ESPACE; + } + memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); + } + else + re_node_set_init_empty (dest); + return REG_NOERROR; +} + +/* Calculate the intersection of the sets SRC1 and SRC2. And merge it to + DEST. Return value indicate the error code or REG_NOERROR if succeeded. + Note: We assume dest->elems is NULL, when dest->alloc is 0. */ + +static reg_errcode_t +internal_function +re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, + const re_node_set *src2) +{ + Idx i1, i2, is, id, delta, sbase; + if (src1->nelem == 0 || src2->nelem == 0) + return REG_NOERROR; + + /* We need dest->nelem + 2 * elems_in_intersection; this is a + conservative estimate. */ + if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) + { + Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; + Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); + if (BE (new_elems == NULL, 0)) + return REG_ESPACE; + dest->elems = new_elems; + dest->alloc = new_alloc; + } + + /* Find the items in the intersection of SRC1 and SRC2, and copy + into the top of DEST those that are not already in DEST itself. */ + sbase = dest->nelem + src1->nelem + src2->nelem; + i1 = src1->nelem - 1; + i2 = src2->nelem - 1; + id = dest->nelem - 1; + for (;;) + { + if (src1->elems[i1] == src2->elems[i2]) + { + /* Try to find the item in DEST. Maybe we could binary search? */ + while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1]) + --id; + + if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1]) + dest->elems[--sbase] = src1->elems[i1]; + + if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2)) + break; + } + + /* Lower the highest of the two items. */ + else if (src1->elems[i1] < src2->elems[i2]) + { + if (! REG_VALID_INDEX (--i2)) + break; + } + else + { + if (! REG_VALID_INDEX (--i1)) + break; + } + } + + id = dest->nelem - 1; + is = dest->nelem + src1->nelem + src2->nelem - 1; + delta = is - sbase + 1; + + /* Now copy. When DELTA becomes zero, the remaining + DEST elements are already in place; this is more or + less the same loop that is in re_node_set_merge. */ + dest->nelem += delta; + if (delta > 0 && REG_VALID_INDEX (id)) + for (;;) + { + if (dest->elems[is] > dest->elems[id]) + { + /* Copy from the top. */ + dest->elems[id + delta--] = dest->elems[is--]; + if (delta == 0) + break; + } + else + { + /* Slide from the bottom. */ + dest->elems[id + delta] = dest->elems[id]; + if (! REG_VALID_INDEX (--id)) + break; + } + } + + /* Copy remaining SRC elements. */ + memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); + + return REG_NOERROR; +} + +/* Calculate the union set of the sets SRC1 and SRC2. And store it to + DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ + +static reg_errcode_t +internal_function +re_node_set_init_union (re_node_set *dest, const re_node_set *src1, + const re_node_set *src2) +{ + Idx i1, i2, id; + if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) + { + dest->alloc = src1->nelem + src2->nelem; + dest->elems = re_malloc (Idx, dest->alloc); + if (BE (dest->elems == NULL, 0)) + return REG_ESPACE; + } + else + { + if (src1 != NULL && src1->nelem > 0) + return re_node_set_init_copy (dest, src1); + else if (src2 != NULL && src2->nelem > 0) + return re_node_set_init_copy (dest, src2); + else + re_node_set_init_empty (dest); + return REG_NOERROR; + } + for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) + { + if (src1->elems[i1] > src2->elems[i2]) + { + dest->elems[id++] = src2->elems[i2++]; + continue; + } + if (src1->elems[i1] == src2->elems[i2]) + ++i2; + dest->elems[id++] = src1->elems[i1++]; + } + if (i1 < src1->nelem) + { + memcpy (dest->elems + id, src1->elems + i1, + (src1->nelem - i1) * sizeof (Idx)); + id += src1->nelem - i1; + } + else if (i2 < src2->nelem) + { + memcpy (dest->elems + id, src2->elems + i2, + (src2->nelem - i2) * sizeof (Idx)); + id += src2->nelem - i2; + } + dest->nelem = id; + return REG_NOERROR; +} + +/* Calculate the union set of the sets DEST and SRC. And store it to + DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ + +static reg_errcode_t +internal_function +re_node_set_merge (re_node_set *dest, const re_node_set *src) +{ + Idx is, id, sbase, delta; + if (src == NULL || src->nelem == 0) + return REG_NOERROR; + if (dest->alloc < 2 * src->nelem + dest->nelem) + { + Idx new_alloc = 2 * (src->nelem + dest->alloc); + Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); + if (BE (new_buffer == NULL, 0)) + return REG_ESPACE; + dest->elems = new_buffer; + dest->alloc = new_alloc; + } + + if (BE (dest->nelem == 0, 0)) + { + dest->nelem = src->nelem; + memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); + return REG_NOERROR; + } + + /* Copy into the top of DEST the items of SRC that are not + found in DEST. Maybe we could binary search in DEST? */ + for (sbase = dest->nelem + 2 * src->nelem, + is = src->nelem - 1, id = dest->nelem - 1; + REG_VALID_INDEX (is) && REG_VALID_INDEX (id); ) + { + if (dest->elems[id] == src->elems[is]) + is--, id--; + else if (dest->elems[id] < src->elems[is]) + dest->elems[--sbase] = src->elems[is--]; + else /* if (dest->elems[id] > src->elems[is]) */ + --id; + } + + if (REG_VALID_INDEX (is)) + { + /* If DEST is exhausted, the remaining items of SRC must be unique. */ + sbase -= is + 1; + memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); + } + + id = dest->nelem - 1; + is = dest->nelem + 2 * src->nelem - 1; + delta = is - sbase + 1; + if (delta == 0) + return REG_NOERROR; + + /* Now copy. When DELTA becomes zero, the remaining + DEST elements are already in place. */ + dest->nelem += delta; + for (;;) + { + if (dest->elems[is] > dest->elems[id]) + { + /* Copy from the top. */ + dest->elems[id + delta--] = dest->elems[is--]; + if (delta == 0) + break; + } + else + { + /* Slide from the bottom. */ + dest->elems[id + delta] = dest->elems[id]; + if (! REG_VALID_INDEX (--id)) + { + /* Copy remaining SRC elements. */ + memcpy (dest->elems, dest->elems + sbase, + delta * sizeof (Idx)); + break; + } + } + } + + return REG_NOERROR; +} + +/* Insert the new element ELEM to the re_node_set* SET. + SET should not already have ELEM. + Return true if successful. */ + +static bool +internal_function +re_node_set_insert (re_node_set *set, Idx elem) +{ + Idx idx; + /* In case the set is empty. */ + if (set->alloc == 0) + return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); + + if (BE (set->nelem, 0) == 0) + { + /* We already guaranteed above that set->alloc != 0. */ + set->elems[0] = elem; + ++set->nelem; + return true; + } + + /* Realloc if we need. */ + if (set->alloc == set->nelem) + { + Idx *new_elems; + set->alloc = set->alloc * 2; + new_elems = re_realloc (set->elems, Idx, set->alloc); + if (BE (new_elems == NULL, 0)) + return false; + set->elems = new_elems; + } + + /* Move the elements which follows the new element. Test the + first element separately to skip a check in the inner loop. */ + if (elem < set->elems[0]) + { + idx = 0; + for (idx = set->nelem; idx > 0; idx--) + set->elems[idx] = set->elems[idx - 1]; + } + else + { + for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) + set->elems[idx] = set->elems[idx - 1]; + } + + /* Insert the new element. */ + set->elems[idx] = elem; + ++set->nelem; + return true; +} + +/* Insert the new element ELEM to the re_node_set* SET. + SET should not already have any element greater than or equal to ELEM. + Return true if successful. */ + +static bool +internal_function +re_node_set_insert_last (re_node_set *set, Idx elem) +{ + /* Realloc if we need. */ + if (set->alloc == set->nelem) + { + Idx *new_elems; + set->alloc = (set->alloc + 1) * 2; + new_elems = re_realloc (set->elems, Idx, set->alloc); + if (BE (new_elems == NULL, 0)) + return false; + set->elems = new_elems; + } + + /* Insert the new element. */ + set->elems[set->nelem++] = elem; + return true; +} + +/* Compare two node sets SET1 and SET2. + Return true if SET1 and SET2 are equivalent. */ + +static bool +internal_function __attribute ((pure)) +re_node_set_compare (const re_node_set *set1, const re_node_set *set2) +{ + Idx i; + if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) + return false; + for (i = set1->nelem ; REG_VALID_INDEX (--i) ; ) + if (set1->elems[i] != set2->elems[i]) + return false; + return true; +} + +/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ + +static Idx +internal_function __attribute ((pure)) +re_node_set_contains (const re_node_set *set, Idx elem) +{ + __re_size_t idx, right, mid; + if (! REG_VALID_NONZERO_INDEX (set->nelem)) + return 0; + + /* Binary search the element. */ + idx = 0; + right = set->nelem - 1; + while (idx < right) + { + mid = (idx + right) / 2; + if (set->elems[mid] < elem) + idx = mid + 1; + else + right = mid; + } + return set->elems[idx] == elem ? idx + 1 : 0; +} + +static void +internal_function +re_node_set_remove_at (re_node_set *set, Idx idx) +{ + if (idx < 0 || idx >= set->nelem) + return; + --set->nelem; + for (; idx < set->nelem; idx++) + set->elems[idx] = set->elems[idx + 1]; +} + + +/* Add the token TOKEN to dfa->nodes, and return the index of the token. + Or return REG_MISSING if an error occurred. */ + +static Idx +internal_function +re_dfa_add_node (re_dfa_t *dfa, re_token_t token) +{ + if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) + { + size_t new_nodes_alloc = dfa->nodes_alloc * 2; + Idx *new_nexts, *new_indices; + re_node_set *new_edests, *new_eclosures; + re_token_t *new_nodes; + size_t max_object_size = + MAX (sizeof (re_token_t), + MAX (sizeof (re_node_set), + sizeof (Idx))); + + /* Avoid overflows. */ + if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0)) + return REG_MISSING; + + new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); + if (BE (new_nodes == NULL, 0)) + return REG_MISSING; + dfa->nodes = new_nodes; + new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); + new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); + new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); + new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); + if (BE (new_nexts == NULL || new_indices == NULL + || new_edests == NULL || new_eclosures == NULL, 0)) + return REG_MISSING; + dfa->nexts = new_nexts; + dfa->org_indices = new_indices; + dfa->edests = new_edests; + dfa->eclosures = new_eclosures; + dfa->nodes_alloc = new_nodes_alloc; + } + dfa->nodes[dfa->nodes_len] = token; + dfa->nodes[dfa->nodes_len].constraint = 0; +#ifdef RE_ENABLE_I18N + { + int type = token.type; + dfa->nodes[dfa->nodes_len].accept_mb = + (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; + } +#endif + dfa->nexts[dfa->nodes_len] = REG_MISSING; + re_node_set_init_empty (dfa->edests + dfa->nodes_len); + re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); + return dfa->nodes_len++; +} + +static inline re_hashval_t +internal_function +calc_state_hash (const re_node_set *nodes, unsigned int context) +{ + re_hashval_t hash = nodes->nelem + context; + Idx i; + for (i = 0 ; i < nodes->nelem ; i++) + hash += nodes->elems[i]; + return hash; +} + +/* Search for the state whose node_set is equivalent to NODES. + Return the pointer to the state, if we found it in the DFA. + Otherwise create the new one and return it. In case of an error + return NULL and set the error code in ERR. + Note: - We assume NULL as the invalid state, then it is possible that + return value is NULL and ERR is REG_NOERROR. + - We never return non-NULL value in case of any errors, it is for + optimization. */ + +static re_dfastate_t * +internal_function +re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, + const re_node_set *nodes) +{ + re_hashval_t hash; + re_dfastate_t *new_state; + struct re_state_table_entry *spot; + Idx i; +#ifdef lint + /* Suppress bogus uninitialized-variable warnings. */ + *err = REG_NOERROR; +#endif + if (BE (nodes->nelem == 0, 0)) + { + *err = REG_NOERROR; + return NULL; + } + hash = calc_state_hash (nodes, 0); + spot = dfa->state_table + (hash & dfa->state_hash_mask); + + for (i = 0 ; i < spot->num ; i++) + { + re_dfastate_t *state = spot->array[i]; + if (hash != state->hash) + continue; + if (re_node_set_compare (&state->nodes, nodes)) + return state; + } + + /* There are no appropriate state in the dfa, create the new one. */ + new_state = create_ci_newstate (dfa, nodes, hash); + if (BE (new_state == NULL, 0)) + *err = REG_ESPACE; + + return new_state; +} + +/* Search for the state whose node_set is equivalent to NODES and + whose context is equivalent to CONTEXT. + Return the pointer to the state, if we found it in the DFA. + Otherwise create the new one and return it. In case of an error + return NULL and set the error code in ERR. + Note: - We assume NULL as the invalid state, then it is possible that + return value is NULL and ERR is REG_NOERROR. + - We never return non-NULL value in case of any errors, it is for + optimization. */ + +static re_dfastate_t * +internal_function +re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, + const re_node_set *nodes, unsigned int context) +{ + re_hashval_t hash; + re_dfastate_t *new_state; + struct re_state_table_entry *spot; + Idx i; +#ifdef lint + /* Suppress bogus uninitialized-variable warnings. */ + *err = REG_NOERROR; +#endif + if (nodes->nelem == 0) + { + *err = REG_NOERROR; + return NULL; + } + hash = calc_state_hash (nodes, context); + spot = dfa->state_table + (hash & dfa->state_hash_mask); + + for (i = 0 ; i < spot->num ; i++) + { + re_dfastate_t *state = spot->array[i]; + if (state->hash == hash + && state->context == context + && re_node_set_compare (state->entrance_nodes, nodes)) + return state; + } + /* There are no appropriate state in `dfa', create the new one. */ + new_state = create_cd_newstate (dfa, nodes, context, hash); + if (BE (new_state == NULL, 0)) + *err = REG_ESPACE; + + return new_state; +} + +/* Finish initialization of the new state NEWSTATE, and using its hash value + HASH put in the appropriate bucket of DFA's state table. Return value + indicates the error code if failed. */ + +static reg_errcode_t +register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, + re_hashval_t hash) +{ + struct re_state_table_entry *spot; + reg_errcode_t err; + Idx i; + + newstate->hash = hash; + err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); + if (BE (err != REG_NOERROR, 0)) + return REG_ESPACE; + for (i = 0; i < newstate->nodes.nelem; i++) + { + Idx elem = newstate->nodes.elems[i]; + if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) + if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0)) + return REG_ESPACE; + } + + spot = dfa->state_table + (hash & dfa->state_hash_mask); + if (BE (spot->alloc <= spot->num, 0)) + { + Idx new_alloc = 2 * spot->num + 2; + re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, + new_alloc); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + spot->array = new_array; + spot->alloc = new_alloc; + } + spot->array[spot->num++] = newstate; + return REG_NOERROR; +} + +static void +free_state (re_dfastate_t *state) +{ + re_node_set_free (&state->non_eps_nodes); + re_node_set_free (&state->inveclosure); + if (state->entrance_nodes != &state->nodes) + { + re_node_set_free (state->entrance_nodes); + re_free (state->entrance_nodes); + } + re_node_set_free (&state->nodes); + re_free (state->word_trtable); + re_free (state->trtable); + re_free (state); +} + +/* Create the new state which is independ of contexts. + Return the new state if succeeded, otherwise return NULL. */ + +static re_dfastate_t * +internal_function +create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, + re_hashval_t hash) +{ + Idx i; + reg_errcode_t err; + re_dfastate_t *newstate; + + newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); + if (BE (newstate == NULL, 0)) + return NULL; + err = re_node_set_init_copy (&newstate->nodes, nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_free (newstate); + return NULL; + } + + newstate->entrance_nodes = &newstate->nodes; + for (i = 0 ; i < nodes->nelem ; i++) + { + re_token_t *node = dfa->nodes + nodes->elems[i]; + re_token_type_t type = node->type; + if (type == CHARACTER && !node->constraint) + continue; +#ifdef RE_ENABLE_I18N + newstate->accept_mb |= node->accept_mb; +#endif /* RE_ENABLE_I18N */ + + /* If the state has the halt node, the state is a halt state. */ + if (type == END_OF_RE) + newstate->halt = 1; + else if (type == OP_BACK_REF) + newstate->has_backref = 1; + else if (type == ANCHOR || node->constraint) + newstate->has_constraint = 1; + } + err = register_state (dfa, newstate, hash); + if (BE (err != REG_NOERROR, 0)) + { + free_state (newstate); + newstate = NULL; + } + return newstate; +} + +/* Create the new state which is depend on the context CONTEXT. + Return the new state if succeeded, otherwise return NULL. */ + +static re_dfastate_t * +internal_function +create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, + unsigned int context, re_hashval_t hash) +{ + Idx i, nctx_nodes = 0; + reg_errcode_t err; + re_dfastate_t *newstate; + + newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); + if (BE (newstate == NULL, 0)) + return NULL; + err = re_node_set_init_copy (&newstate->nodes, nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_free (newstate); + return NULL; + } + + newstate->context = context; + newstate->entrance_nodes = &newstate->nodes; + + for (i = 0 ; i < nodes->nelem ; i++) + { + unsigned int constraint = 0; + re_token_t *node = dfa->nodes + nodes->elems[i]; + re_token_type_t type = node->type; + if (node->constraint) + constraint = node->constraint; + + if (type == CHARACTER && !constraint) + continue; +#ifdef RE_ENABLE_I18N + newstate->accept_mb |= node->accept_mb; +#endif /* RE_ENABLE_I18N */ + + /* If the state has the halt node, the state is a halt state. */ + if (type == END_OF_RE) + newstate->halt = 1; + else if (type == OP_BACK_REF) + newstate->has_backref = 1; + else if (type == ANCHOR) + constraint = node->opr.ctx_type; + + if (constraint) + { + if (newstate->entrance_nodes == &newstate->nodes) + { + newstate->entrance_nodes = re_malloc (re_node_set, 1); + if (BE (newstate->entrance_nodes == NULL, 0)) + { + free_state (newstate); + return NULL; + } + re_node_set_init_copy (newstate->entrance_nodes, nodes); + nctx_nodes = 0; + newstate->has_constraint = 1; + } + + if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) + { + re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); + ++nctx_nodes; + } + } + } + err = register_state (dfa, newstate, hash); + if (BE (err != REG_NOERROR, 0)) + { + free_state (newstate); + newstate = NULL; + } + return newstate; +} diff --git a/gnulib/lib/regex_internal.h b/gnulib/lib/regex_internal.h new file mode 100644 index 0000000..9bbc6ac --- /dev/null +++ b/gnulib/lib/regex_internal.h @@ -0,0 +1,857 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + 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. */ + +#ifndef _REGEX_INTERNAL_H +#define _REGEX_INTERNAL_H 1 + +#include +#include +#include +#include +#include +#include + +#ifdef _LIBC +# include +#else +# include "localcharset.h" +#endif +#if defined HAVE_LOCALE_H || defined _LIBC +# include +#endif + +#include +#include +#include +#if defined _LIBC +# include +#else +# define __libc_lock_init(NAME) do { } while (0) +# define __libc_lock_lock(NAME) do { } while (0) +# define __libc_lock_unlock(NAME) do { } while (0) +#endif + +/* In case that the system doesn't have isblank(). */ +#if !defined _LIBC && !HAVE_DECL_ISBLANK && !defined isblank +# define isblank(ch) ((ch) == ' ' || (ch) == '\t') +#endif + +#ifdef _LIBC +# ifndef _RE_DEFINE_LOCALE_FUNCTIONS +# define _RE_DEFINE_LOCALE_FUNCTIONS 1 +# include +# include +# include +# endif +#endif + +/* This is for other GNU distributions with internationalized messages. */ +#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC +# include +# ifdef _LIBC +# undef gettext +# define gettext(msgid) \ + INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES) +# endif +#else +# define gettext(msgid) (msgid) +#endif + +#ifndef gettext_noop +/* This define is so xgettext can find the internationalizable + strings. */ +# define gettext_noop(String) String +#endif + +/* For loser systems without the definition. */ +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC +# define RE_ENABLE_I18N +#endif + +#if __GNUC__ >= 3 +# define BE(expr, val) __builtin_expect (expr, val) +#else +# define BE(expr, val) (expr) +# ifdef _LIBC +# define inline +# endif +#endif + +/* Number of ASCII characters. */ +#define ASCII_CHARS 0x80 + +/* Number of single byte characters. */ +#define SBC_MAX (UCHAR_MAX + 1) + +#define COLL_ELEM_LEN_MAX 8 + +/* The character which represents newline. */ +#define NEWLINE_CHAR '\n' +#define WIDE_NEWLINE_CHAR L'\n' + +/* Rename to standard API for using out of glibc. */ +#ifndef _LIBC +# define __wctype wctype +# define __iswctype iswctype +# define __btowc btowc +# define __wcrtomb wcrtomb +# define __regfree regfree +# define attribute_hidden +#endif /* not _LIBC */ + +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +# define __attribute(arg) __attribute__ (arg) +#else +# define __attribute(arg) +#endif + +typedef __re_idx_t Idx; + +/* Special return value for failure to match. */ +#define REG_MISSING ((Idx) -1) + +/* Special return value for internal error. */ +#define REG_ERROR ((Idx) -2) + +/* Test whether N is a valid index, and is not one of the above. */ +#ifdef _REGEX_LARGE_OFFSETS +# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR) +#else +# define REG_VALID_INDEX(n) (0 <= (n)) +#endif + +/* Test whether N is a valid nonzero index. */ +#ifdef _REGEX_LARGE_OFFSETS +# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1)) +#else +# define REG_VALID_NONZERO_INDEX(n) (0 < (n)) +#endif + +/* A hash value, suitable for computing hash tables. */ +typedef __re_size_t re_hashval_t; + +/* An integer used to represent a set of bits. It must be unsigned, + and must be at least as wide as unsigned int. */ +typedef unsigned long int bitset_word_t; +/* All bits set in a bitset_word_t. */ +#define BITSET_WORD_MAX ULONG_MAX + +/* Number of bits in a bitset_word_t. For portability to hosts with + padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; + instead, deduce it directly from BITSET_WORD_MAX. Avoid + greater-than-32-bit integers and unconditional shifts by more than + 31 bits, as they're not portable. */ +#if BITSET_WORD_MAX == 0xffffffff +# define BITSET_WORD_BITS 32 +#elif BITSET_WORD_MAX >> 31 >> 5 == 1 +# define BITSET_WORD_BITS 36 +#elif BITSET_WORD_MAX >> 31 >> 16 == 1 +# define BITSET_WORD_BITS 48 +#elif BITSET_WORD_MAX >> 31 >> 28 == 1 +# define BITSET_WORD_BITS 60 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1 +# define BITSET_WORD_BITS 64 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1 +# define BITSET_WORD_BITS 72 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1 +# define BITSET_WORD_BITS 128 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1 +# define BITSET_WORD_BITS 256 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1 +# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */ +# if BITSET_WORD_BITS <= SBC_MAX +# error "Invalid SBC_MAX" +# endif +#elif BITSET_WORD_MAX == (0xffffffff + 2) * 0xffffffff +/* Work around a bug in 64-bit PGC (before version 6.1-2), where the + preprocessor mishandles large unsigned values as if they were signed. */ +# define BITSET_WORD_BITS 64 +#else +# error "Add case for new bitset_word_t size" +#endif + +/* Number of bitset_word_t values in a bitset_t. */ +#define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) + +typedef bitset_word_t bitset_t[BITSET_WORDS]; +typedef bitset_word_t *re_bitset_ptr_t; +typedef const bitset_word_t *re_const_bitset_ptr_t; + +#define PREV_WORD_CONSTRAINT 0x0001 +#define PREV_NOTWORD_CONSTRAINT 0x0002 +#define NEXT_WORD_CONSTRAINT 0x0004 +#define NEXT_NOTWORD_CONSTRAINT 0x0008 +#define PREV_NEWLINE_CONSTRAINT 0x0010 +#define NEXT_NEWLINE_CONSTRAINT 0x0020 +#define PREV_BEGBUF_CONSTRAINT 0x0040 +#define NEXT_ENDBUF_CONSTRAINT 0x0080 +#define WORD_DELIM_CONSTRAINT 0x0100 +#define NOT_WORD_DELIM_CONSTRAINT 0x0200 + +typedef enum +{ + INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, + WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, + WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, + INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, + LINE_FIRST = PREV_NEWLINE_CONSTRAINT, + LINE_LAST = NEXT_NEWLINE_CONSTRAINT, + BUF_FIRST = PREV_BEGBUF_CONSTRAINT, + BUF_LAST = NEXT_ENDBUF_CONSTRAINT, + WORD_DELIM = WORD_DELIM_CONSTRAINT, + NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT +} re_context_type; + +typedef struct +{ + Idx alloc; + Idx nelem; + Idx *elems; +} re_node_set; + +typedef enum +{ + NON_TYPE = 0, + + /* Node type, These are used by token, node, tree. */ + CHARACTER = 1, + END_OF_RE = 2, + SIMPLE_BRACKET = 3, + OP_BACK_REF = 4, + OP_PERIOD = 5, +#ifdef RE_ENABLE_I18N + COMPLEX_BRACKET = 6, + OP_UTF8_PERIOD = 7, +#endif /* RE_ENABLE_I18N */ + + /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used + when the debugger shows values of this enum type. */ +#define EPSILON_BIT 8 + OP_OPEN_SUBEXP = EPSILON_BIT | 0, + OP_CLOSE_SUBEXP = EPSILON_BIT | 1, + OP_ALT = EPSILON_BIT | 2, + OP_DUP_ASTERISK = EPSILON_BIT | 3, + ANCHOR = EPSILON_BIT | 4, + + /* Tree type, these are used only by tree. */ + CONCAT = 16, + SUBEXP = 17, + + /* Token type, these are used only by token. */ + OP_DUP_PLUS = 18, + OP_DUP_QUESTION, + OP_OPEN_BRACKET, + OP_CLOSE_BRACKET, + OP_CHARSET_RANGE, + OP_OPEN_DUP_NUM, + OP_CLOSE_DUP_NUM, + OP_NON_MATCH_LIST, + OP_OPEN_COLL_ELEM, + OP_CLOSE_COLL_ELEM, + OP_OPEN_EQUIV_CLASS, + OP_CLOSE_EQUIV_CLASS, + OP_OPEN_CHAR_CLASS, + OP_CLOSE_CHAR_CLASS, + OP_WORD, + OP_NOTWORD, + OP_SPACE, + OP_NOTSPACE, + BACK_SLASH + +} re_token_type_t; + +#ifdef RE_ENABLE_I18N +typedef struct +{ + /* Multibyte characters. */ + wchar_t *mbchars; + + /* Collating symbols. */ +# ifdef _LIBC + int32_t *coll_syms; +# endif + + /* Equivalence classes. */ +# ifdef _LIBC + int32_t *equiv_classes; +# endif + + /* Range expressions. */ +# ifdef _LIBC + uint32_t *range_starts; + uint32_t *range_ends; +# else /* not _LIBC */ + wchar_t *range_starts; + wchar_t *range_ends; +# endif /* not _LIBC */ + + /* Character classes. */ + wctype_t *char_classes; + + /* If this character set is the non-matching list. */ + unsigned int non_match : 1; + + /* # of multibyte characters. */ + Idx nmbchars; + + /* # of collating symbols. */ + Idx ncoll_syms; + + /* # of equivalence classes. */ + Idx nequiv_classes; + + /* # of range expressions. */ + Idx nranges; + + /* # of character classes. */ + Idx nchar_classes; +} re_charset_t; +#endif /* RE_ENABLE_I18N */ + +typedef struct +{ + union + { + unsigned char c; /* for CHARACTER */ + re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ +#ifdef RE_ENABLE_I18N + re_charset_t *mbcset; /* for COMPLEX_BRACKET */ +#endif /* RE_ENABLE_I18N */ + Idx idx; /* for BACK_REF */ + re_context_type ctx_type; /* for ANCHOR */ + } opr; +#if __GNUC__ >= 2 && !__STRICT_ANSI__ + re_token_type_t type : 8; +#else + re_token_type_t type; +#endif + unsigned int constraint : 10; /* context constraint */ + unsigned int duplicated : 1; + unsigned int opt_subexp : 1; +#ifdef RE_ENABLE_I18N + unsigned int accept_mb : 1; + /* These 2 bits can be moved into the union if needed (e.g. if running out + of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ + unsigned int mb_partial : 1; +#endif + unsigned int word_char : 1; +} re_token_t; + +#define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) + +struct re_string_t +{ + /* Indicate the raw buffer which is the original string passed as an + argument of regexec(), re_search(), etc.. */ + const unsigned char *raw_mbs; + /* Store the multibyte string. In case of "case insensitive mode" like + REG_ICASE, upper cases of the string are stored, otherwise MBS points + the same address that RAW_MBS points. */ + unsigned char *mbs; +#ifdef RE_ENABLE_I18N + /* Store the wide character string which is corresponding to MBS. */ + wint_t *wcs; + Idx *offsets; + mbstate_t cur_state; +#endif + /* Index in RAW_MBS. Each character mbs[i] corresponds to + raw_mbs[raw_mbs_idx + i]. */ + Idx raw_mbs_idx; + /* The length of the valid characters in the buffers. */ + Idx valid_len; + /* The corresponding number of bytes in raw_mbs array. */ + Idx valid_raw_len; + /* The length of the buffers MBS and WCS. */ + Idx bufs_len; + /* The index in MBS, which is updated by re_string_fetch_byte. */ + Idx cur_idx; + /* length of RAW_MBS array. */ + Idx raw_len; + /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ + Idx len; + /* End of the buffer may be shorter than its length in the cases such + as re_match_2, re_search_2. Then, we use STOP for end of the buffer + instead of LEN. */ + Idx raw_stop; + /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ + Idx stop; + + /* The context of mbs[0]. We store the context independently, since + the context of mbs[0] may be different from raw_mbs[0], which is + the beginning of the input string. */ + unsigned int tip_context; + /* The translation passed as a part of an argument of re_compile_pattern. */ + RE_TRANSLATE_TYPE trans; + /* Copy of re_dfa_t's word_char. */ + re_const_bitset_ptr_t word_char; + /* true if REG_ICASE. */ + unsigned char icase; + unsigned char is_utf8; + unsigned char map_notascii; + unsigned char mbs_allocated; + unsigned char offsets_needed; + unsigned char newline_anchor; + unsigned char word_ops_used; + int mb_cur_max; +}; +typedef struct re_string_t re_string_t; + + +struct re_dfa_t; +typedef struct re_dfa_t re_dfa_t; + +#ifndef _LIBC +# ifdef __i386__ +# define internal_function __attribute ((regparm (3), stdcall)) +# else +# define internal_function +# endif +#endif + +static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, + Idx new_buf_len) + internal_function; +#ifdef RE_ENABLE_I18N +static void build_wcs_buffer (re_string_t *pstr) internal_function; +static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) + internal_function; +#endif /* RE_ENABLE_I18N */ +static void build_upper_buffer (re_string_t *pstr) internal_function; +static void re_string_translate_buffer (re_string_t *pstr) internal_function; +static unsigned int re_string_context_at (const re_string_t *input, Idx idx, + int eflags) + internal_function __attribute ((pure)); +#define re_string_peek_byte(pstr, offset) \ + ((pstr)->mbs[(pstr)->cur_idx + offset]) +#define re_string_fetch_byte(pstr) \ + ((pstr)->mbs[(pstr)->cur_idx++]) +#define re_string_first_byte(pstr, idx) \ + ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) +#define re_string_is_single_byte_char(pstr, idx) \ + ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ + || (pstr)->wcs[(idx) + 1] != WEOF)) +#define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) +#define re_string_cur_idx(pstr) ((pstr)->cur_idx) +#define re_string_get_buffer(pstr) ((pstr)->mbs) +#define re_string_length(pstr) ((pstr)->len) +#define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) +#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) +#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) + +#include + +#ifndef _LIBC +# 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. */ +# define __libc_use_alloca(n) ((n) < 4032) +# else +/* alloca is implemented with malloc, so just use malloc. */ +# define __libc_use_alloca(n) 0 +# endif +#endif + +#ifndef MAX +# define MAX(a,b) ((a) < (b) ? (b) : (a)) +#endif + +#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) +#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) +#define re_free(p) free (p) + +struct bin_tree_t +{ + struct bin_tree_t *parent; + struct bin_tree_t *left; + struct bin_tree_t *right; + struct bin_tree_t *first; + struct bin_tree_t *next; + + re_token_t token; + + /* `node_idx' is the index in dfa->nodes, if `type' == 0. + Otherwise `type' indicate the type of this node. */ + Idx node_idx; +}; +typedef struct bin_tree_t bin_tree_t; + +#define BIN_TREE_STORAGE_SIZE \ + ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) + +struct bin_tree_storage_t +{ + struct bin_tree_storage_t *next; + bin_tree_t data[BIN_TREE_STORAGE_SIZE]; +}; +typedef struct bin_tree_storage_t bin_tree_storage_t; + +#define CONTEXT_WORD 1 +#define CONTEXT_NEWLINE (CONTEXT_WORD << 1) +#define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) +#define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) + +#define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) +#define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) +#define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) +#define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) +#define IS_ORDINARY_CONTEXT(c) ((c) == 0) + +#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') +#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) +#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') +#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) + +#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ + ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ + || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ + || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ + || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) + +#define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ + ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ + || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ + || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ + || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) + +struct re_dfastate_t +{ + re_hashval_t hash; + re_node_set nodes; + re_node_set non_eps_nodes; + re_node_set inveclosure; + re_node_set *entrance_nodes; + struct re_dfastate_t **trtable, **word_trtable; + unsigned int context : 4; + unsigned int halt : 1; + /* If this state can accept `multi byte'. + Note that we refer to multibyte characters, and multi character + collating elements as `multi byte'. */ + unsigned int accept_mb : 1; + /* If this state has backreference node(s). */ + unsigned int has_backref : 1; + unsigned int has_constraint : 1; +}; +typedef struct re_dfastate_t re_dfastate_t; + +struct re_state_table_entry +{ + Idx num; + Idx alloc; + re_dfastate_t **array; +}; + +/* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ + +typedef struct +{ + Idx next_idx; + Idx alloc; + re_dfastate_t **array; +} state_array_t; + +/* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ + +typedef struct +{ + Idx node; + Idx str_idx; /* The position NODE match at. */ + state_array_t path; +} re_sub_match_last_t; + +/* Store information about the node NODE whose type is OP_OPEN_SUBEXP. + And information about the node, whose type is OP_CLOSE_SUBEXP, + corresponding to NODE is stored in LASTS. */ + +typedef struct +{ + Idx str_idx; + Idx node; + state_array_t *path; + Idx alasts; /* Allocation size of LASTS. */ + Idx nlasts; /* The number of LASTS. */ + re_sub_match_last_t **lasts; +} re_sub_match_top_t; + +struct re_backref_cache_entry +{ + Idx node; + Idx str_idx; + Idx subexp_from; + Idx subexp_to; + char more; + char unused; + unsigned short int eps_reachable_subexps_map; +}; + +typedef struct +{ + /* The string object corresponding to the input string. */ + re_string_t input; +#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) + const re_dfa_t *const dfa; +#else + const re_dfa_t *dfa; +#endif + /* EFLAGS of the argument of regexec. */ + int eflags; + /* Where the matching ends. */ + Idx match_last; + Idx last_node; + /* The state log used by the matcher. */ + re_dfastate_t **state_log; + Idx state_log_top; + /* Back reference cache. */ + Idx nbkref_ents; + Idx abkref_ents; + struct re_backref_cache_entry *bkref_ents; + int max_mb_elem_len; + Idx nsub_tops; + Idx asub_tops; + re_sub_match_top_t **sub_tops; +} re_match_context_t; + +typedef struct +{ + re_dfastate_t **sifted_states; + re_dfastate_t **limited_states; + Idx last_node; + Idx last_str_idx; + re_node_set limits; +} re_sift_context_t; + +struct re_fail_stack_ent_t +{ + Idx idx; + Idx node; + regmatch_t *regs; + re_node_set eps_via_nodes; +}; + +struct re_fail_stack_t +{ + Idx num; + Idx alloc; + struct re_fail_stack_ent_t *stack; +}; + +struct re_dfa_t +{ + re_token_t *nodes; + size_t nodes_alloc; + size_t nodes_len; + Idx *nexts; + Idx *org_indices; + re_node_set *edests; + re_node_set *eclosures; + re_node_set *inveclosures; + struct re_state_table_entry *state_table; + re_dfastate_t *init_state; + re_dfastate_t *init_state_word; + re_dfastate_t *init_state_nl; + re_dfastate_t *init_state_begbuf; + bin_tree_t *str_tree; + bin_tree_storage_t *str_tree_storage; + re_bitset_ptr_t sb_char; + int str_tree_storage_idx; + + /* number of subexpressions `re_nsub' is in regex_t. */ + re_hashval_t state_hash_mask; + Idx init_node; + Idx nbackref; /* The number of backreference in this dfa. */ + + /* Bitmap expressing which backreference is used. */ + bitset_word_t used_bkref_map; + bitset_word_t completed_bkref_map; + + unsigned int has_plural_match : 1; + /* If this dfa has "multibyte node", which is a backreference or + a node which can accept multibyte character or multi character + collating element. */ + unsigned int has_mb_node : 1; + unsigned int is_utf8 : 1; + unsigned int map_notascii : 1; + unsigned int word_ops_used : 1; + int mb_cur_max; + bitset_t word_char; + reg_syntax_t syntax; + Idx *subexp_map; +#ifdef DEBUG + char* re_str; +#endif +#ifdef _LIBC + __libc_lock_define (, lock) +#endif +}; + +#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) +#define re_node_set_remove(set,id) \ + (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) +#define re_node_set_empty(p) ((p)->nelem = 0) +#define re_node_set_free(set) re_free ((set)->elems) + + +typedef enum +{ + SB_CHAR, + MB_CHAR, + EQUIV_CLASS, + COLL_SYM, + CHAR_CLASS +} bracket_elem_type; + +typedef struct +{ + bracket_elem_type type; + union + { + unsigned char ch; + unsigned char *name; + wchar_t wch; + } opr; +} bracket_elem_t; + + +/* Inline functions for bitset_t operation. */ + +static inline void +bitset_set (bitset_t set, Idx i) +{ + set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; +} + +static inline void +bitset_clear (bitset_t set, Idx i) +{ + set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); +} + +static inline bool +bitset_contain (const bitset_t set, Idx i) +{ + return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; +} + +static inline void +bitset_empty (bitset_t set) +{ + memset (set, '\0', sizeof (bitset_t)); +} + +static inline void +bitset_set_all (bitset_t set) +{ + memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); + if (SBC_MAX % BITSET_WORD_BITS != 0) + set[BITSET_WORDS - 1] = + ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; +} + +static inline void +bitset_copy (bitset_t dest, const bitset_t src) +{ + memcpy (dest, src, sizeof (bitset_t)); +} + +static inline void +bitset_not (bitset_t set) +{ + int bitset_i; + for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) + set[bitset_i] = ~set[bitset_i]; + if (SBC_MAX % BITSET_WORD_BITS != 0) + set[BITSET_WORDS - 1] = + ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) + & ~set[BITSET_WORDS - 1]); +} + +static inline void +bitset_merge (bitset_t dest, const bitset_t src) +{ + int bitset_i; + for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) + dest[bitset_i] |= src[bitset_i]; +} + +static inline void +bitset_mask (bitset_t dest, const bitset_t src) +{ + int bitset_i; + for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) + dest[bitset_i] &= src[bitset_i]; +} + +#ifdef RE_ENABLE_I18N +/* Inline functions for re_string. */ +static inline int +internal_function __attribute ((pure)) +re_string_char_size_at (const re_string_t *pstr, Idx idx) +{ + int byte_idx; + if (pstr->mb_cur_max == 1) + return 1; + for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) + if (pstr->wcs[idx + byte_idx] != WEOF) + break; + return byte_idx; +} + +static inline wint_t +internal_function __attribute ((pure)) +re_string_wchar_at (const re_string_t *pstr, Idx idx) +{ + if (pstr->mb_cur_max == 1) + return (wint_t) pstr->mbs[idx]; + return (wint_t) pstr->wcs[idx]; +} + +static int +internal_function __attribute ((pure)) +re_string_elem_size_at (const re_string_t *pstr, Idx idx) +{ +# ifdef _LIBC + const unsigned char *p, *extra; + const int32_t *table, *indirect; + int32_t tmp; +# include + uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + + if (nrules != 0) + { + table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); + indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_INDIRECTMB); + p = pstr->mbs + idx; + tmp = findidx (&p); + return p - pstr->mbs - idx; + } + else +# endif /* _LIBC */ + return 1; +} +#endif /* RE_ENABLE_I18N */ + +#endif /* _REGEX_INTERNAL_H */ diff --git a/gnulib/lib/regexec.c b/gnulib/lib/regexec.c new file mode 100644 index 0000000..b136570 --- /dev/null +++ b/gnulib/lib/regexec.c @@ -0,0 +1,4399 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, + Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + 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. */ + +static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, + Idx n) internal_function; +static void match_ctx_clean (re_match_context_t *mctx) internal_function; +static void match_ctx_free (re_match_context_t *cache) internal_function; +static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, + Idx str_idx, Idx from, Idx to) + internal_function; +static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) + internal_function; +static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, + Idx str_idx) internal_function; +static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, + Idx node, Idx str_idx) + internal_function; +static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, + re_dfastate_t **limited_sts, Idx last_node, + Idx last_str_idx) + internal_function; +static reg_errcode_t re_search_internal (const regex_t *preg, + const char *string, Idx length, + Idx start, Idx last_start, Idx stop, + size_t nmatch, regmatch_t pmatch[], + int eflags) internal_function; +static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp, + const char *string1, Idx length1, + const char *string2, Idx length2, + Idx start, regoff_t range, + struct re_registers *regs, + Idx stop, bool ret_len) internal_function; +static regoff_t re_search_stub (struct re_pattern_buffer *bufp, + const char *string, Idx length, Idx start, + regoff_t range, Idx stop, + struct re_registers *regs, + bool ret_len) internal_function; +static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, + Idx nregs, int regs_allocated) + internal_function; +static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) + internal_function; +static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, + Idx *p_match_first) internal_function; +static Idx check_halt_state_context (const re_match_context_t *mctx, + const re_dfastate_t *state, Idx idx) + internal_function; +static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, + regmatch_t *prev_idx_match, Idx cur_node, + Idx cur_idx, Idx nmatch) internal_function; +static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, + Idx str_idx, Idx dest_node, Idx nregs, + regmatch_t *regs, + re_node_set *eps_via_nodes) + internal_function; +static reg_errcode_t set_regs (const regex_t *preg, + const re_match_context_t *mctx, + size_t nmatch, regmatch_t *pmatch, + bool fl_backtrack) internal_function; +static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) + internal_function; + +#ifdef RE_ENABLE_I18N +static int sift_states_iter_mb (const re_match_context_t *mctx, + re_sift_context_t *sctx, + Idx node_idx, Idx str_idx, Idx max_str_idx) + internal_function; +#endif /* RE_ENABLE_I18N */ +static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, + re_sift_context_t *sctx) + internal_function; +static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, + re_sift_context_t *sctx, Idx str_idx, + re_node_set *cur_dest) + internal_function; +static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, + re_sift_context_t *sctx, + Idx str_idx, + re_node_set *dest_nodes) + internal_function; +static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, + re_node_set *dest_nodes, + const re_node_set *candidates) + internal_function; +static bool check_dst_limits (const re_match_context_t *mctx, + const re_node_set *limits, + Idx dst_node, Idx dst_idx, Idx src_node, + Idx src_idx) internal_function; +static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, + int boundaries, Idx subexp_idx, + Idx from_node, Idx bkref_idx) + internal_function; +static int check_dst_limits_calc_pos (const re_match_context_t *mctx, + Idx limit, Idx subexp_idx, + Idx node, Idx str_idx, + Idx bkref_idx) internal_function; +static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, + re_node_set *dest_nodes, + const re_node_set *candidates, + re_node_set *limits, + struct re_backref_cache_entry *bkref_ents, + Idx str_idx) internal_function; +static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, + re_sift_context_t *sctx, + Idx str_idx, const re_node_set *candidates) + internal_function; +static reg_errcode_t merge_state_array (const re_dfa_t *dfa, + re_dfastate_t **dst, + re_dfastate_t **src, Idx num) + internal_function; +static re_dfastate_t *find_recover_state (reg_errcode_t *err, + re_match_context_t *mctx) internal_function; +static re_dfastate_t *transit_state (reg_errcode_t *err, + re_match_context_t *mctx, + re_dfastate_t *state) internal_function; +static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, + re_match_context_t *mctx, + re_dfastate_t *next_state) + internal_function; +static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, + re_node_set *cur_nodes, + Idx str_idx) internal_function; +#if 0 +static re_dfastate_t *transit_state_sb (reg_errcode_t *err, + re_match_context_t *mctx, + re_dfastate_t *pstate) + internal_function; +#endif +#ifdef RE_ENABLE_I18N +static reg_errcode_t transit_state_mb (re_match_context_t *mctx, + re_dfastate_t *pstate) + internal_function; +#endif /* RE_ENABLE_I18N */ +static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, + const re_node_set *nodes) + internal_function; +static reg_errcode_t get_subexp (re_match_context_t *mctx, + Idx bkref_node, Idx bkref_str_idx) + internal_function; +static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, + const re_sub_match_top_t *sub_top, + re_sub_match_last_t *sub_last, + Idx bkref_node, Idx bkref_str) + internal_function; +static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, + Idx subexp_idx, int type) internal_function; +static reg_errcode_t check_arrival (re_match_context_t *mctx, + state_array_t *path, Idx top_node, + Idx top_str, Idx last_node, Idx last_str, + int type) internal_function; +static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, + Idx str_idx, + re_node_set *cur_nodes, + re_node_set *next_nodes) + internal_function; +static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, + re_node_set *cur_nodes, + Idx ex_subexp, int type) + internal_function; +static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, + re_node_set *dst_nodes, + Idx target, Idx ex_subexp, + int type) internal_function; +static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, + re_node_set *cur_nodes, Idx cur_str, + Idx subexp_num, int type) + internal_function; +static bool build_trtable (const re_dfa_t *dfa, + re_dfastate_t *state) internal_function; +#ifdef RE_ENABLE_I18N +static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, + const re_string_t *input, Idx idx) + internal_function; +# ifdef _LIBC +static unsigned int find_collation_sequence_value (const unsigned char *mbs, + size_t name_len) + internal_function; +# endif /* _LIBC */ +#endif /* RE_ENABLE_I18N */ +static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, + const re_dfastate_t *state, + re_node_set *states_node, + bitset_t *states_ch) internal_function; +static bool check_node_accept (const re_match_context_t *mctx, + const re_token_t *node, Idx idx) + internal_function; +static reg_errcode_t extend_buffers (re_match_context_t *mctx) + internal_function; + +/* Entry point for POSIX code. */ + +/* regexec searches for a given pattern, specified by PREG, in the + string STRING. + + If NMATCH is zero or REG_NOSUB was set in the cflags argument to + `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at + least NMATCH elements, and we set them to the offsets of the + corresponding matched substrings. + + EFLAGS specifies `execution flags' which affect matching: if + REG_NOTBOL is set, then ^ does not match at the beginning of the + string; if REG_NOTEOL is set, then $ does not match at the end. + + We return 0 if we find a match and REG_NOMATCH if not. */ + +int +regexec (preg, string, nmatch, pmatch, eflags) + const regex_t *_Restrict_ preg; + const char *_Restrict_ string; + size_t nmatch; + regmatch_t pmatch[_Restrict_arr_]; + int eflags; +{ + reg_errcode_t err; + Idx start, length; +#ifdef _LIBC + re_dfa_t *dfa = (re_dfa_t *) preg->buffer; +#endif + + if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) + return REG_BADPAT; + + if (eflags & REG_STARTEND) + { + start = pmatch[0].rm_so; + length = pmatch[0].rm_eo; + } + else + { + start = 0; + length = strlen (string); + } + + __libc_lock_lock (dfa->lock); + if (preg->no_sub) + err = re_search_internal (preg, string, length, start, length, + length, 0, NULL, eflags); + else + err = re_search_internal (preg, string, length, start, length, + length, nmatch, pmatch, eflags); + __libc_lock_unlock (dfa->lock); + return err != REG_NOERROR; +} + +#ifdef _LIBC +# include +versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); + +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) +__typeof__ (__regexec) __compat_regexec; + +int +attribute_compat_text_section +__compat_regexec (const regex_t *_Restrict_ preg, + const char *_Restrict_ string, size_t nmatch, + regmatch_t pmatch[], int eflags) +{ + return regexec (preg, string, nmatch, pmatch, + eflags & (REG_NOTBOL | REG_NOTEOL)); +} +compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); +# endif +#endif + +/* Entry points for GNU code. */ + +/* re_match, re_search, re_match_2, re_search_2 + + The former two functions operate on STRING with length LENGTH, + while the later two operate on concatenation of STRING1 and STRING2 + with lengths LENGTH1 and LENGTH2, respectively. + + re_match() matches the compiled pattern in BUFP against the string, + starting at index START. + + re_search() first tries matching at index START, then it tries to match + starting from index START + 1, and so on. The last start position tried + is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same + way as re_match().) + + The parameter STOP of re_{match,search}_2 specifies that no match exceeding + the first STOP characters of the concatenation of the strings should be + concerned. + + If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match + and all groups is stored in REGS. (For the "_2" variants, the offsets are + computed relative to the concatenation, not relative to the individual + strings.) + + On success, re_match* functions return the length of the match, re_search* + return the position of the start of the match. Return value -1 means no + match was found and -2 indicates an internal error. */ + +regoff_t +re_match (bufp, string, length, start, regs) + struct re_pattern_buffer *bufp; + const char *string; + Idx length, start; + struct re_registers *regs; +{ + return re_search_stub (bufp, string, length, start, 0, length, regs, true); +} +#ifdef _LIBC +weak_alias (__re_match, re_match) +#endif + +regoff_t +re_search (bufp, string, length, start, range, regs) + struct re_pattern_buffer *bufp; + const char *string; + Idx length, start; + regoff_t range; + struct re_registers *regs; +{ + return re_search_stub (bufp, string, length, start, range, length, regs, + false); +} +#ifdef _LIBC +weak_alias (__re_search, re_search) +#endif + +regoff_t +re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + Idx length1, length2, start, stop; + struct re_registers *regs; +{ + return re_search_2_stub (bufp, string1, length1, string2, length2, + start, 0, regs, stop, true); +} +#ifdef _LIBC +weak_alias (__re_match_2, re_match_2) +#endif + +regoff_t +re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + Idx length1, length2, start, stop; + regoff_t range; + struct re_registers *regs; +{ + return re_search_2_stub (bufp, string1, length1, string2, length2, + start, range, regs, stop, false); +} +#ifdef _LIBC +weak_alias (__re_search_2, re_search_2) +#endif + +static regoff_t +internal_function +re_search_2_stub (struct re_pattern_buffer *bufp, + const char *string1, Idx length1, + const char *string2, Idx length2, + Idx start, regoff_t range, struct re_registers *regs, + Idx stop, bool ret_len) +{ + const char *str; + regoff_t rval; + Idx len = length1 + length2; + char *s = NULL; + + if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) + return -2; + + /* Concatenate the strings. */ + if (length2 > 0) + if (length1 > 0) + { + s = re_malloc (char, len); + + if (BE (s == NULL, 0)) + return -2; +#ifdef _LIBC + memcpy (__mempcpy (s, string1, length1), string2, length2); +#else + memcpy (s, string1, length1); + memcpy (s + length1, string2, length2); +#endif + str = s; + } + else + str = string2; + else + str = string1; + + rval = re_search_stub (bufp, str, len, start, range, stop, regs, + ret_len); + re_free (s); + return rval; +} + +/* The parameters have the same meaning as those of re_search. + Additional parameters: + If RET_LEN is true the length of the match is returned (re_match style); + otherwise the position of the match is returned. */ + +static regoff_t +internal_function +re_search_stub (struct re_pattern_buffer *bufp, + const char *string, Idx length, + Idx start, regoff_t range, Idx stop, struct re_registers *regs, + bool ret_len) +{ + reg_errcode_t result; + regmatch_t *pmatch; + Idx nregs; + regoff_t rval; + int eflags = 0; +#ifdef _LIBC + re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; +#endif + Idx last_start = start + range; + + /* Check for out-of-range. */ + if (BE (start < 0 || start > length, 0)) + return -1; + if (BE (length < last_start || (0 <= range && last_start < start), 0)) + last_start = length; + else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) + last_start = 0; + + __libc_lock_lock (dfa->lock); + + eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; + eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; + + /* Compile fastmap if we haven't yet. */ + if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) + re_compile_fastmap (bufp); + + if (BE (bufp->no_sub, 0)) + regs = NULL; + + /* We need at least 1 register. */ + if (regs == NULL) + nregs = 1; + else if (BE (bufp->regs_allocated == REGS_FIXED + && regs->num_regs <= bufp->re_nsub, 0)) + { + nregs = regs->num_regs; + if (BE (nregs < 1, 0)) + { + /* Nothing can be copied to regs. */ + regs = NULL; + nregs = 1; + } + } + else + nregs = bufp->re_nsub + 1; + pmatch = re_malloc (regmatch_t, nregs); + if (BE (pmatch == NULL, 0)) + { + rval = -2; + goto out; + } + + result = re_search_internal (bufp, string, length, start, last_start, stop, + nregs, pmatch, eflags); + + rval = 0; + + /* I hope we needn't fill ther regs with -1's when no match was found. */ + if (result != REG_NOERROR) + rval = -1; + else if (regs != NULL) + { + /* If caller wants register contents data back, copy them. */ + bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, + bufp->regs_allocated); + if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) + rval = -2; + } + + if (BE (rval == 0, 1)) + { + if (ret_len) + { + assert (pmatch[0].rm_so == start); + rval = pmatch[0].rm_eo - start; + } + else + rval = pmatch[0].rm_so; + } + re_free (pmatch); + out: + __libc_lock_unlock (dfa->lock); + return rval; +} + +static unsigned int +internal_function +re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, + int regs_allocated) +{ + int rval = REGS_REALLOCATE; + Idx i; + Idx need_regs = nregs + 1; + /* We need one extra element beyond `num_regs' for the `-1' marker GNU code + uses. */ + + /* Have the register data arrays been allocated? */ + if (regs_allocated == REGS_UNALLOCATED) + { /* No. So allocate them with malloc. */ + regs->start = re_malloc (regoff_t, need_regs); + if (BE (regs->start == NULL, 0)) + return REGS_UNALLOCATED; + regs->end = re_malloc (regoff_t, need_regs); + if (BE (regs->end == NULL, 0)) + { + re_free (regs->start); + return REGS_UNALLOCATED; + } + regs->num_regs = need_regs; + } + else if (regs_allocated == REGS_REALLOCATE) + { /* Yes. If we need more elements than were already + allocated, reallocate them. If we need fewer, just + leave it alone. */ + if (BE (need_regs > regs->num_regs, 0)) + { + regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); + regoff_t *new_end; + if (BE (new_start == NULL, 0)) + return REGS_UNALLOCATED; + new_end = re_realloc (regs->end, regoff_t, need_regs); + if (BE (new_end == NULL, 0)) + { + re_free (new_start); + return REGS_UNALLOCATED; + } + regs->start = new_start; + regs->end = new_end; + regs->num_regs = need_regs; + } + } + else + { + assert (regs_allocated == REGS_FIXED); + /* This function may not be called with REGS_FIXED and nregs too big. */ + assert (regs->num_regs >= nregs); + rval = REGS_FIXED; + } + + /* Copy the regs. */ + for (i = 0; i < nregs; ++i) + { + regs->start[i] = pmatch[i].rm_so; + regs->end[i] = pmatch[i].rm_eo; + } + for ( ; i < regs->num_regs; ++i) + regs->start[i] = regs->end[i] = -1; + + return rval; +} + +/* Set REGS to hold NUM_REGS registers, storing them in STARTS and + ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use + this memory for recording register information. STARTS and ENDS + must be allocated using the malloc library routine, and must each + be at least NUM_REGS * sizeof (regoff_t) bytes long. + + If NUM_REGS == 0, then subsequent matches should allocate their own + register data. + + Unless this function is called, the first search or match using + PATTERN_BUFFER will allocate its own register data, without + freeing the old data. */ + +void +re_set_registers (bufp, regs, num_regs, starts, ends) + struct re_pattern_buffer *bufp; + struct re_registers *regs; + __re_size_t num_regs; + regoff_t *starts, *ends; +{ + if (num_regs) + { + bufp->regs_allocated = REGS_REALLOCATE; + regs->num_regs = num_regs; + regs->start = starts; + regs->end = ends; + } + else + { + bufp->regs_allocated = REGS_UNALLOCATED; + regs->num_regs = 0; + regs->start = regs->end = NULL; + } +} +#ifdef _LIBC +weak_alias (__re_set_registers, re_set_registers) +#endif + +/* Entry points compatible with 4.2 BSD regex library. We don't define + them unless specifically requested. */ + +#if defined _REGEX_RE_COMP || defined _LIBC +int +# ifdef _LIBC +weak_function +# endif +re_exec (s) + const char *s; +{ + return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); +} +#endif /* _REGEX_RE_COMP */ + +/* Internal entry point. */ + +/* Searches for a compiled pattern PREG in the string STRING, whose + length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same + meaning as with regexec. LAST_START is START + RANGE, where + START and RANGE have the same meaning as with re_search. + Return REG_NOERROR if we find a match, and REG_NOMATCH if not, + otherwise return the error code. + Note: We assume front end functions already check ranges. + (0 <= LAST_START && LAST_START <= LENGTH) */ + +static reg_errcode_t +internal_function +re_search_internal (const regex_t *preg, + const char *string, Idx length, + Idx start, Idx last_start, Idx stop, + size_t nmatch, regmatch_t pmatch[], + int eflags) +{ + reg_errcode_t err; + const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; + Idx left_lim, right_lim; + int incr; + bool fl_longest_match; + int match_kind; + Idx match_first; + Idx match_last = REG_MISSING; + Idx extra_nmatch; + bool sb; + int ch; +#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) + re_match_context_t mctx = { .dfa = dfa }; +#else + re_match_context_t mctx; +#endif + char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate + && start != last_start && !preg->can_be_null) + ? preg->fastmap : NULL); + RE_TRANSLATE_TYPE t = preg->translate; + +#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) + memset (&mctx, '\0', sizeof (re_match_context_t)); + mctx.dfa = dfa; +#endif + + extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; + nmatch -= extra_nmatch; + + /* Check if the DFA haven't been compiled. */ + if (BE (preg->used == 0 || dfa->init_state == NULL + || dfa->init_state_word == NULL || dfa->init_state_nl == NULL + || dfa->init_state_begbuf == NULL, 0)) + return REG_NOMATCH; + +#ifdef DEBUG + /* We assume front-end functions already check them. */ + assert (0 <= last_start && last_start <= length); +#endif + + /* If initial states with non-begbuf contexts have no elements, + the regex must be anchored. If preg->newline_anchor is set, + we'll never use init_state_nl, so do not check it. */ + if (dfa->init_state->nodes.nelem == 0 + && dfa->init_state_word->nodes.nelem == 0 + && (dfa->init_state_nl->nodes.nelem == 0 + || !preg->newline_anchor)) + { + if (start != 0 && last_start != 0) + return REG_NOMATCH; + start = last_start = 0; + } + + /* We must check the longest matching, if nmatch > 0. */ + fl_longest_match = (nmatch != 0 || dfa->nbackref); + + err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, + preg->translate, preg->syntax & RE_ICASE, dfa); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + mctx.input.stop = stop; + mctx.input.raw_stop = stop; + mctx.input.newline_anchor = preg->newline_anchor; + + err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + + /* We will log all the DFA states through which the dfa pass, + if nmatch > 1, or this dfa has "multibyte node", which is a + back-reference or a node which can accept multibyte character or + multi character collating element. */ + if (nmatch > 1 || dfa->has_mb_node) + { + /* Avoid overflow. */ + if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0)) + { + err = REG_ESPACE; + goto free_return; + } + + mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); + if (BE (mctx.state_log == NULL, 0)) + { + err = REG_ESPACE; + goto free_return; + } + } + else + mctx.state_log = NULL; + + match_first = start; + mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF + : CONTEXT_NEWLINE | CONTEXT_BEGBUF; + + /* Check incrementally whether of not the input string match. */ + incr = (last_start < start) ? -1 : 1; + left_lim = (last_start < start) ? last_start : start; + right_lim = (last_start < start) ? start : last_start; + sb = dfa->mb_cur_max == 1; + match_kind = + (fastmap + ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) + | (start <= last_start ? 2 : 0) + | (t != NULL ? 1 : 0)) + : 8); + + for (;; match_first += incr) + { + err = REG_NOMATCH; + if (match_first < left_lim || right_lim < match_first) + goto free_return; + + /* Advance as rapidly as possible through the string, until we + find a plausible place to start matching. This may be done + with varying efficiency, so there are various possibilities: + only the most common of them are specialized, in order to + save on code size. We use a switch statement for speed. */ + switch (match_kind) + { + case 8: + /* No fastmap. */ + break; + + case 7: + /* Fastmap with single-byte translation, match forward. */ + while (BE (match_first < right_lim, 1) + && !fastmap[t[(unsigned char) string[match_first]]]) + ++match_first; + goto forward_match_found_start_or_reached_end; + + case 6: + /* Fastmap without translation, match forward. */ + while (BE (match_first < right_lim, 1) + && !fastmap[(unsigned char) string[match_first]]) + ++match_first; + + forward_match_found_start_or_reached_end: + if (BE (match_first == right_lim, 0)) + { + ch = match_first >= length + ? 0 : (unsigned char) string[match_first]; + if (!fastmap[t ? t[ch] : ch]) + goto free_return; + } + break; + + case 4: + case 5: + /* Fastmap without multi-byte translation, match backwards. */ + while (match_first >= left_lim) + { + ch = match_first >= length + ? 0 : (unsigned char) string[match_first]; + if (fastmap[t ? t[ch] : ch]) + break; + --match_first; + } + if (match_first < left_lim) + goto free_return; + break; + + default: + /* In this case, we can't determine easily the current byte, + since it might be a component byte of a multibyte + character. Then we use the constructed buffer instead. */ + for (;;) + { + /* If MATCH_FIRST is out of the valid range, reconstruct the + buffers. */ + __re_size_t offset = match_first - mctx.input.raw_mbs_idx; + if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) + { + err = re_string_reconstruct (&mctx.input, match_first, + eflags); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + + offset = match_first - mctx.input.raw_mbs_idx; + } + /* If MATCH_FIRST is out of the buffer, leave it as '\0'. + Note that MATCH_FIRST must not be smaller than 0. */ + ch = (match_first >= length + ? 0 : re_string_byte_at (&mctx.input, offset)); + if (fastmap[ch]) + break; + match_first += incr; + if (match_first < left_lim || match_first > right_lim) + { + err = REG_NOMATCH; + goto free_return; + } + } + break; + } + + /* Reconstruct the buffers so that the matcher can assume that + the matching starts from the beginning of the buffer. */ + err = re_string_reconstruct (&mctx.input, match_first, eflags); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + +#ifdef RE_ENABLE_I18N + /* Don't consider this char as a possible match start if it part, + yet isn't the head, of a multibyte character. */ + if (!sb && !re_string_first_byte (&mctx.input, 0)) + continue; +#endif + + /* It seems to be appropriate one, then use the matcher. */ + /* We assume that the matching starts from 0. */ + mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; + match_last = check_matching (&mctx, fl_longest_match, + start <= last_start ? &match_first : NULL); + if (match_last != REG_MISSING) + { + if (BE (match_last == REG_ERROR, 0)) + { + err = REG_ESPACE; + goto free_return; + } + else + { + mctx.match_last = match_last; + if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) + { + re_dfastate_t *pstate = mctx.state_log[match_last]; + mctx.last_node = check_halt_state_context (&mctx, pstate, + match_last); + } + if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) + || dfa->nbackref) + { + err = prune_impossible_nodes (&mctx); + if (err == REG_NOERROR) + break; + if (BE (err != REG_NOMATCH, 0)) + goto free_return; + match_last = REG_MISSING; + } + else + break; /* We found a match. */ + } + } + + match_ctx_clean (&mctx); + } + +#ifdef DEBUG + assert (match_last != REG_MISSING); + assert (err == REG_NOERROR); +#endif + + /* Set pmatch[] if we need. */ + if (nmatch > 0) + { + Idx reg_idx; + + /* Initialize registers. */ + for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) + pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; + + /* Set the points where matching start/end. */ + pmatch[0].rm_so = 0; + pmatch[0].rm_eo = mctx.match_last; + /* FIXME: This function should fail if mctx.match_last exceeds + the maximum possible regoff_t value. We need a new error + code REG_OVERFLOW. */ + + if (!preg->no_sub && nmatch > 1) + { + err = set_regs (preg, &mctx, nmatch, pmatch, + dfa->has_plural_match && dfa->nbackref > 0); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + + /* At last, add the offset to the each registers, since we slided + the buffers so that we could assume that the matching starts + from 0. */ + for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) + if (pmatch[reg_idx].rm_so != -1) + { +#ifdef RE_ENABLE_I18N + if (BE (mctx.input.offsets_needed != 0, 0)) + { + pmatch[reg_idx].rm_so = + (pmatch[reg_idx].rm_so == mctx.input.valid_len + ? mctx.input.valid_raw_len + : mctx.input.offsets[pmatch[reg_idx].rm_so]); + pmatch[reg_idx].rm_eo = + (pmatch[reg_idx].rm_eo == mctx.input.valid_len + ? mctx.input.valid_raw_len + : mctx.input.offsets[pmatch[reg_idx].rm_eo]); + } +#else + assert (mctx.input.offsets_needed == 0); +#endif + pmatch[reg_idx].rm_so += match_first; + pmatch[reg_idx].rm_eo += match_first; + } + for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) + { + pmatch[nmatch + reg_idx].rm_so = -1; + pmatch[nmatch + reg_idx].rm_eo = -1; + } + + if (dfa->subexp_map) + for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) + if (dfa->subexp_map[reg_idx] != reg_idx) + { + pmatch[reg_idx + 1].rm_so + = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; + pmatch[reg_idx + 1].rm_eo + = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; + } + } + + free_return: + re_free (mctx.state_log); + if (dfa->nbackref) + match_ctx_free (&mctx); + re_string_destruct (&mctx.input); + return err; +} + +static reg_errcode_t +internal_function +prune_impossible_nodes (re_match_context_t *mctx) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx halt_node, match_last; + reg_errcode_t ret; + re_dfastate_t **sifted_states; + re_dfastate_t **lim_states = NULL; + re_sift_context_t sctx; +#ifdef DEBUG + assert (mctx->state_log != NULL); +#endif + match_last = mctx->match_last; + halt_node = mctx->last_node; + + /* Avoid overflow. */ + if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0)) + return REG_ESPACE; + + sifted_states = re_malloc (re_dfastate_t *, match_last + 1); + if (BE (sifted_states == NULL, 0)) + { + ret = REG_ESPACE; + goto free_return; + } + if (dfa->nbackref) + { + lim_states = re_malloc (re_dfastate_t *, match_last + 1); + if (BE (lim_states == NULL, 0)) + { + ret = REG_ESPACE; + goto free_return; + } + while (1) + { + memset (lim_states, '\0', + sizeof (re_dfastate_t *) * (match_last + 1)); + sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, + match_last); + ret = sift_states_backward (mctx, &sctx); + re_node_set_free (&sctx.limits); + if (BE (ret != REG_NOERROR, 0)) + goto free_return; + if (sifted_states[0] != NULL || lim_states[0] != NULL) + break; + do + { + --match_last; + if (! REG_VALID_INDEX (match_last)) + { + ret = REG_NOMATCH; + goto free_return; + } + } while (mctx->state_log[match_last] == NULL + || !mctx->state_log[match_last]->halt); + halt_node = check_halt_state_context (mctx, + mctx->state_log[match_last], + match_last); + } + ret = merge_state_array (dfa, sifted_states, lim_states, + match_last + 1); + re_free (lim_states); + lim_states = NULL; + if (BE (ret != REG_NOERROR, 0)) + goto free_return; + } + else + { + sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); + ret = sift_states_backward (mctx, &sctx); + re_node_set_free (&sctx.limits); + if (BE (ret != REG_NOERROR, 0)) + goto free_return; + } + re_free (mctx->state_log); + mctx->state_log = sifted_states; + sifted_states = NULL; + mctx->last_node = halt_node; + mctx->match_last = match_last; + ret = REG_NOERROR; + free_return: + re_free (sifted_states); + re_free (lim_states); + return ret; +} + +/* Acquire an initial state and return it. + We must select appropriate initial state depending on the context, + since initial states may have constraints like "\<", "^", etc.. */ + +static inline re_dfastate_t * +__attribute ((always_inline)) internal_function +acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, + Idx idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + if (dfa->init_state->has_constraint) + { + unsigned int context; + context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); + if (IS_WORD_CONTEXT (context)) + return dfa->init_state_word; + else if (IS_ORDINARY_CONTEXT (context)) + return dfa->init_state; + else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) + return dfa->init_state_begbuf; + else if (IS_NEWLINE_CONTEXT (context)) + return dfa->init_state_nl; + else if (IS_BEGBUF_CONTEXT (context)) + { + /* It is relatively rare case, then calculate on demand. */ + return re_acquire_state_context (err, dfa, + dfa->init_state->entrance_nodes, + context); + } + else + /* Must not happen? */ + return dfa->init_state; + } + else + return dfa->init_state; +} + +/* Check whether the regular expression match input string INPUT or not, + and return the index where the matching end. Return REG_MISSING if + there is no match, and return REG_ERROR in case of an error. + FL_LONGEST_MATCH means we want the POSIX longest matching. + If P_MATCH_FIRST is not NULL, and the match fails, it is set to the + next place where we may want to try matching. + Note that the matcher assume that the maching starts from the current + index of the buffer. */ + +static Idx +internal_function +check_matching (re_match_context_t *mctx, bool fl_longest_match, + Idx *p_match_first) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx match = 0; + Idx match_last = REG_MISSING; + Idx cur_str_idx = re_string_cur_idx (&mctx->input); + re_dfastate_t *cur_state; + bool at_init_state = p_match_first != NULL; + Idx next_start_idx = cur_str_idx; + + err = REG_NOERROR; + cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); + /* An initial state must not be NULL (invalid). */ + if (BE (cur_state == NULL, 0)) + { + assert (err == REG_ESPACE); + return REG_ERROR; + } + + if (mctx->state_log != NULL) + { + mctx->state_log[cur_str_idx] = cur_state; + + /* Check OP_OPEN_SUBEXP in the initial state in case that we use them + later. E.g. Processing back references. */ + if (BE (dfa->nbackref, 0)) + { + at_init_state = false; + err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); + if (BE (err != REG_NOERROR, 0)) + return err; + + if (cur_state->has_backref) + { + err = transit_state_bkref (mctx, &cur_state->nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + } + + /* If the RE accepts NULL string. */ + if (BE (cur_state->halt, 0)) + { + if (!cur_state->has_constraint + || check_halt_state_context (mctx, cur_state, cur_str_idx)) + { + if (!fl_longest_match) + return cur_str_idx; + else + { + match_last = cur_str_idx; + match = 1; + } + } + } + + while (!re_string_eoi (&mctx->input)) + { + re_dfastate_t *old_state = cur_state; + Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; + + if (BE (next_char_idx >= mctx->input.bufs_len, 0) + || (BE (next_char_idx >= mctx->input.valid_len, 0) + && mctx->input.valid_len < mctx->input.len)) + { + err = extend_buffers (mctx); + if (BE (err != REG_NOERROR, 0)) + { + assert (err == REG_ESPACE); + return REG_ERROR; + } + } + + cur_state = transit_state (&err, mctx, cur_state); + if (mctx->state_log != NULL) + cur_state = merge_state_with_log (&err, mctx, cur_state); + + if (cur_state == NULL) + { + /* Reached the invalid state or an error. Try to recover a valid + state using the state log, if available and if we have not + already found a valid (even if not the longest) match. */ + if (BE (err != REG_NOERROR, 0)) + return REG_ERROR; + + if (mctx->state_log == NULL + || (match && !fl_longest_match) + || (cur_state = find_recover_state (&err, mctx)) == NULL) + break; + } + + if (BE (at_init_state, 0)) + { + if (old_state == cur_state) + next_start_idx = next_char_idx; + else + at_init_state = false; + } + + if (cur_state->halt) + { + /* Reached a halt state. + Check the halt state can satisfy the current context. */ + if (!cur_state->has_constraint + || check_halt_state_context (mctx, cur_state, + re_string_cur_idx (&mctx->input))) + { + /* We found an appropriate halt state. */ + match_last = re_string_cur_idx (&mctx->input); + match = 1; + + /* We found a match, do not modify match_first below. */ + p_match_first = NULL; + if (!fl_longest_match) + break; + } + } + } + + if (p_match_first) + *p_match_first += next_start_idx; + + return match_last; +} + +/* Check NODE match the current context. */ + +static bool +internal_function +check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) +{ + re_token_type_t type = dfa->nodes[node].type; + unsigned int constraint = dfa->nodes[node].constraint; + if (type != END_OF_RE) + return false; + if (!constraint) + return true; + if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) + return false; + return true; +} + +/* Check the halt state STATE match the current context. + Return 0 if not match, if the node, STATE has, is a halt node and + match the context, return the node. */ + +static Idx +internal_function +check_halt_state_context (const re_match_context_t *mctx, + const re_dfastate_t *state, Idx idx) +{ + Idx i; + unsigned int context; +#ifdef DEBUG + assert (state->halt); +#endif + context = re_string_context_at (&mctx->input, idx, mctx->eflags); + for (i = 0; i < state->nodes.nelem; ++i) + if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) + return state->nodes.elems[i]; + return 0; +} + +/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA + corresponding to the DFA). + Return the destination node, and update EPS_VIA_NODES; + return REG_MISSING in case of errors. */ + +static Idx +internal_function +proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, + Idx *pidx, Idx node, re_node_set *eps_via_nodes, + struct re_fail_stack_t *fs) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx i; + bool ok; + if (IS_EPSILON_NODE (dfa->nodes[node].type)) + { + re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; + re_node_set *edests = &dfa->edests[node]; + Idx dest_node; + ok = re_node_set_insert (eps_via_nodes, node); + if (BE (! ok, 0)) + return REG_ERROR; + /* Pick up a valid destination, or return REG_MISSING if none + is found. */ + for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i) + { + Idx candidate = edests->elems[i]; + if (!re_node_set_contains (cur_nodes, candidate)) + continue; + if (dest_node == REG_MISSING) + dest_node = candidate; + + else + { + /* In order to avoid infinite loop like "(a*)*", return the second + epsilon-transition if the first was already considered. */ + if (re_node_set_contains (eps_via_nodes, dest_node)) + return candidate; + + /* Otherwise, push the second epsilon-transition on the fail stack. */ + else if (fs != NULL + && push_fail_stack (fs, *pidx, candidate, nregs, regs, + eps_via_nodes)) + return REG_ERROR; + + /* We know we are going to exit. */ + break; + } + } + return dest_node; + } + else + { + Idx naccepted = 0; + re_token_type_t type = dfa->nodes[node].type; + +#ifdef RE_ENABLE_I18N + if (dfa->nodes[node].accept_mb) + naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); + else +#endif /* RE_ENABLE_I18N */ + if (type == OP_BACK_REF) + { + Idx subexp_idx = dfa->nodes[node].opr.idx + 1; + naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; + if (fs != NULL) + { + if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) + return REG_MISSING; + else if (naccepted) + { + char *buf = (char *) re_string_get_buffer (&mctx->input); + if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, + naccepted) != 0) + return REG_MISSING; + } + } + + if (naccepted == 0) + { + Idx dest_node; + ok = re_node_set_insert (eps_via_nodes, node); + if (BE (! ok, 0)) + return REG_ERROR; + dest_node = dfa->edests[node].elems[0]; + if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, + dest_node)) + return dest_node; + } + } + + if (naccepted != 0 + || check_node_accept (mctx, dfa->nodes + node, *pidx)) + { + Idx dest_node = dfa->nexts[node]; + *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; + if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL + || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, + dest_node))) + return REG_MISSING; + re_node_set_empty (eps_via_nodes); + return dest_node; + } + } + return REG_MISSING; +} + +static reg_errcode_t +internal_function +push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, + Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) +{ + reg_errcode_t err; + Idx num = fs->num++; + if (fs->num == fs->alloc) + { + struct re_fail_stack_ent_t *new_array; + new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) + * fs->alloc * 2)); + if (new_array == NULL) + return REG_ESPACE; + fs->alloc *= 2; + fs->stack = new_array; + } + fs->stack[num].idx = str_idx; + fs->stack[num].node = dest_node; + fs->stack[num].regs = re_malloc (regmatch_t, nregs); + if (fs->stack[num].regs == NULL) + return REG_ESPACE; + memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); + err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); + return err; +} + +static Idx +internal_function +pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, + regmatch_t *regs, re_node_set *eps_via_nodes) +{ + Idx num = --fs->num; + assert (REG_VALID_INDEX (num)); + *pidx = fs->stack[num].idx; + memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); + re_node_set_free (eps_via_nodes); + re_free (fs->stack[num].regs); + *eps_via_nodes = fs->stack[num].eps_via_nodes; + return fs->stack[num].node; +} + +/* Set the positions where the subexpressions are starts/ends to registers + PMATCH. + Note: We assume that pmatch[0] is already set, and + pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ + +static reg_errcode_t +internal_function +set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, + regmatch_t *pmatch, bool fl_backtrack) +{ + const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; + Idx idx, cur_node; + re_node_set eps_via_nodes; + struct re_fail_stack_t *fs; + struct re_fail_stack_t fs_body = { 0, 2, NULL }; + regmatch_t *prev_idx_match; + bool prev_idx_match_malloced = false; + +#ifdef DEBUG + assert (nmatch > 1); + assert (mctx->state_log != NULL); +#endif + if (fl_backtrack) + { + fs = &fs_body; + fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); + if (fs->stack == NULL) + return REG_ESPACE; + } + else + fs = NULL; + + cur_node = dfa->init_node; + re_node_set_init_empty (&eps_via_nodes); + + if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) + prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); + else + { + prev_idx_match = re_malloc (regmatch_t, nmatch); + if (prev_idx_match == NULL) + { + free_fail_stack_return (fs); + return REG_ESPACE; + } + prev_idx_match_malloced = true; + } + memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); + + for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) + { + update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); + + if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) + { + Idx reg_idx; + if (fs) + { + for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) + if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) + break; + if (reg_idx == nmatch) + { + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + return free_fail_stack_return (fs); + } + cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, + &eps_via_nodes); + } + else + { + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + return REG_NOERROR; + } + } + + /* Proceed to next node. */ + cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, + &eps_via_nodes, fs); + + if (BE (! REG_VALID_INDEX (cur_node), 0)) + { + if (BE (cur_node == REG_ERROR, 0)) + { + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + free_fail_stack_return (fs); + return REG_ESPACE; + } + if (fs) + cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, + &eps_via_nodes); + else + { + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + return REG_NOMATCH; + } + } + } + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + return free_fail_stack_return (fs); +} + +static reg_errcode_t +internal_function +free_fail_stack_return (struct re_fail_stack_t *fs) +{ + if (fs) + { + Idx fs_idx; + for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) + { + re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); + re_free (fs->stack[fs_idx].regs); + } + re_free (fs->stack); + } + return REG_NOERROR; +} + +static void +internal_function +update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, + regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) +{ + int type = dfa->nodes[cur_node].type; + if (type == OP_OPEN_SUBEXP) + { + Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; + + /* We are at the first node of this sub expression. */ + if (reg_num < nmatch) + { + pmatch[reg_num].rm_so = cur_idx; + pmatch[reg_num].rm_eo = -1; + } + } + else if (type == OP_CLOSE_SUBEXP) + { + Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; + if (reg_num < nmatch) + { + /* We are at the last node of this sub expression. */ + if (pmatch[reg_num].rm_so < cur_idx) + { + pmatch[reg_num].rm_eo = cur_idx; + /* This is a non-empty match or we are not inside an optional + subexpression. Accept this right away. */ + memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); + } + else + { + if (dfa->nodes[cur_node].opt_subexp + && prev_idx_match[reg_num].rm_so != -1) + /* We transited through an empty match for an optional + subexpression, like (a?)*, and this is not the subexp's + first match. Copy back the old content of the registers + so that matches of an inner subexpression are undone as + well, like in ((a?))*. */ + memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); + else + /* We completed a subexpression, but it may be part of + an optional one, so do not update PREV_IDX_MATCH. */ + pmatch[reg_num].rm_eo = cur_idx; + } + } + } +} + +/* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 + and sift the nodes in each states according to the following rules. + Updated state_log will be wrote to STATE_LOG. + + Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if... + 1. When STR_IDX == MATCH_LAST(the last index in the state_log): + If `a' isn't the LAST_NODE and `a' can't epsilon transit to + the LAST_NODE, we throw away the node `a'. + 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts + string `s' and transit to `b': + i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw + away the node `a'. + ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is + thrown away, we throw away the node `a'. + 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': + i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the + node `a'. + ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, + we throw away the node `a'. */ + +#define STATE_NODE_CONTAINS(state,node) \ + ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) + +static reg_errcode_t +internal_function +sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) +{ + reg_errcode_t err; + int null_cnt = 0; + Idx str_idx = sctx->last_str_idx; + re_node_set cur_dest; + +#ifdef DEBUG + assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); +#endif + + /* Build sifted state_log[str_idx]. It has the nodes which can epsilon + transit to the last_node and the last_node itself. */ + err = re_node_set_init_1 (&cur_dest, sctx->last_node); + if (BE (err != REG_NOERROR, 0)) + return err; + err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + + /* Then check each states in the state_log. */ + while (str_idx > 0) + { + /* Update counters. */ + null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; + if (null_cnt > mctx->max_mb_elem_len) + { + memset (sctx->sifted_states, '\0', + sizeof (re_dfastate_t *) * str_idx); + re_node_set_free (&cur_dest); + return REG_NOERROR; + } + re_node_set_empty (&cur_dest); + --str_idx; + + if (mctx->state_log[str_idx]) + { + err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + + /* Add all the nodes which satisfy the following conditions: + - It can epsilon transit to a node in CUR_DEST. + - It is in CUR_SRC. + And update state_log. */ + err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + err = REG_NOERROR; + free_return: + re_node_set_free (&cur_dest); + return err; +} + +static reg_errcode_t +internal_function +build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, + Idx str_idx, re_node_set *cur_dest) +{ + const re_dfa_t *const dfa = mctx->dfa; + const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; + Idx i; + + /* Then build the next sifted state. + We build the next sifted state on `cur_dest', and update + `sifted_states[str_idx]' with `cur_dest'. + Note: + `cur_dest' is the sifted state from `state_log[str_idx + 1]'. + `cur_src' points the node_set of the old `state_log[str_idx]' + (with the epsilon nodes pre-filtered out). */ + for (i = 0; i < cur_src->nelem; i++) + { + Idx prev_node = cur_src->elems[i]; + int naccepted = 0; + bool ok; + +#ifdef DEBUG + re_token_type_t type = dfa->nodes[prev_node].type; + assert (!IS_EPSILON_NODE (type)); +#endif +#ifdef RE_ENABLE_I18N + /* If the node may accept `multi byte'. */ + if (dfa->nodes[prev_node].accept_mb) + naccepted = sift_states_iter_mb (mctx, sctx, prev_node, + str_idx, sctx->last_str_idx); +#endif /* RE_ENABLE_I18N */ + + /* We don't check backreferences here. + See update_cur_sifted_state(). */ + if (!naccepted + && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) + && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], + dfa->nexts[prev_node])) + naccepted = 1; + + if (naccepted == 0) + continue; + + if (sctx->limits.nelem) + { + Idx to_idx = str_idx + naccepted; + if (check_dst_limits (mctx, &sctx->limits, + dfa->nexts[prev_node], to_idx, + prev_node, str_idx)) + continue; + } + ok = re_node_set_insert (cur_dest, prev_node); + if (BE (! ok, 0)) + return REG_ESPACE; + } + + return REG_NOERROR; +} + +/* Helper functions. */ + +static reg_errcode_t +internal_function +clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) +{ + Idx top = mctx->state_log_top; + + if (next_state_log_idx >= mctx->input.bufs_len + || (next_state_log_idx >= mctx->input.valid_len + && mctx->input.valid_len < mctx->input.len)) + { + reg_errcode_t err; + err = extend_buffers (mctx); + if (BE (err != REG_NOERROR, 0)) + return err; + } + + if (top < next_state_log_idx) + { + memset (mctx->state_log + top + 1, '\0', + sizeof (re_dfastate_t *) * (next_state_log_idx - top)); + mctx->state_log_top = next_state_log_idx; + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, + re_dfastate_t **src, Idx num) +{ + Idx st_idx; + reg_errcode_t err; + for (st_idx = 0; st_idx < num; ++st_idx) + { + if (dst[st_idx] == NULL) + dst[st_idx] = src[st_idx]; + else if (src[st_idx] != NULL) + { + re_node_set merged_set; + err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, + &src[st_idx]->nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); + re_node_set_free (&merged_set); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +update_cur_sifted_state (const re_match_context_t *mctx, + re_sift_context_t *sctx, Idx str_idx, + re_node_set *dest_nodes) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err = REG_NOERROR; + const re_node_set *candidates; + candidates = ((mctx->state_log[str_idx] == NULL) ? NULL + : &mctx->state_log[str_idx]->nodes); + + if (dest_nodes->nelem == 0) + sctx->sifted_states[str_idx] = NULL; + else + { + if (candidates) + { + /* At first, add the nodes which can epsilon transit to a node in + DEST_NODE. */ + err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + + /* Then, check the limitations in the current sift_context. */ + if (sctx->limits.nelem) + { + err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, + mctx->bkref_ents, str_idx); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + + sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + } + + if (candidates && mctx->state_log[str_idx]->has_backref) + { + err = sift_states_bkref (mctx, sctx, str_idx, candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, + const re_node_set *candidates) +{ + reg_errcode_t err = REG_NOERROR; + Idx i; + + re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + + if (!state->inveclosure.alloc) + { + err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); + if (BE (err != REG_NOERROR, 0)) + return REG_ESPACE; + for (i = 0; i < dest_nodes->nelem; i++) + re_node_set_merge (&state->inveclosure, + dfa->inveclosures + dest_nodes->elems[i]); + } + return re_node_set_add_intersect (dest_nodes, candidates, + &state->inveclosure); +} + +static reg_errcode_t +internal_function +sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, + const re_node_set *candidates) +{ + Idx ecl_idx; + reg_errcode_t err; + re_node_set *inv_eclosure = dfa->inveclosures + node; + re_node_set except_nodes; + re_node_set_init_empty (&except_nodes); + for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) + { + Idx cur_node = inv_eclosure->elems[ecl_idx]; + if (cur_node == node) + continue; + if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) + { + Idx edst1 = dfa->edests[cur_node].elems[0]; + Idx edst2 = ((dfa->edests[cur_node].nelem > 1) + ? dfa->edests[cur_node].elems[1] : REG_MISSING); + if ((!re_node_set_contains (inv_eclosure, edst1) + && re_node_set_contains (dest_nodes, edst1)) + || (REG_VALID_NONZERO_INDEX (edst2) + && !re_node_set_contains (inv_eclosure, edst2) + && re_node_set_contains (dest_nodes, edst2))) + { + err = re_node_set_add_intersect (&except_nodes, candidates, + dfa->inveclosures + cur_node); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&except_nodes); + return err; + } + } + } + } + for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) + { + Idx cur_node = inv_eclosure->elems[ecl_idx]; + if (!re_node_set_contains (&except_nodes, cur_node)) + { + Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; + re_node_set_remove_at (dest_nodes, idx); + } + } + re_node_set_free (&except_nodes); + return REG_NOERROR; +} + +static bool +internal_function +check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, + Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx lim_idx, src_pos, dst_pos; + + Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); + Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); + for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) + { + Idx subexp_idx; + struct re_backref_cache_entry *ent; + ent = mctx->bkref_ents + limits->elems[lim_idx]; + subexp_idx = dfa->nodes[ent->node].opr.idx; + + dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], + subexp_idx, dst_node, dst_idx, + dst_bkref_idx); + src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], + subexp_idx, src_node, src_idx, + src_bkref_idx); + + /* In case of: + ( ) + ( ) + ( ) */ + if (src_pos == dst_pos) + continue; /* This is unrelated limitation. */ + else + return true; + } + return false; +} + +static int +internal_function +check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, + Idx subexp_idx, Idx from_node, Idx bkref_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + const re_node_set *eclosures = dfa->eclosures + from_node; + Idx node_idx; + + /* Else, we are on the boundary: examine the nodes on the epsilon + closure. */ + for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) + { + Idx node = eclosures->elems[node_idx]; + switch (dfa->nodes[node].type) + { + case OP_BACK_REF: + if (bkref_idx != REG_MISSING) + { + struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; + do + { + Idx dst; + int cpos; + + if (ent->node != node) + continue; + + if (subexp_idx < BITSET_WORD_BITS + && !(ent->eps_reachable_subexps_map + & ((bitset_word_t) 1 << subexp_idx))) + continue; + + /* Recurse trying to reach the OP_OPEN_SUBEXP and + OP_CLOSE_SUBEXP cases below. But, if the + destination node is the same node as the source + node, don't recurse because it would cause an + infinite loop: a regex that exhibits this behavior + is ()\1*\1* */ + dst = dfa->edests[node].elems[0]; + if (dst == from_node) + { + if (boundaries & 1) + return -1; + else /* if (boundaries & 2) */ + return 0; + } + + cpos = + check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, + dst, bkref_idx); + if (cpos == -1 /* && (boundaries & 1) */) + return -1; + if (cpos == 0 && (boundaries & 2)) + return 0; + + if (subexp_idx < BITSET_WORD_BITS) + ent->eps_reachable_subexps_map + &= ~((bitset_word_t) 1 << subexp_idx); + } + while (ent++->more); + } + break; + + case OP_OPEN_SUBEXP: + if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) + return -1; + break; + + case OP_CLOSE_SUBEXP: + if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) + return 0; + break; + + default: + break; + } + } + + return (boundaries & 2) ? 1 : 0; +} + +static int +internal_function +check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, + Idx subexp_idx, Idx from_node, Idx str_idx, + Idx bkref_idx) +{ + struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; + int boundaries; + + /* If we are outside the range of the subexpression, return -1 or 1. */ + if (str_idx < lim->subexp_from) + return -1; + + if (lim->subexp_to < str_idx) + return 1; + + /* If we are within the subexpression, return 0. */ + boundaries = (str_idx == lim->subexp_from); + boundaries |= (str_idx == lim->subexp_to) << 1; + if (boundaries == 0) + return 0; + + /* Else, examine epsilon closure. */ + return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, + from_node, bkref_idx); +} + +/* Check the limitations of sub expressions LIMITS, and remove the nodes + which are against limitations from DEST_NODES. */ + +static reg_errcode_t +internal_function +check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, + const re_node_set *candidates, re_node_set *limits, + struct re_backref_cache_entry *bkref_ents, Idx str_idx) +{ + reg_errcode_t err; + Idx node_idx, lim_idx; + + for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) + { + Idx subexp_idx; + struct re_backref_cache_entry *ent; + ent = bkref_ents + limits->elems[lim_idx]; + + if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) + continue; /* This is unrelated limitation. */ + + subexp_idx = dfa->nodes[ent->node].opr.idx; + if (ent->subexp_to == str_idx) + { + Idx ops_node = REG_MISSING; + Idx cls_node = REG_MISSING; + for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) + { + Idx node = dest_nodes->elems[node_idx]; + re_token_type_t type = dfa->nodes[node].type; + if (type == OP_OPEN_SUBEXP + && subexp_idx == dfa->nodes[node].opr.idx) + ops_node = node; + else if (type == OP_CLOSE_SUBEXP + && subexp_idx == dfa->nodes[node].opr.idx) + cls_node = node; + } + + /* Check the limitation of the open subexpression. */ + /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ + if (REG_VALID_INDEX (ops_node)) + { + err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, + candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + } + + /* Check the limitation of the close subexpression. */ + if (REG_VALID_INDEX (cls_node)) + for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) + { + Idx node = dest_nodes->elems[node_idx]; + if (!re_node_set_contains (dfa->inveclosures + node, + cls_node) + && !re_node_set_contains (dfa->eclosures + node, + cls_node)) + { + /* It is against this limitation. + Remove it form the current sifted state. */ + err = sub_epsilon_src_nodes (dfa, node, dest_nodes, + candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + --node_idx; + } + } + } + else /* (ent->subexp_to != str_idx) */ + { + for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) + { + Idx node = dest_nodes->elems[node_idx]; + re_token_type_t type = dfa->nodes[node].type; + if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) + { + if (subexp_idx != dfa->nodes[node].opr.idx) + continue; + /* It is against this limitation. + Remove it form the current sifted state. */ + err = sub_epsilon_src_nodes (dfa, node, dest_nodes, + candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + } + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, + Idx str_idx, const re_node_set *candidates) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx node_idx, node; + re_sift_context_t local_sctx; + Idx first_idx = search_cur_bkref_entry (mctx, str_idx); + + if (first_idx == REG_MISSING) + return REG_NOERROR; + + local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ + + for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) + { + Idx enabled_idx; + re_token_type_t type; + struct re_backref_cache_entry *entry; + node = candidates->elems[node_idx]; + type = dfa->nodes[node].type; + /* Avoid infinite loop for the REs like "()\1+". */ + if (node == sctx->last_node && str_idx == sctx->last_str_idx) + continue; + if (type != OP_BACK_REF) + continue; + + entry = mctx->bkref_ents + first_idx; + enabled_idx = first_idx; + do + { + Idx subexp_len; + Idx to_idx; + Idx dst_node; + bool ok; + re_dfastate_t *cur_state; + + if (entry->node != node) + continue; + subexp_len = entry->subexp_to - entry->subexp_from; + to_idx = str_idx + subexp_len; + dst_node = (subexp_len ? dfa->nexts[node] + : dfa->edests[node].elems[0]); + + if (to_idx > sctx->last_str_idx + || sctx->sifted_states[to_idx] == NULL + || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) + || check_dst_limits (mctx, &sctx->limits, node, + str_idx, dst_node, to_idx)) + continue; + + if (local_sctx.sifted_states == NULL) + { + local_sctx = *sctx; + err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + local_sctx.last_node = node; + local_sctx.last_str_idx = str_idx; + ok = re_node_set_insert (&local_sctx.limits, enabled_idx); + if (BE (! ok, 0)) + { + err = REG_ESPACE; + goto free_return; + } + cur_state = local_sctx.sifted_states[str_idx]; + err = sift_states_backward (mctx, &local_sctx); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + if (sctx->limited_states != NULL) + { + err = merge_state_array (dfa, sctx->limited_states, + local_sctx.sifted_states, + str_idx + 1); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + local_sctx.sifted_states[str_idx] = cur_state; + re_node_set_remove (&local_sctx.limits, enabled_idx); + + /* mctx->bkref_ents may have changed, reload the pointer. */ + entry = mctx->bkref_ents + enabled_idx; + } + while (enabled_idx++, entry++->more); + } + err = REG_NOERROR; + free_return: + if (local_sctx.sifted_states != NULL) + { + re_node_set_free (&local_sctx.limits); + } + + return err; +} + + +#ifdef RE_ENABLE_I18N +static int +internal_function +sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, + Idx node_idx, Idx str_idx, Idx max_str_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + int naccepted; + /* Check the node can accept `multi byte'. */ + naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); + if (naccepted > 0 && str_idx + naccepted <= max_str_idx && + !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], + dfa->nexts[node_idx])) + /* The node can't accept the `multi byte', or the + destination was already thrown away, then the node + could't accept the current input `multi byte'. */ + naccepted = 0; + /* Otherwise, it is sure that the node could accept + `naccepted' bytes input. */ + return naccepted; +} +#endif /* RE_ENABLE_I18N */ + + +/* Functions for state transition. */ + +/* Return the next state to which the current state STATE will transit by + accepting the current input byte, and update STATE_LOG if necessary. + If STATE can accept a multibyte char/collating element/back reference + update the destination of STATE_LOG. */ + +static re_dfastate_t * +internal_function +transit_state (reg_errcode_t *err, re_match_context_t *mctx, + re_dfastate_t *state) +{ + re_dfastate_t **trtable; + unsigned char ch; + +#ifdef RE_ENABLE_I18N + /* If the current state can accept multibyte. */ + if (BE (state->accept_mb, 0)) + { + *err = transit_state_mb (mctx, state); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + } +#endif /* RE_ENABLE_I18N */ + + /* Then decide the next state with the single byte. */ +#if 0 + if (0) + /* don't use transition table */ + return transit_state_sb (err, mctx, state); +#endif + + /* Use transition table */ + ch = re_string_fetch_byte (&mctx->input); + for (;;) + { + trtable = state->trtable; + if (BE (trtable != NULL, 1)) + return trtable[ch]; + + trtable = state->word_trtable; + if (BE (trtable != NULL, 1)) + { + unsigned int context; + context + = re_string_context_at (&mctx->input, + re_string_cur_idx (&mctx->input) - 1, + mctx->eflags); + if (IS_WORD_CONTEXT (context)) + return trtable[ch + SBC_MAX]; + else + return trtable[ch]; + } + + if (!build_trtable (mctx->dfa, state)) + { + *err = REG_ESPACE; + return NULL; + } + + /* Retry, we now have a transition table. */ + } +} + +/* Update the state_log if we need */ +static re_dfastate_t * +internal_function +merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, + re_dfastate_t *next_state) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx cur_idx = re_string_cur_idx (&mctx->input); + + if (cur_idx > mctx->state_log_top) + { + mctx->state_log[cur_idx] = next_state; + mctx->state_log_top = cur_idx; + } + else if (mctx->state_log[cur_idx] == 0) + { + mctx->state_log[cur_idx] = next_state; + } + else + { + re_dfastate_t *pstate; + unsigned int context; + re_node_set next_nodes, *log_nodes, *table_nodes = NULL; + /* If (state_log[cur_idx] != 0), it implies that cur_idx is + the destination of a multibyte char/collating element/ + back reference. Then the next state is the union set of + these destinations and the results of the transition table. */ + pstate = mctx->state_log[cur_idx]; + log_nodes = pstate->entrance_nodes; + if (next_state != NULL) + { + table_nodes = next_state->entrance_nodes; + *err = re_node_set_init_union (&next_nodes, table_nodes, + log_nodes); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + } + else + next_nodes = *log_nodes; + /* Note: We already add the nodes of the initial state, + then we don't need to add them here. */ + + context = re_string_context_at (&mctx->input, + re_string_cur_idx (&mctx->input) - 1, + mctx->eflags); + next_state = mctx->state_log[cur_idx] + = re_acquire_state_context (err, dfa, &next_nodes, context); + /* We don't need to check errors here, since the return value of + this function is next_state and ERR is already set. */ + + if (table_nodes != NULL) + re_node_set_free (&next_nodes); + } + + if (BE (dfa->nbackref, 0) && next_state != NULL) + { + /* Check OP_OPEN_SUBEXP in the current state in case that we use them + later. We must check them here, since the back references in the + next state might use them. */ + *err = check_subexp_matching_top (mctx, &next_state->nodes, + cur_idx); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + + /* If the next state has back references. */ + if (next_state->has_backref) + { + *err = transit_state_bkref (mctx, &next_state->nodes); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + next_state = mctx->state_log[cur_idx]; + } + } + + return next_state; +} + +/* Skip bytes in the input that correspond to part of a + multi-byte match, then look in the log for a state + from which to restart matching. */ +static re_dfastate_t * +internal_function +find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) +{ + re_dfastate_t *cur_state; + do + { + Idx max = mctx->state_log_top; + Idx cur_str_idx = re_string_cur_idx (&mctx->input); + + do + { + if (++cur_str_idx > max) + return NULL; + re_string_skip_bytes (&mctx->input, 1); + } + while (mctx->state_log[cur_str_idx] == NULL); + + cur_state = merge_state_with_log (err, mctx, NULL); + } + while (*err == REG_NOERROR && cur_state == NULL); + return cur_state; +} + +/* Helper functions for transit_state. */ + +/* From the node set CUR_NODES, pick up the nodes whose types are + OP_OPEN_SUBEXP and which have corresponding back references in the regular + expression. And register them to use them later for evaluating the + correspoding back references. */ + +static reg_errcode_t +internal_function +check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, + Idx str_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx node_idx; + reg_errcode_t err; + + /* TODO: This isn't efficient. + Because there might be more than one nodes whose types are + OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all + nodes. + E.g. RE: (a){2} */ + for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) + { + Idx node = cur_nodes->elems[node_idx]; + if (dfa->nodes[node].type == OP_OPEN_SUBEXP + && dfa->nodes[node].opr.idx < BITSET_WORD_BITS + && (dfa->used_bkref_map + & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) + { + err = match_ctx_add_subtop (mctx, node, str_idx); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + return REG_NOERROR; +} + +#if 0 +/* Return the next state to which the current state STATE will transit by + accepting the current input byte. */ + +static re_dfastate_t * +transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, + re_dfastate_t *state) +{ + const re_dfa_t *const dfa = mctx->dfa; + re_node_set next_nodes; + re_dfastate_t *next_state; + Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); + unsigned int context; + + *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) + { + Idx cur_node = state->nodes.elems[node_cnt]; + if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) + { + *err = re_node_set_merge (&next_nodes, + dfa->eclosures + dfa->nexts[cur_node]); + if (BE (*err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return NULL; + } + } + } + context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); + next_state = re_acquire_state_context (err, dfa, &next_nodes, context); + /* We don't need to check errors here, since the return value of + this function is next_state and ERR is already set. */ + + re_node_set_free (&next_nodes); + re_string_skip_bytes (&mctx->input, 1); + return next_state; +} +#endif + +#ifdef RE_ENABLE_I18N +static reg_errcode_t +internal_function +transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx i; + + for (i = 0; i < pstate->nodes.nelem; ++i) + { + re_node_set dest_nodes, *new_nodes; + Idx cur_node_idx = pstate->nodes.elems[i]; + int naccepted; + Idx dest_idx; + unsigned int context; + re_dfastate_t *dest_state; + + if (!dfa->nodes[cur_node_idx].accept_mb) + continue; + + if (dfa->nodes[cur_node_idx].constraint) + { + context = re_string_context_at (&mctx->input, + re_string_cur_idx (&mctx->input), + mctx->eflags); + if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, + context)) + continue; + } + + /* How many bytes the node can accept? */ + naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, + re_string_cur_idx (&mctx->input)); + if (naccepted == 0) + continue; + + /* The node can accepts `naccepted' bytes. */ + dest_idx = re_string_cur_idx (&mctx->input) + naccepted; + mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted + : mctx->max_mb_elem_len); + err = clean_state_log_if_needed (mctx, dest_idx); + if (BE (err != REG_NOERROR, 0)) + return err; +#ifdef DEBUG + assert (dfa->nexts[cur_node_idx] != REG_MISSING); +#endif + new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; + + dest_state = mctx->state_log[dest_idx]; + if (dest_state == NULL) + dest_nodes = *new_nodes; + else + { + err = re_node_set_init_union (&dest_nodes, + dest_state->entrance_nodes, new_nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + } + context = re_string_context_at (&mctx->input, dest_idx - 1, + mctx->eflags); + mctx->state_log[dest_idx] + = re_acquire_state_context (&err, dfa, &dest_nodes, context); + if (dest_state != NULL) + re_node_set_free (&dest_nodes); + if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) + return err; + } + return REG_NOERROR; +} +#endif /* RE_ENABLE_I18N */ + +static reg_errcode_t +internal_function +transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx i; + Idx cur_str_idx = re_string_cur_idx (&mctx->input); + + for (i = 0; i < nodes->nelem; ++i) + { + Idx dest_str_idx, prev_nelem, bkc_idx; + Idx node_idx = nodes->elems[i]; + unsigned int context; + const re_token_t *node = dfa->nodes + node_idx; + re_node_set *new_dest_nodes; + + /* Check whether `node' is a backreference or not. */ + if (node->type != OP_BACK_REF) + continue; + + if (node->constraint) + { + context = re_string_context_at (&mctx->input, cur_str_idx, + mctx->eflags); + if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) + continue; + } + + /* `node' is a backreference. + Check the substring which the substring matched. */ + bkc_idx = mctx->nbkref_ents; + err = get_subexp (mctx, node_idx, cur_str_idx); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + + /* And add the epsilon closures (which is `new_dest_nodes') of + the backreference to appropriate state_log. */ +#ifdef DEBUG + assert (dfa->nexts[node_idx] != REG_MISSING); +#endif + for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) + { + Idx subexp_len; + re_dfastate_t *dest_state; + struct re_backref_cache_entry *bkref_ent; + bkref_ent = mctx->bkref_ents + bkc_idx; + if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) + continue; + subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; + new_dest_nodes = (subexp_len == 0 + ? dfa->eclosures + dfa->edests[node_idx].elems[0] + : dfa->eclosures + dfa->nexts[node_idx]); + dest_str_idx = (cur_str_idx + bkref_ent->subexp_to + - bkref_ent->subexp_from); + context = re_string_context_at (&mctx->input, dest_str_idx - 1, + mctx->eflags); + dest_state = mctx->state_log[dest_str_idx]; + prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 + : mctx->state_log[cur_str_idx]->nodes.nelem); + /* Add `new_dest_node' to state_log. */ + if (dest_state == NULL) + { + mctx->state_log[dest_str_idx] + = re_acquire_state_context (&err, dfa, new_dest_nodes, + context); + if (BE (mctx->state_log[dest_str_idx] == NULL + && err != REG_NOERROR, 0)) + goto free_return; + } + else + { + re_node_set dest_nodes; + err = re_node_set_init_union (&dest_nodes, + dest_state->entrance_nodes, + new_dest_nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&dest_nodes); + goto free_return; + } + mctx->state_log[dest_str_idx] + = re_acquire_state_context (&err, dfa, &dest_nodes, context); + re_node_set_free (&dest_nodes); + if (BE (mctx->state_log[dest_str_idx] == NULL + && err != REG_NOERROR, 0)) + goto free_return; + } + /* We need to check recursively if the backreference can epsilon + transit. */ + if (subexp_len == 0 + && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) + { + err = check_subexp_matching_top (mctx, new_dest_nodes, + cur_str_idx); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + err = transit_state_bkref (mctx, new_dest_nodes); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + } + } + err = REG_NOERROR; + free_return: + return err; +} + +/* Enumerate all the candidates which the backreference BKREF_NODE can match + at BKREF_STR_IDX, and register them by match_ctx_add_entry(). + Note that we might collect inappropriate candidates here. + However, the cost of checking them strictly here is too high, then we + delay these checking for prune_impossible_nodes(). */ + +static reg_errcode_t +internal_function +get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx subexp_num, sub_top_idx; + const char *buf = (const char *) re_string_get_buffer (&mctx->input); + /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ + Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); + if (cache_idx != REG_MISSING) + { + const struct re_backref_cache_entry *entry + = mctx->bkref_ents + cache_idx; + do + if (entry->node == bkref_node) + return REG_NOERROR; /* We already checked it. */ + while (entry++->more); + } + + subexp_num = dfa->nodes[bkref_node].opr.idx; + + /* For each sub expression */ + for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) + { + reg_errcode_t err; + re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; + re_sub_match_last_t *sub_last; + Idx sub_last_idx, sl_str, bkref_str_off; + + if (dfa->nodes[sub_top->node].opr.idx != subexp_num) + continue; /* It isn't related. */ + + sl_str = sub_top->str_idx; + bkref_str_off = bkref_str_idx; + /* At first, check the last node of sub expressions we already + evaluated. */ + for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) + { + regoff_t sl_str_diff; + sub_last = sub_top->lasts[sub_last_idx]; + sl_str_diff = sub_last->str_idx - sl_str; + /* The matched string by the sub expression match with the substring + at the back reference? */ + if (sl_str_diff > 0) + { + if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) + { + /* Not enough chars for a successful match. */ + if (bkref_str_off + sl_str_diff > mctx->input.len) + break; + + err = clean_state_log_if_needed (mctx, + bkref_str_off + + sl_str_diff); + if (BE (err != REG_NOERROR, 0)) + return err; + buf = (const char *) re_string_get_buffer (&mctx->input); + } + if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) + /* We don't need to search this sub expression any more. */ + break; + } + bkref_str_off += sl_str_diff; + sl_str += sl_str_diff; + err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, + bkref_str_idx); + + /* Reload buf, since the preceding call might have reallocated + the buffer. */ + buf = (const char *) re_string_get_buffer (&mctx->input); + + if (err == REG_NOMATCH) + continue; + if (BE (err != REG_NOERROR, 0)) + return err; + } + + if (sub_last_idx < sub_top->nlasts) + continue; + if (sub_last_idx > 0) + ++sl_str; + /* Then, search for the other last nodes of the sub expression. */ + for (; sl_str <= bkref_str_idx; ++sl_str) + { + Idx cls_node; + regoff_t sl_str_off; + const re_node_set *nodes; + sl_str_off = sl_str - sub_top->str_idx; + /* The matched string by the sub expression match with the substring + at the back reference? */ + if (sl_str_off > 0) + { + if (BE (bkref_str_off >= mctx->input.valid_len, 0)) + { + /* If we are at the end of the input, we cannot match. */ + if (bkref_str_off >= mctx->input.len) + break; + + err = extend_buffers (mctx); + if (BE (err != REG_NOERROR, 0)) + return err; + + buf = (const char *) re_string_get_buffer (&mctx->input); + } + if (buf [bkref_str_off++] != buf[sl_str - 1]) + break; /* We don't need to search this sub expression + any more. */ + } + if (mctx->state_log[sl_str] == NULL) + continue; + /* Does this state have a ')' of the sub expression? */ + nodes = &mctx->state_log[sl_str]->nodes; + cls_node = find_subexp_node (dfa, nodes, subexp_num, + OP_CLOSE_SUBEXP); + if (cls_node == REG_MISSING) + continue; /* No. */ + if (sub_top->path == NULL) + { + sub_top->path = calloc (sizeof (state_array_t), + sl_str - sub_top->str_idx + 1); + if (sub_top->path == NULL) + return REG_ESPACE; + } + /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node + in the current context? */ + err = check_arrival (mctx, sub_top->path, sub_top->node, + sub_top->str_idx, cls_node, sl_str, + OP_CLOSE_SUBEXP); + if (err == REG_NOMATCH) + continue; + if (BE (err != REG_NOERROR, 0)) + return err; + sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); + if (BE (sub_last == NULL, 0)) + return REG_ESPACE; + err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, + bkref_str_idx); + if (err == REG_NOMATCH) + continue; + } + } + return REG_NOERROR; +} + +/* Helper functions for get_subexp(). */ + +/* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. + If it can arrive, register the sub expression expressed with SUB_TOP + and SUB_LAST. */ + +static reg_errcode_t +internal_function +get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, + re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) +{ + reg_errcode_t err; + Idx to_idx; + /* Can the subexpression arrive the back reference? */ + err = check_arrival (mctx, &sub_last->path, sub_last->node, + sub_last->str_idx, bkref_node, bkref_str, + OP_OPEN_SUBEXP); + if (err != REG_NOERROR) + return err; + err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, + sub_last->str_idx); + if (BE (err != REG_NOERROR, 0)) + return err; + to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; + return clean_state_log_if_needed (mctx, to_idx); +} + +/* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. + Search '(' if FL_OPEN, or search ')' otherwise. + TODO: This function isn't efficient... + Because there might be more than one nodes whose types are + OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all + nodes. + E.g. RE: (a){2} */ + +static Idx +internal_function +find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, + Idx subexp_idx, int type) +{ + Idx cls_idx; + for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) + { + Idx cls_node = nodes->elems[cls_idx]; + const re_token_t *node = dfa->nodes + cls_node; + if (node->type == type + && node->opr.idx == subexp_idx) + return cls_node; + } + return REG_MISSING; +} + +/* Check whether the node TOP_NODE at TOP_STR can arrive to the node + LAST_NODE at LAST_STR. We record the path onto PATH since it will be + heavily reused. + Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ + +static reg_errcode_t +internal_function +check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, + Idx top_str, Idx last_node, Idx last_str, int type) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err = REG_NOERROR; + Idx subexp_num, backup_cur_idx, str_idx, null_cnt; + re_dfastate_t *cur_state = NULL; + re_node_set *cur_nodes, next_nodes; + re_dfastate_t **backup_state_log; + unsigned int context; + + subexp_num = dfa->nodes[top_node].opr.idx; + /* Extend the buffer if we need. */ + if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) + { + re_dfastate_t **new_array; + Idx old_alloc = path->alloc; + Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1; + if (BE (new_alloc < old_alloc, 0) + || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) + return REG_ESPACE; + new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + path->array = new_array; + path->alloc = new_alloc; + memset (new_array + old_alloc, '\0', + sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); + } + + str_idx = path->next_idx ? path->next_idx : top_str; + + /* Temporary modify MCTX. */ + backup_state_log = mctx->state_log; + backup_cur_idx = mctx->input.cur_idx; + mctx->state_log = path->array; + mctx->input.cur_idx = str_idx; + + /* Setup initial node set. */ + context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); + if (str_idx == top_str) + { + err = re_node_set_init_1 (&next_nodes, top_node); + if (BE (err != REG_NOERROR, 0)) + return err; + err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + else + { + cur_state = mctx->state_log[str_idx]; + if (cur_state && cur_state->has_backref) + { + err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + } + else + re_node_set_init_empty (&next_nodes); + } + if (str_idx == top_str || (cur_state && cur_state->has_backref)) + { + if (next_nodes.nelem) + { + err = expand_bkref_cache (mctx, &next_nodes, str_idx, + subexp_num, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); + if (BE (cur_state == NULL && err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + mctx->state_log[str_idx] = cur_state; + } + + for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) + { + re_node_set_empty (&next_nodes); + if (mctx->state_log[str_idx + 1]) + { + err = re_node_set_merge (&next_nodes, + &mctx->state_log[str_idx + 1]->nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + if (cur_state) + { + err = check_arrival_add_next_nodes (mctx, str_idx, + &cur_state->non_eps_nodes, + &next_nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + ++str_idx; + if (next_nodes.nelem) + { + err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + err = expand_bkref_cache (mctx, &next_nodes, str_idx, + subexp_num, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); + cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); + if (BE (cur_state == NULL && err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + mctx->state_log[str_idx] = cur_state; + null_cnt = cur_state == NULL ? null_cnt + 1 : 0; + } + re_node_set_free (&next_nodes); + cur_nodes = (mctx->state_log[last_str] == NULL ? NULL + : &mctx->state_log[last_str]->nodes); + path->next_idx = str_idx; + + /* Fix MCTX. */ + mctx->state_log = backup_state_log; + mctx->input.cur_idx = backup_cur_idx; + + /* Then check the current node set has the node LAST_NODE. */ + if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) + return REG_NOERROR; + + return REG_NOMATCH; +} + +/* Helper functions for check_arrival. */ + +/* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them + to NEXT_NODES. + TODO: This function is similar to the functions transit_state*(), + however this function has many additional works. + Can't we unify them? */ + +static reg_errcode_t +internal_function +check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, + re_node_set *cur_nodes, re_node_set *next_nodes) +{ + const re_dfa_t *const dfa = mctx->dfa; + bool ok; + Idx cur_idx; + reg_errcode_t err = REG_NOERROR; + re_node_set union_set; + re_node_set_init_empty (&union_set); + for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) + { + int naccepted = 0; + Idx cur_node = cur_nodes->elems[cur_idx]; +#ifdef DEBUG + re_token_type_t type = dfa->nodes[cur_node].type; + assert (!IS_EPSILON_NODE (type)); +#endif +#ifdef RE_ENABLE_I18N + /* If the node may accept `multi byte'. */ + if (dfa->nodes[cur_node].accept_mb) + { + naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, + str_idx); + if (naccepted > 1) + { + re_dfastate_t *dest_state; + Idx next_node = dfa->nexts[cur_node]; + Idx next_idx = str_idx + naccepted; + dest_state = mctx->state_log[next_idx]; + re_node_set_empty (&union_set); + if (dest_state) + { + err = re_node_set_merge (&union_set, &dest_state->nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&union_set); + return err; + } + } + ok = re_node_set_insert (&union_set, next_node); + if (BE (! ok, 0)) + { + re_node_set_free (&union_set); + return REG_ESPACE; + } + mctx->state_log[next_idx] = re_acquire_state (&err, dfa, + &union_set); + if (BE (mctx->state_log[next_idx] == NULL + && err != REG_NOERROR, 0)) + { + re_node_set_free (&union_set); + return err; + } + } + } +#endif /* RE_ENABLE_I18N */ + if (naccepted + || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) + { + ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); + if (BE (! ok, 0)) + { + re_node_set_free (&union_set); + return REG_ESPACE; + } + } + } + re_node_set_free (&union_set); + return REG_NOERROR; +} + +/* For all the nodes in CUR_NODES, add the epsilon closures of them to + CUR_NODES, however exclude the nodes which are: + - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. + - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. +*/ + +static reg_errcode_t +internal_function +check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, + Idx ex_subexp, int type) +{ + reg_errcode_t err; + Idx idx, outside_node; + re_node_set new_nodes; +#ifdef DEBUG + assert (cur_nodes->nelem); +#endif + err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); + if (BE (err != REG_NOERROR, 0)) + return err; + /* Create a new node set NEW_NODES with the nodes which are epsilon + closures of the node in CUR_NODES. */ + + for (idx = 0; idx < cur_nodes->nelem; ++idx) + { + Idx cur_node = cur_nodes->elems[idx]; + const re_node_set *eclosure = dfa->eclosures + cur_node; + outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); + if (outside_node == REG_MISSING) + { + /* There are no problematic nodes, just merge them. */ + err = re_node_set_merge (&new_nodes, eclosure); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&new_nodes); + return err; + } + } + else + { + /* There are problematic nodes, re-calculate incrementally. */ + err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, + ex_subexp, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&new_nodes); + return err; + } + } + } + re_node_set_free (cur_nodes); + *cur_nodes = new_nodes; + return REG_NOERROR; +} + +/* Helper function for check_arrival_expand_ecl. + Check incrementally the epsilon closure of TARGET, and if it isn't + problematic append it to DST_NODES. */ + +static reg_errcode_t +internal_function +check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, + Idx target, Idx ex_subexp, int type) +{ + Idx cur_node; + for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) + { + bool ok; + + if (dfa->nodes[cur_node].type == type + && dfa->nodes[cur_node].opr.idx == ex_subexp) + { + if (type == OP_CLOSE_SUBEXP) + { + ok = re_node_set_insert (dst_nodes, cur_node); + if (BE (! ok, 0)) + return REG_ESPACE; + } + break; + } + ok = re_node_set_insert (dst_nodes, cur_node); + if (BE (! ok, 0)) + return REG_ESPACE; + if (dfa->edests[cur_node].nelem == 0) + break; + if (dfa->edests[cur_node].nelem == 2) + { + reg_errcode_t err; + err = check_arrival_expand_ecl_sub (dfa, dst_nodes, + dfa->edests[cur_node].elems[1], + ex_subexp, type); + if (BE (err != REG_NOERROR, 0)) + return err; + } + cur_node = dfa->edests[cur_node].elems[0]; + } + return REG_NOERROR; +} + + +/* For all the back references in the current state, calculate the + destination of the back references by the appropriate entry + in MCTX->BKREF_ENTS. */ + +static reg_errcode_t +internal_function +expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, + Idx cur_str, Idx subexp_num, int type) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); + struct re_backref_cache_entry *ent; + + if (cache_idx_start == REG_MISSING) + return REG_NOERROR; + + restart: + ent = mctx->bkref_ents + cache_idx_start; + do + { + Idx to_idx, next_node; + + /* Is this entry ENT is appropriate? */ + if (!re_node_set_contains (cur_nodes, ent->node)) + continue; /* No. */ + + to_idx = cur_str + ent->subexp_to - ent->subexp_from; + /* Calculate the destination of the back reference, and append it + to MCTX->STATE_LOG. */ + if (to_idx == cur_str) + { + /* The backreference did epsilon transit, we must re-check all the + node in the current state. */ + re_node_set new_dests; + reg_errcode_t err2, err3; + next_node = dfa->edests[ent->node].elems[0]; + if (re_node_set_contains (cur_nodes, next_node)) + continue; + err = re_node_set_init_1 (&new_dests, next_node); + err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); + err3 = re_node_set_merge (cur_nodes, &new_dests); + re_node_set_free (&new_dests); + if (BE (err != REG_NOERROR || err2 != REG_NOERROR + || err3 != REG_NOERROR, 0)) + { + err = (err != REG_NOERROR ? err + : (err2 != REG_NOERROR ? err2 : err3)); + return err; + } + /* TODO: It is still inefficient... */ + goto restart; + } + else + { + re_node_set union_set; + next_node = dfa->nexts[ent->node]; + if (mctx->state_log[to_idx]) + { + bool ok; + if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, + next_node)) + continue; + err = re_node_set_init_copy (&union_set, + &mctx->state_log[to_idx]->nodes); + ok = re_node_set_insert (&union_set, next_node); + if (BE (err != REG_NOERROR || ! ok, 0)) + { + re_node_set_free (&union_set); + err = err != REG_NOERROR ? err : REG_ESPACE; + return err; + } + } + else + { + err = re_node_set_init_1 (&union_set, next_node); + if (BE (err != REG_NOERROR, 0)) + return err; + } + mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); + re_node_set_free (&union_set); + if (BE (mctx->state_log[to_idx] == NULL + && err != REG_NOERROR, 0)) + return err; + } + } + while (ent++->more); + return REG_NOERROR; +} + +/* Build transition table for the state. + Return true if successful. */ + +static bool +internal_function +build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) +{ + reg_errcode_t err; + Idx i, j; + int ch; + bool need_word_trtable = false; + bitset_word_t elem, mask; + bool dests_node_malloced = false; + bool dest_states_malloced = false; + Idx ndests; /* Number of the destination states from `state'. */ + re_dfastate_t **trtable; + re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; + re_node_set follows, *dests_node; + bitset_t *dests_ch; + bitset_t acceptable; + + struct dests_alloc + { + re_node_set dests_node[SBC_MAX]; + bitset_t dests_ch[SBC_MAX]; + } *dests_alloc; + + /* We build DFA states which corresponds to the destination nodes + from `state'. `dests_node[i]' represents the nodes which i-th + destination state contains, and `dests_ch[i]' represents the + characters which i-th destination state accepts. */ + if (__libc_use_alloca (sizeof (struct dests_alloc))) + dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); + else + { + dests_alloc = re_malloc (struct dests_alloc, 1); + if (BE (dests_alloc == NULL, 0)) + return false; + dests_node_malloced = true; + } + dests_node = dests_alloc->dests_node; + dests_ch = dests_alloc->dests_ch; + + /* Initialize transiton table. */ + state->word_trtable = state->trtable = NULL; + + /* At first, group all nodes belonging to `state' into several + destinations. */ + ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); + if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0)) + { + if (dests_node_malloced) + free (dests_alloc); + if (ndests == 0) + { + state->trtable = (re_dfastate_t **) + calloc (sizeof (re_dfastate_t *), SBC_MAX); + return true; + } + return false; + } + + err = re_node_set_alloc (&follows, ndests + 1); + if (BE (err != REG_NOERROR, 0)) + goto out_free; + + /* Avoid arithmetic overflow in size calculation. */ + if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) + / (3 * sizeof (re_dfastate_t *))) + < ndests), + 0)) + goto out_free; + + if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + + ndests * 3 * sizeof (re_dfastate_t *))) + dest_states = (re_dfastate_t **) + alloca (ndests * 3 * sizeof (re_dfastate_t *)); + else + { + dest_states = (re_dfastate_t **) + malloc (ndests * 3 * sizeof (re_dfastate_t *)); + if (BE (dest_states == NULL, 0)) + { +out_free: + if (dest_states_malloced) + free (dest_states); + re_node_set_free (&follows); + for (i = 0; i < ndests; ++i) + re_node_set_free (dests_node + i); + if (dests_node_malloced) + free (dests_alloc); + return false; + } + dest_states_malloced = true; + } + dest_states_word = dest_states + ndests; + dest_states_nl = dest_states_word + ndests; + bitset_empty (acceptable); + + /* Then build the states for all destinations. */ + for (i = 0; i < ndests; ++i) + { + Idx next_node; + re_node_set_empty (&follows); + /* Merge the follows of this destination states. */ + for (j = 0; j < dests_node[i].nelem; ++j) + { + next_node = dfa->nexts[dests_node[i].elems[j]]; + if (next_node != REG_MISSING) + { + err = re_node_set_merge (&follows, dfa->eclosures + next_node); + if (BE (err != REG_NOERROR, 0)) + goto out_free; + } + } + dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); + if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) + goto out_free; + /* If the new state has context constraint, + build appropriate states for these contexts. */ + if (dest_states[i]->has_constraint) + { + dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, + CONTEXT_WORD); + if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) + goto out_free; + + if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) + need_word_trtable = true; + + dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, + CONTEXT_NEWLINE); + if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) + goto out_free; + } + else + { + dest_states_word[i] = dest_states[i]; + dest_states_nl[i] = dest_states[i]; + } + bitset_merge (acceptable, dests_ch[i]); + } + + if (!BE (need_word_trtable, 0)) + { + /* We don't care about whether the following character is a word + character, or we are in a single-byte character set so we can + discern by looking at the character code: allocate a + 256-entry transition table. */ + trtable = state->trtable = + (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); + if (BE (trtable == NULL, 0)) + goto out_free; + + /* For all characters ch...: */ + for (i = 0; i < BITSET_WORDS; ++i) + for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; + elem; + mask <<= 1, elem >>= 1, ++ch) + if (BE (elem & 1, 0)) + { + /* There must be exactly one destination which accepts + character ch. See group_nodes_into_DFAstates. */ + for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) + ; + + /* j-th destination accepts the word character ch. */ + if (dfa->word_char[i] & mask) + trtable[ch] = dest_states_word[j]; + else + trtable[ch] = dest_states[j]; + } + } + else + { + /* We care about whether the following character is a word + character, and we are in a multi-byte character set: discern + by looking at the character code: build two 256-entry + transition tables, one starting at trtable[0] and one + starting at trtable[SBC_MAX]. */ + trtable = state->word_trtable = + (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); + if (BE (trtable == NULL, 0)) + goto out_free; + + /* For all characters ch...: */ + for (i = 0; i < BITSET_WORDS; ++i) + for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; + elem; + mask <<= 1, elem >>= 1, ++ch) + if (BE (elem & 1, 0)) + { + /* There must be exactly one destination which accepts + character ch. See group_nodes_into_DFAstates. */ + for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) + ; + + /* j-th destination accepts the word character ch. */ + trtable[ch] = dest_states[j]; + trtable[ch + SBC_MAX] = dest_states_word[j]; + } + } + + /* new line */ + if (bitset_contain (acceptable, NEWLINE_CHAR)) + { + /* The current state accepts newline character. */ + for (j = 0; j < ndests; ++j) + if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) + { + /* k-th destination accepts newline character. */ + trtable[NEWLINE_CHAR] = dest_states_nl[j]; + if (need_word_trtable) + trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; + /* There must be only one destination which accepts + newline. See group_nodes_into_DFAstates. */ + break; + } + } + + if (dest_states_malloced) + free (dest_states); + + re_node_set_free (&follows); + for (i = 0; i < ndests; ++i) + re_node_set_free (dests_node + i); + + if (dests_node_malloced) + free (dests_alloc); + + return true; +} + +/* Group all nodes belonging to STATE into several destinations. + Then for all destinations, set the nodes belonging to the destination + to DESTS_NODE[i] and set the characters accepted by the destination + to DEST_CH[i]. This function return the number of destinations. */ + +static Idx +internal_function +group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, + re_node_set *dests_node, bitset_t *dests_ch) +{ + reg_errcode_t err; + bool ok; + Idx i, j, k; + Idx ndests; /* Number of the destinations from `state'. */ + bitset_t accepts; /* Characters a node can accept. */ + const re_node_set *cur_nodes = &state->nodes; + bitset_empty (accepts); + ndests = 0; + + /* For all the nodes belonging to `state', */ + for (i = 0; i < cur_nodes->nelem; ++i) + { + re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; + re_token_type_t type = node->type; + unsigned int constraint = node->constraint; + + /* Enumerate all single byte character this node can accept. */ + if (type == CHARACTER) + bitset_set (accepts, node->opr.c); + else if (type == SIMPLE_BRACKET) + { + bitset_merge (accepts, node->opr.sbcset); + } + else if (type == OP_PERIOD) + { +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + bitset_merge (accepts, dfa->sb_char); + else +#endif + bitset_set_all (accepts); + if (!(dfa->syntax & RE_DOT_NEWLINE)) + bitset_clear (accepts, '\n'); + if (dfa->syntax & RE_DOT_NOT_NULL) + bitset_clear (accepts, '\0'); + } +#ifdef RE_ENABLE_I18N + else if (type == OP_UTF8_PERIOD) + { + if (ASCII_CHARS % BITSET_WORD_BITS == 0) + memset (accepts, -1, ASCII_CHARS / CHAR_BIT); + else + bitset_merge (accepts, utf8_sb_map); + if (!(dfa->syntax & RE_DOT_NEWLINE)) + bitset_clear (accepts, '\n'); + if (dfa->syntax & RE_DOT_NOT_NULL) + bitset_clear (accepts, '\0'); + } +#endif + else + continue; + + /* Check the `accepts' and sift the characters which are not + match it the context. */ + if (constraint) + { + if (constraint & NEXT_NEWLINE_CONSTRAINT) + { + bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); + bitset_empty (accepts); + if (accepts_newline) + bitset_set (accepts, NEWLINE_CHAR); + else + continue; + } + if (constraint & NEXT_ENDBUF_CONSTRAINT) + { + bitset_empty (accepts); + continue; + } + + if (constraint & NEXT_WORD_CONSTRAINT) + { + bitset_word_t any_set = 0; + if (type == CHARACTER && !node->word_char) + { + bitset_empty (accepts); + continue; + } +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + for (j = 0; j < BITSET_WORDS; ++j) + any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); + else +#endif + for (j = 0; j < BITSET_WORDS; ++j) + any_set |= (accepts[j] &= dfa->word_char[j]); + if (!any_set) + continue; + } + if (constraint & NEXT_NOTWORD_CONSTRAINT) + { + bitset_word_t any_set = 0; + if (type == CHARACTER && node->word_char) + { + bitset_empty (accepts); + continue; + } +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + for (j = 0; j < BITSET_WORDS; ++j) + any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); + else +#endif + for (j = 0; j < BITSET_WORDS; ++j) + any_set |= (accepts[j] &= ~dfa->word_char[j]); + if (!any_set) + continue; + } + } + + /* Then divide `accepts' into DFA states, or create a new + state. Above, we make sure that accepts is not empty. */ + for (j = 0; j < ndests; ++j) + { + bitset_t intersec; /* Intersection sets, see below. */ + bitset_t remains; + /* Flags, see below. */ + bitset_word_t has_intersec, not_subset, not_consumed; + + /* Optimization, skip if this state doesn't accept the character. */ + if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) + continue; + + /* Enumerate the intersection set of this state and `accepts'. */ + has_intersec = 0; + for (k = 0; k < BITSET_WORDS; ++k) + has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; + /* And skip if the intersection set is empty. */ + if (!has_intersec) + continue; + + /* Then check if this state is a subset of `accepts'. */ + not_subset = not_consumed = 0; + for (k = 0; k < BITSET_WORDS; ++k) + { + not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; + not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; + } + + /* If this state isn't a subset of `accepts', create a + new group state, which has the `remains'. */ + if (not_subset) + { + bitset_copy (dests_ch[ndests], remains); + bitset_copy (dests_ch[j], intersec); + err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); + if (BE (err != REG_NOERROR, 0)) + goto error_return; + ++ndests; + } + + /* Put the position in the current group. */ + ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); + if (BE (! ok, 0)) + goto error_return; + + /* If all characters are consumed, go to next node. */ + if (!not_consumed) + break; + } + /* Some characters remain, create a new group. */ + if (j == ndests) + { + bitset_copy (dests_ch[ndests], accepts); + err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); + if (BE (err != REG_NOERROR, 0)) + goto error_return; + ++ndests; + bitset_empty (accepts); + } + } + return ndests; + error_return: + for (j = 0; j < ndests; ++j) + re_node_set_free (dests_node + j); + return REG_MISSING; +} + +#ifdef RE_ENABLE_I18N +/* Check how many bytes the node `dfa->nodes[node_idx]' accepts. + Return the number of the bytes the node accepts. + STR_IDX is the current index of the input string. + + This function handles the nodes which can accept one character, or + one collating element like '.', '[a-z]', opposite to the other nodes + can only accept one byte. */ + +static int +internal_function +check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, + const re_string_t *input, Idx str_idx) +{ + const re_token_t *node = dfa->nodes + node_idx; + int char_len, elem_len; + Idx i; + + if (BE (node->type == OP_UTF8_PERIOD, 0)) + { + unsigned char c = re_string_byte_at (input, str_idx), d; + if (BE (c < 0xc2, 1)) + return 0; + + if (str_idx + 2 > input->len) + return 0; + + d = re_string_byte_at (input, str_idx + 1); + if (c < 0xe0) + return (d < 0x80 || d > 0xbf) ? 0 : 2; + else if (c < 0xf0) + { + char_len = 3; + if (c == 0xe0 && d < 0xa0) + return 0; + } + else if (c < 0xf8) + { + char_len = 4; + if (c == 0xf0 && d < 0x90) + return 0; + } + else if (c < 0xfc) + { + char_len = 5; + if (c == 0xf8 && d < 0x88) + return 0; + } + else if (c < 0xfe) + { + char_len = 6; + if (c == 0xfc && d < 0x84) + return 0; + } + else + return 0; + + if (str_idx + char_len > input->len) + return 0; + + for (i = 1; i < char_len; ++i) + { + d = re_string_byte_at (input, str_idx + i); + if (d < 0x80 || d > 0xbf) + return 0; + } + return char_len; + } + + char_len = re_string_char_size_at (input, str_idx); + if (node->type == OP_PERIOD) + { + if (char_len <= 1) + return 0; + /* FIXME: I don't think this if is needed, as both '\n' + and '\0' are char_len == 1. */ + /* '.' accepts any one character except the following two cases. */ + if ((!(dfa->syntax & RE_DOT_NEWLINE) && + re_string_byte_at (input, str_idx) == '\n') || + ((dfa->syntax & RE_DOT_NOT_NULL) && + re_string_byte_at (input, str_idx) == '\0')) + return 0; + return char_len; + } + + elem_len = re_string_elem_size_at (input, str_idx); + if ((elem_len <= 1 && char_len <= 1) || char_len == 0) + return 0; + + if (node->type == COMPLEX_BRACKET) + { + const re_charset_t *cset = node->opr.mbcset; +# ifdef _LIBC + const unsigned char *pin + = ((const unsigned char *) re_string_get_buffer (input) + str_idx); + Idx j; + uint32_t nrules; +# endif /* _LIBC */ + int match_len = 0; + wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) + ? re_string_wchar_at (input, str_idx) : 0); + + /* match with multibyte character? */ + for (i = 0; i < cset->nmbchars; ++i) + if (wc == cset->mbchars[i]) + { + match_len = char_len; + goto check_node_accept_bytes_match; + } + /* match with character_class? */ + for (i = 0; i < cset->nchar_classes; ++i) + { + wctype_t wt = cset->char_classes[i]; + if (__iswctype (wc, wt)) + { + match_len = char_len; + goto check_node_accept_bytes_match; + } + } + +# ifdef _LIBC + nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + if (nrules != 0) + { + unsigned int in_collseq = 0; + const int32_t *table, *indirect; + const unsigned char *weights, *extra; + const char *collseqwc; + int32_t idx; + /* This #include defines a local function! */ +# include + + /* match with collating_symbol? */ + if (cset->ncoll_syms) + extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); + for (i = 0; i < cset->ncoll_syms; ++i) + { + const unsigned char *coll_sym = extra + cset->coll_syms[i]; + /* Compare the length of input collating element and + the length of current collating element. */ + if (*coll_sym != elem_len) + continue; + /* Compare each bytes. */ + for (j = 0; j < *coll_sym; j++) + if (pin[j] != coll_sym[1 + j]) + break; + if (j == *coll_sym) + { + /* Match if every bytes is equal. */ + match_len = j; + goto check_node_accept_bytes_match; + } + } + + if (cset->nranges) + { + if (elem_len <= char_len) + { + collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); + in_collseq = __collseq_table_lookup (collseqwc, wc); + } + else + in_collseq = find_collation_sequence_value (pin, elem_len); + } + /* match with range expression? */ + for (i = 0; i < cset->nranges; ++i) + if (cset->range_starts[i] <= in_collseq + && in_collseq <= cset->range_ends[i]) + { + match_len = elem_len; + goto check_node_accept_bytes_match; + } + + /* match with equivalence_class? */ + if (cset->nequiv_classes) + { + const unsigned char *cp = pin; + 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); + idx = findidx (&cp); + if (idx > 0) + for (i = 0; i < cset->nequiv_classes; ++i) + { + int32_t equiv_class_idx = cset->equiv_classes[i]; + size_t weight_len = weights[idx]; + if (weight_len == weights[equiv_class_idx]) + { + Idx cnt = 0; + while (cnt <= weight_len + && (weights[equiv_class_idx + 1 + cnt] + == weights[idx + 1 + cnt])) + ++cnt; + if (cnt > weight_len) + { + match_len = elem_len; + goto check_node_accept_bytes_match; + } + } + } + } + } + else +# endif /* _LIBC */ + { + /* match with range expression? */ +#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__) + wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; +#else + wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; + cmp_buf[2] = wc; +#endif + for (i = 0; i < cset->nranges; ++i) + { + cmp_buf[0] = cset->range_starts[i]; + cmp_buf[4] = cset->range_ends[i]; + if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 + && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) + { + match_len = char_len; + goto check_node_accept_bytes_match; + } + } + } + check_node_accept_bytes_match: + if (!cset->non_match) + return match_len; + else + { + if (match_len > 0) + return 0; + else + return (elem_len > char_len) ? elem_len : char_len; + } + } + return 0; +} + +# ifdef _LIBC +static unsigned int +internal_function +find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) +{ + uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + if (nrules == 0) + { + if (mbs_len == 1) + { + /* No valid character. Match it as a single byte character. */ + const unsigned char *collseq = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); + return collseq[mbs[0]]; + } + return UINT_MAX; + } + else + { + int32_t idx; + const unsigned char *extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); + int32_t extrasize = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; + + for (idx = 0; idx < extrasize;) + { + int mbs_cnt; + bool found = false; + int32_t elem_mbs_len; + /* Skip the name of collating element name. */ + idx = idx + extra[idx] + 1; + elem_mbs_len = extra[idx++]; + if (mbs_len == elem_mbs_len) + { + for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) + if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) + break; + if (mbs_cnt == elem_mbs_len) + /* Found the entry. */ + found = true; + } + /* Skip the byte sequence of the collating element. */ + idx += elem_mbs_len; + /* Adjust for the alignment. */ + idx = (idx + 3) & ~3; + /* Skip the collation sequence value. */ + idx += sizeof (uint32_t); + /* Skip the wide char sequence of the collating element. */ + idx = idx + sizeof (uint32_t) * (extra[idx] + 1); + /* If we found the entry, return the sequence value. */ + if (found) + return *(uint32_t *) (extra + idx); + /* Skip the collation sequence value. */ + idx += sizeof (uint32_t); + } + return UINT_MAX; + } +} +# endif /* _LIBC */ +#endif /* RE_ENABLE_I18N */ + +/* Check whether the node accepts the byte which is IDX-th + byte of the INPUT. */ + +static bool +internal_function +check_node_accept (const re_match_context_t *mctx, const re_token_t *node, + Idx idx) +{ + unsigned char ch; + ch = re_string_byte_at (&mctx->input, idx); + switch (node->type) + { + case CHARACTER: + if (node->opr.c != ch) + return false; + break; + + case SIMPLE_BRACKET: + if (!bitset_contain (node->opr.sbcset, ch)) + return false; + break; + +#ifdef RE_ENABLE_I18N + case OP_UTF8_PERIOD: + if (ch >= ASCII_CHARS) + return false; + /* FALLTHROUGH */ +#endif + case OP_PERIOD: + if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) + || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) + return false; + break; + + default: + return false; + } + + if (node->constraint) + { + /* The node has constraints. Check whether the current context + satisfies the constraints. */ + unsigned int context = re_string_context_at (&mctx->input, idx, + mctx->eflags); + if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) + return false; + } + + return true; +} + +/* Extend the buffers, if the buffers have run out. */ + +static reg_errcode_t +internal_function +extend_buffers (re_match_context_t *mctx) +{ + reg_errcode_t ret; + re_string_t *pstr = &mctx->input; + + /* Avoid overflow. */ + if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) + return REG_ESPACE; + + /* Double the lengthes of the buffers. */ + ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); + if (BE (ret != REG_NOERROR, 0)) + return ret; + + if (mctx->state_log != NULL) + { + /* And double the length of state_log. */ + /* XXX We have no indication of the size of this buffer. If this + allocation fail we have no indication that the state_log array + does not have the right size. */ + re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, + pstr->bufs_len + 1); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + mctx->state_log = new_array; + } + + /* Then reconstruct the buffers. */ + if (pstr->icase) + { +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + { + ret = build_wcs_upper_buffer (pstr); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } + else +#endif /* RE_ENABLE_I18N */ + build_upper_buffer (pstr); + } + else + { +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + build_wcs_buffer (pstr); + else +#endif /* RE_ENABLE_I18N */ + { + if (pstr->trans != NULL) + re_string_translate_buffer (pstr); + } + } + return REG_NOERROR; +} + + +/* Functions for matching context. */ + +/* Initialize MCTX. */ + +static reg_errcode_t +internal_function +match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) +{ + mctx->eflags = eflags; + mctx->match_last = REG_MISSING; + if (n > 0) + { + /* Avoid overflow. */ + size_t max_object_size = + MAX (sizeof (struct re_backref_cache_entry), + sizeof (re_sub_match_top_t *)); + if (BE (SIZE_MAX / max_object_size < n, 0)) + return REG_ESPACE; + + mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); + mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); + if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) + return REG_ESPACE; + } + /* Already zero-ed by the caller. + else + mctx->bkref_ents = NULL; + mctx->nbkref_ents = 0; + mctx->nsub_tops = 0; */ + mctx->abkref_ents = n; + mctx->max_mb_elem_len = 1; + mctx->asub_tops = n; + return REG_NOERROR; +} + +/* Clean the entries which depend on the current input in MCTX. + This function must be invoked when the matcher changes the start index + of the input, or changes the input string. */ + +static void +internal_function +match_ctx_clean (re_match_context_t *mctx) +{ + Idx st_idx; + for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) + { + Idx sl_idx; + re_sub_match_top_t *top = mctx->sub_tops[st_idx]; + for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) + { + re_sub_match_last_t *last = top->lasts[sl_idx]; + re_free (last->path.array); + re_free (last); + } + re_free (top->lasts); + if (top->path) + { + re_free (top->path->array); + re_free (top->path); + } + free (top); + } + + mctx->nsub_tops = 0; + mctx->nbkref_ents = 0; +} + +/* Free all the memory associated with MCTX. */ + +static void +internal_function +match_ctx_free (re_match_context_t *mctx) +{ + /* First, free all the memory associated with MCTX->SUB_TOPS. */ + match_ctx_clean (mctx); + re_free (mctx->sub_tops); + re_free (mctx->bkref_ents); +} + +/* Add a new backreference entry to MCTX. + Note that we assume that caller never call this function with duplicate + entry, and call with STR_IDX which isn't smaller than any existing entry. +*/ + +static reg_errcode_t +internal_function +match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, + Idx to) +{ + if (mctx->nbkref_ents >= mctx->abkref_ents) + { + struct re_backref_cache_entry* new_entry; + new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, + mctx->abkref_ents * 2); + if (BE (new_entry == NULL, 0)) + { + re_free (mctx->bkref_ents); + return REG_ESPACE; + } + mctx->bkref_ents = new_entry; + memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', + sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); + mctx->abkref_ents *= 2; + } + if (mctx->nbkref_ents > 0 + && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) + mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; + + mctx->bkref_ents[mctx->nbkref_ents].node = node; + mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; + mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; + mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; + + /* This is a cache that saves negative results of check_dst_limits_calc_pos. + If bit N is clear, means that this entry won't epsilon-transition to + an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If + it is set, check_dst_limits_calc_pos_1 will recurse and try to find one + such node. + + A backreference does not epsilon-transition unless it is empty, so set + to all zeros if FROM != TO. */ + mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map + = (from == to ? -1 : 0); + + mctx->bkref_ents[mctx->nbkref_ents++].more = 0; + if (mctx->max_mb_elem_len < to - from) + mctx->max_mb_elem_len = to - from; + return REG_NOERROR; +} + +/* Return the first entry with the same str_idx, or REG_MISSING if none is + found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ + +static Idx +internal_function +search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) +{ + Idx left, right, mid, last; + last = right = mctx->nbkref_ents; + for (left = 0; left < right;) + { + mid = (left + right) / 2; + if (mctx->bkref_ents[mid].str_idx < str_idx) + left = mid + 1; + else + right = mid; + } + if (left < last && mctx->bkref_ents[left].str_idx == str_idx) + return left; + else + return REG_MISSING; +} + +/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches + at STR_IDX. */ + +static reg_errcode_t +internal_function +match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) +{ +#ifdef DEBUG + assert (mctx->sub_tops != NULL); + assert (mctx->asub_tops > 0); +#endif + if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) + { + Idx new_asub_tops = mctx->asub_tops * 2; + re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, + re_sub_match_top_t *, + new_asub_tops); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + mctx->sub_tops = new_array; + mctx->asub_tops = new_asub_tops; + } + mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); + if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) + return REG_ESPACE; + mctx->sub_tops[mctx->nsub_tops]->node = node; + mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; + return REG_NOERROR; +} + +/* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches + at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ + +static re_sub_match_last_t * +internal_function +match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) +{ + re_sub_match_last_t *new_entry; + if (BE (subtop->nlasts == subtop->alasts, 0)) + { + Idx new_alasts = 2 * subtop->alasts + 1; + re_sub_match_last_t **new_array = re_realloc (subtop->lasts, + re_sub_match_last_t *, + new_alasts); + if (BE (new_array == NULL, 0)) + return NULL; + subtop->lasts = new_array; + subtop->alasts = new_alasts; + } + new_entry = calloc (1, sizeof (re_sub_match_last_t)); + if (BE (new_entry != NULL, 1)) + { + subtop->lasts[subtop->nlasts] = new_entry; + new_entry->node = node; + new_entry->str_idx = str_idx; + ++subtop->nlasts; + } + return new_entry; +} + +static void +internal_function +sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, + re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) +{ + sctx->sifted_states = sifted_sts; + sctx->limited_states = limited_sts; + sctx->last_node = last_node; + sctx->last_str_idx = last_str_idx; + re_node_set_init_empty (&sctx->limits); +} diff --git a/gnulib/lib/rpmatch.c b/gnulib/lib/rpmatch.c new file mode 100644 index 0000000..e5f79f8 --- /dev/null +++ b/gnulib/lib/rpmatch.c @@ -0,0 +1,79 @@ +/* Determine whether string value is affirmation or negative response + according to current locale's data. + + Copyright (C) 1996, 1998, 2000, 2002, 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 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. */ + +#include + +#include +#include + +#if ENABLE_NLS +# include +# include +# include +# include "gettext.h" +# define _(msgid) gettext (msgid) + +static int +try (const char *response, const char *pattern, const int match, + const int nomatch, const char **lastp, regex_t *re) +{ + if (pattern != *lastp) + { + /* The pattern has changed. */ + if (*lastp) + { + /* Free the old compiled pattern. */ + regfree (re); + *lastp = NULL; + } + /* Compile the pattern and cache it for future runs. */ + if (regcomp (re, pattern, REG_EXTENDED) != 0) + return -1; + *lastp = pattern; + } + + /* See if the regular expression matches RESPONSE. */ + return regexec (re, response, 0, NULL, 0) == 0 ? match : nomatch; +} +#endif + + +int +rpmatch (const char *response) +{ +#if ENABLE_NLS + /* Match against one of the response patterns, compiling the pattern + first if necessary. */ + + /* We cache the response patterns and compiled regexps here. */ + static const char *yesexpr, *noexpr; + static regex_t yesre, nore; + int result; + + return ((result = try (response, _("^[yY]"), 1, 0, + &yesexpr, &yesre)) + ? result + : try (response, _("^[nN]"), 0, -1, &noexpr, &nore)); +#else + /* Test against "^[yY]" and "^[nN]", hardcoded to avoid requiring regex */ + return (*response == 'y' || *response == 'Y' ? 1 + : *response == 'n' || *response == 'N' ? 0 : -1); +#endif +} diff --git a/gnulib/lib/same-inode.h b/gnulib/lib/same-inode.h new file mode 100644 index 0000000..deca87b --- /dev/null +++ b/gnulib/lib/same-inode.h @@ -0,0 +1,26 @@ +/* Determine whether two stat buffers refer to the same file. + + 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 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. */ + +#ifndef SAME_INODE_H +# define SAME_INODE_H 1 + +# define SAME_INODE(Stat_buf_1, Stat_buf_2) \ + ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ + && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) + +#endif diff --git a/gnulib/lib/save-cwd.c b/gnulib/lib/save-cwd.c new file mode 100644 index 0000000..f07973a --- /dev/null +++ b/gnulib/lib/save-cwd.c @@ -0,0 +1,103 @@ +/* save-cwd.c -- Save and restore current working directory. + + Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005, 2006 Free + Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Jim Meyering. */ + +#include + +#include "save-cwd.h" + +#include +#include +#include +#include +#include + +#include "chdir-long.h" +#include "fcntl--.h" +#include "xgetcwd.h" + +/* On systems without the fchdir function (WOE), pretend that open + always returns -1 so that save_cwd resorts to using xgetcwd. + Since chdir_long requires fchdir, use chdir instead. */ +#if !HAVE_FCHDIR +# undef open +# define open(File, Flags) (-1) +# undef fchdir +# define fchdir(Fd) (abort (), -1) +# undef chdir_long +# define chdir_long(Dir) chdir (Dir) +#endif + +/* Record the location of the current working directory in CWD so that + the program may change to other directories and later use restore_cwd + to return to the recorded location. This function may allocate + space using malloc (via xgetcwd) or leave a file descriptor open; + use free_cwd to perform the necessary free or close. Upon failure, + no memory is allocated, any locally opened file descriptors are + closed; return non-zero -- in that case, free_cwd need not be + called, but doing so is ok. Otherwise, return zero. + + The `raison d'etre' for this interface is that the working directory + is sometimes inaccessible, and getcwd is not robust or as efficient. + So, we prefer to use the open/fchdir approach, but fall back on + getcwd if necessary. + + Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin, + SCO Xenix. Also, SunOS 4 and Irix 5.3 provide the function, yet it + doesn't work for partitions on which auditing is enabled. If + you're still using an obsolete system with these problems, please + send email to the maintainer of this code. */ + +int +save_cwd (struct saved_cwd *cwd) +{ + cwd->name = NULL; + + cwd->desc = open (".", O_RDONLY); + if (cwd->desc < 0) + { + cwd->name = xgetcwd (); + return cwd->name ? 0 : -1; + } + + return 0; +} + +/* Change to recorded location, CWD, in directory hierarchy. + Upon failure, return -1 (errno is set by chdir or fchdir). + Upon success, return zero. */ + +int +restore_cwd (const struct saved_cwd *cwd) +{ + if (0 <= cwd->desc) + return fchdir (cwd->desc); + else + return chdir_long (cwd->name); +} + +void +free_cwd (struct saved_cwd *cwd) +{ + if (cwd->desc >= 0) + close (cwd->desc); + if (cwd->name) + free (cwd->name); +} diff --git a/gnulib/lib/save-cwd.h b/gnulib/lib/save-cwd.h new file mode 100644 index 0000000..d646b55 --- /dev/null +++ b/gnulib/lib/save-cwd.h @@ -0,0 +1,34 @@ +/* Save and restore current working directory. + + Copyright (C) 1995, 1997, 1998, 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 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. */ + +/* Written by Jim Meyering. */ + +#ifndef SAVE_CWD_H +# define SAVE_CWD_H 1 + +struct saved_cwd + { + int desc; + char *name; + }; + +int save_cwd (struct saved_cwd *cwd); +int restore_cwd (const struct saved_cwd *cwd); +void free_cwd (struct saved_cwd *cwd); + +#endif /* SAVE_CWD_H */ diff --git a/gnulib/lib/savedir.c b/gnulib/lib/savedir.c new file mode 100644 index 0000000..d930fb4 --- /dev/null +++ b/gnulib/lib/savedir.c @@ -0,0 +1,137 @@ +/* savedir.c -- save the list of files in a directory in a string + + Copyright (C) 1990, 1997, 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 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. */ + +/* Written by David MacKenzie . */ + +#include + +#include "savedir.h" + +#include + +#include + +#include +#ifndef _D_EXACT_NAMLEN +# define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name) +#endif + +#include +#include +#include + +#include "openat.h" +#include "xalloc.h" + +#ifndef NAME_SIZE_DEFAULT +# define NAME_SIZE_DEFAULT 512 +#endif + +/* The results of opendir() in this file are not used with dirfd and fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef opendir +#undef closedir + +/* Return a freshly allocated string containing the file names + in directory DIRP, separated by '\0' characters; + the end is marked by two '\0' characters in a row. + Return NULL (setting errno) if DIRP cannot be read or closed. + If DIRP is NULL, return NULL without affecting errno. */ + +static char * +savedirstream (DIR *dirp) +{ + char *name_space; + size_t allocated = NAME_SIZE_DEFAULT; + size_t used = 0; + int save_errno; + + if (dirp == NULL) + return NULL; + + name_space = xmalloc (allocated); + + for (;;) + { + struct dirent const *dp; + char const *entry; + + errno = 0; + dp = readdir (dirp); + if (! dp) + break; + + /* Skip "", ".", and "..". "" is returned by at least one buggy + implementation: Solaris 2.4 readdir on NFS file systems. */ + entry = dp->d_name; + if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0') + { + size_t entry_size = _D_EXACT_NAMLEN (dp) + 1; + if (used + entry_size < used) + xalloc_die (); + if (allocated <= used + entry_size) + { + do + { + if (2 * allocated < allocated) + xalloc_die (); + allocated *= 2; + } + while (allocated <= used + entry_size); + + name_space = xrealloc (name_space, allocated); + } + memcpy (name_space + used, entry, entry_size); + used += entry_size; + } + } + name_space[used] = '\0'; + save_errno = errno; + if (closedir (dirp) != 0) + save_errno = errno; + if (save_errno != 0) + { + free (name_space); + errno = save_errno; + return NULL; + } + return name_space; +} + +/* Return a freshly allocated string containing the file names + in directory DIR, separated by '\0' characters; + the end is marked by two '\0' characters in a row. + Return NULL (setting errno) if DIR cannot be opened, read, or closed. */ + +char * +savedir (char const *dir) +{ + return savedirstream (opendir (dir)); +} + +/* Return a freshly allocated string containing the file names + in directory FD, separated by '\0' characters; + the end is marked by two '\0' characters in a row. + Return NULL (setting errno) if FD cannot be read or closed. */ + +char * +fdsavedir (int fd) +{ + return savedirstream (fdopendir (fd)); +} diff --git a/gnulib/lib/savedir.h b/gnulib/lib/savedir.h new file mode 100644 index 0000000..5b7bef9 --- /dev/null +++ b/gnulib/lib/savedir.h @@ -0,0 +1,27 @@ +/* Save the list of files in a directory in a string. + + Copyright (C) 1997, 1999, 2001, 2003, 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. */ + +/* Written by David MacKenzie . */ + +#if !defined SAVEDIR_H_ +# define SAVEDIR_H_ + +char *savedir (char const *dir); +char *fdsavedir (int fd); + +#endif diff --git a/gnulib/lib/setenv.c b/gnulib/lib/setenv.c new file mode 100644 index 0000000..c54c28d --- /dev/null +++ b/gnulib/lib/setenv.c @@ -0,0 +1,332 @@ +/* Copyright (C) 1992,1995-1999,2000-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 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. */ + +#if !_LIBC +# include +#endif +#include + +#include +#ifndef __set_errno +# define __set_errno(ev) ((errno) = (ev)) +#endif + +#include +#include +#if _LIBC || HAVE_UNISTD_H +# include +#endif + +#if _LIBC || !HAVE_SETENV + +#if !_LIBC +# include "allocsa.h" +#endif + +#if !_LIBC +# define __environ environ +# ifndef HAVE_ENVIRON_DECL +extern char **environ; +# endif +#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 + +/* In the GNU C library we must keep the namespace clean. */ +#ifdef _LIBC +# define setenv __setenv +# define clearenv __clearenv +# define tfind __tfind +# define tsearch __tsearch +#endif + +/* In the GNU C library implementation we try to be more clever and + allow arbitrarily many changes of the environment given that the used + values are from a small set. Outside glibc this will eat up all + memory after a while. */ +#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ + && defined __GNUC__) +# define USE_TSEARCH 1 +# include +typedef int (*compar_fn_t) (const void *, const void *); + +/* This is a pointer to the root of the search tree with the known + values. */ +static void *known_values; + +# define KNOWN_VALUE(Str) \ + ({ \ + void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \ + value != NULL ? *(char **) value : NULL; \ + }) +# define STORE_VALUE(Str) \ + tsearch (Str, &known_values, (compar_fn_t) strcmp) + +#else +# undef USE_TSEARCH + +# define KNOWN_VALUE(Str) NULL +# define STORE_VALUE(Str) do { } while (0) + +#endif + + +/* If this variable is not a null pointer we allocated the current + environment. */ +static char **last_environ; + + +/* This function is used by `setenv' and `putenv'. The difference between + the two functions is that for the former must create a new string which + is then placed in the environment, while the argument of `putenv' + must be used directly. This is all complicated by the fact that we try + to reuse values once generated for a `setenv' call since we can never + free the strings. */ +int +__add_to_environ (const char *name, const char *value, const char *combined, + int replace) +{ + register char **ep; + register size_t size; + const size_t namelen = strlen (name); + const size_t vallen = value != NULL ? strlen (value) + 1 : 0; + + LOCK; + + /* We have to get the pointer now that we have the lock and not earlier + since another thread might have created a new environment. */ + ep = __environ; + + size = 0; + if (ep != NULL) + { + for (; *ep != NULL; ++ep) + if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') + break; + else + ++size; + } + + if (ep == NULL || *ep == NULL) + { + char **new_environ; +#ifdef USE_TSEARCH + char *new_value; +#endif + + /* We allocated this space; we can extend it. */ + new_environ = + (char **) (last_environ == NULL + ? malloc ((size + 2) * sizeof (char *)) + : realloc (last_environ, (size + 2) * sizeof (char *))); + if (new_environ == NULL) + { + UNLOCK; + return -1; + } + + /* If the whole entry is given add it. */ + if (combined != NULL) + /* We must not add the string to the search tree since it belongs + to the user. */ + new_environ[size] = (char *) combined; + else + { + /* See whether the value is already known. */ +#ifdef USE_TSEARCH +# ifdef _LIBC + new_value = (char *) alloca (namelen + 1 + vallen); + __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), + value, vallen); +# else + new_value = (char *) allocsa (namelen + 1 + vallen); + if (new_value == NULL) + { + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + memcpy (new_value, name, namelen); + new_value[namelen] = '='; + memcpy (&new_value[namelen + 1], value, vallen); +# endif + + new_environ[size] = KNOWN_VALUE (new_value); + if (new_environ[size] == NULL) +#endif + { + new_environ[size] = (char *) malloc (namelen + 1 + vallen); + if (new_environ[size] == NULL) + { +#if defined USE_TSEARCH && !defined _LIBC + freesa (new_value); +#endif + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + +#ifdef USE_TSEARCH + memcpy (new_environ[size], new_value, namelen + 1 + vallen); +#else + memcpy (new_environ[size], name, namelen); + new_environ[size][namelen] = '='; + memcpy (&new_environ[size][namelen + 1], value, vallen); +#endif + /* And save the value now. We cannot do this when we remove + the string since then we cannot decide whether it is a + user string or not. */ + STORE_VALUE (new_environ[size]); + } +#if defined USE_TSEARCH && !defined _LIBC + freesa (new_value); +#endif + } + + if (__environ != last_environ) + memcpy ((char *) new_environ, (char *) __environ, + size * sizeof (char *)); + + new_environ[size + 1] = NULL; + + last_environ = __environ = new_environ; + } + else if (replace) + { + char *np; + + /* Use the user string if given. */ + if (combined != NULL) + np = (char *) combined; + else + { +#ifdef USE_TSEARCH + char *new_value; +# ifdef _LIBC + new_value = alloca (namelen + 1 + vallen); + __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), + value, vallen); +# else + new_value = allocsa (namelen + 1 + vallen); + if (new_value == NULL) + { + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + memcpy (new_value, name, namelen); + new_value[namelen] = '='; + memcpy (&new_value[namelen + 1], value, vallen); +# endif + + np = KNOWN_VALUE (new_value); + if (np == NULL) +#endif + { + np = malloc (namelen + 1 + vallen); + if (np == NULL) + { +#if defined USE_TSEARCH && !defined _LIBC + freesa (new_value); +#endif + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + +#ifdef USE_TSEARCH + memcpy (np, new_value, namelen + 1 + vallen); +#else + memcpy (np, name, namelen); + np[namelen] = '='; + memcpy (&np[namelen + 1], value, vallen); +#endif + /* And remember the value. */ + STORE_VALUE (np); + } +#if defined USE_TSEARCH && !defined _LIBC + freesa (new_value); +#endif + } + + *ep = np; + } + + UNLOCK; + + return 0; +} + +int +setenv (const char *name, const char *value, int replace) +{ + return __add_to_environ (name, value, NULL, replace); +} + +/* The `clearenv' was planned to be added to POSIX.1 but probably + never made it. Nevertheless the POSIX.9 standard (POSIX bindings + for Fortran 77) requires this function. */ +int +clearenv (void) +{ + LOCK; + + if (__environ == last_environ && __environ != NULL) + { + /* We allocated this environment so we can free it. */ + free (__environ); + last_environ = NULL; + } + + /* Clear the environment pointer removes the whole environment. */ + __environ = NULL; + + UNLOCK; + + return 0; +} + +#ifdef _LIBC +static void +free_mem (void) +{ + /* Remove all traces. */ + clearenv (); + + /* Now remove the search tree. */ + __tdestroy (known_values, free); + known_values = NULL; +} +text_set_element (__libc_subfreeres, free_mem); + + +# undef setenv +# undef clearenv +weak_alias (__setenv, setenv) +weak_alias (__clearenv, clearenv) +#endif + +#endif /* _LIBC || !HAVE_SETENV */ diff --git a/gnulib/lib/setenv.h b/gnulib/lib/setenv.h new file mode 100644 index 0000000..92e7bba --- /dev/null +++ b/gnulib/lib/setenv.h @@ -0,0 +1,54 @@ +/* Setting environment variables. + Copyright (C) 2001-2004, 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 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. */ + +#if HAVE_SETENV || HAVE_UNSETENV + +/* Get setenv(), unsetenv() declarations. */ +# include + +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#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 + +#if HAVE_UNSETENV + +# if VOID_UNSETENV +/* On some systems, unsetenv() returns void. + This is the case for 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 + +#ifdef __cplusplus +} +#endif diff --git a/gnulib/lib/stat-macros.h b/gnulib/lib/stat-macros.h new file mode 100644 index 0000000..690216c --- /dev/null +++ b/gnulib/lib/stat-macros.h @@ -0,0 +1,3 @@ +/* All the mode bits that can be affected by chmod. */ +#define CHMOD_MODE_BITS \ + (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) diff --git a/gnulib/lib/stat-time.h b/gnulib/lib/stat-time.h new file mode 100644 index 0000000..649c848 --- /dev/null +++ b/gnulib/lib/stat-time.h @@ -0,0 +1,184 @@ +/* stat-related time functions. + + Copyright (C) 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 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. */ + +/* Written by Paul Eggert. */ + +#ifndef STAT_TIME_H +#define STAT_TIME_H 1 + +#include +#include + +/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type + struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, + ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, + if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim + for access, status change, data modification, or birth (creation) + time respectively. + + These macros are private to stat-time.h. */ +#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC +# ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) +# else +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec) +# endif +#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec) +#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec) +#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec) +#endif + +/* Return the nanosecond component of *ST's access time. */ +static inline long int +get_stat_atime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_atim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's status change time. */ +static inline long int +get_stat_ctime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_ctim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's data modification time. */ +static inline long int +get_stat_mtime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_mtim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's birth time. */ +static inline long int +get_stat_birthtime_ns (struct stat const *st) +{ +# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + return STAT_TIMESPEC (st, st_birthtim).tv_nsec; +# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + return STAT_TIMESPEC_NS (st, st_birthtim); +# else + return 0; +# endif +} + +/* Return *ST's access time. */ +static inline struct timespec +get_stat_atime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim); +#else + struct timespec t; + t.tv_sec = st->st_atime; + t.tv_nsec = get_stat_atime_ns (st); + return t; +#endif +} + +/* Return *ST's status change time. */ +static inline struct timespec +get_stat_ctime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim); +#else + struct timespec t; + t.tv_sec = st->st_ctime; + t.tv_nsec = get_stat_ctime_ns (st); + return t; +#endif +} + +/* Return *ST's data modification time. */ +static inline struct timespec +get_stat_mtime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim); +#else + struct timespec t; + t.tv_sec = st->st_mtime; + t.tv_nsec = get_stat_mtime_ns (st); + return t; +#endif +} + +/* Return *ST's birth time, if available; otherwise return a value + with negative tv_nsec. */ +static inline struct timespec +get_stat_birthtime (struct stat const *st) +{ + struct timespec t; + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC) + t = STAT_TIMESPEC (st, st_birthtim); +#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + t.tv_sec = st->st_birthtime; + t.tv_nsec = st->st_birthtimensec; +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* Woe32 native platforms (but not Cygwin) put the "file creation + time" in st_ctime (!). See + . */ + t.tv_sec = st->st_ctime; + t.tv_nsec = 0; +#else + /* Birth time is not supported. Set tv_sec to avoid undefined behavior. */ + t.tv_sec = -1; + t.tv_nsec = -1; +#endif + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) + /* FreeBSD and NetBSD sometimes signal the absence of knowledge by + using zero. Attempt to work around this problem. Alas, this can + report failure even for valid time stamps. Also, NetBSD + sometimes returns junk in the birth time fields; work around this + bug if it it is detected. There's no need to detect negative + tv_nsec junk as negative tv_nsec already indicates an error. */ + if (t.tv_sec == 0 || 1000000000 <= t.tv_nsec) + t.tv_nsec = -1; +#endif + + return t; +} + +#endif diff --git a/gnulib/lib/stdbool_.h b/gnulib/lib/stdbool_.h new file mode 100644 index 0000000..150a010 --- /dev/null +++ b/gnulib/lib/stdbool_.h @@ -0,0 +1,118 @@ +/* Copyright (C) 2001, 2002, 2003, 2006, 2007 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 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. */ + +#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. */ +#ifdef __BEOS__ +# 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__ + /* 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". + The only benefit of the enum type, debuggability, is not important + with these compilers. So use 'signed char' and no typedef. */ +# define _Bool signed char +enum { false = 0, true = 1 }; +# 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 */ diff --git a/gnulib/lib/stdint_.h b/gnulib/lib/stdint_.h new file mode 100644 index 0000000..f32b8dc --- /dev/null +++ b/gnulib/lib/stdint_.h @@ -0,0 +1,508 @@ +/* Copyright (C) 2001-2002, 2004-2007 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 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. */ + +#ifndef _GL_STDINT_H +#define _GL_STDINT_H + +/* + * ISO C 99 for platforms that lack it. + * + */ + +/* 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. */ +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_STDINT_H@ +# endif +#endif + +/* 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 @ABSOLUTE_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. */ +# define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H +# include +# undef _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H +#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 + +#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS + +/* Get WCHAR_MIN, WCHAR_MAX. */ +# if ! (defined WCHAR_MIN && defined WCHAR_MAX) +# include +# endif + +#endif + +/* 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) \ + : ((((zero) + 1) << ((bits) ? (bits) - 1 : 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 +#define int8_t signed char +#define uint8_t unsigned char + +#undef int16_t +#undef uint16_t +#define int16_t short int +#define uint16_t unsigned short int + +#undef int32_t +#undef uint32_t +#define int32_t int +#define uint32_t unsigned int + +/* 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 +# define int64_t long int +# define GL_INT64_T +#elif defined _MSC_VER +# undef int64_t +# define int64_t __int64 +# define GL_INT64_T +#elif @HAVE_LONG_LONG_INT@ +# undef int64_t +# define int64_t long long int +# define GL_INT64_T +#endif + +#if ULONG_MAX >> 31 >> 31 >> 1 == 1 +# undef uint64_t +# define uint64_t unsigned long int +# define GL_UINT64_T +#elif defined _MSC_VER +# undef uint64_t +# define uint64_t unsigned __int64 +# define GL_UINT64_T +#elif @HAVE_UNSIGNED_LONG_LONG_INT@ +# undef uint64_t +# define uint64_t unsigned long long int +# 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 +#define int_fast8_t long int +#define uint_fast8_t unsigned int_fast8_t +#define int_fast16_t long int +#define uint_fast16_t unsigned int_fast16_t +#define int_fast32_t long int +#define uint_fast32_t unsigned int_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 +#define intptr_t long int +#define uintptr_t unsigned long int + +/* 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 +# define intmax_t long long int +#elif defined GL_INT64_T +# define intmax_t int64_t +#else +# define intmax_t long int +#endif + +#undef uintmax_t +#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# define uintmax_t unsigned long long int +#elif defined GL_UINT64_T +# define uintmax_t uint64_t +#else +# define uintmax_t unsigned long int +#endif + +/* 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 +#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@) + +/* 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 +#define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) + +/* wchar_t limits */ +#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 */ diff --git a/gnulib/lib/stdio--.h b/gnulib/lib/stdio--.h new file mode 100644 index 0000000..2385e62 --- /dev/null +++ b/gnulib/lib/stdio--.h @@ -0,0 +1,28 @@ +/* Like stdio.h, but redefine some names to avoid glitches. + + 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 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. */ + +/* Written by Paul Eggert. */ + +#include +#include "stdio-safer.h" + +#undef fopen +#define fopen fopen_safer + +#undef tmpfile +#define tmpfile tmpfile_safer diff --git a/gnulib/lib/stdio-safer.h b/gnulib/lib/stdio-safer.h new file mode 100644 index 0000000..8329a1a --- /dev/null +++ b/gnulib/lib/stdio-safer.h @@ -0,0 +1,24 @@ +/* Invoke stdio functions, but avoid some glitches. + + Copyright (C) 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 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. */ + +/* Written by Paul Eggert. */ + +#include + +FILE *fopen_safer (char const *, char const *); +FILE *tmpfile_safer (void); diff --git a/gnulib/lib/stdlib_.h b/gnulib/lib/stdlib_.h new file mode 100644 index 0000000..ea429c0 --- /dev/null +++ b/gnulib/lib/stdlib_.h @@ -0,0 +1,138 @@ +/* A GNU-like . + + Copyright (C) 1995, 2001-2002, 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 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. */ + +#if defined __need_malloc_and_calloc +/* Special invocation convention inside glibc header files. */ + +#if @HAVE_INCLUDE_NEXT@ +# include_next +#else +# include @ABSOLUTE_STDLIB_H@ +#endif + +#else +/* Normal invocation convention. */ + +#if @HAVE_INCLUDE_NEXT@ +# include_next +#endif + +#ifndef _GL_STDLIB_H +#define _GL_STDLIB_H + +#if ! @HAVE_INCLUDE_NEXT@ +# include @ABSOLUTE_STDLIB_H@ +#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_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 + + +#ifdef __cplusplus +} +#endif + +#endif /* _GL_STDLIB_H */ +#endif diff --git a/gnulib/lib/stpcpy.c b/gnulib/lib/stpcpy.c new file mode 100644 index 0000000..4089d39 --- /dev/null +++ b/gnulib/lib/stpcpy.c @@ -0,0 +1,49 @@ +/* stpcpy.c -- copy a string and return pointer to end of new string + Copyright (C) 1992, 1995, 1997-1998, 2006 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 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. */ + +#include + +#include + +#undef __stpcpy +#ifdef _LIBC +# undef stpcpy +#endif + +#ifndef weak_alias +# define __stpcpy stpcpy +#endif + +/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ +char * +__stpcpy (char *dest, const char *src) +{ + register char *d = dest; + register const char *s = src; + + do + *d++ = *s; + while (*s++ != '\0'); + + return d - 1; +} +#ifdef weak_alias +weak_alias (__stpcpy, stpcpy) +#endif diff --git a/gnulib/lib/strdup.c b/gnulib/lib/strdup.c new file mode 100644 index 0000000..c614108 --- /dev/null +++ b/gnulib/lib/strdup.c @@ -0,0 +1,55 @@ +/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 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 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. */ + +#ifndef _LIBC +# include +#endif + +/* Get specification. */ +#include + +#include + +#undef __strdup +#ifdef _LIBC +# undef strdup +#endif + +#ifndef weak_alias +# define __strdup strdup +#endif + +/* Duplicate S, returning an identical malloc'd string. */ +char * +__strdup (const char *s) +{ + size_t len = strlen (s) + 1; + void *new = malloc (len); + + if (new == NULL) + return NULL; + + return (char *) memcpy (new, s, len); +} +#ifdef libc_hidden_def +libc_hidden_def (__strdup) +#endif +#ifdef weak_alias +weak_alias (__strdup, strdup) +#endif diff --git a/gnulib/lib/strftime.c b/gnulib/lib/strftime.c new file mode 100644 index 0000000..1c202c9 --- /dev/null +++ b/gnulib/lib/strftime.c @@ -0,0 +1,1462 @@ +/* Copyright (C) 1991-1999, 2000, 2001, 2003, 2004, 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@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 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. */ + +#ifdef _LIBC +# define HAVE_MBLEN 1 +# define HAVE_MBRLEN 1 +# define HAVE_STRUCT_ERA_ENTRY 1 +# define HAVE_TM_GMTOFF 1 +# define HAVE_TM_ZONE 1 +# define HAVE_TZNAME 1 +# define HAVE_TZSET 1 +# define MULTIBYTE_IS_FORMAT_SAFE 1 +# include "../locale/localeinfo.h" +#else +# include +# if FPRINTFTIME +# include "fprintftime.h" +# endif +#endif + +#include +#include + +#if HAVE_TZNAME && ! defined tzname +extern char *tzname[]; +#endif + +/* Do multibyte processing if multibytes are supported, unless + multibyte sequences are safe in formats. Multibyte sequences are + safe if they cannot contain byte sequences that look like format + conversion specifications. The GNU C Library uses UTF8 multibyte + encoding, which is safe for formats, but strftime.c can be used + with other C libraries that use unsafe encodings. */ +#define DO_MULTIBYTE (HAVE_MBLEN && ! MULTIBYTE_IS_FORMAT_SAFE) + +#if DO_MULTIBYTE +# if HAVE_MBRLEN +# include +# else + /* Simulate mbrlen with mblen as best we can. */ +# define mbstate_t int +# define mbrlen(s, n, ps) mblen (s, n) +# define mbsinit(ps) (*(ps) == 0) +# endif + static const mbstate_t mbstate_zero; +#endif + +#include +#include +#include +#include +#include + +#ifdef COMPILE_WIDE +# include +# define CHAR_T wchar_t +# define UCHAR_T unsigned int +# define L_(Str) L##Str +# define NLW(Sym) _NL_W##Sym + +# define MEMCPY(d, s, n) __wmemcpy (d, s, n) +# define STRLEN(s) __wcslen (s) + +#else +# define CHAR_T char +# define UCHAR_T unsigned char +# define L_(Str) Str +# define NLW(Sym) Sym + +# define MEMCPY(d, s, n) memcpy (d, s, n) +# define STRLEN(s) strlen (s) + +# ifdef _LIBC +# define MEMPCPY(d, s, n) __mempcpy (d, s, n) +# else +# ifndef HAVE_MEMPCPY +# define MEMPCPY(d, s, n) ((void *) ((char *) memcpy (d, s, n) + (n))) +# endif +# endif +#endif + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +/* 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 - 1) * 146 / 485 + 2) + +#define TM_YEAR_BASE 1900 + +#ifndef __isleap +/* Nonzero if YEAR is a leap year (every 4 years, + except every 100th isn't, and every 400th is). */ +# define __isleap(year) \ + ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) +#endif + + +#ifdef _LIBC +# define tzname __tzname +# define tzset __tzset +#endif + +#if !HAVE_TM_GMTOFF +/* Portable standalone applications should supply a "time.h" that + declares a POSIX-compliant localtime_r, for the benefit of older + implementations that lack localtime_r or have a nonstandard one. + See the gnulib time_r module for one way to implement this. */ +# undef __gmtime_r +# undef __localtime_r +# define __gmtime_r gmtime_r +# define __localtime_r localtime_r +#endif + + +#ifndef FPRINTFTIME +# define FPRINTFTIME 0 +#endif + +#if FPRINTFTIME +# define STREAM_OR_CHAR_T FILE +# define STRFTIME_ARG(x) /* empty */ +#else +# define STREAM_OR_CHAR_T CHAR_T +# define STRFTIME_ARG(x) x, +#endif + +#if FPRINTFTIME +# define memset_byte(P, Len, Byte) \ + do { size_t _i; for (_i = 0; _i < Len; _i++) fputc (Byte, P); } while (0) +# define memset_space(P, Len) memset_byte (P, Len, ' ') +# define memset_zero(P, Len) memset_byte (P, Len, '0') +#elif defined COMPILE_WIDE +# define memset_space(P, Len) (wmemset (P, L' ', Len), (P) += (Len)) +# define memset_zero(P, Len) (wmemset (P, L'0', Len), (P) += (Len)) +#else +# define memset_space(P, Len) (memset (P, ' ', Len), (P) += (Len)) +# define memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len)) +#endif + +#if FPRINTFTIME +# define advance(P, N) +#else +# define advance(P, N) ((P) += (N)) +#endif + +#define add(n, f) \ + do \ + { \ + int _n = (n); \ + int _delta = width - _n; \ + int _incr = _n + (_delta > 0 ? _delta : 0); \ + if ((size_t) _incr >= maxsize - i) \ + return 0; \ + if (p) \ + { \ + if (digits == 0 && _delta > 0) \ + { \ + if (pad == L_('0')) \ + memset_zero (p, _delta); \ + else \ + memset_space (p, _delta); \ + } \ + f; \ + advance (p, _n); \ + } \ + i += _incr; \ + } while (0) + +#if FPRINTFTIME +# define add1(C) add (1, fputc (C, p)) +#else +# define add1(C) add (1, *p = C) +#endif + +#if FPRINTFTIME +# define cpy(n, s) \ + add ((n), \ + if (to_lowcase) \ + fwrite_lowcase (p, (s), _n); \ + else if (to_uppcase) \ + fwrite_uppcase (p, (s), _n); \ + else \ + fwrite ((s), _n, 1, p)) +#else +# define cpy(n, s) \ + add ((n), \ + if (to_lowcase) \ + memcpy_lowcase (p, (s), _n LOCALE_ARG); \ + else if (to_uppcase) \ + memcpy_uppcase (p, (s), _n LOCALE_ARG); \ + else \ + MEMCPY ((void *) p, (void const *) (s), _n)) +#endif + +#ifdef COMPILE_WIDE +# ifndef USE_IN_EXTENDED_LOCALE_MODEL +# undef __mbsrtowcs_l +# define __mbsrtowcs_l(d, s, l, st, loc) __mbsrtowcs (d, s, l, st) +# endif +# define widen(os, ws, l) \ + { \ + mbstate_t __st; \ + const char *__s = os; \ + memset (&__st, '\0', sizeof (__st)); \ + l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc); \ + ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t)); \ + (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc); \ + } +#endif + + +#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL +/* 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. */ +# define strftime __strftime_l +# define wcsftime __wcsftime_l +# undef _NL_CURRENT +# define _NL_CURRENT(category, item) \ + (current->values[_NL_ITEM_INDEX (item)].string) +# define LOCALE_ARG , loc +# define LOCALE_PARAM_PROTO , __locale_t loc +# define HELPER_LOCALE_ARG , current +#else +# define LOCALE_PARAM_PROTO +# define LOCALE_ARG +# ifdef _LIBC +# define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME) +# else +# define HELPER_LOCALE_ARG +# endif +#endif + +#ifdef COMPILE_WIDE +# ifdef USE_IN_EXTENDED_LOCALE_MODEL +# define TOUPPER(Ch, L) __towupper_l (Ch, L) +# define TOLOWER(Ch, L) __towlower_l (Ch, L) +# else +# define TOUPPER(Ch, L) towupper (Ch) +# define TOLOWER(Ch, L) towlower (Ch) +# endif +#else +# ifdef USE_IN_EXTENDED_LOCALE_MODEL +# define TOUPPER(Ch, L) __toupper_l (Ch, L) +# define TOLOWER(Ch, L) __tolower_l (Ch, L) +# else +# define TOUPPER(Ch, L) toupper (Ch) +# define TOLOWER(Ch, L) tolower (Ch) +# endif +#endif +/* We don't use `isdigit' here since the locale dependent + interpretation is not what we want here. We only need to accept + the arabic digits in the ASCII range. One day there is perhaps a + more reliable way to accept other sets of digits. */ +#define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) + +#if FPRINTFTIME +static void +fwrite_lowcase (FILE *fp, const CHAR_T *src, size_t len) +{ + while (len-- > 0) + { + fputc (TOLOWER ((UCHAR_T) *src, loc), fp); + ++src; + } +} + +static void +fwrite_uppcase (FILE *fp, const CHAR_T *src, size_t len) +{ + while (len-- > 0) + { + fputc (TOUPPER ((UCHAR_T) *src, loc), fp); + ++src; + } +} +#else +static CHAR_T * +memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, + size_t len LOCALE_PARAM_PROTO) +{ + while (len-- > 0) + dest[len] = TOLOWER ((UCHAR_T) src[len], loc); + return dest; +} + +static CHAR_T * +memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, + size_t len LOCALE_PARAM_PROTO) +{ + while (len-- > 0) + dest[len] = TOUPPER ((UCHAR_T) src[len], loc); + return dest; +} +#endif + + +#if ! HAVE_TM_GMTOFF +/* Yield the difference between *A and *B, + measured in seconds, ignoring leap seconds. */ +# define tm_diff ftime_tm_diff +static int +tm_diff (const struct tm *a, const struct tm *b) +{ + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid int overflow in leap day calculations, + but it's OK to assume that A and B are close to each other. */ + int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); + int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + int years = a->tm_year - b->tm_year; + int days = (365 * years + intervening_leap_days + + (a->tm_yday - b->tm_yday)); + return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + + (a->tm_min - b->tm_min)) + + (a->tm_sec - b->tm_sec)); +} +#endif /* ! HAVE_TM_GMTOFF */ + + + +/* The number of days from the first day of the first ISO week of this + year to the year day YDAY with week day WDAY. ISO weeks start on + Monday; the first ISO week has the year's first Thursday. YDAY may + be as small as YDAY_MINIMUM. */ +#define ISO_WEEK_START_WDAY 1 /* Monday */ +#define ISO_WEEK1_WDAY 4 /* Thursday */ +#define YDAY_MINIMUM (-366) +#ifdef __GNUC__ +__inline__ +#endif +static int +iso_week_days (int yday, int wday) +{ + /* Add enough to the first operand of % to make it nonnegative. */ + int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; + return (yday + - (yday - wday + ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7 + + ISO_WEEK1_WDAY - ISO_WEEK_START_WDAY); +} + + +/* When compiling this file, GNU applications can #define my_strftime + to a symbol (typically nstrftime) to get an extended strftime with + extra arguments UT and NS. Emacs is a special case for now, but + this Emacs-specific code can be removed once Emacs's config.h + defines my_strftime. */ +#if defined emacs && !defined my_strftime +# define my_strftime nstrftime +#endif + +#if FPRINTFTIME +# undef my_strftime +# define my_strftime fprintftime +#endif + +#ifdef my_strftime +# define extra_args , ut, ns +# define extra_args_spec , int ut, int ns +#else +# if defined COMPILE_WIDE +# define my_strftime wcsftime +# define nl_get_alt_digit _nl_get_walt_digit +# else +# define my_strftime strftime +# define nl_get_alt_digit _nl_get_alt_digit +# endif +# define extra_args +# define extra_args_spec +/* We don't have this information in general. */ +# define ut 0 +# define ns 0 +#endif + + +/* Just like my_strftime, below, but with one more parameter, UPCASE, + to indicate that the result should be converted to upper case. */ +static size_t +strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s, + STRFTIME_ARG (size_t maxsize) + const CHAR_T *format, + const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO) +{ +#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL + struct locale_data *const current = loc->__locales[LC_TIME]; +#endif +#if FPRINTFTIME + size_t maxsize = (size_t) -1; +#endif + + int hour12 = tp->tm_hour; +#ifdef _NL_CURRENT + /* We cannot make the following values variables since we must delay + the evaluation of these values until really needed since some + expressions might not be valid in every situation. The `struct tm' + might be generated by a strptime() call that initialized + only a few elements. Dereference the pointers only if the format + requires this. Then it is ok to fail if the pointers are invalid. */ +# define a_wkday \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)) +# define f_wkday \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)) +# define a_month \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)) +# define f_month \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)) +# define ampm \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \ + ? NLW(PM_STR) : NLW(AM_STR))) + +# define aw_len STRLEN (a_wkday) +# define am_len STRLEN (a_month) +# define ap_len STRLEN (ampm) +#endif + const char *zone; + size_t i = 0; + STREAM_OR_CHAR_T *p = s; + const CHAR_T *f; +#if DO_MULTIBYTE && !defined COMPILE_WIDE + const char *format_end = NULL; +#endif + +#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST + /* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned + by localtime. On such systems, we must either use the tzset and + localtime wrappers to work around the bug (which sets + HAVE_RUN_TZSET_TEST) or make a copy of the structure. */ + struct tm copy = *tp; + tp = © +#endif + + zone = NULL; +#if HAVE_TM_ZONE + /* The POSIX test suite assumes that setting + the environment variable TZ to a new value before calling strftime() + will influence the result (the %Z format) even if the information in + TP is computed with a totally different time zone. + This is bogus: though POSIX allows bad behavior like this, + POSIX does not require it. Do the right thing instead. */ + zone = (const char *) tp->tm_zone; +#endif +#if HAVE_TZNAME + if (ut) + { + if (! (zone && *zone)) + zone = "GMT"; + } + else + { + /* POSIX.1 requires that local time zone information be used as + though strftime called tzset. */ +# if HAVE_TZSET + tzset (); +# endif + } +#endif + + if (hour12 > 12) + hour12 -= 12; + else + if (hour12 == 0) + hour12 = 12; + + for (f = format; *f != '\0'; ++f) + { + int pad = 0; /* Padding for number ('-', '_', or 0). */ + int modifier; /* Field modifier ('E', 'O', or 0). */ + int digits = 0; /* Max digits for numeric format. */ + int number_value; /* Numeric value to be printed. */ + unsigned int u_number_value; /* (unsigned int) number_value. */ + bool negative_number; /* The number is negative. */ + bool always_output_a_sign; /* +/- should always be output. */ + int tz_colon_mask; /* Bitmask of where ':' should appear. */ + const CHAR_T *subfmt; + CHAR_T sign_char; + CHAR_T *bufp; + CHAR_T buf[1 + + 2 /* for the two colons in a %::z or %:::z time zone */ + + (sizeof (int) < sizeof (time_t) + ? INT_STRLEN_BOUND (time_t) + : INT_STRLEN_BOUND (int))]; + int width = -1; + bool to_lowcase = false; + bool to_uppcase = upcase; + size_t colons; + bool change_case = false; + int format_char; + +#if DO_MULTIBYTE && !defined COMPILE_WIDE + switch (*f) + { + case L_('%'): + break; + + case L_('\b'): case L_('\t'): case L_('\n'): + case L_('\v'): case L_('\f'): case L_('\r'): + 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_('~'): + /* The C Standard requires these 98 characters (plus '%') to + be in the basic execution character set. None of these + characters can start a multibyte sequence, so they need + not be analyzed further. */ + add1 (*f); + continue; + + default: + /* Copy this multibyte sequence until we reach its end, find + an error, or come back to the initial shift state. */ + { + mbstate_t mbstate = mbstate_zero; + size_t len = 0; + size_t fsize; + + if (! format_end) + format_end = f + strlen (f) + 1; + fsize = format_end - f; + + do + { + size_t bytes = mbrlen (f + len, fsize - len, &mbstate); + + if (bytes == 0) + break; + + if (bytes == (size_t) -2) + { + len += strlen (f + len); + break; + } + + if (bytes == (size_t) -1) + { + len++; + break; + } + + len += bytes; + } + while (! mbsinit (&mbstate)); + + cpy (len, f); + f += len - 1; + continue; + } + } + +#else /* ! DO_MULTIBYTE */ + + /* Either multibyte encodings are not supported, they are + safe for formats, so any non-'%' byte can be copied through, + or this is the wide character version. */ + if (*f != L_('%')) + { + add1 (*f); + continue; + } + +#endif /* ! DO_MULTIBYTE */ + + /* Check for flags that can modify a format. */ + while (1) + { + switch (*++f) + { + /* This influences the number formats. */ + case L_('_'): + case L_('-'): + case L_('0'): + pad = *f; + continue; + + /* This changes textual output. */ + case L_('^'): + to_uppcase = true; + continue; + case L_('#'): + change_case = true; + continue; + + default: + break; + } + break; + } + + /* As a GNU extension we allow to specify the field width. */ + if (ISDIGIT (*f)) + { + width = 0; + do + { + if (width > INT_MAX / 10 + || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10)) + /* Avoid overflow. */ + width = INT_MAX; + else + { + width *= 10; + width += *f - L_('0'); + } + ++f; + } + while (ISDIGIT (*f)); + } + + /* Check for modifiers. */ + switch (*f) + { + case L_('E'): + case L_('O'): + modifier = *f++; + break; + + default: + modifier = 0; + break; + } + + /* Now do the specified format. */ + format_char = *f; + switch (format_char) + { +#define DO_NUMBER(d, v) \ + digits = d; \ + number_value = v; goto do_number +#define DO_SIGNED_NUMBER(d, negative, v) \ + digits = d; \ + negative_number = negative; \ + u_number_value = v; goto do_signed_number + + /* The mask is not what you might think. + When the ordinal i'th bit is set, insert a colon + before the i'th digit of the time zone representation. */ +#define DO_TZ_OFFSET(d, negative, mask, v) \ + digits = d; \ + negative_number = negative; \ + tz_colon_mask = mask; \ + u_number_value = v; goto do_tz_offset +#define DO_NUMBER_SPACEPAD(d, v) \ + digits = d; \ + number_value = v; goto do_number_spacepad + + case L_('%'): + if (modifier != 0) + goto bad_format; + add1 (*f); + break; + + case L_('a'): + if (modifier != 0) + goto bad_format; + if (change_case) + { + to_uppcase = true; + to_lowcase = false; + } +#ifdef _NL_CURRENT + cpy (aw_len, a_wkday); + break; +#else + goto underlying_strftime; +#endif + + case 'A': + if (modifier != 0) + goto bad_format; + if (change_case) + { + to_uppcase = true; + to_lowcase = false; + } +#ifdef _NL_CURRENT + cpy (STRLEN (f_wkday), f_wkday); + break; +#else + goto underlying_strftime; +#endif + + case L_('b'): + case L_('h'): + if (change_case) + { + to_uppcase = true; + to_lowcase = false; + } + if (modifier != 0) + goto bad_format; +#ifdef _NL_CURRENT + cpy (am_len, a_month); + break; +#else + goto underlying_strftime; +#endif + + case L_('B'): + if (modifier != 0) + goto bad_format; + if (change_case) + { + to_uppcase = true; + to_lowcase = false; + } +#ifdef _NL_CURRENT + cpy (STRLEN (f_month), f_month); + break; +#else + goto underlying_strftime; +#endif + + case L_('c'): + if (modifier == L_('O')) + goto bad_format; +#ifdef _NL_CURRENT + if (! (modifier == 'E' + && (*(subfmt = + (const CHAR_T *) _NL_CURRENT (LC_TIME, + NLW(ERA_D_T_FMT))) + != '\0'))) + subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT)); +#else + goto underlying_strftime; +#endif + + subformat: + { + size_t len = strftime_case_ (to_uppcase, + NULL, STRFTIME_ARG ((size_t) -1) + subfmt, + tp extra_args LOCALE_ARG); + add (len, strftime_case_ (to_uppcase, p, + STRFTIME_ARG (maxsize - i) + subfmt, + tp extra_args LOCALE_ARG)); + } + break; + +#if !(defined _NL_CURRENT && HAVE_STRUCT_ERA_ENTRY) + underlying_strftime: + { + /* The relevant information is available only via the + underlying strftime implementation, so use that. */ + char ufmt[5]; + char *u = ufmt; + char ubuf[1024]; /* enough for any single format in practice */ + size_t len; + /* Make sure we're calling the actual underlying strftime. + In some cases, config.h contains something like + "#define strftime rpl_strftime". */ +# ifdef strftime +# undef strftime + size_t strftime (); +# endif + + /* The space helps distinguish strftime failure from empty + output. */ + *u++ = ' '; + *u++ = '%'; + if (modifier != 0) + *u++ = modifier; + *u++ = format_char; + *u = '\0'; + len = strftime (ubuf, sizeof ubuf, ufmt, tp); + if (len != 0) + cpy (len - 1, ubuf + 1); + } + break; +#endif + + case L_('C'): + if (modifier == L_('O')) + goto bad_format; + if (modifier == L_('E')) + { +#if HAVE_STRUCT_ERA_ENTRY + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); + if (era) + { +# ifdef COMPILE_WIDE + size_t len = __wcslen (era->era_wname); + cpy (len, era->era_wname); +# else + size_t len = strlen (era->era_name); + cpy (len, era->era_name); +# endif + break; + } +#else + goto underlying_strftime; +#endif + } + + { + int century = tp->tm_year / 100 + TM_YEAR_BASE / 100; + century -= tp->tm_year % 100 < 0 && 0 < century; + DO_SIGNED_NUMBER (2, tp->tm_year < - TM_YEAR_BASE, century); + } + + case L_('x'): + if (modifier == L_('O')) + goto bad_format; +#ifdef _NL_CURRENT + if (! (modifier == L_('E') + && (*(subfmt = + (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT))) + != L_('\0')))) + subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT)); + goto subformat; +#else + goto underlying_strftime; +#endif + case L_('D'): + if (modifier != 0) + goto bad_format; + subfmt = L_("%m/%d/%y"); + goto subformat; + + case L_('d'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, tp->tm_mday); + + case L_('e'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER_SPACEPAD (2, tp->tm_mday); + + /* All numeric formats set DIGITS and NUMBER_VALUE (or U_NUMBER_VALUE) + and then jump to one of these labels. */ + + do_tz_offset: + always_output_a_sign = true; + goto do_number_body; + + do_number_spacepad: + /* Force `_' flag unless overridden by `0' or `-' flag. */ + if (pad != L_('0') && pad != L_('-')) + pad = L_('_'); + + do_number: + /* Format NUMBER_VALUE according to the MODIFIER flag. */ + negative_number = number_value < 0; + u_number_value = number_value; + + do_signed_number: + always_output_a_sign = false; + tz_colon_mask = 0; + + do_number_body: + /* Format U_NUMBER_VALUE according to the MODIFIER flag. + NEGATIVE_NUMBER is nonzero if the original number was + negative; in this case it was converted directly to + unsigned int (i.e., modulo (UINT_MAX + 1)) without + negating it. */ + if (modifier == L_('O') && !negative_number) + { +#ifdef _NL_CURRENT + /* Get the locale specific alternate representation of + the number. If none exist NULL is returned. */ + const CHAR_T *cp = nl_get_alt_digit (u_number_value + HELPER_LOCALE_ARG); + + if (cp != NULL) + { + size_t digitlen = STRLEN (cp); + if (digitlen != 0) + { + cpy (digitlen, cp); + break; + } + } +#else + goto underlying_strftime; +#endif + } + + bufp = buf + sizeof (buf) / sizeof (buf[0]); + + if (negative_number) + u_number_value = - u_number_value; + + do + { + if (tz_colon_mask & 1) + *--bufp = ':'; + tz_colon_mask >>= 1; + *--bufp = u_number_value % 10 + L_('0'); + u_number_value /= 10; + } + while (u_number_value != 0 || tz_colon_mask != 0); + + do_number_sign_and_padding: + if (digits < width) + digits = width; + + sign_char = (negative_number ? L_('-') + : always_output_a_sign ? L_('+') + : 0); + + if (pad == L_('-')) + { + if (sign_char) + add1 (sign_char); + } + else + { + int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) + - bufp) - !!sign_char; + + if (padding > 0) + { + if (pad == L_('_')) + { + if ((size_t) padding >= maxsize - i) + return 0; + + if (p) + memset_space (p, padding); + i += padding; + width = width > padding ? width - padding : 0; + if (sign_char) + add1 (sign_char); + } + else + { + if ((size_t) digits >= maxsize - i) + return 0; + + if (sign_char) + add1 (sign_char); + + if (p) + memset_zero (p, padding); + i += padding; + width = 0; + } + } + else + { + if (sign_char) + add1 (sign_char); + } + } + + cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp); + break; + + case L_('F'): + if (modifier != 0) + goto bad_format; + subfmt = L_("%Y-%m-%d"); + goto subformat; + + case L_('H'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, tp->tm_hour); + + case L_('I'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, hour12); + + case L_('k'): /* GNU extension. */ + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER_SPACEPAD (2, tp->tm_hour); + + case L_('l'): /* GNU extension. */ + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER_SPACEPAD (2, hour12); + + case L_('j'): + if (modifier == L_('E')) + goto bad_format; + + DO_SIGNED_NUMBER (3, tp->tm_yday < -1, tp->tm_yday + 1U); + + case L_('M'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, tp->tm_min); + + case L_('m'): + if (modifier == L_('E')) + goto bad_format; + + DO_SIGNED_NUMBER (2, tp->tm_mon < -1, tp->tm_mon + 1U); + +#ifndef _LIBC + case L_('N'): /* GNU extension. */ + if (modifier == L_('E')) + goto bad_format; + + number_value = ns; + if (width == -1) + width = 9; + else + { + /* Take an explicit width less than 9 as a precision. */ + int j; + for (j = width; j < 9; j++) + number_value /= 10; + } + + DO_NUMBER (width, number_value); +#endif + + case L_('n'): + add1 (L_('\n')); + break; + + case L_('P'): + to_lowcase = true; +#ifndef _NL_CURRENT + format_char = L_('p'); +#endif + /* FALLTHROUGH */ + + case L_('p'): + if (change_case) + { + to_uppcase = false; + to_lowcase = true; + } +#ifdef _NL_CURRENT + cpy (ap_len, ampm); + break; +#else + goto underlying_strftime; +#endif + + case L_('R'): + subfmt = L_("%H:%M"); + goto subformat; + + case L_('r'): +#ifdef _NL_CURRENT + if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, + NLW(T_FMT_AMPM))) + == L_('\0')) + subfmt = L_("%I:%M:%S %p"); + goto subformat; +#else + goto underlying_strftime; +#endif + + case L_('S'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, tp->tm_sec); + + case L_('s'): /* GNU extension. */ + { + struct tm ltm; + time_t t; + + ltm = *tp; + t = mktime (<m); + + /* Generate string value for T using time_t arithmetic; + this works even if sizeof (long) < sizeof (time_t). */ + + bufp = buf + sizeof (buf) / sizeof (buf[0]); + negative_number = t < 0; + + do + { + int d = t % 10; + t /= 10; + *--bufp = (negative_number ? -d : d) + L_('0'); + } + while (t != 0); + + digits = 1; + always_output_a_sign = false; + goto do_number_sign_and_padding; + } + + case L_('X'): + if (modifier == L_('O')) + goto bad_format; +#ifdef _NL_CURRENT + if (! (modifier == L_('E') + && (*(subfmt = + (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT))) + != L_('\0')))) + subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT)); + goto subformat; +#else + goto underlying_strftime; +#endif + case L_('T'): + subfmt = L_("%H:%M:%S"); + goto subformat; + + case L_('t'): + add1 (L_('\t')); + break; + + case L_('u'): + DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); + + case L_('U'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7); + + case L_('V'): + case L_('g'): + case L_('G'): + if (modifier == L_('E')) + goto bad_format; + { + /* YEAR is a leap year if and only if (tp->tm_year + TM_YEAR_BASE) + is a leap year, except that YEAR and YEAR - 1 both work + correctly even when (tp->tm_year + TM_YEAR_BASE) would + overflow. */ + int year = (tp->tm_year + + (tp->tm_year < 0 + ? TM_YEAR_BASE % 400 + : TM_YEAR_BASE % 400 - 400)); + int year_adjust = 0; + int days = iso_week_days (tp->tm_yday, tp->tm_wday); + + if (days < 0) + { + /* This ISO week belongs to the previous year. */ + year_adjust = -1; + days = iso_week_days (tp->tm_yday + (365 + __isleap (year - 1)), + tp->tm_wday); + } + else + { + int d = iso_week_days (tp->tm_yday - (365 + __isleap (year)), + tp->tm_wday); + if (0 <= d) + { + /* This ISO week belongs to the next year. */ + year_adjust = 1; + days = d; + } + } + + switch (*f) + { + case L_('g'): + { + int yy = (tp->tm_year % 100 + year_adjust) % 100; + DO_NUMBER (2, (0 <= yy + ? yy + : tp->tm_year < -TM_YEAR_BASE - year_adjust + ? -yy + : yy + 100)); + } + + case L_('G'): + DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE - year_adjust, + (tp->tm_year + (unsigned int) TM_YEAR_BASE + + year_adjust)); + + default: + DO_NUMBER (2, days / 7 + 1); + } + } + + case L_('W'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, (tp->tm_yday - (tp->tm_wday - 1 + 7) % 7 + 7) / 7); + + case L_('w'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (1, tp->tm_wday); + + case L_('Y'): + if (modifier == 'E') + { +#if HAVE_STRUCT_ERA_ENTRY + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); + if (era) + { +# ifdef COMPILE_WIDE + subfmt = era->era_wformat; +# else + subfmt = era->era_format; +# endif + goto subformat; + } +#else + goto underlying_strftime; +#endif + } + if (modifier == L_('O')) + goto bad_format; + else + DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE, + tp->tm_year + (unsigned int) TM_YEAR_BASE); + + case L_('y'): + if (modifier == L_('E')) + { +#if HAVE_STRUCT_ERA_ENTRY + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); + if (era) + { + int delta = tp->tm_year - era->start_date[0]; + DO_NUMBER (1, (era->offset + + delta * era->absolute_direction)); + } +#else + goto underlying_strftime; +#endif + } + + { + int yy = tp->tm_year % 100; + if (yy < 0) + yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100; + DO_NUMBER (2, yy); + } + + case L_('Z'): + if (change_case) + { + to_uppcase = false; + to_lowcase = true; + } + +#if HAVE_TZNAME + /* The tzset() call might have changed the value. */ + if (!(zone && *zone) && tp->tm_isdst >= 0) + zone = tzname[tp->tm_isdst != 0]; +#endif + if (! zone) + zone = ""; + +#ifdef COMPILE_WIDE + { + /* The zone string is always given in multibyte form. We have + to transform it first. */ + wchar_t *wczone; + size_t len; + widen (zone, wczone, len); + cpy (len, wczone); + } +#else + cpy (strlen (zone), zone); +#endif + break; + + case L_(':'): + /* :, ::, and ::: are valid only just before 'z'. + :::: etc. are rejected later. */ + for (colons = 1; f[colons] == L_(':'); colons++) + continue; + if (f[colons] != L_('z')) + goto bad_format; + f += colons; + goto do_z_conversion; + + case L_('z'): + colons = 0; + + do_z_conversion: + if (tp->tm_isdst < 0) + break; + + { + int diff; + int hour_diff; + int min_diff; + int sec_diff; +#if HAVE_TM_GMTOFF + diff = tp->tm_gmtoff; +#else + if (ut) + diff = 0; + else + { + struct tm gtm; + struct tm ltm; + time_t lt; + + ltm = *tp; + lt = mktime (<m); + + if (lt == (time_t) -1) + { + /* mktime returns -1 for errors, but -1 is also a + valid time_t value. Check whether an error really + occurred. */ + struct tm tm; + + if (! __localtime_r (<, &tm) + || ((ltm.tm_sec ^ tm.tm_sec) + | (ltm.tm_min ^ tm.tm_min) + | (ltm.tm_hour ^ tm.tm_hour) + | (ltm.tm_mday ^ tm.tm_mday) + | (ltm.tm_mon ^ tm.tm_mon) + | (ltm.tm_year ^ tm.tm_year))) + break; + } + + if (! __gmtime_r (<, >m)) + break; + + diff = tm_diff (<m, >m); + } +#endif + + hour_diff = diff / 60 / 60; + min_diff = diff / 60 % 60; + sec_diff = diff % 60; + + switch (colons) + { + case 0: /* +hhmm */ + DO_TZ_OFFSET (5, diff < 0, 0, hour_diff * 100 + min_diff); + + case 1: tz_hh_mm: /* +hh:mm */ + DO_TZ_OFFSET (6, diff < 0, 04, hour_diff * 100 + min_diff); + + case 2: tz_hh_mm_ss: /* +hh:mm:ss */ + DO_TZ_OFFSET (9, diff < 0, 024, + hour_diff * 10000 + min_diff * 100 + sec_diff); + + case 3: /* +hh if possible, else +hh:mm, else +hh:mm:ss */ + if (sec_diff != 0) + goto tz_hh_mm_ss; + if (min_diff != 0) + goto tz_hh_mm; + DO_TZ_OFFSET (3, diff < 0, 0, hour_diff); + + default: + goto bad_format; + } + } + + case L_('\0'): /* GNU extension: % at end of format. */ + --f; + /* Fall through. */ + default: + /* Unknown format; output the format, including the '%', + since this is most likely the right thing to do if a + multibyte string has been misparsed. */ + bad_format: + { + int flen; + for (flen = 1; f[1 - flen] != L_('%'); flen++) + continue; + cpy (flen, &f[1 - flen]); + } + break; + } + } + +#if ! FPRINTFTIME + if (p && maxsize != 0) + *p = L_('\0'); +#endif + + return i; +} + +/* Write information from TP into S according to the format + string FORMAT, writing no more that MAXSIZE characters + (including the terminating '\0') and returning number of + characters written. If S is NULL, nothing will be written + anywhere, so to determine how many characters would be + written, use NULL for S and (size_t) -1 for MAXSIZE. */ +size_t +my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) + const CHAR_T *format, + const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO) +{ + return strftime_case_ (false, s, STRFTIME_ARG (maxsize) + format, tp extra_args LOCALE_ARG); +} + +#if defined _LIBC && ! FPRINTFTIME +libc_hidden_def (my_strftime) +#endif + + +#if defined emacs && ! FPRINTFTIME +/* For Emacs we have a separate interface which corresponds to the normal + strftime function plus the ut argument, but without the ns argument. */ +size_t +emacs_strftimeu (char *s, size_t maxsize, const char *format, + const struct tm *tp, int ut) +{ + return my_strftime (s, maxsize, format, tp, ut, 0); +} +#endif diff --git a/gnulib/lib/strftime.h b/gnulib/lib/strftime.h new file mode 100644 index 0000000..16b996e --- /dev/null +++ b/gnulib/lib/strftime.h @@ -0,0 +1,21 @@ +/* declarations for strftime.c + + Copyright (C) 2002, 2004 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. */ + +#include + +size_t nstrftime (char *, size_t, char const *, struct tm const *, int, int); diff --git a/gnulib/lib/string_.h b/gnulib/lib/string_.h new file mode 100644 index 0000000..43801e8 --- /dev/null +++ b/gnulib/lib/string_.h @@ -0,0 +1,544 @@ +/* A GNU-like . + + Copyright (C) 1995-1996, 2001-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 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. */ + +#if @HAVE_INCLUDE_NEXT@ +# include_next +#endif + +#ifndef _GL_STRING_H +#define _GL_STRING_H + +#if ! @HAVE_INCLUDE_NEXT@ +# include @ABSOLUTE_STRING_H@ +#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 ! @HAVE_DECL_MEMMEM@ +extern void *memmem (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memmem +# define memmem(a,al,b,bl) \ + (GL_LINK_WARNING ("memmem is unportable - " \ + "use gnulib module memmem for portability"), \ + 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); +# 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 + +/* 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 + +/* 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 + +#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); +# 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 ! @HAVE_DECL_STRDUP@ && ! defined 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); +# 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); +# 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 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 cannot work correctly on character strings " \ + "in most multibyte locales - " \ + "use mbsstr if you care about internationalization"), \ + strstr (a, b)) +#endif + +/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive + comparison. */ +#if ! @HAVE_STRCASESTR@ +extern char *strcasestr (const char *haystack, const char *needle); +#endif +#if 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_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 + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/gnulib/lib/stripslash.c b/gnulib/lib/stripslash.c new file mode 100644 index 0000000..342d497 --- /dev/null +++ b/gnulib/lib/stripslash.c @@ -0,0 +1,45 @@ +/* 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 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. */ + +#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; +} diff --git a/gnulib/lib/strndup.c b/gnulib/lib/strndup.c new file mode 100644 index 0000000..3a1b0ea --- /dev/null +++ b/gnulib/lib/strndup.c @@ -0,0 +1,37 @@ +/* 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 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. */ + +#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); +} diff --git a/gnulib/lib/strnlen.c b/gnulib/lib/strnlen.c new file mode 100644 index 0000000..d346d32 --- /dev/null +++ b/gnulib/lib/strnlen.c @@ -0,0 +1,31 @@ +/* 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 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. */ + +#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; +} diff --git a/gnulib/lib/strnlen1.c b/gnulib/lib/strnlen1.c new file mode 100644 index 0000000..422ed9e --- /dev/null +++ b/gnulib/lib/strnlen1.c @@ -0,0 +1,36 @@ +/* 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 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. */ + +#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; +} diff --git a/gnulib/lib/strnlen1.h b/gnulib/lib/strnlen1.h new file mode 100644 index 0000000..7ce7d0c --- /dev/null +++ b/gnulib/lib/strnlen1.h @@ -0,0 +1,40 @@ +/* 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 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. */ + +#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 */ diff --git a/gnulib/lib/strtoimax.c b/gnulib/lib/strtoimax.c new file mode 100644 index 0000000..82dc4f0 --- /dev/null +++ b/gnulib/lib/strtoimax.c @@ -0,0 +1,76 @@ +/* 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 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. */ + +/* 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); +} diff --git a/gnulib/lib/strtol.c b/gnulib/lib/strtol.c new file mode 100644 index 0000000..e14d3cf --- /dev/null +++ b/gnulib/lib/strtol.c @@ -0,0 +1,436 @@ +/* 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 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. */ + +#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); +} diff --git a/gnulib/lib/strtoll.c b/gnulib/lib/strtoll.c new file mode 100644 index 0000000..f61f5ad --- /dev/null +++ b/gnulib/lib/strtoll.c @@ -0,0 +1,33 @@ +/* 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 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. */ + +#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 diff --git a/gnulib/lib/strtoul.c b/gnulib/lib/strtoul.c new file mode 100644 index 0000000..79ceed2 --- /dev/null +++ b/gnulib/lib/strtoul.c @@ -0,0 +1,20 @@ +/* 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 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. */ + +#define UNSIGNED 1 + +#include "strtol.c" diff --git a/gnulib/lib/strtoull.c b/gnulib/lib/strtoull.c new file mode 100644 index 0000000..6186bfb --- /dev/null +++ b/gnulib/lib/strtoull.c @@ -0,0 +1,27 @@ +/* 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 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. */ + +#define QUAD 1 + +#include "strtoul.c" + +#ifdef _LIBC +strong_alias (__strtoull_internal, __strtouq_internal) +weak_alias (strtoull, strtouq) +#endif diff --git a/gnulib/lib/strtoumax.c b/gnulib/lib/strtoumax.c new file mode 100644 index 0000000..dc395d6 --- /dev/null +++ b/gnulib/lib/strtoumax.c @@ -0,0 +1,2 @@ +#define UNSIGNED 1 +#include "strtoimax.c" diff --git a/gnulib/lib/sys_stat_.h b/gnulib/lib/sys_stat_.h new file mode 100644 index 0000000..20bd5ae --- /dev/null +++ b/gnulib/lib/sys_stat_.h @@ -0,0 +1,280 @@ +/* Provide a more complete sys/stat header file. + 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 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. */ + +/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ + +#ifndef _GL_SYS_STAT_H +#define _GL_SYS_STAT_H + +/* 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 @HAVE_INCLUDE_NEXT@ +# include_next +#else +# include @ABSOLUTE_SYS_STAT_H@ +#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 + +/* mingw does not support symlinks, therefore it does not have lstat. But + without links, stat does just fine. */ +#if ! @HAVE_LSTAT@ +# define lstat stat +#endif + +/* 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 io.h. */ +#if ! @HAVE_DECL_MKDIR@ && @HAVE_IO_H@ +# include + +static inline int +rpl_mkdir (char const *name, mode_t mode) +{ + return _mkdir (name); +} + +# define mkdir rpl_mkdir +#endif + +#endif /* _GL_SYS_STAT_H */ diff --git a/gnulib/lib/sys_time_.h b/gnulib/lib/sys_time_.h new file mode 100644 index 0000000..6fe31b5 --- /dev/null +++ b/gnulib/lib/sys_time_.h @@ -0,0 +1,48 @@ +/* Provide a more complete sys/time.h. + + Copyright (C) 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 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. */ + +/* Written by Paul Eggert. */ + +#ifndef _GL_SYS_TIME_H +#define _GL_SYS_TIME_H + +#if @HAVE_SYS_TIME_H@ +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_SYS_TIME_H@ +# endif +#else +# include +#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 + +#endif /* _GL_SYS_TIME_H */ diff --git a/gnulib/lib/time_.h b/gnulib/lib/time_.h new file mode 100644 index 0000000..3300fb8 --- /dev/null +++ b/gnulib/lib/time_.h @@ -0,0 +1,123 @@ +/* A more-standard . + + Copyright (C) 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 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. */ + +/* 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. */ +#if defined __need_time_t || defined __need_clock_t || defined __need_timespec + +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_TIME_H@ +# endif + +#else +/* Normal invocation convention. */ + +# if @HAVE_INCLUDE_NEXT@ +# include_next +# endif + +# if ! defined _GL_TIME_H +# define _GL_TIME_H + +# if ! @HAVE_INCLUDE_NEXT@ +# include @ABSOLUTE_TIME_H@ +# endif + +# 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 +#endif diff --git a/gnulib/lib/time_r.c b/gnulib/lib/time_r.c new file mode 100644 index 0000000..2b72692 --- /dev/null +++ b/gnulib/lib/time_r.c @@ -0,0 +1,47 @@ +/* Reentrant time functions like localtime_r. + + 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 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. */ + +/* Written by Paul Eggert. */ + +#include + +#include + +#include + +static struct tm * +copy_tm_result (struct tm *dest, struct tm const *src) +{ + if (! src) + return 0; + *dest = *src; + return dest; +} + + +struct tm * +gmtime_r (time_t const * restrict t, struct tm * restrict tp) +{ + return copy_tm_result (tp, gmtime (t)); +} + +struct tm * +localtime_r (time_t const * restrict t, struct tm * restrict tp) +{ + return copy_tm_result (tp, localtime (t)); +} diff --git a/gnulib/lib/timespec.h b/gnulib/lib/timespec.h new file mode 100644 index 0000000..cce2d66 --- /dev/null +++ b/gnulib/lib/timespec.h @@ -0,0 +1,37 @@ +/* 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 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. */ + +#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 diff --git a/gnulib/lib/unistd--.h b/gnulib/lib/unistd--.h new file mode 100644 index 0000000..1fe6ce8 --- /dev/null +++ b/gnulib/lib/unistd--.h @@ -0,0 +1,28 @@ +/* Like unistd.h, but redefine some names to avoid glitches. + + 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 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. */ + +/* Written by Paul Eggert. */ + +#include +#include "unistd-safer.h" + +#undef dup +#define dup dup_safer + +#undef pipe +#define pipe pipe_safer diff --git a/gnulib/lib/unistd-safer.h b/gnulib/lib/unistd-safer.h new file mode 100644 index 0000000..f95999d --- /dev/null +++ b/gnulib/lib/unistd-safer.h @@ -0,0 +1,23 @@ +/* Invoke unistd-like functions, but avoid some glitches. + + Copyright (C) 2001, 2003, 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. */ + +/* Written by Paul Eggert. */ + +int dup_safer (int); +int fd_safer (int); +int pipe_safer (int[2]); diff --git a/gnulib/lib/unistd_.h b/gnulib/lib/unistd_.h new file mode 100644 index 0000000..da165c5 --- /dev/null +++ b/gnulib/lib/unistd_.h @@ -0,0 +1,239 @@ +/* Substitute for and wrapper around . + Copyright (C) 2004-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 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. */ + +#ifndef _GL_UNISTD_H +#define _GL_UNISTD_H + +#if @HAVE_UNISTD_H@ +# if @HAVE_INCLUDE_NEXT@ +# include_next +# else +# include @ABSOLUTE_UNISTD_H@ +# endif +#endif + +/* mingw doesn't define the SEEK_* macros in . */ +#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) +# include +#endif + +/* mingw fails to declare _exit in . */ +#include + +/* The definition of GL_LINK_WARNING is copied here. */ + + +/* Declare overridden functions. */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if @GNULIB_CHOWN@ +# 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). + 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 +#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_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_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 close rpl_close +extern int close (int); +# 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_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_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_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 non-seekable " \ + "files 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 + + +#ifdef __cplusplus +} +#endif + + +#endif /* _GL_UNISTD_H */ diff --git a/gnulib/lib/unsetenv.c b/gnulib/lib/unsetenv.c new file mode 100644 index 0000000..0f83744 --- /dev/null +++ b/gnulib/lib/unsetenv.c @@ -0,0 +1,92 @@ +/* Copyright (C) 1992,1995-1999,2000-2002,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 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. */ + +#include + +#include +#if !_LIBC +# define __set_errno(ev) ((errno) = (ev)) +#endif + +#include +#include +#include + +#if !_LIBC +# define __environ environ +# ifndef HAVE_ENVIRON_DECL +extern char **environ; +# endif +#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 + +/* In the GNU C library we must keep the namespace clean. */ +#ifdef _LIBC +# define unsetenv __unsetenv +#endif + + +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; +} + +#ifdef _LIBC +# undef unsetenv +weak_alias (__unsetenv, unsetenv) +#endif diff --git a/gnulib/lib/verify.h b/gnulib/lib/verify.h new file mode 100644 index 0000000..d603b17 --- /dev/null +++ b/gnulib/lib/verify.h @@ -0,0 +1,141 @@ +/* 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 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. */ + +/* 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 diff --git a/gnulib/lib/wchar_.h b/gnulib/lib/wchar_.h new file mode 100644 index 0000000..f58af2f --- /dev/null +++ b/gnulib/lib/wchar_.h @@ -0,0 +1,49 @@ +/* A substitute for ISO C99 , for platforms that have issues. + + Copyright (C) 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 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. */ + +/* Written by Eric Blake. */ + +/* + * ISO C 99 for platforms that have issues. + * + * + * For now, this just ensures proper prerequisite inclusion order. + */ + +#if @HAVE_INCLUDE_NEXT@ +# include +# include_next +#endif + +#ifndef _GL_WCHAR_H +#define _GL_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 ! @HAVE_INCLUDE_NEXT@ +# include @ABSOLUTE_WCHAR_H@ +#endif + +#endif /* _GL_WCHAR_H */ diff --git a/gnulib/lib/wctype_.h b/gnulib/lib/wctype_.h new file mode 100644 index 0000000..3ca41a7 --- /dev/null +++ b/gnulib/lib/wctype_.h @@ -0,0 +1,165 @@ +/* A substitute for ISO C99 , for platforms that lack it. + + 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 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. */ + +/* 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. + */ + +#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 + +#if @HAVE_WCTYPE_H@ +# if @HAVE_INCLUDE_NEXT@ +# include_next +# endif +#endif + +#ifndef _GL_WCTYPE_H +#define _GL_WCTYPE_H + +/* Include the original if it exists. + BeOS 5 has the functions but no . */ +#if @HAVE_WCTYPE_H@ +# if ! @HAVE_INCLUDE_NEXT@ +# include @ABSOLUTE_WCTYPE_H@ +# endif +#endif + +#if @HAVE_WINT_T@ +typedef wint_t __wctype_wint_t; +#else +typedef int __wctype_wint_t; +#endif + +/* FreeBSD 4.4 to 4.11 has but lacks the functions. + Assume all 12 functions are implemented the same way, or not at all. */ +#if ! @HAVE_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 + +static inline int +iswalnum (__wctype_wint_t wc) +{ + return ((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); +} + +static inline int +iswalpha (__wctype_wint_t wc) +{ + return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; +} + +static inline int +iswblank (__wctype_wint_t wc) +{ + return wc == ' ' || wc == '\t'; +} + +static inline int +iswcntrl (__wctype_wint_t wc) +{ + return (wc & ~0x1f) == 0 || wc == 0x7f; +} + +static inline int +iswdigit (__wctype_wint_t wc) +{ + return wc >= '0' && wc <= '9'; +} + +static inline int +iswgraph (__wctype_wint_t wc) +{ + return wc >= '!' && wc <= '~'; +} + +static inline int +iswlower (__wctype_wint_t wc) +{ + return wc >= 'a' && wc <= 'z'; +} + +static inline int +iswprint (__wctype_wint_t wc) +{ + return wc >= ' ' && wc <= '~'; +} + +static inline int +iswpunct (__wctype_wint_t wc) +{ + return (wc >= '!' && wc <= '~' + && !((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); +} + +static inline int +iswspace (__wctype_wint_t wc) +{ + return (wc == ' ' || wc == '\t' + || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); +} + +static inline int +iswupper (__wctype_wint_t wc) +{ + return wc >= 'A' && wc <= 'Z'; +} + +static inline int +iswxdigit (__wctype_wint_t wc) +{ + return ((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); +} + +# endif /* ! HAVE_ISWCNTRL */ + +#endif /* _GL_WCTYPE_H */ diff --git a/gnulib/lib/wcwidth.h b/gnulib/lib/wcwidth.h new file mode 100644 index 0000000..8ed5ff8 --- /dev/null +++ b/gnulib/lib/wcwidth.h @@ -0,0 +1,57 @@ +/* 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 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. */ + +#ifndef _gl_WCWIDTH_H +#define _gl_WCWIDTH_H + +#if HAVE_WCHAR_T + +/* Get wcwidth if available, along with wchar_t. */ +# include + +/* Get iswprint. */ +# include + +# ifndef HAVE_DECL_WCWIDTH +"this configure-time declaration test was not run" +# endif +# ifndef wcwidth +# if !HAVE_WCWIDTH + +/* wcwidth doesn't exist, so assume all printable characters have + width 1. */ +static inline int +wcwidth (wchar_t wc) +{ + return wc == 0 ? 0 : iswprint (wc) ? 1 : -1; +} + +# elif !HAVE_DECL_WCWIDTH + +/* wcwidth exists but is not declared. */ +extern +# ifdef __cplusplus +"C" +# endif +int wcwidth (int /* actually wchar_t */); + +# endif +# endif + +#endif /* HAVE_WCHAR_T */ + +#endif /* _gl_WCWIDTH_H */ diff --git a/gnulib/lib/xalloc-die.c b/gnulib/lib/xalloc-die.c new file mode 100644 index 0000000..090f060 --- /dev/null +++ b/gnulib/lib/xalloc-die.c @@ -0,0 +1,42 @@ +/* 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 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. */ + +#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 (); +} diff --git a/gnulib/lib/xalloc.h b/gnulib/lib/xalloc.h new file mode 100644 index 0000000..0c6d8dc --- /dev/null +++ b/gnulib/lib/xalloc.h @@ -0,0 +1,271 @@ +/* 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 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. */ + +#ifndef XALLOC_H_ +# define XALLOC_H_ + +# include + + +# ifdef __cplusplus +extern "C" { +# endif + + +# ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) +# endif +# endif + +# ifndef ATTRIBUTE_NORETURN +# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +# 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); +void *xzalloc (size_t s); +void *xcalloc (size_t n, size_t s); +void *xrealloc (void *p, size_t s); +void *x2realloc (void *p, size_t *pn); +void *xmemdup (void const *p, size_t s); +char *xstrdup (char const *str); + +/* 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); + 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); +# 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) +{ + 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) +{ + 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_ */ diff --git a/gnulib/lib/xgetcwd.c b/gnulib/lib/xgetcwd.c new file mode 100644 index 0000000..26ea5da --- /dev/null +++ b/gnulib/lib/xgetcwd.c @@ -0,0 +1,41 @@ +/* xgetcwd.c -- return current directory with unlimited length + + Copyright (C) 2001, 2003, 2004, 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 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. */ + +/* Written by Jim Meyering. */ + +#include + +#include "xgetcwd.h" + +#include +#include + +#include "xalloc.h" + +/* Return the current directory, newly allocated. + Upon an out-of-memory error, call xalloc_die. + Upon any other type of error, return NULL. */ + +char * +xgetcwd (void) +{ + char *cwd = getcwd (NULL, 0); + if (! cwd && errno == ENOMEM) + xalloc_die (); + return cwd; +} diff --git a/gnulib/lib/xgetcwd.h b/gnulib/lib/xgetcwd.h new file mode 100644 index 0000000..70afe35 --- /dev/null +++ b/gnulib/lib/xgetcwd.h @@ -0,0 +1,18 @@ +/* prototype for xgetcwd + Copyright (C) 1995, 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 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. */ + +extern char *xgetcwd (void); diff --git a/gnulib/lib/xmalloc.c b/gnulib/lib/xmalloc.c new file mode 100644 index 0000000..318e0dd --- /dev/null +++ b/gnulib/lib/xmalloc.c @@ -0,0 +1,123 @@ +/* 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 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. */ + +#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); +} diff --git a/gnulib/lib/xreadlink-with-size.c b/gnulib/lib/xreadlink-with-size.c new file mode 100644 index 0000000..5524a8a --- /dev/null +++ b/gnulib/lib/xreadlink-with-size.c @@ -0,0 +1,105 @@ +/* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage + + Copyright (C) 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 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Jim Meyering */ + +#include + +#include "xreadlink.h" + +#include +#include +#include +#include +#include +#include + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif + +/* SYMLINK_MAX is used only for an initial memory-allocation sanity + check, so it's OK to guess too small on hosts where there is no + arbitrary limit to symbolic link length. */ +#ifndef SYMLINK_MAX +# define SYMLINK_MAX 1024 +#endif + +#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX) + +#include "xalloc.h" + +/* Call readlink to get the symbolic link value of FILE. + SIZE is a hint as to how long the link is expected to be; + typically it is taken from st_size. It need not be correct. + Return a pointer to that NUL-terminated string in malloc'd storage. + If readlink fails, return NULL (caller may use errno to diagnose). + If malloc fails, or if the link value is longer than SSIZE_MAX :-), + give a diagnostic and exit. */ + +char * +xreadlink_with_size (char const *file, size_t size) +{ + /* Some buggy file systems report garbage in st_size. Defend + against them by ignoring outlandish st_size values in the initial + memory allocation. */ + size_t symlink_max = SYMLINK_MAX; + size_t INITIAL_LIMIT_BOUND = 8 * 1024; + size_t initial_limit = (symlink_max < INITIAL_LIMIT_BOUND + ? symlink_max + 1 + : INITIAL_LIMIT_BOUND); + + /* The initial buffer size for the link value. */ + size_t buf_size = size < initial_limit ? size + 1 : initial_limit; + + while (1) + { + char *buffer = xmalloc (buf_size); + ssize_t r = readlink (file, buffer, buf_size); + size_t link_length = r; + + /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 + with errno == ERANGE if the buffer is too small. */ + if (r < 0 && errno != ERANGE) + { + int saved_errno = errno; + free (buffer); + errno = saved_errno; + return NULL; + } + + if (link_length < buf_size) + { + buffer[link_length] = 0; + return buffer; + } + + free (buffer); + if (buf_size <= MAXSIZE / 2) + buf_size *= 2; + else if (buf_size < MAXSIZE) + buf_size = MAXSIZE; + else + xalloc_die (); + } +} diff --git a/gnulib/lib/xreadlink.h b/gnulib/lib/xreadlink.h new file mode 100644 index 0000000..6d93fe6 --- /dev/null +++ b/gnulib/lib/xreadlink.h @@ -0,0 +1,34 @@ +/* Reading symbolic links without size limitation. + + Copyright (C) 2001, 2003, 2004, 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 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Jim Meyering */ + +#include + +/* Call readlink to get the symbolic link value of FILENAME. + Return a pointer to that NUL-terminated string in malloc'd storage. + If readlink fails, return NULL and set errno. */ +extern char *xreadlink (char const *filename); + +/* Call readlink to get the symbolic link value of FILENAME. + SIZE_HINT is a hint as to how long the link is expected to be; + typically it is taken from st_size. It need not be correct. + Return a pointer to that NUL-terminated string in malloc'd storage. + If readlink fails, return NULL and set errno. */ +extern char *xreadlink_with_size (char const *filename, size_t size_hint); diff --git a/gnulib/lib/xstrndup.c b/gnulib/lib/xstrndup.c new file mode 100644 index 0000000..7ccefd7 --- /dev/null +++ b/gnulib/lib/xstrndup.c @@ -0,0 +1,37 @@ +/* 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 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. */ + +#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; +} diff --git a/gnulib/lib/xstrndup.h b/gnulib/lib/xstrndup.h new file mode 100644 index 0000000..88354cf --- /dev/null +++ b/gnulib/lib/xstrndup.h @@ -0,0 +1,24 @@ +/* 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 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. */ + +#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); diff --git a/gnulib/lib/xstrtod.c b/gnulib/lib/xstrtod.c new file mode 100644 index 0000000..86e124f --- /dev/null +++ b/gnulib/lib/xstrtod.c @@ -0,0 +1,72 @@ +/* error-checking interface to strtod-like functions + + Copyright (C) 1996, 1999, 2000, 2003, 2004, 2005, 2006 Free + Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Jim Meyering. */ + +#include + +#include "xstrtod.h" + +#include +#include +#include + +#if LONG +# define XSTRTOD xstrtold +# define DOUBLE long double +#else +# define XSTRTOD xstrtod +# define DOUBLE double +#endif + +/* An interface to a string-to-floating-point conversion function that + encapsulates all the error checking one should usually perform. + Like strtod/strtold, but upon successful + conversion put the result in *RESULT and return true. Return + false and don't modify *RESULT upon any failure. CONVERT + specifies the conversion function, e.g., strtod itself. */ + +bool +XSTRTOD (char const *str, char const **ptr, DOUBLE *result, + DOUBLE (*convert) (char const *, char **)) +{ + DOUBLE val; + char *terminator; + bool ok = true; + + errno = 0; + val = convert (str, &terminator); + + /* Having a non-zero terminator is an error only when PTR is NULL. */ + if (terminator == str || (ptr == NULL && *terminator != '\0')) + ok = false; + else + { + /* Allow underflow (in which case CONVERT returns zero), + but flag overflow as an error. */ + if (val != 0 && errno == ERANGE) + ok = false; + } + + if (ptr != NULL) + *ptr = terminator; + + *result = val; + return ok; +} diff --git a/gnulib/lib/xstrtod.h b/gnulib/lib/xstrtod.h new file mode 100644 index 0000000..1e5ad94 --- /dev/null +++ b/gnulib/lib/xstrtod.h @@ -0,0 +1,31 @@ +/* Error-checking interface to strtod-like functions. + + Copyright (C) 1996, 1998, 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 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. */ + +/* Written by Jim Meyering. */ + +#ifndef XSTRTOD_H +# define XSTRTOD_H 1 + +# include + +bool xstrtod (const char *str, const char **ptr, double *result, + double (*convert) (char const *, char **)); +bool xstrtold (const char *str, const char **ptr, long double *result, + long double (*convert) (char const *, char **)); + +#endif /* not XSTRTOD_H */ diff --git a/gnulib/lib/xstrtol.c b/gnulib/lib/xstrtol.c new file mode 100644 index 0000000..c4557a0 --- /dev/null +++ b/gnulib/lib/xstrtol.c @@ -0,0 +1,263 @@ +/* A more useful interface to strtol. + + Copyright (C) 1995, 1996, 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 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. */ + +/* 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; +} + +#ifdef TESTING_XSTRTO + +# include +# include "error.h" + +char *program_name; + +int +main (int argc, char **argv) +{ + strtol_error s_err; + int i; + + program_name = argv[0]; + for (i=1; i%lu (%s)\n", argv[i], val, p); + } + else + { + STRTOL_FATAL_ERROR (argv[i], "arg", s_err); + } + } + exit (0); +} + +#endif /* TESTING_XSTRTO */ diff --git a/gnulib/lib/xstrtol.h b/gnulib/lib/xstrtol.h new file mode 100644 index 0000000..475728a --- /dev/null +++ b/gnulib/lib/xstrtol.h @@ -0,0 +1,87 @@ +/* A more useful interface to strtol. + + Copyright (C) 1995, 1996, 1998, 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 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. */ + +#ifndef XSTRTOL_H_ +# define XSTRTOL_H_ 1 + +# include "exitfail.h" + +# include + +# include "gettext.h" + +# 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) + +# define _STRTOL_ERROR(Exit_code, Str, Argument_type_string, Err) \ + do \ + { \ + switch ((Err)) \ + { \ + default: \ + abort (); \ + \ + case LONGINT_INVALID: \ + error ((Exit_code), 0, gettext ("invalid %s `%s'"), \ + (Argument_type_string), (Str)); \ + break; \ + \ + case LONGINT_INVALID_SUFFIX_CHAR: \ + case LONGINT_INVALID_SUFFIX_CHAR | LONGINT_OVERFLOW: \ + error ((Exit_code), 0, \ + gettext ("invalid character following %s in `%s'"), \ + (Argument_type_string), (Str)); \ + break; \ + \ + case LONGINT_OVERFLOW: \ + error ((Exit_code), 0, gettext ("%s `%s' too large"), \ + (Argument_type_string), (Str)); \ + break; \ + } \ + } \ + while (0) + +# define STRTOL_FATAL_ERROR(Str, Argument_type_string, Err) \ + _STRTOL_ERROR (exit_failure, Str, Argument_type_string, Err) + +# define STRTOL_FAIL_WARN(Str, Argument_type_string, Err) \ + _STRTOL_ERROR (0, Str, Argument_type_string, Err) + +#endif /* not XSTRTOL_H_ */ diff --git a/gnulib/lib/xstrtoul.c b/gnulib/lib/xstrtoul.c new file mode 100644 index 0000000..285f7b9 --- /dev/null +++ b/gnulib/lib/xstrtoul.c @@ -0,0 +1,6 @@ +#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" diff --git a/gnulib/lib/xstrtoumax.c b/gnulib/lib/xstrtoumax.c new file mode 100644 index 0000000..9a2349f --- /dev/null +++ b/gnulib/lib/xstrtoumax.c @@ -0,0 +1,6 @@ +#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" diff --git a/gnulib/lib/yesno.c b/gnulib/lib/yesno.c new file mode 100644 index 0000000..2400628 --- /dev/null +++ b/gnulib/lib/yesno.c @@ -0,0 +1,64 @@ +/* yesno.c -- read a yes/no response from stdin + + Copyright (C) 1990, 1998, 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 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. */ + +#include + +#include "yesno.h" + +#include +#include + +#if ENABLE_NLS +# include "getline.h" +#endif + +/* Return true if we read an affirmative line from standard input. */ + +extern int rpmatch (char const *response); + +bool +yesno (void) +{ + bool yes; + +#if ENABLE_NLS + char *response = NULL; + size_t response_size = 0; + ssize_t response_len = getline (&response, &response_size, stdin); + + if (response_len <= 0) + yes = false; + else + { + response[response_len - 1] = '\0'; + yes = (0 < rpmatch (response)); + } + + free (response); +#else + /* Test against "^[yY]", hardcoded to avoid requiring getline, + regex, and rpmatch. */ + int c = getchar (); + yes = (c == 'y' || c == 'Y'); + while (c != '\n' && c != EOF) + c = getchar (); +#endif + + return yes; +} diff --git a/gnulib/lib/yesno.h b/gnulib/lib/yesno.h new file mode 100644 index 0000000..dfa70bc --- /dev/null +++ b/gnulib/lib/yesno.h @@ -0,0 +1,26 @@ +/* declare yesno + Copyright (C) 2004 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef YESNO_H_ +# define YESNO_H_ + +# include + +bool yesno (void); + +#endif diff --git a/gnulib/m4/absolute-header.m4 b/gnulib/m4/absolute-header.m4 new file mode 100644 index 0000000..c649df0 --- /dev/null +++ b/gnulib/m4/absolute-header.m4 @@ -0,0 +1,44 @@ +# absolute-header.m4 serial 6 +dnl Copyright (C) 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 Derek Price. + +# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) +# --------------------------------------- +# Find the absolute name of a header file, assuming the header exists. +# If the header were sys/inttypes.h, this macro would define +# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h +# in config.h +# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). +# 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. +AC_DEFUN([gl_ABSOLUTE_HEADER], +[AC_LANG_PREPROC_REQUIRE()dnl +AC_FOREACH([gl_HEADER_NAME], [$1], + [AS_VAR_PUSHDEF([gl_absolute_header], + [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl + AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>], + m4_quote(m4_defn([gl_absolute_header])), + [AS_VAR_PUSHDEF([ac_header_exists], + [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl + AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl + if test AS_VAR_GET(ac_header_exists) = yes; then + AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])]) +dnl eval is necessary to expand ac_cpp. +dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. + AS_VAR_SET(gl_absolute_header, +[`(eval "$ac_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;}'`]) + fi + AS_VAR_POPDEF([ac_header_exists])dnl + ])dnl + AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))), + ["AS_VAR_GET(gl_absolute_header)"], + [Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.]) + AS_VAR_POPDEF([gl_absolute_header])dnl +])dnl +])# gl_ABSOLUTE_HEADER diff --git a/gnulib/m4/alloca.m4 b/gnulib/m4/alloca.m4 new file mode 100644 index 0000000..eb62e0e --- /dev/null +++ b/gnulib/m4/alloca.m4 @@ -0,0 +1,50 @@ +# alloca.m4 serial 7 +dnl Copyright (C) 2002-2004, 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_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]) + + AC_DEFINE(HAVE_ALLOCA_H, 1, + [Define HAVE_ALLOCA_H for backward compatibility with older code + that includes only if HAVE_ALLOCA_H is defined.]) +]) + +# Prerequisites of lib/alloca.c. +# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. +AC_DEFUN([gl_PREREQ_ALLOCA], [:]) diff --git a/gnulib/m4/allocsa.m4 b/gnulib/m4/allocsa.m4 new file mode 100644 index 0000000..5f51c98 --- /dev/null +++ b/gnulib/m4/allocsa.m4 @@ -0,0 +1,14 @@ +# allocsa.m4 serial 7 +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_ALLOCSA], +[ + 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]) +]) diff --git a/gnulib/m4/argmatch.m4 b/gnulib/m4/argmatch.m4 new file mode 100644 index 0000000..beda5a1 --- /dev/null +++ b/gnulib/m4/argmatch.m4 @@ -0,0 +1,10 @@ +#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]) +]) diff --git a/gnulib/m4/bison.m4 b/gnulib/m4/bison.m4 new file mode 100644 index 0000000..91039b1 --- /dev/null +++ b/gnulib/m4/bison.m4 @@ -0,0 +1,24 @@ +#serial 4 + +# Copyright (C) 2002, 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. + +AC_DEFUN([gl_BISON], +[ + # getdate.y works with bison only. + : ${YACC='bison -y'} +dnl +dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB +dnl requires an Autoconf greater than 2.59c, but it will probably still be +dnl useful to override the description of YACC in the --help output, re +dnl getdate.y assuming `bison -y'. + AC_ARG_VAR(YACC, +[The `Yet Another C Compiler' implementation to use. Defaults to `bison -y'. +Values other than `bison -y' will most likely break on most systems.])dnl + AC_ARG_VAR(YFLAGS, +[YFLAGS contains the list arguments that will be passed by default to Bison. +This script will default YFLAGS to the empty string to avoid a default value of +`-d' given by some make applications.])dnl +]) diff --git a/gnulib/m4/canonicalize-lgpl.m4 b/gnulib/m4/canonicalize-lgpl.m4 new file mode 100755 index 0000000..b0a7902 --- /dev/null +++ b/gnulib/m4/canonicalize-lgpl.m4 @@ -0,0 +1,35 @@ +# canonicalize-lgpl.m4 serial 4 +dnl Copyright (C) 2003, 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_CANONICALIZE_LGPL], +[ + dnl Do this replacement check manually because the file name is shorter + dnl than the function name. + AC_CHECK_DECLS_ONCE(canonicalize_file_name) + AC_CHECK_FUNCS_ONCE(canonicalize_file_name) + if test $ac_cv_func_canonicalize_file_name = no; then + AC_LIBOBJ(canonicalize-lgpl) + AC_DEFINE([realpath], [rpl_realpath], + [Define to a replacement function name for realpath().]) + gl_PREREQ_CANONICALIZE_LGPL + fi +]) + +# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation +# (no AC_LIBOBJ). +AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], +[ + AC_CHECK_DECLS_ONCE(canonicalize_file_name) + AC_CHECK_FUNCS_ONCE(canonicalize_file_name) + gl_PREREQ_CANONICALIZE_LGPL +]) + +# Prerequisites of lib/canonicalize-lgpl.c. +AC_DEFUN([gl_PREREQ_CANONICALIZE_LGPL], +[ + AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h) + AC_CHECK_FUNCS_ONCE(getcwd readlink) +]) diff --git a/gnulib/m4/canonicalize.m4 b/gnulib/m4/canonicalize.m4 new file mode 100644 index 0000000..817edd5 --- /dev/null +++ b/gnulib/m4/canonicalize.m4 @@ -0,0 +1,17 @@ +#serial 12 + +# Copyright (C) 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 Jim Meyering. + +AC_DEFUN([AC_FUNC_CANONICALIZE_FILE_NAME], + [ + AC_LIBOBJ([canonicalize]) + + AC_CHECK_HEADERS_ONCE([sys/param.h]) + AC_CHECK_DECLS_ONCE([canonicalize_file_name]) + AC_CHECK_FUNCS_ONCE([canonicalize_file_name resolvepath]) + ]) diff --git a/gnulib/m4/chdir-long.m4 b/gnulib/m4/chdir-long.m4 new file mode 100644 index 0000000..7f34f60 --- /dev/null +++ b/gnulib/m4/chdir-long.m4 @@ -0,0 +1,38 @@ +#serial 10 + +# Use Gnulib's robust chdir function. +# It can handle arbitrarily long directory names, which means +# that when it is given the name of an existing directory, it +# never fails with ENAMETOOLONG. +# Arrange to compile chdir-long.c only on systems that define PATH_MAX. + +dnl Copyright (C) 2004, 2005, 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. + +# Written by Jim Meyering. + +AC_DEFUN([gl_FUNC_CHDIR_LONG], +[ + AC_CACHE_CHECK([whether this system has an arbitrary file name length limit], + gl_cv_have_arbitrary_file_name_length_limit, + [AC_EGREP_CPP([have_arbitrary_file_name_length_limit], + [#include +#include +#if defined PATH_MAX || defined MAXPATHLEN +have_arbitrary_file_name_length_limit +#endif], + gl_cv_have_arbitrary_file_name_length_limit=yes, + gl_cv_have_arbitrary_file_name_length_limit=no)]) + + if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then + AC_LIBOBJ([chdir-long]) + gl_PREREQ_CHDIR_LONG + fi +]) + +AC_DEFUN([gl_PREREQ_CHDIR_LONG], +[ + : +]) diff --git a/gnulib/m4/chown.m4 b/gnulib/m4/chown.m4 new file mode 100644 index 0000000..89761f5 --- /dev/null +++ b/gnulib/m4/chown.m4 @@ -0,0 +1,83 @@ +#serial 17 +# Determine whether we need the chown wrapper. + +dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007 Free +dnl 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. + +# chown should accept arguments of -1 for uid and gid, and it should +# dereference symlinks. If it doesn't, arrange to use the replacement +# function. + +# From Jim Meyering. + +AC_DEFUN([gl_FUNC_CHOWN], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_TYPE_UID_T]) + AC_REQUIRE([AC_FUNC_CHOWN]) + AC_REQUIRE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK]) + + if test $ac_cv_func_chown_works = no; then + AC_DEFINE(CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE, 1, + [Define if chown is not POSIX compliant regarding IDs of -1.]) + fi + + # If chown has either of the above problems, then we need the wrapper. + if test $ac_cv_func_chown_works$gl_cv_func_chown_follows_symlink = yesyes; then + : # no wrapper needed + else + REPLACE_CHOWN=1 + AC_LIBOBJ(chown) + gl_PREREQ_CHOWN + fi +]) + +# Determine whether chown follows symlinks (it should). +AC_DEFUN([gl_FUNC_CHOWN_FOLLOWS_SYMLINK], +[ + AC_CACHE_CHECK( + [whether chown(2) dereferences symlinks], + gl_cv_func_chown_follows_symlink, + [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#include + + int + main () + { + char const *dangling_symlink = "conftest.dangle"; + + unlink (dangling_symlink); + if (symlink ("conftest.no-such", dangling_symlink)) + abort (); + + /* Exit successfully on a conforming system, + i.e., where chown must fail with ENOENT. */ + exit ( ! (chown (dangling_symlink, getuid (), getgid ()) != 0 + && errno == ENOENT)); + } + ]])], + [gl_cv_func_chown_follows_symlink=yes], + [gl_cv_func_chown_follows_symlink=no], + [gl_cv_func_chown_follows_symlink=yes] + ) + ] + ) + + if test $gl_cv_func_chown_follows_symlink = no; then + AC_DEFINE(CHOWN_MODIFIES_SYMLINK, 1, + [Define if chown modifies symlinks.]) + fi +]) + +# Prerequisites of lib/chown.c. +AC_DEFUN([gl_PREREQ_CHOWN], +[ + AC_CHECK_FUNC([fchown], , [AC_LIBOBJ(fchown-stub)]) +]) diff --git a/gnulib/m4/clock_time.m4 b/gnulib/m4/clock_time.m4 new file mode 100644 index 0000000..227a597 --- /dev/null +++ b/gnulib/m4/clock_time.m4 @@ -0,0 +1,30 @@ +# clock_time.m4 serial 8 +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. + +# 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 +]) diff --git a/gnulib/m4/close-stream.m4 b/gnulib/m4/close-stream.m4 new file mode 100644 index 0000000..b1f9d54 --- /dev/null +++ b/gnulib/m4/close-stream.m4 @@ -0,0 +1,13 @@ +#serial 3 +dnl Copyright (C) 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_CLOSE_STREAM], +[ + AC_LIBOBJ([close-stream]) + + dnl Prerequisites of lib/close-stream.c. + : +]) diff --git a/gnulib/m4/closeout.m4 b/gnulib/m4/closeout.m4 new file mode 100644 index 0000000..55a65f0 --- /dev/null +++ b/gnulib/m4/closeout.m4 @@ -0,0 +1,13 @@ +# closeout.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_CLOSEOUT], +[ + AC_LIBOBJ([closeout]) + + dnl Prerequisites of lib/closeout.c. + : +]) diff --git a/gnulib/m4/codeset.m4 b/gnulib/m4/codeset.m4 new file mode 100644 index 0000000..223955b --- /dev/null +++ b/gnulib/m4/codeset.m4 @@ -0,0 +1,21 @@ +# codeset.m4 serial 2 (gettext-0.16) +dnl Copyright (C) 2000-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. + +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 +]) diff --git a/gnulib/m4/cycle-check.m4 b/gnulib/m4/cycle-check.m4 new file mode 100644 index 0000000..608f781 --- /dev/null +++ b/gnulib/m4/cycle-check.m4 @@ -0,0 +1,11 @@ +#serial 5 +dnl Copyright (C) 2005, 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_CYCLE_CHECK], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_LIBOBJ([cycle-check]) +]) diff --git a/gnulib/m4/d-ino.m4 b/gnulib/m4/d-ino.m4 new file mode 100644 index 0000000..6e6dab3 --- /dev/null +++ b/gnulib/m4/d-ino.m4 @@ -0,0 +1,41 @@ +#serial 10 + +dnl From Jim Meyering. +dnl +dnl Check whether struct dirent has a member named d_ino. +dnl + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 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. + +AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], + [AC_CACHE_CHECK([for d_ino member in directory struct], + gl_cv_struct_dirent_d_ino, + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + ]], + [[DIR *dp = opendir ("."); + struct dirent *e; + struct stat st; + if (! dp) + return 1; + e = readdir (dp); + return ! (e + && stat (e->d_name, &st) == 0 + && e->d_ino == st.st_ino);]])], + [gl_cv_struct_dirent_d_ino=yes], + [gl_cv_struct_dirent_d_ino=no], + [gl_cv_struct_dirent_d_ino=no])]) + if test $gl_cv_struct_dirent_d_ino = yes; then + AC_DEFINE(D_INO_IN_DIRENT, 1, + [Define if struct dirent has a member d_ino that actually works.]) + fi + ] +) diff --git a/gnulib/m4/d-type.m4 b/gnulib/m4/d-type.m4 new file mode 100644 index 0000000..7675dd2 --- /dev/null +++ b/gnulib/m4/d-type.m4 @@ -0,0 +1,35 @@ +#serial 9 + +dnl From Jim Meyering. +dnl +dnl Check whether struct dirent has a member named d_type. +dnl + +# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 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. + +AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE], + [AC_CACHE_CHECK([for d_type member in directory struct], + jm_cv_struct_dirent_d_type, + [AC_TRY_LINK(dnl + [ +#include +#include + ], + [struct dirent dp; dp.d_type = 0;], + + jm_cv_struct_dirent_d_type=yes, + jm_cv_struct_dirent_d_type=no) + ] + ) + if test $jm_cv_struct_dirent_d_type = yes; then + AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1, + [Define if there is a member named d_type in the struct describing + directory headers.]) + fi + ] +) diff --git a/gnulib/m4/dirfd.m4 b/gnulib/m4/dirfd.m4 new file mode 100644 index 0000000..125966b --- /dev/null +++ b/gnulib/m4/dirfd.m4 @@ -0,0 +1,74 @@ +#serial 14 -*- Autoconf -*- + +dnl Find out how to get the file descriptor associated with an open DIR*. + +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +dnl From Jim Meyering + +AC_DEFUN([gl_FUNC_DIRFD], +[ + dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. + AC_REQUIRE([AC_PROG_CPP]) + AC_REQUIRE([AC_PROG_EGREP]) + AC_CHECK_FUNCS(dirfd) + AC_CHECK_DECLS([dirfd], , , + [#include + #include ]) + + AC_CACHE_CHECK([whether dirfd is a macro], + gl_cv_func_dirfd_macro, + [AC_EGREP_CPP([dirent_header_defines_dirfd], [ +#include +#include +#ifdef dirfd + dirent_header_defines_dirfd +#endif], + gl_cv_func_dirfd_macro=yes, + gl_cv_func_dirfd_macro=no)]) + + # Use the replacement only if we have no function, macro, + # or declaration with that name. + if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$gl_cv_func_dirfd_macro \ + = no,no,no; then + AC_REPLACE_FUNCS([dirfd]) + AC_CACHE_CHECK( + [how to get the file descriptor associated with an open DIR*], + gl_cv_sys_dir_fd_member_name, + [ + dirfd_save_CFLAGS=$CFLAGS + for ac_expr in d_fd dd_fd; do + + CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" + AC_TRY_COMPILE( + [#include + #include ], + [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;], + dir_fd_found=yes + ) + CFLAGS=$dirfd_save_CFLAGS + test "$dir_fd_found" = yes && break + done + test "$dir_fd_found" = yes || ac_expr=no_such_member + + gl_cv_sys_dir_fd_member_name=$ac_expr + ] + ) + if test $gl_cv_sys_dir_fd_member_name != no_such_member; then + AC_DEFINE_UNQUOTED(DIR_FD_MEMBER_NAME, + $gl_cv_sys_dir_fd_member_name, + [the name of the file descriptor member of DIR]) + fi + AH_VERBATIM(DIR_TO_FD, + [#ifdef DIR_FD_MEMBER_NAME +# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) +#else +# define DIR_TO_FD(Dir_p) -1 +#endif +]) + fi +]) diff --git a/gnulib/m4/dirname.m4 b/gnulib/m4/dirname.m4 new file mode 100644 index 0000000..e35da96 --- /dev/null +++ b/gnulib/m4/dirname.m4 @@ -0,0 +1,18 @@ +#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. +]) diff --git a/gnulib/m4/dos.m4 b/gnulib/m4/dos.m4 new file mode 100644 index 0000000..dd59571 --- /dev/null +++ b/gnulib/m4/dos.m4 @@ -0,0 +1,71 @@ +#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.]) + ]) diff --git a/gnulib/m4/double-slash-root.m4 b/gnulib/m4/double-slash-root.m4 new file mode 100644 index 0000000..69d60d0 --- /dev/null +++ b/gnulib/m4/double-slash-root.m4 @@ -0,0 +1,38 @@ +# double-slash-root.m4 serial 2 -*- Autoconf -*- +dnl Copyright (C) 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_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 / //` + 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 +]) diff --git a/gnulib/m4/dup2.m4 b/gnulib/m4/dup2.m4 new file mode 100644 index 0000000..0549823 --- /dev/null +++ b/gnulib/m4/dup2.m4 @@ -0,0 +1,15 @@ +#serial 5 +dnl Copyright (C) 2002, 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. + +AC_DEFUN([gl_FUNC_DUP2], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([dup2]) + if test $ac_cv_func_dup2 = no; then + HAVE_DUP2=0 + AC_LIBOBJ([dup2]) + fi +]) diff --git a/gnulib/m4/eealloc.m4 b/gnulib/m4/eealloc.m4 new file mode 100644 index 0000000..adcfd06 --- /dev/null +++ b/gnulib/m4/eealloc.m4 @@ -0,0 +1,32 @@ +# eealloc.m4 serial 1 +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_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.]) +]) diff --git a/gnulib/m4/error.m4 b/gnulib/m4/error.m4 new file mode 100644 index 0000000..7c7746e --- /dev/null +++ b/gnulib/m4/error.m4 @@ -0,0 +1,22 @@ +#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]) + : +]) diff --git a/gnulib/m4/exitfail.m4 b/gnulib/m4/exitfail.m4 new file mode 100644 index 0000000..b7a691e --- /dev/null +++ b/gnulib/m4/exitfail.m4 @@ -0,0 +1,13 @@ +# 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. + : +]) diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4 new file mode 100644 index 0000000..143a9e5 --- /dev/null +++ b/gnulib/m4/extensions.m4 @@ -0,0 +1,58 @@ +# serial 4 -*- Autoconf -*- +# Enable extensions on systems that normally disable them. + +# Copyright (C) 2003, 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS +# Autoconf. Perhaps we can remove this once we can assume Autoconf +# 2.61 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. +AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], +[ + AC_BEFORE([$0], [AC_COMPILE_IFELSE]) + AC_BEFORE([$0], [AC_RUN_IFELSE]) + + AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([AC_AIX]) + AC_REQUIRE([AC_MINIX]) + + AH_VERBATIM([__EXTENSIONS__], +[/* Enable extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#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([_POSIX_PTHREAD_SEMANTICS]) + AC_DEFINE([_TANDEM_SOURCE]) +]) + +# gl_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], + [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])]) diff --git a/gnulib/m4/fchdir.m4 b/gnulib/m4/fchdir.m4 new file mode 100644 index 0000000..58c933c --- /dev/null +++ b/gnulib/m4/fchdir.m4 @@ -0,0 +1,28 @@ +# fchdir.m4 serial 3 +dnl Copyright (C) 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_FUNC_FCHDIR], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([fchdir]) + if test $ac_cv_func_fchdir = no; then + REPLACE_FCHDIR=1 + AC_LIBOBJ([fchdir]) + gl_PREREQ_FCHDIR + AC_DEFINE([FCHDIR_REPLACEMENT], 1, + [Define if gnulib's fchdir() replacement is used.]) + gl_ABSOLUTE_HEADER([dirent.h]) + ABSOLUTE_DIRENT_H=\"$gl_cv_absolute_dirent_h\" + DIRENT_H='dirent.h' + else + DIRENT_H= + fi + AC_SUBST([ABSOLUTE_DIRENT_H]) + AC_SUBST([DIRENT_H]) +]) + +# Prerequisites of lib/fchdir.c. +AC_DEFUN([gl_PREREQ_FCHDIR], [:]) diff --git a/gnulib/m4/fcntl-safer.m4 b/gnulib/m4/fcntl-safer.m4 new file mode 100644 index 0000000..3475b0a --- /dev/null +++ b/gnulib/m4/fcntl-safer.m4 @@ -0,0 +1,11 @@ +#serial 5 +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. + +AC_DEFUN([gl_FCNTL_SAFER], +[ + AC_LIBOBJ([open-safer]) + AC_LIBOBJ([creat-safer]) +]) diff --git a/gnulib/m4/fcntl_h.m4 b/gnulib/m4/fcntl_h.m4 new file mode 100644 index 0000000..9846b2f --- /dev/null +++ b/gnulib/m4/fcntl_h.m4 @@ -0,0 +1,81 @@ +# Configure fcntl.h. +dnl Copyright (C) 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 Written by Paul Eggert. + +AC_DEFUN([gl_FCNTL_H], +[ + 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_ABSOLUTE_HEADER([fcntl.h]) + ABSOLUTE_FCNTL_H=\"$gl_cv_absolute_fcntl_h\" + AC_SUBST([ABSOLUTE_FCNTL_H]) + FCNTL_H='fcntl.h' + AC_SUBST([FCNTL_H]) +]) diff --git a/gnulib/m4/fileblocks.m4 b/gnulib/m4/fileblocks.m4 new file mode 100644 index 0000000..5fb6311 --- /dev/null +++ b/gnulib/m4/fileblocks.m4 @@ -0,0 +1,20 @@ +# fileblocks.m4 serial 4 +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_FILEBLOCKS], +[ + AC_STRUCT_ST_BLOCKS + dnl Note: AC_STRUCT_ST_BLOCKS does AC_LIBOBJ(fileblocks). + if test $ac_cv_member_struct_stat_st_blocks = no; then + gl_PREREQ_FILEBLOCKS + fi +]) + +# Prerequisites of lib/fileblocks.c. +AC_DEFUN([gl_PREREQ_FILEBLOCKS], [ + AC_CHECK_HEADERS_ONCE(sys/param.h) + : +]) diff --git a/gnulib/m4/filemode.m4 b/gnulib/m4/filemode.m4 new file mode 100644 index 0000000..64f5cb9 --- /dev/null +++ b/gnulib/m4/filemode.m4 @@ -0,0 +1,12 @@ +# filemode.m4 serial 7 +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_FILEMODE], +[ + AC_REQUIRE([AC_STRUCT_ST_DM_MODE]) + AC_LIBOBJ([filemode]) + AC_CHECK_DECLS_ONCE([strmode]) +]) diff --git a/gnulib/m4/filenamecat.m4 b/gnulib/m4/filenamecat.m4 new file mode 100644 index 0000000..bb46dba --- /dev/null +++ b/gnulib/m4/filenamecat.m4 @@ -0,0 +1,13 @@ +# filenamecat.m4 serial 8 +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_FILE_NAME_CONCAT], +[ + AC_LIBOBJ([filenamecat]) + + dnl Prerequisites of lib/filenamecat.c. + AC_CHECK_FUNCS_ONCE(mempcpy) +]) diff --git a/gnulib/m4/flexmember.m4 b/gnulib/m4/flexmember.m4 new file mode 100644 index 0000000..eb5f2b1 --- /dev/null +++ b/gnulib/m4/flexmember.m4 @@ -0,0 +1,41 @@ +# serial 1 +# Check for flexible array member support. + +# Copyright (C) 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# 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 +]) diff --git a/gnulib/m4/fnmatch.m4 b/gnulib/m4/fnmatch.m4 new file mode 100644 index 0000000..3778742 --- /dev/null +++ b/gnulib/m4/fnmatch.m4 @@ -0,0 +1,127 @@ +# Check for fnmatch. + +# Copyright (C) 2000, 2001, 2002, 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. + +# 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 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_GNU_SOURCE]) + + 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]) +]) diff --git a/gnulib/m4/fpending.m4 b/gnulib/m4/fpending.m4 new file mode 100644 index 0000000..a073483 --- /dev/null +++ b/gnulib/m4/fpending.m4 @@ -0,0 +1,78 @@ +#serial 10 + +# 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. + +dnl From Jim Meyering +dnl Using code from emacs, based on suggestions from Paul Eggert +dnl and Ulrich Drepper. + +dnl Find out how to determine the number of pending output bytes on a stream. +dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems, +dnl we have to grub around in the FILE struct. + +AC_DEFUN([gl_FUNC_FPENDING], +[ + AC_CHECK_HEADERS_ONCE(stdio_ext.h) + AC_REPLACE_FUNCS([__fpending]) + fp_headers=' +# include +# if HAVE_STDIO_EXT_H +# include +# endif +' + AC_CHECK_DECLS([__fpending], , , $fp_headers) + if test $ac_cv_func___fpending = no; then + AC_CACHE_CHECK( + [how to determine the number of pending output bytes on a stream], + ac_cv_sys_pending_output_n_bytes, + [ + for ac_expr in \ + \ + '# glibc2' \ + 'fp->_IO_write_ptr - fp->_IO_write_base' \ + \ + '# traditional Unix' \ + 'fp->_ptr - fp->_base' \ + \ + '# BSD' \ + 'fp->_p - fp->_bf._base' \ + \ + '# SCO, Unixware' \ + '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ + \ + '# old glibc?' \ + 'fp->__bufp - fp->__buffer' \ + \ + '# old glibc iostream?' \ + 'fp->_pptr - fp->_pbase' \ + \ + '# VMS' \ + '(*fp)->_ptr - (*fp)->_base' \ + \ + '# e.g., DGUX R4.11; the info is not available' \ + 1 \ + ; do + + # Skip each embedded comment. + case "$ac_expr" in '#'*) continue;; esac + + AC_TRY_COMPILE( + [#include + ], + [FILE *fp = stdin; (void) ($ac_expr);], + fp_done=yes + ) + test "$fp_done" = yes && break + done + + ac_cv_sys_pending_output_n_bytes=$ac_expr + ] + ) + AC_DEFINE_UNQUOTED(PENDING_OUTPUT_N_BYTES, + $ac_cv_sys_pending_output_n_bytes, + [the number of pending output bytes on stream `fp']) + fi +]) diff --git a/gnulib/m4/fstypename.m4 b/gnulib/m4/fstypename.m4 new file mode 100644 index 0000000..aa676f3 --- /dev/null +++ b/gnulib/m4/fstypename.m4 @@ -0,0 +1,22 @@ +#serial 6 + +dnl From Jim Meyering. +dnl +dnl See if struct statfs has the f_fstypename member. +dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME. +dnl + +# Copyright (C) 1998, 1999, 2001, 2004, 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. + +AC_DEFUN([gl_FSTYPENAME], +[ + AC_CHECK_MEMBERS([struct statfs.f_fstypename],,, + [ + #include + #include + #include + ]) +]) diff --git a/gnulib/m4/fts.m4 b/gnulib/m4/fts.m4 new file mode 100644 index 0000000..cceb48f --- /dev/null +++ b/gnulib/m4/fts.m4 @@ -0,0 +1,28 @@ +#serial 13 +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. + +AC_DEFUN([gl_FUNC_FTS], +[ + gl_FUNC_FTS_CORE +]) + +AC_DEFUN([gl_FUNC_FTS_LGPL], +[ + gl_FUNC_FTS_CORE +]) + +AC_DEFUN([gl_FUNC_FTS_CORE], +[ + dnl Use this version of fts unconditionally, since the GNU libc and + dnl NetBSD versions have bugs and/or unnecessary limitations. + AC_LIBOBJ([fts]) + + dnl Prerequisites of lib/fts.c. + gl_FUNC_OPENAT + + # Checks for header files. + AC_CHECK_HEADERS_ONCE([sys/param.h])dnl +]) diff --git a/gnulib/m4/getcwd-abort-bug.m4 b/gnulib/m4/getcwd-abort-bug.m4 new file mode 100644 index 0000000..a431a7c --- /dev/null +++ b/gnulib/m4/getcwd-abort-bug.m4 @@ -0,0 +1,106 @@ +#serial 1 +# Determine whether getcwd aborts when the length of the working directory +# name is unusually large. Any length between 4k and 16k trigger the bug +# when using glibc-2.4.90-9 or older. + +# Copyright (C) 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# From Jim Meyering + +# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG], +[ + AC_CHECK_DECLS_ONCE(getcwd) + AC_CHECK_FUNCS(getpagesize) + AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k], + gl_cv_func_getcwd_abort_bug, + [# Remove any remnants of a previous test. + rm -rf confdir-14B--- + # Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir-14B---" + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ +#include +#include +#include +#include +#include + +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif + +/* FIXME: skip the run-test altogether on systems without getpagesize. */ +#if ! HAVE_GETPAGESIZE +# define getpagesize() 0 +#endif + +/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than + the 16kB pagesize on ia64 linux. Those conditions make the code below + trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ +#define TARGET_LEN (5 * 1024) + +int +main () +{ + char const *dir_name = "confdir-14B---"; + char *cwd; + size_t initial_cwd_len; + int fail = 0; + size_t desired_depth; + size_t d; + + /* The bug is triggered when PATH_MAX < getpagesize (), so skip + this relative expensive and invasive test if that's not true. */ + if (getpagesize () <= PATH_MAX) + return 0; + + cwd = getcwd (NULL, 0); + if (cwd == NULL) + return 0; + + initial_cwd_len = strlen (cwd); + free (cwd); + desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) + / (1 + strlen (dir_name))); + for (d = 0; d < desired_depth; d++) + { + if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) + { + fail = 3; /* Unable to construct deep hierarchy. */ + break; + } + } + + /* If libc has the bug in question, this invocation of getcwd + results in a failed assertion. */ + cwd = getcwd (NULL, 0); + if (cwd == NULL) + fail = 4; /* getcwd failed. This is ok, and expected. */ + free (cwd); + + /* Call rmdir first, in case the above chdir failed. */ + rmdir (dir_name); + while (0 < d--) + { + if (chdir ("..") < 0) + break; + rmdir (dir_name); + } + + return 0; +} + ]])], + [gl_cv_func_getcwd_abort_bug=no], + [gl_cv_func_getcwd_abort_bug=yes], + [gl_cv_func_getcwd_abort_bug=yes]) + ]) + AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) +]) diff --git a/gnulib/m4/getcwd-path-max.m4 b/gnulib/m4/getcwd-path-max.m4 new file mode 100644 index 0000000..5e6d58b --- /dev/null +++ b/gnulib/m4/getcwd-path-max.m4 @@ -0,0 +1,190 @@ +#serial 13 +# Check for several getcwd bugs with long file names. +# If so, arrange to compile the wrapper function. + +# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20. +# I've heard that this is due to a Linux kernel bug, and that it has +# been fixed between 2.4.21-pre3 and 2.4.21-pre4. */ + +# Copyright (C) 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. + +# From Jim Meyering + +AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX], +[ + AC_CHECK_DECLS_ONCE(getcwd) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CACHE_CHECK([whether getcwd handles long file names properly], + gl_cv_func_getcwd_path_max, + [# Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir3" + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef AT_FDCWD +# define AT_FDCWD 0 +#endif +#ifdef ENAMETOOLONG +# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) +#else +# define is_ENAMETOOLONG(x) 0 +#endif + +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif + +/* The length of this name must be 8. */ +#define DIR_NAME "confdir3" +#define DIR_NAME_LEN 8 +#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) + +/* The length of "../". */ +#define DOTDOTSLASH_LEN 3 + +/* Leftover bytes in the buffer, to work around library or OS bugs. */ +#define BUF_SLOP 20 + +int +main () +{ +#ifndef PATH_MAX + /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- + at least not on a local file system. And if we were to start worrying + about remote file systems, we'd have to enable the wrapper function + all of the time, just to be safe. That's not worth the cost. */ + exit (0); +#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ + - DIR_NAME_SIZE - BUF_SLOP) \ + <= PATH_MAX) + /* FIXME: Assuming there's a system for which this is true, + this should be done in a compile test. */ + exit (0); +#else + char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) + + DIR_NAME_SIZE + BUF_SLOP]; + char *cwd = getcwd (buf, PATH_MAX); + size_t initial_cwd_len; + size_t cwd_len; + int fail = 0; + size_t n_chdirs = 0; + + if (cwd == NULL) + exit (1); + + cwd_len = initial_cwd_len = strlen (cwd); + + while (1) + { + size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); + char *c = NULL; + + cwd_len += DIR_NAME_SIZE; + /* If mkdir or chdir fails, it could be that this system cannot create + any file with an absolute name longer than PATH_MAX, such as cygwin. + If so, leave fail as 0, because the current working directory can't + be too long for getcwd if it can't even be created. For other + errors, be pessimistic and consider that as a failure, too. */ + if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) + { + if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) + fail = 2; + break; + } + + if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) + { + c = getcwd (buf, PATH_MAX); + if (!c && errno == ENOENT) + { + fail = 1; + break; + } + if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno))) + { + fail = 2; + break; + } + } + + if (dotdot_max <= cwd_len - initial_cwd_len) + { + if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) + break; + c = getcwd (buf, cwd_len + 1); + if (!c) + { + if (! (errno == ERANGE || errno == ENOENT + || is_ENAMETOOLONG (errno))) + { + fail = 2; + break; + } + if (AT_FDCWD || errno == ERANGE || errno == ENOENT) + { + fail = 1; + break; + } + } + } + + if (c && strlen (c) != cwd_len) + { + fail = 2; + break; + } + ++n_chdirs; + } + + /* Leaving behind such a deep directory is not polite. + So clean up here, right away, even though the driving + shell script would also clean up. */ + { + size_t i; + + /* Try rmdir first, in case the chdir failed. */ + rmdir (DIR_NAME); + for (i = 0; i <= n_chdirs; i++) + { + if (chdir ("..") < 0) + break; + if (rmdir (DIR_NAME) != 0) + break; + } + } + + exit (fail); +#endif +} + ]])], + [gl_cv_func_getcwd_path_max=yes], + [case $? in + 1) gl_cv_func_getcwd_path_max='no, but it is partly working';; + *) gl_cv_func_getcwd_path_max=no;; + esac], + [gl_cv_func_getcwd_path_max=no]) + ]) + case $gl_cv_func_getcwd_path_max in + no,*) + AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], 1, + [Define to 1 if getcwd works, except it sometimes fails when it shouldn't, + setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX + is not defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD + is defined.]);; + esac +]) diff --git a/gnulib/m4/getcwd.m4 b/gnulib/m4/getcwd.m4 new file mode 100644 index 0000000..6ebe2fc --- /dev/null +++ b/gnulib/m4/getcwd.m4 @@ -0,0 +1,64 @@ +# getcwd.m4 - check for working getcwd that is compatible with glibc + +# 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. + +# Written by Paul Eggert. + +AC_DEFUN([gl_FUNC_GETCWD_NULL], + [ + AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], + [gl_cv_func_getcwd_null], + [AC_TRY_RUN( + [ +# include +# include +# ifndef getcwd + char *getcwd (); +# endif + int + main () + { + if (chdir ("/") != 0) + exit (1); + else + { + char *f = getcwd (NULL, 0); + exit (! (f && f[0] == '/' && !f[1])); + } + }], + [gl_cv_func_getcwd_null=yes], + [gl_cv_func_getcwd_null=no], + [gl_cv_func_getcwd_null=no])]) +]) + +AC_DEFUN([gl_FUNC_GETCWD], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_GETCWD_NULL]) + + gl_abort_bug=no + case $gl_cv_func_getcwd_null in + yes) + gl_FUNC_GETCWD_PATH_MAX + gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);; + esac + + case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in + yes,yes,no) ;; + *) + REPLACE_GETCWD=1 + AC_LIBOBJ([getcwd]) + gl_PREREQ_GETCWD;; + esac +]) + +# Prerequisites of lib/getcwd.c. +AC_DEFUN([gl_PREREQ_GETCWD], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) + : +]) diff --git a/gnulib/m4/getdate.m4 b/gnulib/m4/getdate.m4 new file mode 100644 index 0000000..d160329 --- /dev/null +++ b/gnulib/m4/getdate.m4 @@ -0,0 +1,33 @@ +# getdate.m4 serial 12 +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_C_COMPOUND_LITERALS], +[ + AC_CACHE_CHECK([for compound literals], gl_cv_compound_literals, + [AC_TRY_COMPILE([struct s { int i, j; }; struct s s = (struct s) { 1, 2 };], + [struct s t = (struct s) { 3, 4 }; + if (t.i != 0) return 0;], + gl_cv_compound_literals=yes, + gl_cv_compound_literals=no)]) + if test $gl_cv_compound_literals = yes; then + AC_DEFINE(HAVE_COMPOUND_LITERALS, 1, + [Define if you have compound literals.]) + fi +]) + +AC_DEFUN([gl_GETDATE], +[ + dnl Prerequisites of lib/getdate.h. + AC_REQUIRE([AM_STDBOOL_H]) + AC_REQUIRE([gl_TIMESPEC]) + + dnl Prerequisites of lib/getdate.y. + AC_REQUIRE([gl_BISON]) + AC_REQUIRE([gl_C_COMPOUND_LITERALS]) + AC_STRUCT_TIMEZONE + AC_REQUIRE([gl_CLOCK_TIME]) + AC_REQUIRE([gl_TM_GMTOFF]) +]) diff --git a/gnulib/m4/getdelim.m4 b/gnulib/m4/getdelim.m4 new file mode 100644 index 0000000..2a738f6 --- /dev/null +++ b/gnulib/m4/getdelim.m4 @@ -0,0 +1,29 @@ +# getdelim.m4 serial 2 + +dnl Copyright (C) 2005, 2006 Free Software dnl Foundation, Inc. +dnl +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_PREREQ(2.52) + +AC_DEFUN([gl_FUNC_GETDELIM], +[ + + dnl Persuade glibc to declare getdelim(). + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_REPLACE_FUNCS(getdelim) + AC_CHECK_DECLS_ONCE(getdelim) + + if test $ac_cv_func_getdelim = no; then + gl_PREREQ_GETDELIM + fi +]) + +# Prerequisites of lib/getdelim.c. +AC_DEFUN([gl_PREREQ_GETDELIM], +[ + AC_CHECK_FUNCS([flockfile funlockfile]) +]) diff --git a/gnulib/m4/getline.m4 b/gnulib/m4/getline.m4 new file mode 100644 index 0000000..5b55c30 --- /dev/null +++ b/gnulib/m4/getline.m4 @@ -0,0 +1,79 @@ +# getline.m4 serial 15 + +dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software +dnl Foundation, Inc. +dnl +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_PREREQ(2.52) + +dnl See if there's a working, system-supplied version of the getline function. +dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems +dnl have a function by that name in -linet that doesn't have anything +dnl to do with the function we need. +AC_DEFUN([gl_FUNC_GETLINE], +[ + dnl Persuade glibc to declare getline(). + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_CHECK_DECLS([getline]) + + gl_getline_needs_run_time_check=no + AC_CHECK_FUNC(getline, + dnl Found it in some library. Verify that it works. + gl_getline_needs_run_time_check=yes, + am_cv_func_working_getline=no) + if test $gl_getline_needs_run_time_check = yes; then + AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline, + [echo fooN |tr -d '\012'|tr N '\012' > conftest.data + AC_TRY_RUN([ +# include +# include +# include + int main () + { /* Based on a test program from Karl Heuer. */ + char *line = NULL; + size_t siz = 0; + int len; + FILE *in = fopen ("./conftest.data", "r"); + if (!in) + return 1; + len = getline (&line, &siz, in); + exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); + } + ], am_cv_func_working_getline=yes dnl The library version works. + , am_cv_func_working_getline=no dnl The library version does NOT work. + , dnl We're cross compiling. Assume it works on glibc2 systems. + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) + Lucky GNU user + #endif +#endif + ], + [am_cv_func_working_getline=yes], + [am_cv_func_working_getline=no])] + )]) + fi + + if test $am_cv_func_working_getline = no; then + dnl We must choose a different name for our function, since on ELF systems + dnl a broken getline() in libc.so would override our getline() in + dnl libgettextlib.so. + AC_DEFINE([getline], [gnu_getline], + [Define to a replacement function name for getline().]) + AC_LIBOBJ(getline) + + gl_PREREQ_GETLINE + fi +]) + +# Prerequisites of lib/getline.c. +AC_DEFUN([gl_PREREQ_GETLINE], +[ + gl_FUNC_GETDELIM +]) diff --git a/gnulib/m4/getopt.m4 b/gnulib/m4/getopt.m4 new file mode 100644 index 0000000..c0a73b2 --- /dev/null +++ b/gnulib/m4/getopt.m4 @@ -0,0 +1,83 @@ +# getopt.m4 serial 13 +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. + +# 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]) +]) diff --git a/gnulib/m4/gettext.m4 b/gnulib/m4/gettext.m4 new file mode 100644 index 0000000..91c345e --- /dev/null +++ b/gnulib/m4/gettext.m4 @@ -0,0 +1,419 @@ +# gettext.m4 serial 59 (gettext-0.16.1) +dnl Copyright (C) 1995-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 +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-2006. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) + define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + [$gt_func_gnugettext_libintl], + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv. + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST(INTLOBJS) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) +]) + + +dnl Checks for special options needed on MacOS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in MacOS X 10.2. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + gt_cv_func_CFPreferencesCopyAppValue, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], + [CFPreferencesCopyAppValue(NULL, NULL)], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, + [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Check for API introduced in MacOS X 10.3. + AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], + [gt_cv_func_CFLocaleCopyCurrent=yes], + [gt_cv_func_CFLocaleCopyCurrent=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, + [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) + + +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/gnulib/m4/gettime.m4 b/gnulib/m4/gettime.m4 new file mode 100644 index 0000000..601a5e6 --- /dev/null +++ b/gnulib/m4/gettime.m4 @@ -0,0 +1,15 @@ +# gettime.m4 serial 6 +dnl Copyright (C) 2002, 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_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) +]) diff --git a/gnulib/m4/gettimeofday.m4 b/gnulib/m4/gettimeofday.m4 new file mode 100644 index 0000000..b9bbb10 --- /dev/null +++ b/gnulib/m4/gettimeofday.m4 @@ -0,0 +1,101 @@ +#serial 11 + +# Copyright (C) 2001, 2002, 2003, 2005, 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_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]) +]) diff --git a/gnulib/m4/glibc21.m4 b/gnulib/m4/glibc21.m4 new file mode 100644 index 0000000..d95fd98 --- /dev/null +++ b/gnulib/m4/glibc21.m4 @@ -0,0 +1,30 @@ +# glibc21.m4 serial 3 +dnl Copyright (C) 2000-2002, 2004 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" + ] +) diff --git a/gnulib/m4/gnulib-common.m4 b/gnulib/m4/gnulib-common.m4 new file mode 100644 index 0000000..5398010 --- /dev/null +++ b/gnulib/m4/gnulib-common.m4 @@ -0,0 +1,22 @@ +# gnulib-common.m4 serial 2 +dnl Copyright (C) 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. + +# 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[.]) +]) + +# 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([AC_PROG_MKDIR_P], + [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + MKDIR_P='$(mkdir_p)' + AC_SUBST([MKDIR_P])])]) diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 new file mode 100644 index 0000000..c92e249 --- /dev/null +++ b/gnulib/m4/gnulib-comp.m4 @@ -0,0 +1,603 @@ +# DO NOT EDIT! GENERATED AUTOMATICALLY! +# Copyright (C) 2004-2007 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.in, 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([AC_GNU_SOURCE]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +]) + +# This macro should be invoked from ./configure.in, in the section +# "Check for header files, types and library functions". +AC_DEFUN([gl_INIT], +[ + 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])) + AM_CONDITIONAL([GL_COND_LIBTOOL], [false]) + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_source_base='gnulib/lib' + gl_FUNC_ALLOCA + gl_ALLOCSA + gl_ARGMATCH + AC_FUNC_CANONICALIZE_FILE_NAME + gl_MODULE_INDICATOR([canonicalize]) + gl_CANONICALIZE_LGPL + gl_FUNC_CHDIR_LONG + gl_FUNC_CHOWN + gl_UNISTD_MODULE_INDICATOR([chown]) + gl_CLOCK_TIME + gl_CLOSE_STREAM + gl_MODULE_INDICATOR([close-stream]) + gl_CLOSEOUT + gl_CYCLE_CHECK + gl_CHECK_TYPE_STRUCT_DIRENT_D_INO + gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE + gl_FUNC_DIRFD + gl_DIRNAME + gl_DOUBLE_SLASH_ROOT + gl_FUNC_DUP2 + gl_UNISTD_MODULE_INDICATOR([dup2]) + gl_ERROR + gl_EXITFAIL + gl_FUNC_FCHDIR + gl_UNISTD_MODULE_INDICATOR([fchdir]) + gl_FCNTL_H + gl_FCNTL_SAFER + gl_MODULE_INDICATOR([fcntl-safer]) + gl_FILEBLOCKS + gl_FILEMODE + gl_FILE_NAME_CONCAT + AC_C_FLEXIBLE_ARRAY_MEMBER + # No macro. You should also use one of fnmatch-posix or fnmatch-gnu. + gl_FUNC_FNMATCH_GNU + gl_FOPEN_SAFER + gl_MODULE_INDICATOR([fopen-safer]) + gl_FUNC_FPENDING + gl_FUNC_FTS + gl_MODULE_INDICATOR([fts]) + gl_FUNC_GETCWD + gl_UNISTD_MODULE_INDICATOR([getcwd]) + gl_GETDATE + gl_FUNC_GETDELIM + gl_FUNC_GETLINE + gl_GETOPT + dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac. + AM_GNU_GETTEXT_VERSION([0.16.1]) + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + gl_GETTIME + gl_FUNC_GETTIMEOFDAY + gl_HASH + gl_HUMAN + gl_I_RING + gl_IDCACHE + gl_INLINE + gl_INTTYPES_H + gl_FUNC_LCHOWN + gl_LOCALCHARSET + gl_FUNC_LSTAT + AC_FUNC_MALLOC + gl_MBCHAR + gl_FUNC_MBSCASESTR + gl_STRING_MODULE_INDICATOR([mbscasestr]) + gt_LOCALE_FR_UTF8 + gt_LOCALE_TR_UTF8 + gt_LOCALE_ZH_CN + gl_FUNC_MBSLEN + gl_STRING_MODULE_INDICATOR([mbslen]) + gl_FUNC_MBSSTR + gl_STRING_MODULE_INDICATOR([mbsstr]) + gt_LOCALE_FR_UTF8 + gt_LOCALE_ZH_CN + gl_MBITER + gl_FUNC_MEMCHR + gl_FUNC_MEMCMP + gl_FUNC_MEMPCPY + gl_STRING_MODULE_INDICATOR([mempcpy]) + gl_FUNC_MEMRCHR + gl_STRING_MODULE_INDICATOR([memrchr]) + gl_FUNC_MEMSET + gl_FUNC_MKTIME + gl_MODECHANGE + gl_MOUNTLIST + gl_FUNC_OPENAT + gl_PATHMAX + gl_QUOTE + gl_QUOTEARG + gl_FUNC_READLINK + gl_UNISTD_MODULE_INDICATOR([readlink]) + AC_FUNC_REALLOC + gl_REGEX + gl_FUNC_RPMATCH + gl_SAVE_CWD + gl_SAVEDIR + gl_FUNC_SETENV + gl_FUNC_UNSETENV + gt_TYPE_SSIZE_T + gl_STAT_TIME + gl_STAT_BIRTHTIME + AM_STDBOOL_H + gl_STDINT_H + gt_TYPE_WCHAR_T + gt_TYPE_WINT_T + gl_STDLIB_H + gl_FUNC_STPCPY + gl_STRING_MODULE_INDICATOR([stpcpy]) + gl_FUNC_STRDUP + gl_STRING_MODULE_INDICATOR([strdup]) + gl_FUNC_GNU_STRFTIME + gl_HEADER_STRING_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_FUNC_STRTOUL + gl_FUNC_STRTOULL + gl_FUNC_STRTOUMAX + gl_INTTYPES_MODULE_INDICATOR([strtoumax]) + gl_HEADER_SYS_STAT_H + AC_PROG_MKDIR_P + gl_HEADER_SYS_TIME_H + AC_PROG_MKDIR_P + gl_HEADER_TIME_H + gl_TIME_R + gl_TIMESPEC + gl_UNISTD_H + gl_UNISTD_SAFER + gl_WCHAR_H + gl_WCTYPE_H + gl_FUNC_WCWIDTH + gl_XALLOC + gl_XGETCWD + gl_XSTRNDUP + gl_XSTRTOD + gl_XSTRTOL + gl_YESNO + LIBGNULIB_LIBDEPS="$gl_libdeps" + AC_SUBST([LIBGNULIB_LIBDEPS]) + LIBGNULIB_LTLIBDEPS="$gl_ltlibdeps" + AC_SUBST([LIBGNULIB_LTLIBDEPS]) + 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]) + ]) +]) + +# Like AC_LIBOBJ, except that the module name goes +# into gl_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gl_LIBOBJ], + [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], + [AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])]) + +# Like AC_LIBSOURCES, except that it does nothing. +# We rely on EXTRA_lib..._SOURCES instead. +AC_DEFUN([gl_LIBSOURCES], + []) + +# 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/config.rpath + build-aux/link-warning.h + doc/getdate.texi + lib/__fpending.c + lib/__fpending.h + lib/alloca.c + lib/alloca_.h + lib/allocsa.c + lib/allocsa.h + lib/allocsa.valgrind + lib/argmatch.c + lib/argmatch.h + lib/at-func.c + lib/basename.c + lib/c-strstr.c + lib/c-strstr.h + lib/canonicalize-lgpl.c + lib/canonicalize.c + lib/canonicalize.h + lib/chdir-long.c + lib/chdir-long.h + lib/chown.c + lib/close-stream.c + lib/close-stream.h + lib/closeout.c + lib/closeout.h + lib/config.charset + lib/creat-safer.c + lib/cycle-check.c + lib/cycle-check.h + lib/dev-ino.h + lib/dirent_.h + lib/dirfd.c + lib/dirfd.h + lib/dirname.c + lib/dirname.h + lib/dup-safer.c + lib/dup2.c + lib/error.c + lib/error.h + lib/exitfail.c + lib/exitfail.h + lib/fchdir.c + lib/fchmodat.c + lib/fchown-stub.c + lib/fchownat.c + lib/fcntl--.h + lib/fcntl-safer.h + lib/fcntl_.h + lib/fd-safer.c + lib/fileblocks.c + lib/filemode.c + lib/filemode.h + lib/filenamecat.c + lib/filenamecat.h + lib/fnmatch.c + lib/fnmatch_.h + lib/fnmatch_loop.c + lib/fopen-safer.c + lib/fstatat.c + lib/fts-cycle.c + lib/fts.c + lib/fts_.h + lib/getcwd.c + lib/getdate.h + lib/getdate.y + lib/getdelim.c + lib/getdelim.h + lib/getline.c + lib/getline.h + lib/getopt.c + lib/getopt1.c + lib/getopt_.h + lib/getopt_int.h + lib/gettext.h + lib/gettime.c + lib/gettimeofday.c + lib/hash.c + lib/hash.h + lib/human.c + lib/human.h + lib/i-ring.c + lib/i-ring.h + lib/idcache.c + lib/intprops.h + lib/inttypes_.h + lib/lchown.c + lib/lchown.h + lib/localcharset.c + lib/localcharset.h + lib/lstat.c + lib/lstat.h + lib/malloc.c + lib/mbchar.c + lib/mbchar.h + lib/mbscasestr.c + lib/mbslen.c + lib/mbsstr.c + lib/mbuiter.h + lib/memchr.c + lib/memcmp.c + lib/mempcpy.c + lib/memrchr.c + lib/memset.c + lib/mkdirat.c + lib/mktime.c + lib/modechange.c + lib/modechange.h + lib/mountlist.c + lib/mountlist.h + lib/open-safer.c + lib/openat-die.c + lib/openat-priv.h + lib/openat-proc.c + lib/openat.c + lib/openat.h + lib/pathmax.h + lib/pipe-safer.c + lib/progname.c + lib/progname.h + lib/quote.c + lib/quote.h + lib/quotearg.c + lib/quotearg.h + lib/readlink.c + lib/realloc.c + lib/ref-add.sin + lib/ref-del.sin + lib/regcomp.c + lib/regex.c + lib/regex.h + lib/regex_internal.c + lib/regex_internal.h + lib/regexec.c + lib/rpmatch.c + lib/same-inode.h + lib/save-cwd.c + lib/save-cwd.h + lib/savedir.c + lib/savedir.h + lib/setenv.c + lib/setenv.h + lib/stat-macros.h + lib/stat-time.h + lib/stdbool_.h + lib/stdint_.h + lib/stdio--.h + lib/stdio-safer.h + lib/stdlib_.h + lib/stpcpy.c + lib/strdup.c + lib/strftime.c + lib/strftime.h + lib/string_.h + lib/stripslash.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_stat_.h + lib/sys_time_.h + lib/time_.h + lib/time_r.c + lib/timespec.h + lib/unistd--.h + lib/unistd-safer.h + lib/unistd_.h + lib/unsetenv.c + lib/verify.h + lib/wchar_.h + lib/wctype_.h + lib/wcwidth.h + lib/xalloc-die.c + lib/xalloc.h + lib/xgetcwd.c + lib/xgetcwd.h + lib/xmalloc.c + lib/xreadlink-with-size.c + lib/xreadlink.h + lib/xstrndup.c + lib/xstrndup.h + lib/xstrtod.c + lib/xstrtod.h + lib/xstrtol.c + lib/xstrtol.h + lib/xstrtoul.c + lib/xstrtoumax.c + lib/yesno.c + lib/yesno.h + m4/absolute-header.m4 + m4/alloca.m4 + m4/allocsa.m4 + m4/argmatch.m4 + m4/bison.m4 + m4/canonicalize-lgpl.m4 + m4/canonicalize.m4 + m4/chdir-long.m4 + m4/chown.m4 + m4/clock_time.m4 + m4/close-stream.m4 + m4/closeout.m4 + m4/codeset.m4 + m4/cycle-check.m4 + m4/d-ino.m4 + m4/d-type.m4 + m4/dirfd.m4 + m4/dirname.m4 + m4/dos.m4 + m4/double-slash-root.m4 + m4/dup2.m4 + m4/eealloc.m4 + m4/error.m4 + m4/exitfail.m4 + m4/extensions.m4 + m4/fchdir.m4 + m4/fcntl-safer.m4 + m4/fcntl_h.m4 + m4/fileblocks.m4 + m4/filemode.m4 + m4/filenamecat.m4 + m4/flexmember.m4 + m4/fnmatch.m4 + m4/fpending.m4 + m4/fstypename.m4 + m4/fts.m4 + m4/getcwd-abort-bug.m4 + m4/getcwd-path-max.m4 + m4/getcwd.m4 + m4/getdate.m4 + m4/getdelim.m4 + m4/getline.m4 + m4/getopt.m4 + m4/gettext.m4 + m4/gettime.m4 + m4/gettimeofday.m4 + m4/glibc2.m4 + m4/glibc21.m4 + m4/gnulib-common.m4 + m4/hash.m4 + m4/human.m4 + m4/i-ring.m4 + m4/iconv.m4 + m4/idcache.m4 + m4/inline.m4 + m4/intdiv0.m4 + m4/intl.m4 + m4/intldir.m4 + m4/intmax.m4 + m4/inttypes-pri.m4 + m4/inttypes.m4 + m4/inttypes_h.m4 + m4/lchown.m4 + m4/lcmessage.m4 + m4/lib-ld.m4 + m4/lib-link.m4 + m4/lib-prefix.m4 + m4/localcharset.m4 + m4/locale-fr.m4 + m4/locale-tr.m4 + m4/locale-zh.m4 + m4/lock.m4 + m4/longlong.m4 + m4/ls-mntd-fs.m4 + m4/lstat.m4 + m4/mbchar.m4 + m4/mbiter.m4 + m4/mbrtowc.m4 + m4/mbscasestr.m4 + m4/mbslen.m4 + m4/mbsstr.m4 + m4/mbstate_t.m4 + m4/memchr.m4 + m4/memcmp.m4 + m4/mempcpy.m4 + m4/memrchr.m4 + m4/memset.m4 + m4/mktime.m4 + m4/modechange.m4 + m4/mountlist.m4 + m4/nls.m4 + m4/onceonly_2_57.m4 + m4/openat.m4 + m4/pathmax.m4 + m4/po.m4 + m4/printf-posix.m4 + m4/progtest.m4 + m4/quote.m4 + m4/quotearg.m4 + m4/readlink.m4 + m4/regex.m4 + m4/rpmatch.m4 + m4/save-cwd.m4 + m4/savedir.m4 + m4/setenv.m4 + m4/size_max.m4 + m4/ssize_t.m4 + m4/st_dm_mode.m4 + m4/stat-time.m4 + m4/stdbool.m4 + m4/stdint.m4 + m4/stdint_h.m4 + m4/stdio-safer.m4 + m4/stdlib_h.m4 + m4/stpcpy.m4 + m4/strdup.m4 + m4/strftime.m4 + m4/string_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_stat_h.m4 + m4/sys_time_h.m4 + m4/time_h.m4 + m4/time_r.m4 + m4/timespec.m4 + m4/tm_gmtoff.m4 + m4/uintmax_t.m4 + m4/ulonglong.m4 + m4/unistd-safer.m4 + m4/unistd_h.m4 + m4/visibility.m4 + m4/wchar.m4 + m4/wchar_t.m4 + m4/wctype.m4 + m4/wcwidth.m4 + m4/wint_t.m4 + m4/xalloc.m4 + m4/xgetcwd.m4 + m4/xsize.m4 + m4/xstrndup.m4 + m4/xstrtod.m4 + m4/xstrtol.m4 + m4/yesno.m4 + tests/test-alloca-opt.c + tests/test-allocsa.c + tests/test-argmatch.c + tests/test-c-strstr.c + tests/test-canonicalize-lgpl.c + tests/test-canonicalize-lgpl.sh + tests/test-dirname.c + tests/test-fcntl.c + tests/test-gettimeofday.c + tests/test-inttypes.c + tests/test-mbscasestr1.c + tests/test-mbscasestr2.c + tests/test-mbscasestr2.sh + tests/test-mbscasestr3.c + tests/test-mbscasestr3.sh + tests/test-mbscasestr4.c + tests/test-mbscasestr4.sh + tests/test-mbsstr1.c + tests/test-mbsstr2.c + tests/test-mbsstr2.sh + tests/test-mbsstr3.c + tests/test-mbsstr3.sh + tests/test-stat-time.c + tests/test-stdbool.c + tests/test-stdint.c + tests/test-stdlib.c + tests/test-string.c + tests/test-sys_stat.c + tests/test-sys_time.c + tests/test-time.c + tests/test-unistd.c + tests/test-wchar.c + tests/test-wctype.c +]) diff --git a/gnulib/m4/hash.m4 b/gnulib/m4/hash.m4 new file mode 100644 index 0000000..1b1873c --- /dev/null +++ b/gnulib/m4/hash.m4 @@ -0,0 +1,13 @@ +# hash.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_HASH], +[ + AC_LIBOBJ([hash]) + + dnl Prerequisites of lib/hash.c. + AC_REQUIRE([AM_STDBOOL_H]) +]) diff --git a/gnulib/m4/human.m4 b/gnulib/m4/human.m4 new file mode 100644 index 0000000..72f2176 --- /dev/null +++ b/gnulib/m4/human.m4 @@ -0,0 +1,13 @@ +#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. + : +]) diff --git a/gnulib/m4/i-ring.m4 b/gnulib/m4/i-ring.m4 new file mode 100644 index 0000000..2c51225 --- /dev/null +++ b/gnulib/m4/i-ring.m4 @@ -0,0 +1,10 @@ +# serial 1 +dnl Copyright (C) 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_I_RING], +[ + AC_LIBOBJ([i-ring]) +]) diff --git a/gnulib/m4/iconv.m4 b/gnulib/m4/iconv.m4 new file mode 100644 index 0000000..32239e3 --- /dev/null +++ b/gnulib/m4/iconv.m4 @@ -0,0 +1,179 @@ +# iconv.m4 serial AM5 (gettext-0.16.2) +dnl Copyright (C) 2000-2002, 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 From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ + dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + AC_TRY_RUN([ +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 0; +}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) diff --git a/gnulib/m4/idcache.m4 b/gnulib/m4/idcache.m4 new file mode 100644 index 0000000..8bb2fc9 --- /dev/null +++ b/gnulib/m4/idcache.m4 @@ -0,0 +1,10 @@ +# 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]) +]) diff --git a/gnulib/m4/inline.m4 b/gnulib/m4/inline.m4 new file mode 100644 index 0000000..a07076c --- /dev/null +++ b/gnulib/m4/inline.m4 @@ -0,0 +1,40 @@ +# inline.m4 serial 3 +dnl Copyright (C) 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 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 +]) diff --git a/gnulib/m4/inttypes-pri.m4 b/gnulib/m4/inttypes-pri.m4 new file mode 100644 index 0000000..7c7f894 --- /dev/null +++ b/gnulib/m4/inttypes-pri.m4 @@ -0,0 +1,36 @@ +# inttypes-pri.m4 serial 4 (gettext-0.16) +dnl Copyright (C) 1997-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. + +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]) +]) diff --git a/gnulib/m4/inttypes.m4 b/gnulib/m4/inttypes.m4 new file mode 100644 index 0000000..095ace9 --- /dev/null +++ b/gnulib/m4/inttypes.m4 @@ -0,0 +1,223 @@ +# inttypes.m4 serial 8 +dnl Copyright (C) 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. + +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 */ +#include ABSOLUTE_INTTYPES_H + +/* 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]) + dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. + if test $ac_cv_header_inttypes_h = yes; then + gl_ABSOLUTE_HEADER([inttypes.h]) + ABSOLUTE_INTTYPES_H=\"$gl_cv_absolute_inttypes_h\" + else + ABSOLUTE_INTTYPES_H=\"no/such/file/inttypes.h\" + fi + AC_SUBST([ABSOLUTE_INTTYPES_H]) + + 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 + + INTTYPES_H='inttypes.h' + fi + AC_SUBST(INTTYPES_H) +]) + +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]) +]) diff --git a/gnulib/m4/lchown.m4 b/gnulib/m4/lchown.m4 new file mode 100644 index 0000000..a7b3572 --- /dev/null +++ b/gnulib/m4/lchown.m4 @@ -0,0 +1,19 @@ +#serial 11 + +dnl Copyright (C) 1998, 2001, 2003, 2004, 2005, 2006 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. + +dnl From Jim Meyering. +dnl Provide lchown on systems that lack it. + +AC_DEFUN([gl_FUNC_LCHOWN], +[ + AC_REQUIRE([AC_TYPE_UID_T]) + AC_REQUIRE([gl_FUNC_CHOWN]) + AC_CHECK_DECLS_ONCE([lchown]) + AC_REPLACE_FUNCS(lchown) +]) diff --git a/gnulib/m4/lib-ld.m4 b/gnulib/m4/lib-ld.m4 new file mode 100644 index 0000000..96c4e2c --- /dev/null +++ b/gnulib/m4/lib-ld.m4 @@ -0,0 +1,110 @@ +# lib-ld.m4 serial 3 (gettext-0.13) +dnl Copyright (C) 1996-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. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 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 +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) diff --git a/gnulib/m4/lib-link.m4 b/gnulib/m4/lib-link.m4 new file mode 100644 index 0000000..f157d98 --- /dev/null +++ b/gnulib/m4/lib-link.m4 @@ -0,0 +1,709 @@ +# lib-link.m4 serial 13 (gettext-0.16.2) +dnl Copyright (C) 2001-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 From Bruno Haible. + +AC_PREREQ(2.54) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl Autoconf >= 2.61 supports dots in --with options. + define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], +[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIB[]NAME[]_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/gnulib/m4/lib-prefix.m4 b/gnulib/m4/lib-prefix.m4 new file mode 100644 index 0000000..a8684e1 --- /dev/null +++ b/gnulib/m4/lib-prefix.m4 @@ -0,0 +1,185 @@ +# lib-prefix.m4 serial 5 (gettext-0.15) +dnl Copyright (C) 2001-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 From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing +dnl the basename of the libdir, either "lib" or "lib64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi +]) diff --git a/gnulib/m4/localcharset.m4 b/gnulib/m4/localcharset.m4 new file mode 100644 index 0000000..b2b7733 --- /dev/null +++ b/gnulib/m4/localcharset.m4 @@ -0,0 +1,16 @@ +# localcharset.m4 serial 5 +dnl Copyright (C) 2002, 2004, 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_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]) +]) diff --git a/gnulib/m4/locale-fr.m4 b/gnulib/m4/locale-fr.m4 new file mode 100644 index 0000000..a33f068 --- /dev/null +++ b/gnulib/m4/locale-fr.m4 @@ -0,0 +1,174 @@ +# locale-fr.m4 serial 6 (gettext-0.16.2) +dnl Copyright (C) 2003, 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 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, [ + macosx= +changequote(,)dnl + case "$host_os" in + darwin[56]*) ;; + darwin*) macosx=yes;; + esac +changequote([,])dnl + if test -n "$macosx"; then + # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8 + # encodings, but the kernel does not support them. 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." + # See the comments in config.charset. Therefore we bypass the test. + gt_cv_locale_fr=none + else + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +changequote(,)dnl +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +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. + 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. */ +#if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') 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* + fi + ]) + 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 +struct tm t; +char buf[16]; +int main () { + /* On BeOS, 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__) + /* 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. + 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. */ +# if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') 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]) +]) diff --git a/gnulib/m4/locale-tr.m4 b/gnulib/m4/locale-tr.m4 new file mode 100644 index 0000000..2286c18 --- /dev/null +++ b/gnulib/m4/locale-tr.m4 @@ -0,0 +1,82 @@ +# locale-tr.m4 serial 2 +dnl Copyright (C) 2003, 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 From Bruno Haible. + +dnl Determine the name of a turkish locale with UTF-8 encoding. +AC_DEFUN([gt_LOCALE_TR_UTF8], +[ + AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_CACHE_CHECK([for a turkish Unicode locale], gt_cv_locale_tr_utf8, [ + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +changequote(,)dnl +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +struct tm t; +char buf[16]; +int main () { + /* On BeOS, 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__) + /* 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. + On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. */ +# if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') return 1; +# endif + /* Check whether in the abbreviation of the eighth month, the second + character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) + return 1; + /* Check whether the upper-/lowercase mappings are as expected for + Turkish. */ + if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' + || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) + return 1; +#endif + 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=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr_TR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr_TR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr.UTF-8 + else + # None found. + gt_cv_locale_tr_utf8=none + fi + fi + fi + else + gt_cv_locale_tr_utf8=none + fi + rm -fr conftest* + ]) + LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 + AC_SUBST([LOCALE_TR_UTF8]) +]) diff --git a/gnulib/m4/locale-zh.m4 b/gnulib/m4/locale-zh.m4 new file mode 100644 index 0000000..187ad35 --- /dev/null +++ b/gnulib/m4/locale-zh.m4 @@ -0,0 +1,96 @@ +# locale-zh.m4 serial 2 +dnl Copyright (C) 2003, 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 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, [ + macosx= +changequote(,)dnl + case "$host_os" in + darwin[56]*) ;; + darwin*) macosx=yes;; + esac +changequote([,])dnl + if test -n "$macosx"; then + # On Darwin 7 (MacOS X), the libc supports some locales in non-UTF-8 + # encodings, but the kernel does not support them. 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." + # See the comments in config.charset. Therefore we bypass the test. + gt_cv_locale_zh_CN=none + else + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +changequote(,)dnl +#include +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +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. + 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. */ +#if HAVE_LANGINFO_CODESET + if (nl_langinfo (CODESET) [0] == '\0') 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* + fi + ]) + LOCALE_ZH_CN=$gt_cv_locale_zh_CN + AC_SUBST([LOCALE_ZH_CN]) +]) diff --git a/gnulib/m4/longlong.m4 b/gnulib/m4/longlong.m4 new file mode 100644 index 0000000..1f9e862 --- /dev/null +++ b/gnulib/m4/longlong.m4 @@ -0,0 +1,72 @@ +# longlong.m4 serial 10 +dnl Copyright (C) 1999-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 Paul Eggert. + +# Define HAVE_LONG_LONG_INT if 'long long int' works. +# This fixes a bug in Autoconf 2.60, but can be removed once we +# assume 2.61 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_LANG_PROGRAM( + [[long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + typedef int a[((-9223372036854775807LL < 0 + && 0 < 9223372036854775807ll) + ? 1 : -1)]; + int i = 63;]], + [[long long int llmax = 9223372036854775807ll; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll));]])], + [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 +]) + +# This macro is obsolescent and should go away soon. +AC_DEFUN([gl_AC_TYPE_LONG_LONG], +[ + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + ac_cv_type_long_long=$ac_cv_type_long_long_int + if test $ac_cv_type_long_long = yes; then + AC_DEFINE(HAVE_LONG_LONG, 1, + [Define if you have the 'long long' type.]) + fi +]) diff --git a/gnulib/m4/ls-mntd-fs.m4 b/gnulib/m4/ls-mntd-fs.m4 new file mode 100644 index 0000000..21ac4e7 --- /dev/null +++ b/gnulib/m4/ls-mntd-fs.m4 @@ -0,0 +1,337 @@ +#serial 26 +# How to list mounted file systems. + +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 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. + +dnl From Jim Meyering. +dnl +dnl This is not pretty. I've just taken the autoconf code and wrapped +dnl it in an AC_DEFUN and made some other fixes. +dnl + +# Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf +# through Autoconf 2.59. We can remove this once we assume Autoconf 2.60 +# or later. +AC_DEFUN([AC_FUNC_GETMNTENT], +[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, +# -lseq on Dynix/PTX, -lgen on Unixware. +AC_SEARCH_LIBS(getmntent, [sun seq gen]) +AC_CHECK_FUNCS(getmntent) +]) + +# gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS], + [ +AC_CHECK_FUNCS(listmntent getmntinfo) +AC_CHECK_HEADERS_ONCE(sys/param.h sys/statvfs.h) + +# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses +# NGROUPS (as the array dimension for a struct member) without a definition. +AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include ]) + +AC_CHECK_HEADERS(sys/mount.h, [], [], + [AC_INCLUDES_DEFAULT + [#if HAVE_SYS_PARAM_H + #include + #endif]]) + +AC_CHECK_HEADERS(mntent.h sys/fs_types.h) + getfsstat_includes="\ +$ac_includes_default +#if HAVE_SYS_PARAM_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_UCRED_H +# include /* needed for definition of NGROUPS */ +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_FS_TYPES_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +" +AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes]) + +# Determine how to get the list of mounted file systems. +ac_list_mounted_fs= + +# If the getmntent function is available but not in the standard library, +# make sure LIBS contains the appropriate -l option. +AC_FUNC_GETMNTENT + +# This test must precede the ones for getmntent because Unicos-9 is +# reported to have the getmntent function, but its support is incompatible +# with other getmntent implementations. + +# NOTE: Normally, I wouldn't use a check for system type as I've done for +# `CRAY' below since that goes against the whole autoconf philosophy. But +# I think there is too great a chance that some non-Cray system has a +# function named listmntent to risk the false positive. + +if test -z "$ac_list_mounted_fs"; then + # Cray UNICOS 9 + AC_MSG_CHECKING([for listmntent of Cray/Unicos-9]) + AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent, + [fu_cv_sys_mounted_cray_listmntent=no + AC_EGREP_CPP(yes, + [#ifdef _CRAY +yes +#endif + ], [test $ac_cv_func_listmntent = yes \ + && fu_cv_sys_mounted_cray_listmntent=yes] + ) + ] + ) + AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent) + if test $fu_cv_sys_mounted_cray_listmntent = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_LISTMNTENT, 1, + [Define if there is a function named listmntent that can be used to + list all mounted file systems. (UNICOS)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # AIX. + AC_MSG_CHECKING([for mntctl function and struct vmount]) + AC_CACHE_VAL(fu_cv_sys_mounted_vmount, + [AC_TRY_CPP([#include ], + fu_cv_sys_mounted_vmount=yes, + fu_cv_sys_mounted_vmount=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_vmount) + if test $fu_cv_sys_mounted_vmount = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_VMOUNT, 1, + [Define if there is a function named mntctl that can be used to read + the list of mounted file systems, and there is a system header file + that declares `struct vmount.' (AIX)]) + fi +fi + +if test $ac_cv_func_getmntent = yes; then + + # This system has the getmntent function. + # Determine whether it's the one-argument variant or the two-argument one. + + if test -z "$ac_list_mounted_fs"; then + # 4.3BSD, SunOS, HP-UX, Dynix, Irix + AC_MSG_CHECKING([for one-argument getmntent function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1, + [AC_TRY_COMPILE([ +/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ +#include + +#include +#if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ +# define MOUNTED MNT_MNTTAB +# endif +# if defined MNTTABNAME /* Dynix. */ +# define MOUNTED MNTTABNAME +# endif +#endif +], + [ struct mntent *mnt = 0; char *table = MOUNTED; + if (sizeof mnt && sizeof table) return 0;], + fu_cv_sys_mounted_getmntent1=yes, + fu_cv_sys_mounted_getmntent1=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) + if test $fu_cv_sys_mounted_getmntent1 = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTENT1, 1, + [Define if there is a function named getmntent for reading the list + of mounted file systems, and that function takes a single argument. + (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) + fi + fi + + if test -z "$ac_list_mounted_fs"; then + # SVR4 + AC_MSG_CHECKING([for two-argument getmntent function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2, + [AC_EGREP_HEADER(getmntent, sys/mnttab.h, + fu_cv_sys_mounted_getmntent2=yes, + fu_cv_sys_mounted_getmntent2=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2) + if test $fu_cv_sys_mounted_getmntent2 = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTENT2, 1, + [Define if there is a function named getmntent for reading the list of + mounted file systems, and that function takes two arguments. (SVR4)]) + AC_CHECK_FUNCS(hasmntopt) + fi + fi + +fi + +if test -z "$ac_list_mounted_fs"; then + # DEC Alpha running OSF/1, and Apple Darwin 1.3. + # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h + + AC_MSG_CHECKING([for getfsstat function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getfsstat, + [AC_TRY_LINK([ +#include +#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME +# define FS_TYPE(Ent) ((Ent).f_fstypename) +#else +# define FS_TYPE(Ent) mnt_names[(Ent).f_type] +#endif +]$getfsstat_includes +, + [struct statfs *stats; + int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); + char *t = FS_TYPE (*stats); ], + fu_cv_sys_mounted_getfsstat=yes, + fu_cv_sys_mounted_getfsstat=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_getfsstat) + if test $fu_cv_sys_mounted_getfsstat = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETFSSTAT, 1, + [Define if there is a function named getfsstat for reading the + list of mounted file systems. (DEC Alpha running OSF/1)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR3 + AC_MSG_CHECKING([for FIXME existence of three headers]) + AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp, + [AC_TRY_CPP([ +#include +#include +#include ], + fu_cv_sys_mounted_fread_fstyp=yes, + fu_cv_sys_mounted_fread_fstyp=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp) + if test $fu_cv_sys_mounted_fread_fstyp = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_FREAD_FSTYP, 1, + [Define if (like SVR2) there is no specific function for reading the + list of mounted file systems, and your system has these header files: + and . (SVR3)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + AC_MSG_CHECKING([for getmntinfo function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, + [ + test "$ac_cv_func_getmntinfo" = yes \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + ]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) + if test $fu_cv_sys_mounted_getmntinfo = yes; then + AC_MSG_CHECKING([whether getmntinfo returns statvfs structures]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo2, + [ + AC_TRY_COMPILE([ +#if HAVE_SYS_PARAM_H +# include +#endif +#include +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_STATVFS_H +# include +#endif +extern int getmntinfo (struct statfs **, int); + ], [], + [fu_cv_sys_mounted_getmntinfo2=no], + [fu_cv_sys_mounted_getmntinfo2=yes]) + ]) + AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo2]) + if test $fu_cv_sys_mounted_getmntinfo2 = no; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTINFO, 1, + [Define if there is a function named getmntinfo for reading the + list of mounted file systems and it returns an array of + 'struct statfs'. (4.4BSD, Darwin)]) + else + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNTINFO2, 1, + [Define if there is a function named getmntinfo for reading the + list of mounted file systems and it returns an array of + 'struct statvfs'. (NetBSD 3.0)]) + fi + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # Ultrix + AC_MSG_CHECKING([for getmnt function]) + AC_CACHE_VAL(fu_cv_sys_mounted_getmnt, + [AC_TRY_CPP([ +#include +#include ], + fu_cv_sys_mounted_getmnt=yes, + fu_cv_sys_mounted_getmnt=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_getmnt) + if test $fu_cv_sys_mounted_getmnt = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_GETMNT, 1, + [Define if there is a function named getmnt for reading the list of + mounted file systems. (Ultrix)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # BeOS + AC_CHECK_FUNCS(next_dev fs_stat_dev) + AC_CHECK_HEADERS(fs_info.h) + AC_MSG_CHECKING([for BEOS mounted file system support functions]) + if test $ac_cv_header_fs_info_h = yes \ + && test $ac_cv_func_next_dev = yes \ + && test $ac_cv_func_fs_stat_dev = yes; then + fu_result=yes + else + fu_result=no + fi + AC_MSG_RESULT($fu_result) + if test $fu_result = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_FS_STAT_DEV, 1, + [Define if there are functions named next_dev and fs_stat_dev for + reading the list of mounted file systems. (BeOS)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR2 + AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) + AC_CACHE_VAL(fu_cv_sys_mounted_fread, + [AC_TRY_CPP([#include ], + fu_cv_sys_mounted_fread=yes, + fu_cv_sys_mounted_fread=no)]) + AC_MSG_RESULT($fu_cv_sys_mounted_fread) + if test $fu_cv_sys_mounted_fread = yes; then + ac_list_mounted_fs=found + AC_DEFINE(MOUNTED_FREAD, 1, + [Define if there is no specific function for reading the list of + mounted file systems. fread will be used to read /etc/mnttab. + (SVR2) ]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + AC_MSG_ERROR([could not determine how to read list of mounted file systems]) + # FIXME -- no need to abort building the whole package + # Can't build mountlist.c or anything that needs its functions +fi + +AS_IF([test $ac_list_mounted_fs = found], [$1], [$2]) + + ]) diff --git a/gnulib/m4/lstat.m4 b/gnulib/m4/lstat.m4 new file mode 100644 index 0000000..b9777a6 --- /dev/null +++ b/gnulib/m4/lstat.m4 @@ -0,0 +1,17 @@ +#serial 16 + +# Copyright (C) 1997, 1998, 1999, 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_FUNC_LSTAT], +[ + AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK + dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat). + : +]) diff --git a/gnulib/m4/mbchar.m4 b/gnulib/m4/mbchar.m4 new file mode 100644 index 0000000..02f9eff --- /dev/null +++ b/gnulib/m4/mbchar.m4 @@ -0,0 +1,13 @@ +# mbchar.m4 serial 6 +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_GNU_SOURCE]) +]) diff --git a/gnulib/m4/mbiter.m4 b/gnulib/m4/mbiter.m4 new file mode 100644 index 0000000..7d51af1 --- /dev/null +++ b/gnulib/m4/mbiter.m4 @@ -0,0 +1,17 @@ +# mbiter.m4 serial 2 +dnl Copyright (C) 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 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". + AC_REQUIRE([gl_FUNC_MBRTOWC]) + : +]) diff --git a/gnulib/m4/mbrtowc.m4 b/gnulib/m4/mbrtowc.m4 new file mode 100644 index 0000000..a3bd911 --- /dev/null +++ b/gnulib/m4/mbrtowc.m4 @@ -0,0 +1,31 @@ +# mbrtowc.m4 serial 8 +dnl Copyright (C) 2001-2002, 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 From Paul Eggert + +dnl This file can be removed, and gl_FUNC_MBRTOWC replaced with +dnl AC_FUNC_MBRTOWC, when autoconf 2.60 can be assumed everywhere. + +AC_DEFUN([gl_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 +]) diff --git a/gnulib/m4/mbscasestr.m4 b/gnulib/m4/mbscasestr.m4 new file mode 100644 index 0000000..88f50c3 --- /dev/null +++ b/gnulib/m4/mbscasestr.m4 @@ -0,0 +1,16 @@ +# mbscasestr.m4 serial 1 +dnl Copyright (C) 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_FUNC_MBSCASESTR], +[ + gl_PREREQ_MBSCASESTR +]) + +# Prerequisites of lib/mbscasestr.c. +AC_DEFUN([gl_PREREQ_MBSCASESTR], [ + AC_REQUIRE([gl_FUNC_MBRTOWC]) + : +]) diff --git a/gnulib/m4/mbslen.m4 b/gnulib/m4/mbslen.m4 new file mode 100644 index 0000000..dad8a8c --- /dev/null +++ b/gnulib/m4/mbslen.m4 @@ -0,0 +1,16 @@ +# mbslen.m4 serial 1 +dnl Copyright (C) 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_FUNC_MBSLEN], +[ + gl_PREREQ_MBSLEN +]) + +# Prerequisites of lib/mbslen.c. +AC_DEFUN([gl_PREREQ_MBSLEN], [ + AC_REQUIRE([gl_FUNC_MBRTOWC]) + : +]) diff --git a/gnulib/m4/mbsstr.m4 b/gnulib/m4/mbsstr.m4 new file mode 100644 index 0000000..cec117f --- /dev/null +++ b/gnulib/m4/mbsstr.m4 @@ -0,0 +1,16 @@ +# mbsstr.m4 serial 1 +dnl Copyright (C) 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_FUNC_MBSSTR], +[ + gl_PREREQ_MBSSTR +]) + +# Prerequisites of lib/mbsstr.c. +AC_DEFUN([gl_PREREQ_MBSSTR], [ + AC_REQUIRE([gl_FUNC_MBRTOWC]) + : +]) diff --git a/gnulib/m4/mbstate_t.m4 b/gnulib/m4/mbstate_t.m4 new file mode 100644 index 0000000..df2a275 --- /dev/null +++ b/gnulib/m4/mbstate_t.m4 @@ -0,0 +1,30 @@ +# mbstate_t.m4 serial 9 +dnl Copyright (C) 2000, 2001, 2002 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_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]) diff --git a/gnulib/m4/memchr.m4 b/gnulib/m4/memchr.m4 new file mode 100644 index 0000000..91b8636 --- /dev/null +++ b/gnulib/m4/memchr.m4 @@ -0,0 +1,18 @@ +# memchr.m4 serial 4 +dnl Copyright (C) 2002, 2003, 2004 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_MEMCHR], +[ + AC_REPLACE_FUNCS(memchr) + if test $ac_cv_func_memchr = no; then + gl_PREREQ_MEMCHR + fi +]) + +# Prerequisites of lib/memchr.c. +AC_DEFUN([gl_PREREQ_MEMCHR], [ + AC_CHECK_HEADERS(bp-sym.h) +]) diff --git a/gnulib/m4/memcmp.m4 b/gnulib/m4/memcmp.m4 new file mode 100644 index 0000000..099b141 --- /dev/null +++ b/gnulib/m4/memcmp.m4 @@ -0,0 +1,19 @@ +# memcmp.m4 serial 12 +dnl Copyright (C) 2002, 2003, 2004, 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_FUNC_MEMCMP], +[ + AC_FUNC_MEMCMP + dnl Note: AC_FUNC_MEMCMP does AC_LIBOBJ(memcmp). + if test $ac_cv_func_memcmp_working = no; then + AC_DEFINE(memcmp, rpl_memcmp, + [Define to rpl_memcmp if the replacement function should be used.]) + gl_PREREQ_MEMCMP + fi +]) + +# Prerequisites of lib/memcmp.c. +AC_DEFUN([gl_PREREQ_MEMCMP], [:]) diff --git a/gnulib/m4/mempcpy.m4 b/gnulib/m4/mempcpy.m4 new file mode 100644 index 0000000..9e854e8 --- /dev/null +++ b/gnulib/m4/mempcpy.m4 @@ -0,0 +1,26 @@ +# mempcpy.m4 serial 7 +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_FUNC_MEMPCPY], +[ + dnl Persuade glibc to declare mempcpy(). + AC_REQUIRE([AC_GNU_SOURCE]) + + dnl The mempcpy() declaration in lib/string_.h uses 'restrict'. + AC_REQUIRE([AC_C_RESTRICT]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REPLACE_FUNCS(mempcpy) + if test $ac_cv_func_mempcpy = no; then + HAVE_MEMPCPY=0 + gl_PREREQ_MEMPCPY + fi +]) + +# Prerequisites of lib/mempcpy.c. +AC_DEFUN([gl_PREREQ_MEMPCPY], [ + : +]) diff --git a/gnulib/m4/memrchr.m4 b/gnulib/m4/memrchr.m4 new file mode 100644 index 0000000..69674ff --- /dev/null +++ b/gnulib/m4/memrchr.m4 @@ -0,0 +1,25 @@ +# memrchr.m4 serial 7 +dnl Copyright (C) 2002, 2003, 2005, 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_FUNC_MEMRCHR], +[ + dnl Persuade glibc to declare memrchr(). + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_DECLS_ONCE([memrchr]) + if test $ac_cv_have_decl_memrchr = no; then + HAVE_DECL_MEMRCHR=0 + fi + + AC_REPLACE_FUNCS(memrchr) + if test $ac_cv_func_memrchr = no; then + gl_PREREQ_MEMRCHR + fi +]) + +# Prerequisites of lib/memrchr.c. +AC_DEFUN([gl_PREREQ_MEMRCHR], [:]) diff --git a/gnulib/m4/memset.m4 b/gnulib/m4/memset.m4 new file mode 100644 index 0000000..14ac267 --- /dev/null +++ b/gnulib/m4/memset.m4 @@ -0,0 +1,18 @@ +# memset.m4 serial 2 +dnl Copyright (C) 2002 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_MEMSET], +[ + AC_REPLACE_FUNCS(memset) + if test $ac_cv_func_memset = no; then + gl_PREREQ_MEMSET + fi +]) + +# Prerequisites of lib/memset.c. +AC_DEFUN([gl_PREREQ_MEMSET], [ + : +]) diff --git a/gnulib/m4/mktime.m4 b/gnulib/m4/mktime.m4 new file mode 100644 index 0000000..5faf393 --- /dev/null +++ b/gnulib/m4/mktime.m4 @@ -0,0 +1,227 @@ +#serial 13 +dnl Copyright (C) 2002, 2003, 2005, 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. + +dnl From Jim Meyering. + +# Redefine AC_FUNC_MKTIME, to fix a bug in Autoconf 2.61a and earlier. +# This redefinition can be removed once a new version of Autoconf is assumed. +# The redefinition is taken from +# . +# AC_FUNC_MKTIME +# -------------- +AC_DEFUN([AC_FUNC_MKTIME], +[AC_CHECK_HEADERS_ONCE(unistd.h) +AC_CHECK_FUNCS_ONCE(alarm) +AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, +[AC_RUN_IFELSE([AC_LANG_SOURCE( +[[/* Test program from Paul Eggert and Tony Leneis. */ +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifndef HAVE_ALARM +# define alarm(X) /* empty */ +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (now) + time_t now; +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (now) + time_t now; +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (j) + int j; +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} + +int +main () +{ + time_t t, delta; + int i, j; + + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + alarm (60); + + for (;;) + { + t = (time_t_max << 1) + 1; + if (t <= time_t_max) + break; + time_t_max = t; + } + time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; + + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) + return 1; + if (! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + return 1; + + for (j = 1; ; j <<= 1) + if (! bigtime_test (j)) + return 1; + else if (INT_MAX / 2 < j) + break; + if (! bigtime_test (INT_MAX)) + return 1; + } + return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); +}]])], + [ac_cv_func_working_mktime=yes], + [ac_cv_func_working_mktime=no], + [ac_cv_func_working_mktime=no])]) +if test $ac_cv_func_working_mktime = no; then + AC_LIBOBJ([mktime]) +fi +])# AC_FUNC_MKTIME + +AC_DEFUN([gl_FUNC_MKTIME], +[ + AC_FUNC_MKTIME + dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ(mktime). + if test $ac_cv_func_working_mktime = no; then + AC_DEFINE(mktime, rpl_mktime, + [Define to rpl_mktime if the replacement function should be used.]) + gl_PREREQ_MKTIME + fi +]) + +# Prerequisites of lib/mktime.c. +AC_DEFUN([gl_PREREQ_MKTIME], +[ + AC_REQUIRE([AC_C_INLINE]) +]) diff --git a/gnulib/m4/modechange.m4 b/gnulib/m4/modechange.m4 new file mode 100644 index 0000000..3b23955 --- /dev/null +++ b/gnulib/m4/modechange.m4 @@ -0,0 +1,10 @@ +# modechange.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_MODECHANGE], +[ + AC_LIBOBJ([modechange]) +]) diff --git a/gnulib/m4/mountlist.m4 b/gnulib/m4/mountlist.m4 new file mode 100644 index 0000000..c25f44e --- /dev/null +++ b/gnulib/m4/mountlist.m4 @@ -0,0 +1,23 @@ +#serial 9 +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_MOUNTLIST], +[ + gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes], + [gl_cv_list_mounted_fs=no]) + if test $gl_cv_list_mounted_fs = yes; then + AC_LIBOBJ(mountlist) + gl_PREREQ_MOUNTLIST_EXTRA + fi +]) + +# Prerequisites of lib/mountlist.c not done by gl_LIST_MOUNTED_FILE_SYSTEMS. +AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA], +[ + dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h. + AC_CHECK_HEADERS(sys/mntent.h) + gl_FSTYPENAME +]) diff --git a/gnulib/m4/nls.m4 b/gnulib/m4/nls.m4 new file mode 100644 index 0000000..7967cc2 --- /dev/null +++ b/gnulib/m4/nls.m4 @@ -0,0 +1,31 @@ +# nls.m4 serial 3 (gettext-0.15) +dnl Copyright (C) 1995-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. +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) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) +]) diff --git a/gnulib/m4/onceonly_2_57.m4 b/gnulib/m4/onceonly_2_57.m4 new file mode 100644 index 0000000..15884b3 --- /dev/null +++ b/gnulib/m4/onceonly_2_57.m4 @@ -0,0 +1,86 @@ +# onceonly_2_57.m4 serial 4 +dnl Copyright (C) 2002-2003, 2005-2006 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 This is like onceonly.m4, except that it uses diversions to named sections +dnl DEFAULTS and INIT_PREPARE in order to check all requested headers at once, +dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The +dnl size reduction is ca. 9%. + +dnl Autoconf version 2.57 or newer is recommended. +AC_PREREQ(2.57) + +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ + : + AC_FOREACH([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], [ + : + AC_FOREACH([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], [ + : + AC_FOREACH([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])) + ]) +]) diff --git a/gnulib/m4/openat.m4 b/gnulib/m4/openat.m4 new file mode 100644 index 0000000..43f46d0 --- /dev/null +++ b/gnulib/m4/openat.m4 @@ -0,0 +1,90 @@ +#serial 15 +# See if we need to use our replacement for Solaris' openat et al functions. + +dnl Copyright (C) 2004, 2005, 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. + +# Written by Jim Meyering. + +AC_DEFUN([gl_FUNC_OPENAT], +[ + AC_LIBOBJ([openat-proc]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([lchmod]) + AC_CHECK_FUNCS_ONCE([fdopendir]) + AC_REPLACE_FUNCS([fchmodat mkdirat openat]) + case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in + yes+yes) ;; + yes+*) AC_LIBOBJ([fstatat]);; + *) + AC_DEFINE([__OPENAT_PREFIX], [[rpl_]], + [Define to rpl_ if the openat replacement function should be used.]) + gl_PREREQ_OPENAT;; + esac + gl_FUNC_FCHOWNAT +]) + +# gl_FUNC_FCHOWNAT_DEREF_BUG([ACTION-IF-BUGGY[, ACTION-IF-NOT_BUGGY]]) +AC_DEFUN([gl_FUNC_FCHOWNAT_DEREF_BUG], +[ + AC_CACHE_CHECK([whether fchownat works with AT_SYMLINK_NOFOLLOW], + gl_cv_func_fchownat_nofollow_works, + [ + gl_dangle=conftest.dangle + # Remove any remnants of a previous test. + rm -f $gl_dangle + # Arrange for deletion of the temporary file this test creates. + ac_clean_files="$ac_clean_files $gl_dangle" + ln -s conftest.no-such $gl_dangle + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ +#include +#include +#include +#include +#include +int +main () +{ + return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), + AT_SYMLINK_NOFOLLOW) != 0 + && errno == ENOENT); +} + ]])], + [gl_cv_func_fchownat_nofollow_works=yes], + [gl_cv_func_fchownat_nofollow_works=no], + [gl_cv_func_fchownat_nofollow_works=no], + ) + ]) + AS_IF([test $gl_cv_func_fchownat_nofollow_works = no], [$1], [$2]) +]) + +# If we have the fchownat function, and it has the bug (in glibc-2.4) +# that it dereferences symlinks even with AT_SYMLINK_NOFOLLOW, then +# use the replacement function. +# Also use the replacement function if fchownat is simply not available. +AC_DEFUN([gl_FUNC_FCHOWNAT], +[ + # Assume we'll use the replacement function. + # The only case in which we won't is when we have fchownat, and it works. + use_replacement_fchownat=yes + + AC_CHECK_FUNC([fchownat], [have_fchownat=yes], [have_fchownat=no]) + if test $have_fchownat = yes; then + gl_FUNC_FCHOWNAT_DEREF_BUG([], [use_replacement_fchownat=no]) + fi + + if test $use_replacement_fchownat = yes; then + AC_LIBOBJ(fchownat) + AC_DEFINE(fchownat, rpl_fchownat, + [Define to rpl_fchownat if the replacement function should be used.]) + fi +]) + +AC_DEFUN([gl_PREREQ_OPENAT], +[ + : +]) diff --git a/gnulib/m4/pathmax.m4 b/gnulib/m4/pathmax.m4 new file mode 100644 index 0000000..64bf26f --- /dev/null +++ b/gnulib/m4/pathmax.m4 @@ -0,0 +1,11 @@ +# pathmax.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_PATHMAX], +[ + dnl Prerequisites of lib/pathmax.h. + AC_CHECK_HEADERS_ONCE(sys/param.h) +]) diff --git a/gnulib/m4/po.m4 b/gnulib/m4/po.m4 new file mode 100644 index 0000000..00133ef --- /dev/null +++ b/gnulib/m4/po.m4 @@ -0,0 +1,428 @@ +# po.m4 serial 13 (gettext-0.15) +dnl Copyright (C) 1995-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 +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 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]) + + 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" <, 1996. + +AC_PREREQ(2.50) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# 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 + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) diff --git a/gnulib/m4/quote.m4 b/gnulib/m4/quote.m4 new file mode 100644 index 0000000..0f08791 --- /dev/null +++ b/gnulib/m4/quote.m4 @@ -0,0 +1,13 @@ +# 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) +]) diff --git a/gnulib/m4/quotearg.m4 b/gnulib/m4/quotearg.m4 new file mode 100644 index 0000000..db635d0 --- /dev/null +++ b/gnulib/m4/quotearg.m4 @@ -0,0 +1,15 @@ +# quotearg.m4 serial 6 +dnl Copyright (C) 2002, 2004, 2005, 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_QUOTEARG], +[ + AC_LIBOBJ([quotearg]) + + dnl Prerequisites of lib/quotearg.c. + AC_CHECK_FUNCS_ONCE([mbsinit]) + AC_TYPE_MBSTATE_T + gl_FUNC_MBRTOWC +]) diff --git a/gnulib/m4/readlink.m4 b/gnulib/m4/readlink.m4 new file mode 100644 index 0000000..1c347a0 --- /dev/null +++ b/gnulib/m4/readlink.m4 @@ -0,0 +1,29 @@ +# readlink.m4 serial 4 +dnl Copyright (C) 2003, 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_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], +[ + : +]) diff --git a/gnulib/m4/regex.m4 b/gnulib/m4/regex.m4 new file mode 100644 index 0000000..b8d5b1e --- /dev/null +++ b/gnulib/m4/regex.m4 @@ -0,0 +1,211 @@ +#serial 46 + +# Copyright (C) 1996, 1997, 1998, 1999, 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 Initially derived from code in GNU grep. +dnl Mostly written by Jim Meyering. + +AC_PREREQ([2.50]) + +AC_DEFUN([gl_REGEX], +[ + AC_CHECK_HEADERS_ONCE([locale.h]) + + AC_ARG_WITH([included-regex], + [AC_HELP_STRING([--without-included-regex], + [don't compile regex; this is the default on 32-bit + systems with recent-enough versions of the GNU C + Library (use with caution on other systems). + On systems with 64-bit ptrdiff_t and 32-bit int, + --with-included-regex is the default, in case + regex functions operate on very long strings (>2GB)])]) + + case $with_included_regex in #( + yes|no) ac_use_included_regex=$with_included_regex + ;; + '') + # If the system regex support is good enough that it passes the + # following run test, then default to *not* using the included regex.c. + # If cross compiling, assume the test would fail and use the included + # regex.c. + AC_CACHE_CHECK([for working re_compile_pattern], + [gl_cv_func_re_compile_pattern_working], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT + #if HAVE_LOCALE_H + #include + #endif + #include + #include + ], + [[static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; + const char *s; + struct re_registers regs; + + #if HAVE_LOCALE_H + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ + if (setlocale (LC_ALL, "en_US.UTF-8")) + { + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + return 1; + if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + return 1; + if (! setlocale (LC_ALL, "C")) + return 1; + } + #endif + + /* This test is from glibc bug 3957, reported by Andrew Mackey. */ + re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[^x]b", 6, ®ex); + if (s) + return 1; + + /* This should fail, but succeeds for glibc-2.5. */ + if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) + return 1; + + /* This regular expression is from Spencer ere test number 75 + in grep-2.3. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); + /* This should fail with _Invalid character class name_ error. */ + if (!s) + return 1; + + /* This should succeed, but does not for glibc-2.1.3. */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("{1", 2, ®ex); + + if (s) + return 1; + + /* The following example is derived from a problem report + against gawk from Jorge Stolfi . */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[an\371]*n", 7, ®ex); + if (s) + return 1; + + /* This should match, but does not for glibc-2.2.1. */ + if (re_match (®ex, "an", 2, 0, ®s) != 2) + return 1; + + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + return 1; + + /* glibc-2.2.93 does not work with a negative RANGE argument. */ + if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) + return 1; + + /* The version of regex.c in older versions of gnulib + ignored RE_ICASE. Detect that problem too. */ + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + return 1; + + if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) + return 1; + + /* REG_STARTEND was added to glibc on 2004-01-15. + Reject older versions. */ + if (! REG_STARTEND) + return 1; + + /* Reject hosts whose regoff_t values are too narrow. + These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t + and 32-bit int. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) + return 1; + + return 0;]])], + [gl_cv_func_re_compile_pattern_working=yes], + [gl_cv_func_re_compile_pattern_working=no], + dnl When crosscompiling, assume it is not working. + [gl_cv_func_re_compile_pattern_working=no])]) + case $gl_cv_func_re_compile_pattern_working in #( + yes) ac_use_included_regex=no;; #( + no) ac_use_included_regex=yes;; + esac + ;; + *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) + ;; + esac + + if test $ac_use_included_regex = yes; then + AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, + [Define if you want regoff_t to be at least as wide POSIX requires.]) + AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], + [Define to rpl_re_syntax_options if the replacement should be used.]) + AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], + [Define to rpl_re_set_syntax if the replacement should be used.]) + AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], + [Define to rpl_re_compile_pattern if the replacement should be used.]) + AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], + [Define to rpl_re_compile_fastmap if the replacement should be used.]) + AC_DEFINE([re_search], [rpl_re_search], + [Define to rpl_re_search if the replacement should be used.]) + AC_DEFINE([re_search_2], [rpl_re_search_2], + [Define to rpl_re_search_2 if the replacement should be used.]) + AC_DEFINE([re_match], [rpl_re_match], + [Define to rpl_re_match if the replacement should be used.]) + AC_DEFINE([re_match_2], [rpl_re_match_2], + [Define to rpl_re_match_2 if the replacement should be used.]) + AC_DEFINE([re_set_registers], [rpl_re_set_registers], + [Define to rpl_re_set_registers if the replacement should be used.]) + AC_DEFINE([re_comp], [rpl_re_comp], + [Define to rpl_re_comp if the replacement should be used.]) + AC_DEFINE([re_exec], [rpl_re_exec], + [Define to rpl_re_exec if the replacement should be used.]) + AC_DEFINE([regcomp], [rpl_regcomp], + [Define to rpl_regcomp if the replacement should be used.]) + AC_DEFINE([regexec], [rpl_regexec], + [Define to rpl_regexec if the replacement should be used.]) + AC_DEFINE([regerror], [rpl_regerror], + [Define to rpl_regerror if the replacement should be used.]) + AC_DEFINE([regfree], [rpl_regfree], + [Define to rpl_regfree if the replacement should be used.]) + AC_LIBOBJ([regex]) + gl_PREREQ_REGEX + fi +]) + +# Prerequisites of lib/regex.c and lib/regex_internal.c. +AC_DEFUN([gl_PREREQ_REGEX], +[ + AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([AC_C_RESTRICT]) + AC_CHECK_FUNCS_ONCE([iswctype mbrtowc wcrtomb wcscoll]) + AC_CHECK_DECLS([isblank], [], [], [#include ]) +]) diff --git a/gnulib/m4/rpmatch.m4 b/gnulib/m4/rpmatch.m4 new file mode 100644 index 0000000..4a471ac --- /dev/null +++ b/gnulib/m4/rpmatch.m4 @@ -0,0 +1,16 @@ +# rpmatch.m4 serial 5 +dnl Copyright (C) 2002, 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_FUNC_RPMATCH], +[ + AC_REPLACE_FUNCS(rpmatch) + if test $ac_cv_func_rpmatch = no; then + gl_PREREQ_RPMATCH + fi +]) + +# Prerequisites of lib/rpmatch.c. +AC_DEFUN([gl_PREREQ_RPMATCH], [:]) diff --git a/gnulib/m4/save-cwd.m4 b/gnulib/m4/save-cwd.m4 new file mode 100644 index 0000000..7a2286b --- /dev/null +++ b/gnulib/m4/save-cwd.m4 @@ -0,0 +1,12 @@ +#serial 8 +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_SAVE_CWD], +[ + AC_LIBOBJ([save-cwd]) + dnl Prerequisites for lib/save-cwd.c. + AC_CHECK_FUNCS_ONCE(fchdir) +]) diff --git a/gnulib/m4/savedir.m4 b/gnulib/m4/savedir.m4 new file mode 100644 index 0000000..1fc6c81 --- /dev/null +++ b/gnulib/m4/savedir.m4 @@ -0,0 +1,10 @@ +# savedir.m4 serial 9 +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_SAVEDIR], +[ + AC_LIBOBJ([savedir]) +]) diff --git a/gnulib/m4/setenv.m4 b/gnulib/m4/setenv.m4 new file mode 100644 index 0000000..d6901de --- /dev/null +++ b/gnulib/m4/setenv.m4 @@ -0,0 +1,82 @@ +# setenv.m4 serial 8 +dnl Copyright (C) 2001-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_FUNC_SETENV], +[ + AC_CHECK_FUNCS_ONCE([setenv]) + if test $ac_cv_func_setenv = no; then + AC_LIBOBJ([setenv]) + gl_PREREQ_SETENV + fi +]) + +# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ). +AC_DEFUN([gl_FUNC_SETENV_SEPARATE], +[ + AC_CHECK_FUNCS_ONCE([setenv]) + gl_PREREQ_SETENV +]) + +AC_DEFUN([gl_FUNC_UNSETENV], +[ + AC_CHECK_FUNCS([unsetenv]) + if test $ac_cv_func_unsetenv = no; then + AC_LIBOBJ([unsetenv]) + gl_PREREQ_UNSETENV + else + AC_CACHE_CHECK([for unsetenv() return type], gt_cv_func_unsetenv_ret, + [AC_TRY_COMPILE([#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +int unsetenv (const char *name); +#else +int unsetenv(); +#endif +], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')]) + if test $gt_cv_func_unsetenv_ret = 'void'; then + AC_DEFINE(VOID_UNSETENV, 1, [Define if unsetenv() returns void, not int.]) + fi + fi +]) + +# Check if a variable is properly declared. +# gt_CHECK_VAR_DECL(includes,variable) +AC_DEFUN([gt_CHECK_VAR_DECL], +[ + define([gt_cv_var], [gt_cv_var_]$2[_declaration]) + AC_MSG_CHECKING([if $2 is properly declared]) + AC_CACHE_VAL(gt_cv_var, [ + AC_TRY_COMPILE([$1 + extern struct { int foo; } $2;], + [$2.foo = 1;], + gt_cv_var=no, + gt_cv_var=yes)]) + AC_MSG_RESULT($gt_cv_var) + if test $gt_cv_var = yes; then + AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1, + [Define if you have the declaration of $2.]) + fi +]) + +# Prerequisites of lib/setenv.c. +AC_DEFUN([gl_PREREQ_SETENV], +[ + AC_REQUIRE([AC_FUNC_ALLOCA]) + AC_CHECK_HEADERS_ONCE(unistd.h) + AC_CHECK_HEADERS(search.h) + AC_CHECK_FUNCS(tsearch) + gt_CHECK_VAR_DECL([#include ], environ) +]) + +# Prerequisites of lib/unsetenv.c. +AC_DEFUN([gl_PREREQ_UNSETENV], +[ + AC_CHECK_HEADERS_ONCE(unistd.h) + gt_CHECK_VAR_DECL([#include ], environ) +]) diff --git a/gnulib/m4/ssize_t.m4 b/gnulib/m4/ssize_t.m4 new file mode 100644 index 0000000..4eaef93 --- /dev/null +++ b/gnulib/m4/ssize_t.m4 @@ -0,0 +1,21 @@ +# 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 +]) diff --git a/gnulib/m4/st_dm_mode.m4 b/gnulib/m4/st_dm_mode.m4 new file mode 100644 index 0000000..c1da154 --- /dev/null +++ b/gnulib/m4/st_dm_mode.m4 @@ -0,0 +1,22 @@ +#serial 4 + +# Copyright (C) 1998, 1999, 2001 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. + +# Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member. + +AC_DEFUN([AC_STRUCT_ST_DM_MODE], + [AC_CACHE_CHECK([for st_dm_mode in struct stat], ac_cv_struct_st_dm_mode, + [AC_TRY_COMPILE([#include +#include ], [struct stat s; s.st_dm_mode;], + ac_cv_struct_st_dm_mode=yes, + ac_cv_struct_st_dm_mode=no)]) + + if test $ac_cv_struct_st_dm_mode = yes; then + AC_DEFINE(HAVE_ST_DM_MODE, 1, + [Define if struct stat has an st_dm_mode member. ]) + fi + ] +) diff --git a/gnulib/m4/stat-time.m4 b/gnulib/m4/stat-time.m4 new file mode 100644 index 0000000..84dc26f --- /dev/null +++ b/gnulib/m4/stat-time.m4 @@ -0,0 +1,85 @@ +# Checks for stat-related time functions. + +# Copyright (C) 1998, 1999, 2001, 2003, 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 Paul Eggert. + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + +AC_DEFUN([gl_STAT_TIME], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + + AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], + [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], + [AC_TRY_COMPILE( + [ + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + ], + [ + st.st_atim = ts; + ], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], 1, + [Define to 1 if the type of the st_atim member of a struct stat is + struct timespec.]) + fi], + [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], + [#include + #include ])], + [#include + #include ])], + [#include + #include ])], + [#include + #include ]) +]) + +# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.) +# and NTFS (Cygwin). +# There was a time when this field was named st_createtime (21 June +# 2002 to 16 July 2002) But that window is very small and applied only +# to development code, so systems still using that configuration are +# not supported. See revisions 1.10 and 1.11 of FreeBSD's +# src/sys/ufs/ufs/dinode.h. +# +AC_DEFUN([gl_STAT_BIRTHTIME], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [], + [#include + #include ])], + [#include + #include ])], + [#include + #include ]) +]) diff --git a/gnulib/m4/stdbool.m4 b/gnulib/m4/stdbool.m4 new file mode 100644 index 0000000..2204ecd --- /dev/null +++ b/gnulib/m4/stdbool.m4 @@ -0,0 +1,115 @@ +# Check for stdbool.h that conforms to C99. + +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. + +# 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]) diff --git a/gnulib/m4/stdint.m4 b/gnulib/m4/stdint.m4 new file mode 100644 index 0000000..659ca85 --- /dev/null +++ b/gnulib/m4/stdint.m4 @@ -0,0 +1,369 @@ +# stdint.m4 serial 23 +dnl Copyright (C) 2001-2002, 2004-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 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]) + + dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h. + if test $ac_cv_header_stdint_h = yes; then + gl_ABSOLUTE_HEADER([stdint.h]) + ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\" + HAVE_STDINT_H=1 + else + ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\" + HAVE_STDINT_H=0 + fi + AC_SUBST([ABSOLUTE_STDINT_H]) + AC_SUBST([HAVE_STDINT_H]) + + dnl Now see whether we need a substitute . Use + dnl ABSOLUTE_STDINT_H, not , so that it also works during + dnl a "config.status --recheck" if a stdint.h has been + dnl created in the build directory. + 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([gl_STDINT_INCLUDES + [ +#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 */ +#include ABSOLUTE_STDINT_H +#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; +struct s { + int check_PTRDIFF: PTRDIFF_MIN < (ptrdiff_t) 0 && (ptrdiff_t) 0 < PTRDIFF_MAX ? 1 : -1; + int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= (sig_atomic_t) 0 && (sig_atomic_t) 0 < SIG_ATOMIC_MAX ? 1 : -1; + int check_SIZE: (size_t) 0 < SIZE_MAX ? 1 : -1; + int check_WCHAR: WCHAR_MIN <= (wchar_t) 0 && (wchar_t) 0 < WCHAR_MAX ? 1 : -1; + int check_WINT: WINT_MIN <= (wint_t) 0 && (wint_t) 0 < WINT_MAX ? 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]) + + 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. + AC_FOREACH([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 + AC_FOREACH([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. + AC_FOREACH([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 + AC_FOREACH([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. + AC_FOREACH([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 + AC_FOREACH([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 + #include + #include + #include +]]) + +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_.h. +AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], +[ + gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_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 + gl_INTEGER_TYPE_SUFFIX([ptrdiff_t sig_atomic_t size_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: diff --git a/gnulib/m4/stdio-safer.m4 b/gnulib/m4/stdio-safer.m4 new file mode 100644 index 0000000..3d71452 --- /dev/null +++ b/gnulib/m4/stdio-safer.m4 @@ -0,0 +1,15 @@ +#serial 10 +dnl Copyright (C) 2002, 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. + +AC_DEFUN([gl_FOPEN_SAFER], +[ + AC_LIBOBJ([fopen-safer]) +]) + +AC_DEFUN([gl_TMPFILE_SAFER], +[ + AC_LIBOBJ([tmpfile-safer]) +]) diff --git a/gnulib/m4/stdlib_h.m4 b/gnulib/m4/stdlib_h.m4 new file mode 100644 index 0000000..d46a5f0 --- /dev/null +++ b/gnulib/m4/stdlib_h.m4 @@ -0,0 +1,31 @@ +# stdlib_h.m4 serial 1 +dnl Copyright (C) 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_STDLIB_H], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + gl_ABSOLUTE_HEADER([stdlib.h]) + ABSOLUTE_STDLIB_H=\"$gl_cv_absolute_stdlib_h\" + AC_SUBST([ABSOLUTE_STDLIB_H]) +]) + +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_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) + GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) + GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) + HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) + REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) +]) diff --git a/gnulib/m4/stpcpy.m4 b/gnulib/m4/stpcpy.m4 new file mode 100644 index 0000000..c48aa9c --- /dev/null +++ b/gnulib/m4/stpcpy.m4 @@ -0,0 +1,26 @@ +# stpcpy.m4 serial 4 +dnl Copyright (C) 2002, 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_FUNC_STPCPY], +[ + dnl Persuade glibc to declare stpcpy(). + AC_REQUIRE([AC_GNU_SOURCE]) + + dnl The stpcpy() declaration in lib/string_.h uses 'restrict'. + AC_REQUIRE([AC_C_RESTRICT]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REPLACE_FUNCS(stpcpy) + if test $ac_cv_func_stpcpy = no; then + HAVE_STPCPY=0 + gl_PREREQ_STPCPY + fi +]) + +# Prerequisites of lib/stpcpy.c. +AC_DEFUN([gl_PREREQ_STPCPY], [ + : +]) diff --git a/gnulib/m4/strdup.m4 b/gnulib/m4/strdup.m4 new file mode 100644 index 0000000..8796e9e --- /dev/null +++ b/gnulib/m4/strdup.m4 @@ -0,0 +1,22 @@ +# strdup.m4 serial 9 + +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_FUNC_STRDUP], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REPLACE_FUNCS(strdup) + AC_CHECK_DECLS_ONCE(strdup) + if test $ac_cv_have_decl_strdup = no; then + HAVE_DECL_STRDUP=0 + fi + gl_PREREQ_STRDUP +]) + +# Prerequisites of lib/strdup.c. +AC_DEFUN([gl_PREREQ_STRDUP], [:]) diff --git a/gnulib/m4/strftime.m4 b/gnulib/m4/strftime.m4 new file mode 100644 index 0000000..70b5378 --- /dev/null +++ b/gnulib/m4/strftime.m4 @@ -0,0 +1,33 @@ +#serial 29 + +# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 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 Jim Meyering and Paul Eggert. + +AC_DEFUN([gl_FUNC_GNU_STRFTIME], +[ + gl_FUNC_STRFTIME +]) + +# These are the prerequisite macros for GNU's strftime.c replacement. +AC_DEFUN([gl_FUNC_STRFTIME], +[ + AC_LIBOBJ([strftime]) + + # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. + AC_REQUIRE([AC_STRUCT_TIMEZONE]) + + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + AC_REQUIRE([gl_TM_GMTOFF]) + + AC_CHECK_FUNCS_ONCE(mblen mbrlen mempcpy tzset) + AC_CHECK_HEADERS_ONCE(wchar.h) + + AC_DEFINE([my_strftime], [nstrftime], + [Define to the name of the strftime replacement function.]) +]) diff --git a/gnulib/m4/string_h.m4 b/gnulib/m4/string_h.m4 new file mode 100644 index 0000000..f706d49 --- /dev/null +++ b/gnulib/m4/string_h.m4 @@ -0,0 +1,78 @@ +# Configure a GNU-like 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. + +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_ABSOLUTE_HEADER([string.h]) + ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\" + AC_SUBST([ABSOLUTE_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_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_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) + GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) + GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) + 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]) + 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_STPCPY=1; AC_SUBST([HAVE_STPCPY]) + HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) + HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) + HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) + 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]) +]) diff --git a/gnulib/m4/strndup.m4 b/gnulib/m4/strndup.m4 new file mode 100644 index 0000000..baa6c03 --- /dev/null +++ b/gnulib/m4/strndup.m4 @@ -0,0 +1,53 @@ +# strndup.m4 serial 13 +dnl Copyright (C) 2002-2003, 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. + +AC_DEFUN([gl_FUNC_STRNDUP], +[ + dnl Persuade glibc to declare strndup(). + AC_REQUIRE([AC_GNU_SOURCE]) + + 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], [:]) diff --git a/gnulib/m4/strnlen.m4 b/gnulib/m4/strnlen.m4 new file mode 100644 index 0000000..0e2815b --- /dev/null +++ b/gnulib/m4/strnlen.m4 @@ -0,0 +1,31 @@ +# strnlen.m4 serial 8 +dnl Copyright (C) 2002-2003, 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. + +AC_DEFUN([gl_FUNC_STRNLEN], +[ + dnl Persuade glibc to declare strnlen(). + AC_REQUIRE([AC_GNU_SOURCE]) + + 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 doens'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], [:]) diff --git a/gnulib/m4/strtoimax.m4 b/gnulib/m4/strtoimax.m4 new file mode 100644 index 0000000..9957637 --- /dev/null +++ b/gnulib/m4/strtoimax.m4 @@ -0,0 +1,34 @@ +# strtoimax.m4 serial 6 +dnl Copyright (C) 2002, 2003, 2004, 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_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], + jm_cv_func_strtoimax_macro, + [AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include +#ifdef strtoimax + inttypes_h_defines_strtoimax +#endif], + jm_cv_func_strtoimax_macro=yes, + jm_cv_func_strtoimax_macro=no)]) + + if test "$jm_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]) +]) diff --git a/gnulib/m4/strtol.m4 b/gnulib/m4/strtol.m4 new file mode 100644 index 0000000..7fbae60 --- /dev/null +++ b/gnulib/m4/strtol.m4 @@ -0,0 +1,10 @@ +# strtol.m4 serial 4 +dnl Copyright (C) 2002, 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. + +AC_DEFUN([gl_FUNC_STRTOL], +[ + AC_REPLACE_FUNCS(strtol) +]) diff --git a/gnulib/m4/strtoll.m4 b/gnulib/m4/strtoll.m4 new file mode 100644 index 0000000..53cbed2 --- /dev/null +++ b/gnulib/m4/strtoll.m4 @@ -0,0 +1,23 @@ +# strtoll.m4 serial 4 +dnl Copyright (C) 2002, 2004, 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_FUNC_STRTOLL], +[ + 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 + gl_PREREQ_STRTOLL + fi + fi +]) + +# Prerequisites of lib/strtoll.c. +AC_DEFUN([gl_PREREQ_STRTOLL], [ + : +]) diff --git a/gnulib/m4/strtoul.m4 b/gnulib/m4/strtoul.m4 new file mode 100644 index 0000000..5ec54aa --- /dev/null +++ b/gnulib/m4/strtoul.m4 @@ -0,0 +1,10 @@ +# strtoul.m4 serial 3 +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_FUNC_STRTOUL], +[ + AC_REPLACE_FUNCS(strtoul) +]) diff --git a/gnulib/m4/strtoull.m4 b/gnulib/m4/strtoull.m4 new file mode 100644 index 0000000..fcec3de --- /dev/null +++ b/gnulib/m4/strtoull.m4 @@ -0,0 +1,23 @@ +# strtoull.m4 serial 4 +dnl Copyright (C) 2002, 2004, 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_FUNC_STRTOULL], +[ + 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 + gl_PREREQ_STRTOULL + fi + fi +]) + +# Prerequisites of lib/strtoull.c. +AC_DEFUN([gl_PREREQ_STRTOULL], [ + : +]) diff --git a/gnulib/m4/strtoumax.m4 b/gnulib/m4/strtoumax.m4 new file mode 100644 index 0000000..1935250 --- /dev/null +++ b/gnulib/m4/strtoumax.m4 @@ -0,0 +1,34 @@ +# strtoumax.m4 serial 6 +dnl Copyright (C) 2002, 2003, 2004, 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_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], + jm_cv_func_strtoumax_macro, + [AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include +#ifdef strtoumax + inttypes_h_defines_strtoumax +#endif], + jm_cv_func_strtoumax_macro=yes, + jm_cv_func_strtoumax_macro=no)]) + + if test "$jm_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]) +]) diff --git a/gnulib/m4/sys_stat_h.m4 b/gnulib/m4/sys_stat_h.m4 new file mode 100644 index 0000000..2283138 --- /dev/null +++ b/gnulib/m4/sys_stat_h.m4 @@ -0,0 +1,50 @@ +# sys_stat_h.m4 serial 5 -*- Autoconf -*- +dnl Copyright (C) 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. + +dnl From Eric Blake. +dnl Test whether contains lstat and mkdir or must be substituted. + +AC_DEFUN([gl_HEADER_SYS_STAT_H], +[ + 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 Check for mkdir. Mingw has _mkdir(name) in the nonstandard + dnl instead. + AC_CHECK_DECLS([mkdir], + [], + [AC_CHECK_HEADERS([io.h])], + [#include ]) + if test $ac_cv_have_decl_mkdir = yes; then + HAVE_DECL_MKDIR=1 + else + HAVE_DECL_MKDIR=0 + fi + AC_SUBST([HAVE_DECL_MKDIR]) + if test "$ac_cv_header_io_h" = yes; then + HAVE_IO_H=1 + else + HAVE_IO_H=0 + fi + AC_SUBST([HAVE_IO_H]) + AC_REQUIRE([AC_C_INLINE]) + + dnl Check for broken stat macros. + AC_REQUIRE([AC_HEADER_STAT]) + + gl_ABSOLUTE_HEADER([sys/stat.h]) + ABSOLUTE_SYS_STAT_H=\"$gl_cv_absolute_sys_stat_h\" + AC_SUBST([ABSOLUTE_SYS_STAT_H]) + SYS_STAT_H='sys/stat.h' + AC_SUBST([SYS_STAT_H]) +]) # gl_HEADER_SYS_STAT_H diff --git a/gnulib/m4/sys_time_h.m4 b/gnulib/m4/sys_time_h.m4 new file mode 100644 index 0000000..b38e1bc --- /dev/null +++ b/gnulib/m4/sys_time_h.m4 @@ -0,0 +1,61 @@ +# 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]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + + if test $ac_cv_header_sys_time_h = yes; then + gl_ABSOLUTE_HEADER([sys/time.h]) + ABSOLUTE_SYS_TIME_H=\"$gl_cv_absolute_sys_time_h\" + HAVE_SYS_TIME_H=1 + else + ABSOLUTE_SYS_TIME_H=\"no/such/file/sys/time.h\" + HAVE_SYS_TIME_H=0 + fi + AC_SUBST([ABSOLUTE_SYS_TIME_H]) + 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]) +]) diff --git a/gnulib/m4/time_h.m4 b/gnulib/m4/time_h.m4 new file mode 100644 index 0000000..e90ed7a --- /dev/null +++ b/gnulib/m4/time_h.m4 @@ -0,0 +1,76 @@ +# 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_ABSOLUTE_HEADER([time.h]) + ABSOLUTE_TIME_H=\"$gl_cv_absolute_time_h\" + AC_SUBST([ABSOLUTE_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_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]) +]) diff --git a/gnulib/m4/time_r.m4 b/gnulib/m4/time_r.m4 new file mode 100644 index 0000000..dbb6396 --- /dev/null +++ b/gnulib/m4/time_r.m4 @@ -0,0 +1,41 @@ +dnl Reentrant time functions like localtime_r. + +dnl Copyright (C) 2003, 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. + +dnl Written by Paul Eggert. + +AC_DEFUN([gl_TIME_R], +[ + dnl Persuade glibc and Solaris to declare localtime_r. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) + + AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], + [gl_cv_time_r_posix], + [AC_TRY_COMPILE( + [#include ], + [/* We don't need to append 'restrict's to the argument types, + even though the POSIX signature has the 'restrict's, + since C99 says they can't affect type compatibility. */ + struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; + if (ptr) return 0;], + [gl_cv_time_r_posix=yes], + [gl_cv_time_r_posix=no])]) + if test $gl_cv_time_r_posix = yes; then + REPLACE_LOCALTIME_R=0 + else + REPLACE_LOCALTIME_R=1 + AC_LIBOBJ([time_r]) + gl_PREREQ_TIME_R + fi +]) + +# Prerequisites of lib/time_r.c. +AC_DEFUN([gl_PREREQ_TIME_R], [ + : +]) diff --git a/gnulib/m4/timespec.m4 b/gnulib/m4/timespec.m4 new file mode 100644 index 0000000..36f1238 --- /dev/null +++ b/gnulib/m4/timespec.m4 @@ -0,0 +1,16 @@ +#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]) +]) diff --git a/gnulib/m4/tm_gmtoff.m4 b/gnulib/m4/tm_gmtoff.m4 new file mode 100644 index 0000000..cb0b3c8 --- /dev/null +++ b/gnulib/m4/tm_gmtoff.m4 @@ -0,0 +1,14 @@ +# tm_gmtoff.m4 serial 2 +dnl Copyright (C) 2002 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_TM_GMTOFF], +[ + AC_CHECK_MEMBER([struct tm.tm_gmtoff], + [AC_DEFINE(HAVE_TM_GMTOFF, 1, + [Define if struct tm has the tm_gmtoff member.])], + , + [#include ]) +]) diff --git a/gnulib/m4/ulonglong.m4 b/gnulib/m4/ulonglong.m4 new file mode 100644 index 0000000..9fae98e --- /dev/null +++ b/gnulib/m4/ulonglong.m4 @@ -0,0 +1,48 @@ +# ulonglong.m4 serial 6 +dnl Copyright (C) 1999-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 Paul Eggert. + +# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. +# This fixes a bug in Autoconf 2.60, but can be removed once we +# assume 2.61 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_LANG_PROGRAM( + [[unsigned long long int ull = 18446744073709551615ULL; + typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63;]], + [[unsigned long long int ullmax = 18446744073709551615ull; + return (ull << 63 | ull >> 63 | ull << i | ull >> i + | ullmax / ull | ullmax % ull);]])], + [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 +]) + +# This macro is obsolescent and should go away soon. +AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the 'unsigned long long' type.]) + fi +]) diff --git a/gnulib/m4/unistd-safer.m4 b/gnulib/m4/unistd-safer.m4 new file mode 100644 index 0000000..09adf93 --- /dev/null +++ b/gnulib/m4/unistd-safer.m4 @@ -0,0 +1,13 @@ +#serial 8 +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_UNISTD_SAFER], +[ + AC_CHECK_FUNCS_ONCE([pipe]) + AC_LIBOBJ([dup-safer]) + AC_LIBOBJ([fd-safer]) + AC_LIBOBJ([pipe-safer]) +]) diff --git a/gnulib/m4/unistd_h.m4 b/gnulib/m4/unistd_h.m4 new file mode 100644 index 0000000..60dd730 --- /dev/null +++ b/gnulib/m4/unistd_h.m4 @@ -0,0 +1,55 @@ +# unistd_h.m4 serial 7 +dnl Copyright (C) 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. + +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]) + + AC_CHECK_HEADERS_ONCE([unistd.h]) + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + gl_ABSOLUTE_HEADER([unistd.h]) + ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\" + else + HAVE_UNISTD_H=0 + fi + AC_SUBST([HAVE_UNISTD_H]) + AC_SUBST([ABSOLUTE_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_DUP2=0; AC_SUBST([GNULIB_DUP2]) + GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) + GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) + GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) + GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) + GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) + GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) + GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) + HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) + HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) + HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) + HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) + REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) + REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR]) + REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) + REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) +]) diff --git a/gnulib/m4/wchar.m4 b/gnulib/m4/wchar.m4 new file mode 100644 index 0000000..068f22d --- /dev/null +++ b/gnulib/m4/wchar.m4 @@ -0,0 +1,29 @@ +dnl A placeholder for ISO C99 , for platforms that have issues. + +dnl Copyright (C) 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 Written by Eric Blake. + +# wchar.m4 serial 1 + +AC_DEFUN([gl_WCHAR_H], +[ + 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])]) + if test $gl_cv_header_wchar_h_standalone = yes; then + WCHAR_H= + else + gl_ABSOLUTE_HEADER([wchar.h]) + ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\" + WCHAR_H=wchar.h + fi + AC_SUBST([ABSOLUTE_WCHAR_H]) + AC_SUBST([WCHAR_H]) +]) diff --git a/gnulib/m4/wchar_t.m4 b/gnulib/m4/wchar_t.m4 new file mode 100644 index 0000000..cde2129 --- /dev/null +++ b/gnulib/m4/wchar_t.m4 @@ -0,0 +1,20 @@ +# wchar_t.m4 serial 1 (gettext-0.12) +dnl Copyright (C) 2002-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. + +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 +]) diff --git a/gnulib/m4/wctype.m4 b/gnulib/m4/wctype.m4 new file mode 100644 index 0000000..a56834d --- /dev/null +++ b/gnulib/m4/wctype.m4 @@ -0,0 +1,47 @@ +dnl A placeholder for ISO C99 , for platforms that lack it. + +dnl Copyright (C) 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. + +dnl Written by Paul Eggert. + +AC_DEFUN([gl_WCTYPE_H], +[ + 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 + WCTYPE_H= + fi + dnl Compute ABSOLUTE_WCTYPE_H even if WCTYPE_H is empty, + dnl for the benefit of builds from non-distclean directories. + gl_ABSOLUTE_HEADER([wctype.h]) + ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\" + HAVE_WCTYPE_H=1 + else + ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\" + HAVE_WCTYPE_H=0 + fi + AC_SUBST([ABSOLUTE_WCTYPE_H]) + AC_SUBST([HAVE_WCTYPE_H]) + AC_SUBST([WCTYPE_H]) +]) diff --git a/gnulib/m4/wcwidth.m4 b/gnulib/m4/wcwidth.m4 new file mode 100644 index 0000000..b483499 --- /dev/null +++ b/gnulib/m4/wcwidth.m4 @@ -0,0 +1,30 @@ +# wcwidth.m4 serial 8 +dnl Copyright (C) 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_FUNC_WCWIDTH], +[ + dnl Persuade glibc to declare wcwidth(). + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_REQUIRE([AC_C_INLINE]) + 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 +])]) diff --git a/gnulib/m4/wint_t.m4 b/gnulib/m4/wint_t.m4 new file mode 100644 index 0000000..2cac1a7 --- /dev/null +++ b/gnulib/m4/wint_t.m4 @@ -0,0 +1,28 @@ +# wint_t.m4 serial 2 (gettext-0.16.2) +dnl Copyright (C) 2003, 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 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 +]) diff --git a/gnulib/m4/xalloc.m4 b/gnulib/m4/xalloc.m4 new file mode 100644 index 0000000..837a948 --- /dev/null +++ b/gnulib/m4/xalloc.m4 @@ -0,0 +1,24 @@ +# 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], [ + : +]) diff --git a/gnulib/m4/xgetcwd.m4 b/gnulib/m4/xgetcwd.m4 new file mode 100644 index 0000000..d8609d1 --- /dev/null +++ b/gnulib/m4/xgetcwd.m4 @@ -0,0 +1,12 @@ +#serial 6 +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_XGETCWD], +[ + AC_LIBOBJ([xgetcwd]) + + AC_REQUIRE([gl_FUNC_GETCWD]) +]) diff --git a/gnulib/m4/xstrndup.m4 b/gnulib/m4/xstrndup.m4 new file mode 100644 index 0000000..8a30ab1 --- /dev/null +++ b/gnulib/m4/xstrndup.m4 @@ -0,0 +1,15 @@ +# 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], [ + : +]) diff --git a/gnulib/m4/xstrtod.m4 b/gnulib/m4/xstrtod.m4 new file mode 100644 index 0000000..625e19c --- /dev/null +++ b/gnulib/m4/xstrtod.m4 @@ -0,0 +1,17 @@ +#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. + +# Prerequisites of lib/xstrtod.c. +AC_DEFUN([gl_XSTRTOD], +[ + AC_LIBOBJ([xstrtod]) +]) + +# Prerequisites of lib/xstrtold.c. +AC_DEFUN([gl_XSTRTOLD], +[ + AC_LIBOBJ([xstrtold]) +]) diff --git a/gnulib/m4/xstrtol.m4 b/gnulib/m4/xstrtol.m4 new file mode 100644 index 0000000..cd5a549 --- /dev/null +++ b/gnulib/m4/xstrtol.m4 @@ -0,0 +1,11 @@ +#serial 9 +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_XSTRTOL], +[ + AC_LIBOBJ([xstrtol]) + AC_LIBOBJ([xstrtoul]) +]) diff --git a/gnulib/m4/yesno.m4 b/gnulib/m4/yesno.m4 new file mode 100644 index 0000000..3506217 --- /dev/null +++ b/gnulib/m4/yesno.m4 @@ -0,0 +1,13 @@ +# yesno.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_YESNO], +[ + AC_LIBOBJ([yesno]) + + dnl No prerequisites of lib/yesno.c. + : +]) diff --git a/import-gnulib.config b/import-gnulib.config new file mode 100644 index 0000000..b3b1db0 --- /dev/null +++ b/import-gnulib.config @@ -0,0 +1,29 @@ +# What version of gnulib to use? +gnulib_version="2007-05-26" + +destdir="gnulib" + +# Random extra gnulib files needed for findutils. +extra_files=' +build-aux/config.guess +build-aux/config.sub +build-aux/depcomp +build-aux/install-sh +build-aux/mdate-sh +build-aux/mkinstalldirs +build-aux/missing +build-aux/texinfo.tex +' + +# Modules needed for findutils. +# We need regex to ensure that we can build on platforms like +# Solaris which lack those functions. +modules="\ +alloca argmatch dirname error fchdir fileblocks fnmatch-gnu fopen-safer fts \ +getdate getline getopt human idcache inline lstat malloc \ +mbscasestr mbsstr memcmp memset mktime \ +modechange pathmax quotearg realloc regex rpmatch savedir \ +stpcpy strdup strftime c-strstr strtol strtoul strtoull strtoumax \ +xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno human filemode \ +getline stpcpy canonicalize mountlist closeout gettext stat-macros stat-time \ +sys_stat timespec verify wcwidth xstrtod" diff --git a/import-gnulib.sh b/import-gnulib.sh new file mode 100644 index 0000000..3872f03 --- /dev/null +++ b/import-gnulib.sh @@ -0,0 +1,248 @@ +#! /bin/sh +# +# import-gnulib.sh -- imports a copy of gnulib into findutils +# Copyright (C) 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 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. +# +########################################################################## +# +# This script is intended to populate the "gnulib" directory +# with a subset of the gnulib code, as provided by "gnulib-tool". +# +# To use it, just run this script with the top-level sourec directory +# as your working directory. + +# If CDPATH is set, it will sometimes print the name of the directory +# to which you have moved. Unsetting CDPATH prevents this, as does +# prefixing it with ".". +unset CDPATH + +## Defaults +# cvsdir=/doesnotexist +configfile="./import-gnulib.config" +need_checkout=yes + + +usage() { + cat >&2 <&2 + exit 1 + fi + + + if ! [ -d "$cvsdir" ] ; then + if mkdir "$cvsdir" ; then + echo "Created $cvsdir" + else + echo "Failed to create $cvsdir" >&2 + exit 1 + fi + fi + + # Decide if gnulib_version is probably a date or probably a tag. + if date -d yesterday >/dev/null ; then + # It looks like GNU date is available + if date -d "$gnulib_version" >/dev/null ; then + # Looks like a date. + cvs_sticky_option="-D" + else + echo "Warning: assuming $gnulib_version is a CVS tag rather than a date" >&2 + cvs_sticky_option="-r" + fi + else + # GNU date unavailable, assume the version is a date + cvs_sticky_option="-D" + fi + + + + ( + # Change directory unconditionally (rater than using checkout -d) so that + # cvs does not pick up defaults from ./CVS. Those defaults refer to our + # own CVS repository for our code, not to gnulib. + cd $cvsdir + if test -d gnulib/CVS ; then + cd gnulib + cmd=update + root="" # use previous + else + root="-d :pserver:anonymous@cvs.sv.gnu.org:/sources/gnulib" + cmd=checkout + args=gnulib + fi + set -x + cvs -q -z3 $root $cmd $cvs_sticky_option "$gnulib_version" $args + set +x + ) +} + +run_gnulib_tool() { + local tool="$1" + if test -f "$tool" + then + true + else + echo "$tool does not exist, did you specify the right directory?" >&2 + exit 1 + fi + + if test -x "$tool" + then + true + else + echo "$tool is not executable" >&2 + exit 1 + fi + + + if [ -d gnulib ] + then + echo "Warning: directory gnulib already exists, removing it." >&2 + rm -rf gnulib + fi + mkdir gnulib + + set -x + if "$tool" --import --symlink --with-tests --dir=. --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 $modules + then + set +x + else + set +x + echo "$tool failed, exiting." >&2 + exit 1 + fi +} + + +hack_gnulib_tool_output() { + local gnulibdir="${1}" + for file in $extra_files; do + case $file in + */mdate-sh | */texinfo.tex) dest=doc;; + *) dest=build-aux;; + esac + cp -fp "${gnulibdir}"/"$file" "$dest" || exit + done + + + + + cat > gnulib/Makefile.am < "${outfile}".new < /dev/null ; then + rm "${outfile}".new + return 0 + fi + fi + mv "${outfile}".new "${outfile}" +} + + +main() { + ## Option parsing + local gnulibdir=/doesnotexist + while getopts "d:a" opt + do + case "$opt" in + d) gnulibdir="$OPTARG" ; need_checkout=no ;; + a) refresh_output_files ; exit $? ;; + **) usage; exit 1;; + esac + done + + # We need the config file to tell us which modules + # to use, even if we don't want to know the CVS version. + . $configfile || exit 1 + + ## If -d was not given, do CVS checkout/update + if [ $need_checkout = yes ] ; then + do_checkout gnulib-cvs + gnulibdir=gnulib-cvs/gnulib + else + echo "Warning: using gnulib code which already exists in $gnulibdir" >&2 + fi + + ## Invoke gnulib-tool to import the code. + local tool="${gnulibdir}"/gnulib-tool + + if run_gnulib_tool "${tool}" && + hack_gnulib_tool_output "${gnulibdir}" && + refresh_output_files && + update_version_file ; then + echo Done. + else + echo FAILED >&2 + exit 1 + fi +} + +main "$@" diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000..e900bf3 --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,44 @@ +## Process this file with automake to produce Makefile.in. + +AUTOMAKE_OPTIONS = 1.5 gnits +# no-dependencies + +noinst_LIBRARIES = libfind.a + +if CROSS_COMPILING +# The regexprops program needs to be a native executable, so we +# can't build it with a cross-compiler. +else +noinst_PROGRAMS = regexprops +regexprops_SOURCES = regexprops.c regextype.c +endif + +libfind_a_SOURCES = gnulib-version.c +EXTRA_DIST = modetype.h wait.h extendbuf.h savedirinfo.h buildcmd.h \ + gnulib-version.h gnulib-version.c +BUILT_SOURCES = gnulib-version.c +SUFFIXES = +MOSTLYCLEANFILES = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = + + +INCLUDES = -I../gnulib/lib -I$(top_srcdir)/gnulib/lib +LDADD = ../gnulib/lib/libgnulib.a @INTLLIBS@ + +libfind_a_SOURCES += modetype.h nextelem.h printquoted.h listfile.h \ + regextype.h dircallback.h +libfind_a_SOURCES += listfile.c nextelem.c extendbuf.c buildcmd.c savedirinfo.c \ + forcefindlib.c qmark.c printquoted.c regextype.c dircallback.c + +EXTRA_DIST += waitpid.c forcefindlib.c + + +libfind_a_LIBADD = @FINDLIBOBJS@ +libfind_a_DEPENDENCIES = @FINDLIBOBJS@ +# libfind_la_LIBADD = @LTFINDLIBOBJS@ + +# libfind_a_OBJECTS += @FINDLIBOBJS@ +# libfind_la_OBJECTS += @LTFINDLIBOBJS@ + diff --git a/lib/Makefile.in b/lib/Makefile.in new file mode 100644 index 0000000..92c547c --- /dev/null +++ b/lib/Makefile.in @@ -0,0 +1,767 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@CROSS_COMPILING_FALSE@noinst_PROGRAMS = regexprops$(EXEEXT) +subdir = lib +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +libfind_a_AR = $(AR) $(ARFLAGS) +am_libfind_a_OBJECTS = gnulib-version.$(OBJEXT) listfile.$(OBJEXT) \ + nextelem.$(OBJEXT) extendbuf.$(OBJEXT) buildcmd.$(OBJEXT) \ + savedirinfo.$(OBJEXT) forcefindlib.$(OBJEXT) qmark.$(OBJEXT) \ + printquoted.$(OBJEXT) regextype.$(OBJEXT) \ + dircallback.$(OBJEXT) +libfind_a_OBJECTS = $(am_libfind_a_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +am__regexprops_SOURCES_DIST = regexprops.c regextype.c +@CROSS_COMPILING_FALSE@am_regexprops_OBJECTS = regexprops.$(OBJEXT) \ +@CROSS_COMPILING_FALSE@ regextype.$(OBJEXT) +regexprops_OBJECTS = $(am_regexprops_OBJECTS) +regexprops_LDADD = $(LDADD) +regexprops_DEPENDENCIES = ../gnulib/lib/libgnulib.a +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = $(libfind_a_SOURCES) $(regexprops_SOURCES) +DIST_SOURCES = $(libfind_a_SOURCES) $(am__regexprops_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = -I../gnulib/lib -I$(top_srcdir)/gnulib/lib +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = 1.5 gnits +# no-dependencies +noinst_LIBRARIES = libfind.a +@CROSS_COMPILING_FALSE@regexprops_SOURCES = regexprops.c regextype.c +libfind_a_SOURCES = gnulib-version.c modetype.h nextelem.h \ + printquoted.h listfile.h regextype.h dircallback.h listfile.c \ + nextelem.c extendbuf.c buildcmd.c savedirinfo.c forcefindlib.c \ + qmark.c printquoted.c regextype.c dircallback.c +EXTRA_DIST = modetype.h wait.h extendbuf.h savedirinfo.h buildcmd.h \ + gnulib-version.h gnulib-version.c waitpid.c forcefindlib.c +BUILT_SOURCES = gnulib-version.c +SUFFIXES = +MOSTLYCLEANFILES = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = +LDADD = ../gnulib/lib/libgnulib.a @INTLLIBS@ +libfind_a_LIBADD = @FINDLIBOBJS@ +libfind_a_DEPENDENCIES = @FINDLIBOBJS@ +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libfind.a: $(libfind_a_OBJECTS) $(libfind_a_DEPENDENCIES) + -rm -f libfind.a + $(libfind_a_AR) libfind.a $(libfind_a_OBJECTS) $(libfind_a_LIBADD) + $(RANLIB) libfind.a + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) +regexprops$(EXEEXT): $(regexprops_OBJECTS) $(regexprops_DEPENDENCIES) + @rm -f regexprops$(EXEEXT) + $(LINK) $(regexprops_OBJECTS) $(regexprops_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buildcmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dircallback.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extendbuf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/forcefindlib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnulib-version.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nextelem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printquoted.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qmark.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexprops.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regextype.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savedirinfo.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) $(PROGRAMS) +installdirs: +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: + -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) + -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-am + +clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + +# libfind_la_LIBADD = @LTFINDLIBOBJS@ + +# libfind_a_OBJECTS += @FINDLIBOBJS@ +# libfind_la_OBJECTS += @LTFINDLIBOBJS@ +# 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/buildcmd.c b/lib/buildcmd.c new file mode 100644 index 0000000..dd38e1d --- /dev/null +++ b/lib/buildcmd.c @@ -0,0 +1,552 @@ +/* buildcmd.c -- build command lines from a list of arguments. + Copyright (C) 1990, 91, 92, 93, 94, 2000, 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 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. +*/ + +/* + XXX_SOC: + + One of the aspects of the SOC project is to adapt this module. + This module currently makes an initial guess at two things: + + buildcmd_control->arg_max (The most characters we can fit in) + buildcmd_control->max_arg_count (most args) + + The nature of the SOC task is to adjust these values when exec fails. + Optionally (if we have the time) we can make the software adjust them + when exec succeeds. If we do the latter, we need to ensure we don't + get into some state where we are sitting just below the limit and + keep trying to extend, because that would lead to every other exec + failing. + + If our initial guess is successful, there is no pressing need really to + increase our guess. Indeed, if we are beign called by xargs (as opposed + to find) th user may have specified a limit with "-s" and we should not + exceed it. +*/ + + +#include + +# ifndef PARAMS +# if defined PROTOTYPES || (defined __STDC__ && __STDC__) +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +# endif + +#include + + +#if DO_MULTIBYTE +# if HAVE_MBRLEN +# include +# else + /* Simulate mbrlen with mblen as best we can. */ +# define mbstate_t int +# define mbrlen(s, n, ps) mblen (s, n) +# endif +#endif + +#ifdef HAVE_LOCALE_H +#include +#endif +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + +#ifndef _POSIX_SOURCE +#include +#endif + +#ifdef HAVE_LIMITS_H +#include +#endif + +/* The presence of unistd.h is assumed by gnulib these days, so we + * might as well assume it too. + */ +/* for sysconf() */ +#include + +#include + +/* COMPAT: SYSV version defaults size (and has a max value of) to 470. + We try to make it as large as possible. See bc_get_arg_max() below. */ +#if !defined(ARG_MAX) && defined(NCARGS) +#error "You have an unusual system. Once you remove this error message from buildcmd.c, it should work, but please make sure that DejaGnu is installed on your system and that 'make check' passes before using the findutils programs" +#define ARG_MAX NCARGS +#endif + + + +#include +#include +#include + +#include "buildcmd.h" + + +extern char **environ; + + +/* Replace all instances of `replace_pat' in ARG with `linebuf', + and add the resulting string to the list of arguments for the command + to execute. + ARGLEN is the length of ARG, not including the null. + LBLEN is the length of LINEBUF, not including the null. + PFXLEN is the length of PREFIX. Substitution is not performed on + the prefix. The prefix is used if the argument contains replace_pat. + + COMPAT: insertions on the SYSV version are limited to 255 chars per line, + and a max of 5 occurrences of replace_pat in the initial-arguments. + Those restrictions do not exist here. */ + +void +bc_do_insert (const struct buildcmd_control *ctl, + struct buildcmd_state *state, + char *arg, size_t arglen, + const char *prefix, size_t pfxlen, + const char *linebuf, size_t lblen, + int initial_args) +{ + /* Temporary copy of each arg with the replace pattern replaced by the + real arg. */ + static char *insertbuf; + char *p; + size_t bytes_left = ctl->arg_max - 1; /* Bytes left on the command line. */ + + /* XXX: on systems lacking an upper limit for exec args, ctl->arg_max + * may have been set to LONG_MAX (see bc_get_arg_max()). Hence + * this xmalloc call may be a bad idea, especially since we are + * adding 1 to it... + */ + if (!insertbuf) + insertbuf = (char *) xmalloc (ctl->arg_max + 1); + p = insertbuf; + + do + { + size_t len; /* Length in ARG before `replace_pat'. */ + char *s = mbsstr (arg, ctl->replace_pat); + if (s) + { + len = s - arg; + } + else + { + len = arglen; + } + + if (bytes_left <= len) + break; + else + bytes_left -= len; + + strncpy (p, arg, len); + p += len; + arg += len; + arglen -= len; + + if (s) + { + if (bytes_left <= (lblen + pfxlen)) + break; + else + bytes_left -= (lblen + pfxlen); + + if (prefix) + { + strcpy (p, prefix); + p += pfxlen; + } + strcpy (p, linebuf); + p += lblen; + + arg += ctl->rplen; + arglen -= ctl->rplen; + } + } + while (*arg); + if (*arg) + error (1, 0, _("command too long")); + *p++ = '\0'; + + bc_push_arg (ctl, state, + insertbuf, p - insertbuf, + NULL, 0, + initial_args); +} + +static +void do_exec(const struct buildcmd_control *ctl, + struct buildcmd_state *state) +{ + /* XXX_SOC: + + Here we are calling the user's function. Currently there is no + way for it to report that the argument list was too long. We + should introduce an externally callable function that allows them + to report this. + + If the callee does report that the exec failed, we need to retry + the exec with a shorter argument list. Once we have reduced the + argument list to the point where the exec can succeed, we need to + preserve the list of arguments we couldn't exec this time. + + This also means that the control argument here probably needs not + to be const (since the limits are in the control arg). + + The caller's only requirement on do_exec is that it should + free up enough room for at least one argument. + */ + (ctl->exec_callback)(ctl, state); +} + + +/* Return nonzero if there would not be enough room for an additional + * argument. We check the total number of arguments only, not the space + * occupied by those arguments. + * + * If we return zero, there still may not be enough room for the next + * argument, depending on its length. + */ +static int +bc_argc_limit_reached(int initial_args, + const struct buildcmd_control *ctl, + struct buildcmd_state *state) +{ + /* Check to see if we about to exceed a limit set by xargs' -n option */ + if (!initial_args && ctl->args_per_exec && + ( (state->cmd_argc - ctl->initial_argc) == ctl->args_per_exec)) + return 1; + + /* We deliberately use an equality test here rather than >= in order + * to force a software failure if the code is modified in such a way + * that it fails to call this function for every new argument. + */ + return state->cmd_argc == ctl->max_arg_count; +} + + +/* Add ARG to the end of the list of arguments `cmd_argv' to pass + to the command. + LEN is the length of ARG, including the terminating null. + If this brings the list up to its maximum size, execute the command. +*/ +/* XXX: sometimes this function is called (internally) + * just to push a NULL onto the and of the arg list. + * We should probably do that with a separate function + * for greater clarity. + */ +void +bc_push_arg (const struct buildcmd_control *ctl, + struct buildcmd_state *state, + const char *arg, size_t len, + const char *prefix, size_t pfxlen, + int initial_args) +{ + if (!initial_args) + { + state->todo = 1; + } + + if (arg) + { + /* XXX_SOC: if do_exec() is only guaranteeed to free up one + * argument, this if statement may need to become a while loop. + * If it becomes a while loop, it needs not to be an infinite + * loop... + */ + if (state->cmd_argv_chars + len > ctl->arg_max) + { + if (initial_args || state->cmd_argc == ctl->initial_argc) + error (1, 0, _("can not fit single argument within argument list size limit")); + /* xargs option -i (replace_pat) implies -x (exit_if_size_exceeded) */ + if (ctl->replace_pat + || (ctl->exit_if_size_exceeded && + (ctl->lines_per_exec || ctl->args_per_exec))) + error (1, 0, _("argument list too long")); + do_exec (ctl, state); + } + /* XXX_SOC: this if may also need to become a while loop. In + fact perhaps it is best to factor this out into a separate + function which ceeps calling the exec handler until there is + space for our next argument. Each exec will free one argc + "slot" so the main thing to worry about repeated exec calls + for would be total argument length. + */ + if (bc_argc_limit_reached(initial_args, ctl, state)) + do_exec (ctl, state); + } + + if (state->cmd_argc >= state->cmd_argv_alloc) + { + /* XXX: we could use extendbuf() here. */ + if (!state->cmd_argv) + { + state->cmd_argv_alloc = 64; + state->cmd_argv = (char **) xmalloc (sizeof (char *) * state->cmd_argv_alloc); + } + else + { + state->cmd_argv_alloc *= 2; + state->cmd_argv = (char **) xrealloc (state->cmd_argv, + sizeof (char *) * state->cmd_argv_alloc); + } + } + + if (!arg) + state->cmd_argv[state->cmd_argc++] = NULL; + else + { + state->cmd_argv[state->cmd_argc++] = state->argbuf + state->cmd_argv_chars; + if (prefix) + { + strcpy (state->argbuf + state->cmd_argv_chars, prefix); + state->cmd_argv_chars += pfxlen; + } + + strcpy (state->argbuf + state->cmd_argv_chars, arg); + state->cmd_argv_chars += len; + + /* If we have now collected enough arguments, + * do the exec immediately. This must be + * conditional on arg!=NULL, since do_exec() + * actually calls bc_push_arg(ctl, state, NULL, 0, false). + */ + if (bc_argc_limit_reached(initial_args, ctl, state)) + do_exec (ctl, state); + } + + /* If this is an initial argument, set the high-water mark. */ + if (initial_args) + { + state->cmd_initial_argv_chars = state->cmd_argv_chars; + } +} + +#if 0 +/* We used to set posix_arg_size_min to the LINE_MAX limit, but + * currently we use _POSIX_ARG_MAX (which is the minimum value). + */ +static size_t +get_line_max(void) +{ + long val; +#ifdef _SC_LINE_MAX + val = sysconf(_SC_LINE_MAX); +#else + val = -1; +#endif + + if (val > 0) + return val; + + /* either _SC_LINE_MAX was not available or + * there is no particular limit. + */ +#ifdef LINE_MAX + val = LINE_MAX; +#endif + + if (val > 0) + return val; + + return 2048L; /* a reasonable guess. */ +} +#endif + +size_t +bc_get_arg_max(void) +{ + long val; + + /* We may resort to using LONG_MAX, so check it fits. */ + /* XXX: better to do a compile-time check */ + assert( (~(size_t)0) >= LONG_MAX); + +#ifdef _SC_ARG_MAX + val = sysconf(_SC_ARG_MAX); +#else + val = -1; +#endif + + if (val > 0) + return val; + + /* either _SC_ARG_MAX was not available or + * there is no particular limit. + */ +#ifdef ARG_MAX + val = ARG_MAX; +#endif + + if (val > 0) + return val; + + /* The value returned by this function bounds the + * value applied as the ceiling for the -s option. + * Hence it the system won't tell us what its limit + * is, we allow the user to specify more or less + * whatever value they like. + */ + return LONG_MAX; +} + + +static int cb_exec_noop(const struct buildcmd_control *ctl, + struct buildcmd_state *state) +{ + /* does nothing. */ + (void) ctl; + (void) state; + + return 0; +} + + +/* Return how much of ARG_MAX is used by the environment. */ +size_t +bc_size_of_environment (void) +{ + size_t len = 0u; + char **envp = environ; + + while (*envp) + len += strlen (*envp++) + 1; + + return len; +} + + +enum BC_INIT_STATUS +bc_init_controlinfo(struct buildcmd_control *ctl, + size_t headroom) +{ + size_t size_of_environment = bc_size_of_environment(); + + /* POSIX requires that _POSIX_ARG_MAX is 4096. That is the lowest + * possible value for ARG_MAX on a POSIX compliant system. See + * http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html + */ + ctl->posix_arg_size_min = _POSIX_ARG_MAX; + ctl->posix_arg_size_max = bc_get_arg_max(); + + ctl->exit_if_size_exceeded = 0; + + /* Take the size of the environment into account. */ + if (size_of_environment > ctl->posix_arg_size_max) + { + return BC_INIT_ENV_TOO_BIG; + } + else if ((headroom + size_of_environment) >= ctl->posix_arg_size_max) + { + /* POSIX.2 requires xargs to subtract 2048, but ARG_MAX is + * guaranteed to be at least 4096. Although xargs could use an + * assertion here, we use a runtime check which returns an error + * code, because our caller may not be xargs. + */ + return BC_INIT_CANNOT_ACCOMODATE_HEADROOM; + } + else + { + ctl->posix_arg_size_max -= size_of_environment; + ctl->posix_arg_size_max -= headroom; + } + + /* need to subtract 2 on the following line - for Linux/PPC */ + ctl->max_arg_count = (ctl->posix_arg_size_max / sizeof(char*)) - 2u; + assert(ctl->max_arg_count > 0); + ctl->rplen = 0u; + ctl->replace_pat = NULL; + ctl->initial_argc = 0; + ctl->exec_callback = cb_exec_noop; + ctl->lines_per_exec = 0; + ctl->args_per_exec = 0; + + /* Set the initial value of arg_max to the largest value we can + * tolerate. + */ + ctl->arg_max = ctl->posix_arg_size_max; + + return BC_INIT_OK; +} + +void +bc_use_sensible_arg_max(struct buildcmd_control *ctl) +{ + enum { arg_size = (128u * 1024u) }; + + /* Check against the upper and lower limits. */ + if (arg_size > ctl->posix_arg_size_max) + ctl->arg_max = ctl->posix_arg_size_max; + else if (arg_size < ctl->posix_arg_size_min) + ctl->arg_max = ctl->posix_arg_size_min; + else + ctl->arg_max = arg_size; +} + + + + +void +bc_init_state(const struct buildcmd_control *ctl, + struct buildcmd_state *state, + void *context) +{ + state->cmd_argc = 0; + state->cmd_argv_chars = 0; + state->cmd_argv = NULL; + state->cmd_argv_alloc = 0; + + /* XXX: the following memory allocation is inadvisable on systems + * with no ARG_MAX, because ctl->arg_max may actually be close to + * LONG_MAX. Adding one to it is safe though because earlier we + * subtracted 2048. + */ + assert(ctl->arg_max <= (LONG_MAX - 2048L)); + state->argbuf = (char *) xmalloc (ctl->arg_max + 1u); + + state->cmd_argv_chars = state->cmd_initial_argv_chars = 0; + state->todo = 0; + state->dirfd = -1; + state->usercontext = context; +} + +void +bc_clear_args(const struct buildcmd_control *ctl, + struct buildcmd_state *state) +{ + state->cmd_argc = ctl->initial_argc; + state->cmd_argv_chars = state->cmd_initial_argv_chars; + state->todo = 0; + state->dirfd = -1; +} + diff --git a/lib/buildcmd.h b/lib/buildcmd.h new file mode 100644 index 0000000..c6f2373 --- /dev/null +++ b/lib/buildcmd.h @@ -0,0 +1,136 @@ +/* buildcmd.[ch] -- build command lines from a stream of arguments + 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 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. +*/ +/* + * Written by James Youngman. + */ +#ifndef INC_BUILDCMD_H +#define INC_BUILDCMD_H 1 + +struct buildcmd_state +{ + /* Number of valid elements in `cmd_argv'. */ + int cmd_argc; /* 0 */ + + /* The list of args being built. */ + char **cmd_argv; /* NULL */ + + /* Number of elements allocated for `cmd_argv'. */ + int cmd_argv_alloc; + + /* Storage for elements of `cmd_argv'. */ + char *argbuf; + + /* Number of chars being used in `cmd_argv'. */ + size_t cmd_argv_chars; + + /* Number of chars being used in `cmd_argv' for the initial args.. */ + size_t cmd_initial_argv_chars; + + /* User context information. */ + void *usercontext; + + /* to-do flag. */ + int todo; + + /* Directory in which to perform the exec. */ + int dirfd; +}; + +struct buildcmd_control +{ + /* If true, exit if lines_per_exec or args_per_exec is exceeded. */ + int exit_if_size_exceeded; /* false */ + + /* POSIX limits on the argument length. */ + size_t posix_arg_size_max; + size_t posix_arg_size_min; + + /* The maximum number of characters that can be used per command line. */ + size_t arg_max; + + /* max_arg_count: the maximum number of arguments that can be used. + * + * Many systems include the size of the pointers in ARG_MAX. + * Linux on PPC fails if we just subtract 1 here. + * + * However, not all systems define ARG_MAX. Our bc_get_arg_max() + * function returns a useful value even if ARG_MAX is not defined. + * However, sometimes, max_arg_count is LONG_MAX! + */ + long max_arg_count; + + + /* The length of `replace_pat'. */ + size_t rplen; + + /* If nonzero, then instead of putting the args from stdin at + the end of the command argument list, they are each stuck into the + initial args, replacing each occurrence of the `replace_pat' in the + initial args. */ + char *replace_pat; + + /* Number of initial arguments given on the command line. */ + int initial_argc; /* 0 */ + + /* exec callback. */ + int (*exec_callback)(const struct buildcmd_control *, struct buildcmd_state *); + + /* If nonzero, the maximum number of nonblank lines from stdin to use + per command line. */ + long lines_per_exec; /* 0 */ + + /* The maximum number of arguments to use per command line. */ + long args_per_exec; +}; + +enum BC_INIT_STATUS + { + BC_INIT_OK = 0, + BC_INIT_ENV_TOO_BIG, + BC_INIT_CANNOT_ACCOMODATE_HEADROOM, + }; + +extern size_t bc_size_of_environment (void); + + +extern void bc_do_insert (const struct buildcmd_control *ctl, + struct buildcmd_state *state, + char *arg, size_t arglen, + const char *prefix, size_t pfxlen, + const char *linebuf, size_t lblen, + int initial_args); + +extern void bc_push_arg (const struct buildcmd_control *ctl, + struct buildcmd_state *state, + const char *arg, size_t len, + const char *prefix, size_t pfxlen, + int initial_args); + +extern void bc_init_state(const struct buildcmd_control *ctl, + struct buildcmd_state *state, + void *usercontext); +extern enum BC_INIT_STATUS bc_init_controlinfo(struct buildcmd_control *ctl, + size_t arglen_headroom); +extern size_t bc_get_arg_max(void); +extern void bc_use_sensible_arg_max(struct buildcmd_control *ctl); +extern void bc_clear_args(const struct buildcmd_control *ctl, + struct buildcmd_state *state); + + +#endif diff --git a/lib/dircallback.c b/lib/dircallback.c new file mode 100644 index 0000000..81253b9 --- /dev/null +++ b/lib/dircallback.c @@ -0,0 +1,101 @@ +/* listfile.c -- run a function in a specific directory + Copyright (C) 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 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. +*/ + +/* This file was written by James Youngman, based on gnulib'c at-func.c. + */ + + +#if HAVE_CONFIG_H +# include +#endif + +#include "openat.h" +#include +#include + +#include "fcntl--.h" +#include "lchown.h" +#include "lstat.h" +#include "save-cwd.h" + + +/* The presence of unistd.h is assumed by gnulib these days, so we + * might as well assume it too. + */ +#include /* for readlink() */ + +#ifdef HAVE_LOCALE_H +#include +#endif + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + + + +int +run_in_dir (int dirfd, int (*callback)(void*), void *usercontext) +{ + if (dirfd == AT_FDCWD) + { + return (*callback)(usercontext); + } + else + { + struct saved_cwd saved_cwd; + int saved_errno; + int err; + + if (save_cwd (&saved_cwd) != 0) + openat_save_fail (errno); + + if (fchdir (dirfd) != 0) + { + saved_errno = errno; + free_cwd (&saved_cwd); + errno = saved_errno; + return -1; + } + + err = (*callback)(usercontext); + saved_errno = (err < 0 ? errno : 0); + + if (restore_cwd (&saved_cwd) != 0) + openat_restore_fail (errno); + + free_cwd (&saved_cwd); + + if (saved_errno) + errno = saved_errno; + return err; + } +} + diff --git a/lib/dircallback.h b/lib/dircallback.h new file mode 100644 index 0000000..33f41cd --- /dev/null +++ b/lib/dircallback.h @@ -0,0 +1,26 @@ +/* listfile.h -- display a long listing of a file + Copyright (C) 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 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. +*/ + + +#if !defined DIRCALLBACK_H +# define DIRCALLBACK_H + +int run_in_dir (int dirfd, int (*callback)(void*), void *usercontext); + +#endif diff --git a/lib/extendbuf.c b/lib/extendbuf.c new file mode 100644 index 0000000..a082733 --- /dev/null +++ b/lib/extendbuf.c @@ -0,0 +1,105 @@ +/* extendbuf.c -- manage a dynamically-allocated buffer + + Copyright 2004 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. */ + +/* Written by James Yougnman . */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#include "xalloc.h" +#include "extendbuf.h" + + +/* We initially use a small default size to ensure that this code + * gets exercised. + */ +#ifndef SIZE_DEFAULT +# define SIZE_DEFAULT 16 +#endif + +static size_t +decide_size(size_t current, size_t wanted) +{ + size_t newsize; + + if (0 == current) + newsize = SIZE_DEFAULT; + else + newsize = current; + + while (newsize < wanted) + { + if (2 * newsize < newsize) + xalloc_die (); + newsize *= 2; + } + return newsize; +} + + +void * +extendbuf(void* existing, size_t wanted, size_t *allocated) +{ + int saved_errno; + size_t newsize; + void *result; /* leave uninitialised to allow static code checkers to identify bugs */ + + saved_errno = errno; + + assert(wanted > 0u); + newsize = decide_size(*allocated, wanted); + + if ( (*allocated) == 0 ) + { + /* Sanity check: If there is no existing allocation size, there + * must be no existing allocated buffer. + */ + assert(NULL == existing); + + (*allocated) = newsize; + result = xmalloc(newsize); + } + else + { + if (newsize != (*allocated) ) + { + (*allocated) = newsize; + result = xrealloc (existing, newsize); + + } + else + { + result = existing; + } + } + + if (result) + { + /* xmalloc() or xrealloc() may have changed errno, but in the + success case we want to preserve the previous value. + */ + errno = saved_errno; + } + return result; +} diff --git a/lib/extendbuf.h b/lib/extendbuf.h new file mode 100644 index 0000000..987152e --- /dev/null +++ b/lib/extendbuf.h @@ -0,0 +1,27 @@ +/* extendbuf.h -- Manage a dynamically-alloicated buffer + + Copyright (C) 2004 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. +*/ + +#ifndef INC_EXTENDBUF_H +#define INC_EXTENDBUF_H 1 + +void *extendbuf(void* existing, size_t wanted, size_t *allocated); + + +#endif diff --git a/lib/forcefindlib.c b/lib/forcefindlib.c new file mode 100644 index 0000000..23448c6 --- /dev/null +++ b/lib/forcefindlib.c @@ -0,0 +1,50 @@ +/* Ensures that the FINDLIB_REPLACE_FUNCS macro in configure.in works + Copyright (C) 2004 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. +*/ + +/* Written by James Youngman. */ + + +#ifdef HAVE_CONFIG_H +#include +#endif + + +extern void forcefindlib(void); /* prevent GCC warning... */ + + + +/* forcefindlib + * + * This function exists only to be pulled into libfind.a by the + * FINDLIB_REPLACE_FUNCS macro in configure.in. We already have + * AC_REPLACE_FUNCS, but that adds to LIBOBJS, and that's a gnulib thing + * in the case of findutils. Hence we have out own library of replacement + * functions which aren't in gnulib (or aren't in it any more). An example + * of this is waitpid(). I develop on a system that doesn't + * lack waitpid, for example. Therefore FINDLIB_REPLACE_FUNCS(waitpid) + * never puts waitpid.o into FINDLIBOBJS. Hence, to ensure that these + * macros are tested every time, we use FINDLIB_REPLACE_FUNCS on a function + * that never exists anywhere, so always needs to be pulled in. That function + * is forcefindlib(). + */ +void +forcefindlib(void) +{ + /* does nothing, exists only to ensure that FINDLIB_REPLACE_FUNCS works. */ +} diff --git a/lib/gnulib-version.c b/lib/gnulib-version.c new file mode 100644 index 0000000..02ca6f4 --- /dev/null +++ b/lib/gnulib-version.c @@ -0,0 +1,2 @@ +/* This file is automatically generated by import-gnulib.sh and simply records which version of gnulib we used. */ +const char * const gnulib_version = "2007-05-26"; diff --git a/lib/gnulib-version.h b/lib/gnulib-version.h new file mode 100644 index 0000000..eadd5be --- /dev/null +++ b/lib/gnulib-version.h @@ -0,0 +1,21 @@ +/* gnulib-version.h + Copyright (C) 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 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. +*/ + +extern const char * const gnulib_version; + diff --git a/lib/listfile.c b/lib/listfile.c new file mode 100644 index 0000000..0bdf99d --- /dev/null +++ b/lib/listfile.c @@ -0,0 +1,441 @@ +/* listfile.c -- display a long listing of a file + Copyright (C) 1991, 1993, 2000, 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 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. +*/ + +#if HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for readlink() */ +#include + +#include "human.h" +#include "xalloc.h" +#include "pathmax.h" +#include "error.h" +#include "filemode.h" +#include "dircallback.h" + +#include "listfile.h" + +/* Since major is a function on SVR4, we can't use `ifndef major'. */ +#ifdef MAJOR_IN_MKDEV +#include +#define HAVE_MAJOR +#endif +#ifdef MAJOR_IN_SYSMACROS +#include +#define HAVE_MAJOR +#endif + + + + + +#ifdef HAVE_LOCALE_H +#include +#endif + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + + + +#ifdef STAT_MACROS_BROKEN +#undef S_ISCHR +#undef S_ISBLK +#undef S_ISLNK +#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 +#if defined(S_IFLNK) && !defined(S_ISLNK) +#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +#endif + +/* Get or fake the disk device blocksize. + Usually defined by sys/param.h (if at all). */ +#ifndef DEV_BSIZE +# ifdef BSIZE +# define DEV_BSIZE BSIZE +# else /* !BSIZE */ +# define DEV_BSIZE 4096 +# endif /* !BSIZE */ +#endif /* !DEV_BSIZE */ + +/* Extract or fake data from a `struct stat'. + ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes. + ST_NBLOCKS: Number of blocks in the file, including indirect blocks. + ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS. */ +#ifndef HAVE_STRUCT_STAT_ST_BLOCKS +# define ST_BLKSIZE(statbuf) DEV_BSIZE +# if defined(_POSIX_SOURCE) || !defined(BSIZE) /* fileblocks.c uses BSIZE. */ +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) \ + || S_ISDIR ((statbuf).st_mode) \ + ? (statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0) : 0) +# else /* !_POSIX_SOURCE && BSIZE */ +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) \ + || S_ISDIR ((statbuf).st_mode) \ + ? st_blocks ((statbuf).st_size) : 0) +# endif /* !_POSIX_SOURCE && BSIZE */ +#else /* HAVE_STRUCT_STAT_ST_BLOCKS */ +/* Some systems, like Sequents, return st_blksize of 0 on pipes. */ +# define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \ + ? (statbuf).st_blksize : DEV_BSIZE) +# if defined(hpux) || defined(__hpux__) || defined(__hpux) +/* HP-UX counts st_blocks in 1024-byte units. + This loses when mixing HP-UX and BSD filesystems with NFS. */ +# define ST_NBLOCKSIZE 1024 +# else /* !hpux */ +# if defined(_AIX) && defined(_I386) +/* AIX PS/2 counts st_blocks in 4K units. */ +# define ST_NBLOCKSIZE (4 * 1024) +# else /* not AIX PS/2 */ +# if defined(_CRAY) +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) \ + || S_ISDIR ((statbuf).st_mode) \ + ? (statbuf).st_blocks * ST_BLKSIZE(statbuf)/ST_NBLOCKSIZE : 0) +# endif /* _CRAY */ +# endif /* not AIX PS/2 */ +# endif /* !hpux */ +#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */ + +#ifndef ST_NBLOCKS +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) \ + || S_ISDIR ((statbuf).st_mode) \ + ? (statbuf).st_blocks : 0) +#endif + +#ifndef ST_NBLOCKSIZE +# define ST_NBLOCKSIZE 512 +#endif + +#ifdef major /* Might be defined in sys/types.h. */ +#define HAVE_MAJOR +#endif +#ifndef HAVE_MAJOR +#define major(dev) (((dev) >> 8) & 0xff) +#define minor(dev) ((dev) & 0xff) +#endif +#undef HAVE_MAJOR + + +static void print_name (register const char *p, FILE *stream, int literal_control_chars); + +extern char * getgroup (gid_t gid); +extern char * getuser (uid_t uid); + + + +size_t +file_blocksize(const struct stat *p) +{ + return ST_NBLOCKSIZE; +} + + + +/* NAME is the name to print. + RELNAME is the path to access it from the current directory. + STATP is the results of stat or lstat on it. + Use CURRENT_TIME to decide whether to print yyyy or hh:mm. + Use OUTPUT_BLOCK_SIZE to determine how to print file block counts + and sizes. + STREAM is the stdio stream to print on. */ + +void +list_file (const char *name, + int dirfd, + char *relname, + const struct stat *statp, + time_t current_time, + int output_block_size, + int literal_control_chars, + FILE *stream) +{ + char modebuf[11]; + struct tm const *when_local; + char const *user_name; + char const *group_name; + char hbuf[LONGEST_HUMAN_READABLE + 1]; + +#if HAVE_ST_DM_MODE + /* Cray DMF: look at the file's migrated, not real, status */ + strmode (statp->st_dm_mode, modebuf); +#else + strmode (statp->st_mode, modebuf); +#endif + modebuf[10] = '\0'; + + fprintf (stream, "%6s ", + human_readable ((uintmax_t) statp->st_ino, hbuf, + human_ceiling, + 1, 1)); + + fprintf (stream, "%4s ", + human_readable ((uintmax_t) ST_NBLOCKS (*statp), hbuf, + human_ceiling, + ST_NBLOCKSIZE, output_block_size)); + + + /* The space between the mode and the number of links is the POSIX + "optional alternate access method flag". */ + fprintf (stream, "%s %3lu ", modebuf, (unsigned long) statp->st_nlink); + + user_name = getuser (statp->st_uid); + if (user_name) + fprintf (stream, "%-8s ", user_name); + else + fprintf (stream, "%-8lu ", (unsigned long) statp->st_uid); + + group_name = getgroup (statp->st_gid); + if (group_name) + fprintf (stream, "%-8s ", group_name); + else + fprintf (stream, "%-8lu ", (unsigned long) statp->st_gid); + + if (S_ISCHR (statp->st_mode) || S_ISBLK (statp->st_mode)) +#ifdef HAVE_ST_RDEV + fprintf (stream, "%3lu, %3lu ", + (unsigned long) major (statp->st_rdev), + (unsigned long) minor (statp->st_rdev)); +#else + fprintf (stream, " "); +#endif + else + fprintf (stream, "%8s ", + human_readable ((uintmax_t) statp->st_size, hbuf, + human_ceiling, + 1, + output_block_size < 0 ? output_block_size : 1)); + + if ((when_local = localtime (&statp->st_mtime))) + { + char init_bigbuf[256]; + char *buf = init_bigbuf; + size_t bufsize = sizeof init_bigbuf; + + /* Use strftime rather than ctime, because the former can produce + locale-dependent names for the month (%b). + + Output the year if the file is fairly old or in the future. + POSIX says the cutoff is 6 months old; + approximate this by 6*30 days. + Allow a 1 hour slop factor for what is considered "the future", + to allow for NFS server/client clock disagreement. */ + char const *fmt = + ((current_time - 6 * 30 * 24 * 60 * 60 <= statp->st_mtime + && statp->st_mtime <= current_time + 60 * 60) + ? "%b %e %H:%M" + : "%b %e %Y"); + + while (!strftime (buf, bufsize, fmt, when_local)) + buf = (char *) alloca (bufsize *= 2); + + fprintf (stream, "%s ", buf); + } + else + { + /* The time cannot be represented as a local time; + print it as a huge integer number of seconds. */ + int width = 12; + + if (statp->st_mtime < 0) + { + char const *num = human_readable (- (uintmax_t) statp->st_mtime, + hbuf, human_ceiling, 1, 1); + int sign_width = width - strlen (num); + fprintf (stream, "%*s%s ", + sign_width < 0 ? 0 : sign_width, "-", num); + } + else + fprintf (stream, "%*s ", width, + human_readable ((uintmax_t) statp->st_mtime, hbuf, + human_ceiling, + 1, 1)); + } + + print_name (name, stream, literal_control_chars); + +#ifdef S_ISLNK + if (S_ISLNK (statp->st_mode)) + { + char *linkname = get_link_name_at (name, dirfd, relname); + + if (linkname) + { + fputs (" -> ", stream); + print_name (linkname, stream, literal_control_chars); + free (linkname); + } + } +#endif + putc ('\n', stream); +} + + +static void +print_name_without_quoting (const char *p, FILE *stream) +{ + fprintf(stream, "%s", p); +} + + +static void +print_name_with_quoting (register const char *p, FILE *stream) +{ + register unsigned char c; + + while ((c = *p++) != '\0') + { + switch (c) + { + case '\\': + fprintf (stream, "\\\\"); + break; + + case '\n': + fprintf (stream, "\\n"); + break; + + case '\b': + fprintf (stream, "\\b"); + break; + + case '\r': + fprintf (stream, "\\r"); + break; + + case '\t': + fprintf (stream, "\\t"); + break; + + case '\f': + fprintf (stream, "\\f"); + break; + + case ' ': + fprintf (stream, "\\ "); + break; + + case '"': + fprintf (stream, "\\\""); + break; + + default: + if (c > 040 && c < 0177) + putc (c, stream); + else + fprintf (stream, "\\%03o", (unsigned int) c); + } + } +} + +static void print_name (register const char *p, FILE *stream, int literal_control_chars) +{ + if (literal_control_chars) + print_name_without_quoting(p, stream); + else + print_name_with_quoting(p, stream); +} + +#ifdef S_ISLNK +static char * +get_link_name (const char *name, char *relname) +{ + register char *linkname; + register int linklen; + + /* st_size is wrong for symlinks on AIX, and on + mount points with some automounters. + So allocate a pessimistic PATH_MAX + 1 bytes. */ +#define LINK_BUF PATH_MAX + linkname = (char *) xmalloc (LINK_BUF + 1); + linklen = readlink (relname, linkname, LINK_BUF); + if (linklen < 0) + { + error (0, errno, "%s", name); + free (linkname); + return 0; + } + linkname[linklen] = '\0'; + return linkname; +} + +struct link_name_args +{ + const char *name; + char *relname; + char *result; +}; + +static int +get_link_name_cb(void *context) +{ + struct link_name_args *args = context; + args->result = get_link_name(args->name, args->relname); + return 0; +} + +char * +get_link_name_at (const char *name, int dirfd, char *relname) +{ + struct link_name_args args; + args.result = NULL; + args.name = name; + args.relname = relname; + if (0 == run_in_dir(dirfd, get_link_name_cb, &args)) + return args.result; + else + return NULL; +} + + +#endif diff --git a/lib/listfile.h b/lib/listfile.h new file mode 100644 index 0000000..70bcf9e --- /dev/null +++ b/lib/listfile.h @@ -0,0 +1,30 @@ +/* listfile.h -- display a long listing of a file + Copyright (C) 1991, 1993, 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 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. +*/ + + +#if !defined LISTFILE_H +# define LISTFILE_H + +void list_file (const char *name, int dir_fd, char *relname, const struct stat *statp, time_t current_time, int output_block_size, int literal_control_chars, FILE *stream); + +char * get_link_name_at (const char *name, int dirfd, char *relname); + +size_t file_blocksize(const struct stat *p); + +#endif diff --git a/lib/modetype.h b/lib/modetype.h new file mode 100644 index 0000000..60ddb43 --- /dev/null +++ b/lib/modetype.h @@ -0,0 +1,144 @@ +/* modetype.h -- file type bits definitions for POSIX systems + Requires sys/types.h sys/stat.h. + Copyright (C) 1990, 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 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. +*/ + +/* POSIX.1 doesn't mention the S_IFMT bits; instead, it uses S_IStype + test macros. To make storing file types more convenient, define + them; the values don't need to correspond to what the kernel uses, + because of the way we use them. */ +#ifndef INC_MODETYPE_H +#define INC_MODETYPE_H 1 + +#ifndef S_IFMT /* Doesn't have traditional Unix macros. */ +#define S_IFBLK 1 +#define S_IFCHR 2 +#define S_IFDIR 4 +#define S_IFREG 8 +#ifdef S_ISLNK +#define S_IFLNK 16 +#endif +#ifdef S_ISFIFO +#define S_IFIFO 32 +#endif +#ifdef S_ISSOCK +#define S_IFSOCK 64 +#endif +#ifdef S_ISDOOR +#define S_IFDOOR 128 +#endif +#endif /* !S_IFMT */ + +#ifdef STAT_MACROS_BROKEN +#undef S_ISBLK +#undef S_ISCHR +#undef S_ISDIR +#undef S_ISREG +#undef S_ISFIFO +#undef S_ISLNK +#undef S_ISSOCK +#undef S_ISDOOR +#undef S_ISMPB +#undef S_ISMPC +#undef S_ISNWK +#endif + +/* Do the reverse: define the POSIX.1 macros for traditional Unix systems + that don't have them. */ +#if !defined(S_ISBLK) && defined(S_IFBLK) +#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +#endif +#if !defined(S_ISCHR) && defined(S_IFCHR) +#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +#endif +#if !defined(S_ISDIR) && defined(S_IFDIR) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif +#if !defined(S_ISREG) && defined(S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif +#if !defined(S_ISFIFO) && defined(S_IFIFO) +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +#endif +#if !defined(S_ISLNK) && defined(S_IFLNK) +#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +#endif +#if !defined(S_ISSOCK) && defined(S_IFSOCK) +#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +#endif +#if !defined(S_ISDOOR) && defined(S_IFDOOR) +#define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR) +#endif +#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */ +/* Also available on Coherent, according to + * Albert D. Cahalan (acahalan@cs.uml.edu) + */ +#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) /* multiplexed block device */ +#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) /* multiplexed char device */ +/* GNU BFD library source uses type letter 'm' for these */ +#endif + +#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */ +/* Apparently HPUX ls gives 'n' as the type letter for these. */ +#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) +#endif + +#endif + +/* The above macros don't handle + * /bin/ls letters Mode What is it? + * S_IFNAM (Xenix "name files") + * H S_ISCDF (HPUX Context Dependent Files) + * S_IFCMP + * S_IFSHAD + */ + +/* +In message <199907051927.PAA01106@jupiter.cs.uml.edu> +Albert Cahalan wrote:- + +BTW, I believe many of these can't actually exist on disk. +Some of these (like S_IFSHAD AFAIK) are not seen by userspace. + +hex name ls octal description +0000 000000 SCO out-of-service inode, BSD unknown type +1000 S_IFIFO p| 010000 fifo (named pipe) +2000 S_IFCHR c 020000 character special +3000 S_IFMPC 030000 multiplexed character device (Coherent) +4000 S_IFDIR d/ 040000 directory +5000 S_IFNAM 050000 XENIX special named file +6000 S_IFBLK b 060000 block special +7000 S_IFMPB 070000 multiplexed block device (Coherent) +8000 S_IFREG - 100000 regular +9000 S_IFCMP 110000 VxFS compressed (file?) +9000 S_IFNWK 110000 HP-UX network special +a000 S_IFLNK l@ 120000 symbolic link +b000 S_IFSHAD 130000 Solaris shadow inode for ACL +c000 S_IFSOCK s= 140000 socket (also "S_IFSOC" on VxFS) +d000 S_IFDOOR D 150000 Solaris door +e000 S_IFWHT w% 160000 BSD whiteout (not used for inode) +f000 S_IFMT 170000 mask (not used for inode) +hex name ls octal description +0200 S_ISVTX 001000 save swapped text even after use +0400 S_ISGID 002000 set group ID on execution +0400 S_ENFMT 002000 SysV forced file locking (shared w/ S_ISGID) +0800 S_CDF 004000 HP-UX hidden directory +0800 S_ISUID 004000 set user ID on execution + + +*/ diff --git a/lib/nextelem.c b/lib/nextelem.c new file mode 100644 index 0000000..98d331e --- /dev/null +++ b/lib/nextelem.c @@ -0,0 +1,110 @@ +/* Return the next element of a path. + Copyright (C) 1992,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. +*/ + +/* Written by David MacKenzie , + inspired by John P. Rouillard . */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) +#include +#else +#include +#ifndef strchr +#define strchr index +#endif +#endif +#if defined(STDC_HEADERS) +#include +#endif + +#include "nextelem.h" + + +/* Return the next element of a colon-separated path. + A null entry in the path is equivalent to "." (the current directory). + + If NEW_PATH is non-NULL, set the path and return NULL. + If NEW_PATH is NULL, return the next item in the string, or + return NULL if there are no more elements. */ + +char * +next_element (const char *new_path, int curdir_ok) +{ + static char *path = NULL; /* Freshly allocated copy of NEW_PATH. */ + static char *end; /* Start of next element to return. */ + static int final_colon; /* If zero, path didn't end with a colon. */ + char *start; /* Start of path element to return. */ + + if (new_path) + { + if (path) + free (path); + end = path = strdup (new_path); + final_colon = 0; + return NULL; + } + + if (*end == '\0') + { + if (final_colon) + { + final_colon = 0; + return curdir_ok ? "." : ""; + } + return NULL; + } + + start = end; + final_colon = 1; /* Maybe there will be one. */ + + end = strchr (start, ':'); + if (end == start) + { + /* An empty path element. */ + *end++ = '\0'; + return curdir_ok ? "." : ""; + } + else if (end == NULL) + { + /* The last path element. */ + end = strchr (start, '\0'); + final_colon = 0; + } + else + *end++ = '\0'; + + return start; +} + +#ifdef TEST +int +main () +{ + char *p; + + next_element (getenv ("PATH")); + while (p = next_element (NULL)) + puts (p); + exit (0); +} +#endif /* TEST */ diff --git a/lib/nextelem.h b/lib/nextelem.h new file mode 100644 index 0000000..9e6b76b --- /dev/null +++ b/lib/nextelem.h @@ -0,0 +1,28 @@ +/* Return the next element of a path. + Copyright (C) 1992 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. +*/ + +/* Written by David MacKenzie , + inspired by John P. Rouillard . */ + +#ifndef INC_NEXTELEM_H +#define INC_NEXTELEM_H 1 + +char *next_element (const char *path, int curdir_ok); + +#endif diff --git a/lib/printquoted.c b/lib/printquoted.c new file mode 100644 index 0000000..2c2e45d --- /dev/null +++ b/lib/printquoted.c @@ -0,0 +1,90 @@ +/* printquoted.c -- print a specified string with any necessary quoting. + + Copyright (C) 1990, 1991, 1992, 1993, 1994, 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. +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +/* Get mbstate_t, mbrtowc(), mbsinit(), wcwidth(). */ +#if HAVE_WCHAR_H +# include +#endif + + + +#include "xalloc.h" +#include "printquoted.h" + + +/* + * Print S according to the format FORMAT, but if the destination is a tty, + * convert any potentially-dangerous characters. The logic in this function + * was taken from ls.c in coreutils (at Sun Jun 5 20:42:51 2005 UTC). + */ +int +print_quoted (FILE *fp, + const struct quoting_options *qopts, + bool dest_is_tty, + const char *format, + const char *s) +{ + int rv; + + if (dest_is_tty) + { + char smallbuf[BUFSIZ]; + size_t len = quotearg_buffer (smallbuf, sizeof smallbuf, s, -1, qopts); + char *buf; + if (len < sizeof smallbuf) + buf = smallbuf; + else + { + /* The original coreutils code uses alloca(), but I don't + * want to take on the anguish of introducing alloca() to + * 'find'. + * XXX: newsflash: we already have alloca(). + */ + buf = xmalloc (len + 1); + quotearg_buffer (buf, len + 1, s, -1, qopts); + } + + /* Replace any remaining funny characters with '?'. */ + len = qmark_chars(buf, len); + + rv = fprintf(fp, format, buf); /* Print the quoted version */ + if (buf != smallbuf) + { + free(buf); + buf = NULL; + } + } + else + { + /* no need to quote things. */ + rv = fprintf(fp, format, s); + } + return rv; +} + diff --git a/lib/printquoted.h b/lib/printquoted.h new file mode 100644 index 0000000..23152d5 --- /dev/null +++ b/lib/printquoted.h @@ -0,0 +1,35 @@ +/* Print a string, appropriately quoted. + + Copyright 1997, 1999, 2001, 2003, 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. + */ + +#if !defined PRINTQUOTED_H +# define PRINTQUOTED_H + +#include "quote.h" +#include "quotearg.h" + + +#include +#include + + +size_t qmark_chars(char *buf, size_t len); +int print_quoted (FILE *fp, const struct quoting_options *qopts, bool dest_is_tty, const char *format, const char *s); + + +#endif diff --git a/lib/qmark.c b/lib/qmark.c new file mode 100644 index 0000000..8220d5f --- /dev/null +++ b/lib/qmark.c @@ -0,0 +1,241 @@ +/* qmark.c -- quote 'dangerous' filenames + + Copyright (C) 2005 Free Software Foundation, Inc. + Derived from courutils' ls.c: + Copyright (C) 85, 88, 90, 91, 1995-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. +*/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +# include +# include +#include + +#if HAVE_STRING_H || STDC_HEADERS +#include +#else +#include +#endif + + +/* Get mbstate_t, mbrtowc(), mbsinit(), wcwidth(). */ +#if HAVE_WCHAR_H +# include +#endif + +#include "printquoted.h" + + +/* + This comment, IN_CTYPE_DOMAIN and ISPRINT were borrowed from + coreutils at Sun Jun 5 21:17:40 2005 UTC. + + Jim Meyering writes: + + "... Some ctype macros are valid only for character codes that + isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when + using /bin/cc or gcc but without giving an ansi option). So, all + ctype uses should be through macros like ISPRINT... If + STDC_HEADERS is defined, then autoconf has verified that the ctype + macros don't need to be guarded with references to isascii. ... + Defining isascii to 1 should let any compiler worth its salt + eliminate the && through constant folding." + + Bruno Haible adds: + + "... Furthermore, isupper(c) etc. have an undefined result if c is + outside the range -1 <= c <= 255. One is tempted to write isupper(c) + with c being of type `char', but this is wrong if c is an 8-bit + character >= 128 which gets sign-extended to a negative value. + The macro ISUPPER protects against this as well." */ + + + + +/* ISPRINT is defined in on at least Solaris2.6 systems. */ +#undef ISPRINT +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) + +#if STDC_HEADERS || (!defined (isascii) && !HAVE_ISASCII) +# define IN_CTYPE_DOMAIN(c) 1 +#else +# define IN_CTYPE_DOMAIN(c) isascii(c) +#endif + + + + + +/* Convert a possibly-signed character to an unsigned character. This is + * a bit safer than casting to unsigned char, since it catches some type + * errors that the cast doesn't. + * + * This code taken from coreutils' system.h header at + * Sun Jun 5 21:05:21 2005 UTC. + */ +static inline unsigned char to_uchar (char ch) +{ + return ch; +} + + + +static size_t +unibyte_qmark_chars(char *buf, size_t len) +{ + char *p = buf; + char const *plimit = buf + len; + + while (p < plimit) + { + if (! ISPRINT (to_uchar (*p))) + *p = '?'; + p++; + } + return len; +} + + +#if HAVE_MBRTOWC +static size_t +multibyte_qmark_chars(char *buf, size_t len) +{ + if (MB_CUR_MAX <= 1) + { + return unibyte_qmark_chars(buf, len); + } + else + { + char const *p = buf; + char const *plimit = buf + len; + char *q = buf; + + while (p < plimit) + switch (*p) + { + 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 '~': + /* These characters are printable ASCII characters. */ + *q++ = *p++; + break; + default: + /* If we have a multibyte sequence, copy it until we + reach its end, replacing each non-printable multibyte + character with a single question mark. */ + { + mbstate_t mbstate; + memset (&mbstate, 0, sizeof mbstate); + do + { + wchar_t wc; + size_t bytes; + int w; + + bytes = mbrtowc (&wc, p, plimit - p, &mbstate); + + if (bytes == (size_t) -1) + { + /* An invalid multibyte sequence was + encountered. Skip one input byte, and + put a question mark. */ + p++; + *q++ = '?'; + break; + } + + if (bytes == (size_t) -2) + { + /* An incomplete multibyte character + at the end. Replace it entirely with + a question mark. */ + p = plimit; + *q++ = '?'; + break; + } + + if (bytes == 0) + /* A null wide character was encountered. */ + bytes = 1; + + w = wcwidth (wc); + if (w >= 0) + { + /* A printable multibyte character. + Keep it. */ + for (; bytes > 0; --bytes) + *q++ = *p++; + } + else + { + /* An unprintable multibyte character. + Replace it entirely with a question + mark. */ + p += bytes; + *q++ = '?'; + } + } + while (! mbsinit (&mbstate)); + } + break; + } + + /* The buffer may have shrunk. */ + len = q - buf; + return len; + } +} +#endif + + +/* Scan BUF, replacing any dangerous-looking characters with question + * marks. This code is taken from the ls.c file in coreutils as at + * Sun Jun 5 20:51:54 2005 UTC. + * + * This function may shrink the buffer. Either way, the new length + * is returned. + */ +size_t +qmark_chars(char *buf, size_t len) +{ +#if HAVE_MBRTOWC + return multibyte_qmark_chars(buf, len); +#else + return unibyte_qmark_chars(buf, len); +#endif +} + diff --git a/lib/regexprops.c b/lib/regexprops.c new file mode 100644 index 0000000..0b86f39 --- /dev/null +++ b/lib/regexprops.c @@ -0,0 +1,493 @@ +/* regexprops.c -- document the properties of the regular expressions + understood by gnulib. + + Copyright 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. */ + +/* Written by James Youngman, . */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include "regex.h" +#include "regextype.h" + + +/* Name this program was run with. */ +char *program_name; + +static void output(const char *s, int escape) +{ + (void) escape; + + fputs(s, stdout); +} + + +static void newline(void) +{ + output("\n", 0); +} + +static void content(const char *s) +{ + output(s, 1); +} + +static void literal(const char *s) +{ + output(s, 0); +} + +static void directive(const char *s) +{ + output(s, 0); +} + +static void enum_item(const char *s) +{ + newline(); + directive("@item "); + literal(s); + newline(); +} + +static void begin_subsection(const char *name, + const char *next, + const char *prev, + const char *up) +{ + (void) next; + (void) prev; + (void) up; + + newline(); + + directive("@node "); + content(name); + content(" regular expression syntax"); + newline(); + + directive("@subsection "); + output("@samp{", 0); + content(name); + output("}", 0); + content(" regular expression syntax"); + newline(); +} + +static void begintable_markup(char const *markup) +{ + newline(); + directive("@table "); + literal(markup); + newline(); +} + +static void endtable() +{ + newline(); + directive("@end table"); + newline(); +} + +static void beginenum() +{ + newline(); + directive("@enumerate"); + newline(); +} + +static void endenum() +{ + newline(); + directive("@end enumerate"); + newline(); +} + +static void newpara() +{ + content("\n\n"); +} + + +static void +describe_regex_syntax(int options) +{ + newpara(); + content("The character @samp{.} matches any single character"); + if ( (options & RE_DOT_NEWLINE) == 0 ) + { + content(" except newline"); + } + if (options & RE_DOT_NOT_NULL) + { + if ( (options & RE_DOT_NEWLINE) == 0 ) + content(" and"); + else + content(" except"); + + content(" the null character"); + } + content(". "); + newpara(); + + if (!(options & RE_LIMITED_OPS)) + { + begintable_markup("@samp"); + if (options & RE_BK_PLUS_QM) + { + enum_item("\\+"); + content("indicates that the regular expression should match one" + " or more occurrences of the previous atom or regexp. "); + enum_item("\\?"); + content("indicates that the regular expression should match zero" + " or one occurrence of the previous atom or regexp. "); + enum_item("+ and ? "); + content("match themselves. "); + } + else + { + enum_item("+"); + content("indicates that the regular expression should match one" + " or more occurrences of the previous atom or regexp. "); + enum_item("?"); + content("indicates that the regular expression should match zero" + " or one occurrence of the previous atom or regexp. "); + enum_item("\\+"); + literal("matches a @samp{+}"); + enum_item("\\?"); + literal("matches a @samp{?}. "); + } + endtable(); + } + + newpara(); + + content("Bracket expressions are used to match ranges of characters. "); + literal("Bracket expressions where the range is backward, for example @samp{[z-a]}, are "); + if (options & RE_NO_EMPTY_RANGES) + content("invalid"); + else + content("ignored"); + content(". "); + + if (options & RE_BACKSLASH_ESCAPE_IN_LISTS) + literal("Within square brackets, @samp{\\} can be used to quote " + "the following character. "); + else + literal("Within square brackets, @samp{\\} is taken literally. "); + + if (options & RE_CHAR_CLASSES) + content("Character classes are supported; for example " + "@samp{[[:digit:]]} will match a single decimal digit. "); + else + literal("Character classes are not supported, so for example " + "you would need to use @samp{[0-9]} " + "instead of @samp{[[:digit:]]}. "); + + if (options & RE_HAT_LISTS_NOT_NEWLINE) + { + literal("Non-matching lists @samp{[^@dots{}]} do not ever match newline. "); + } + newpara(); + if (options & RE_NO_GNU_OPS) + { + content("GNU extensions are not supported and so " + "@samp{\\w}, @samp{\\W}, @samp{\\<}, @samp{\\>}, @samp{\\b}, @samp{\\B}, @samp{\\`}, and @samp{\\'} " + "match " + "@samp{w}, @samp{W}, @samp{<}, @samp{>}, @samp{b}, @samp{B}, @samp{`}, and @samp{'} respectively. "); + } + else + { + content("GNU extensions are supported:"); + beginenum(); + enum_item("@samp{\\w} matches a character within a word"); + enum_item("@samp{\\W} matches a character which is not within a word"); + enum_item("@samp{\\<} matches the beginning of a word"); + enum_item("@samp{\\>} matches the end of a word"); + enum_item("@samp{\\b} matches a word boundary"); + enum_item("@samp{\\B} matches characters which are not a word boundary"); + enum_item("@samp{\\`} matches the beginning of the whole input"); + enum_item("@samp{\\'} matches the end of the whole input"); + endenum(); + } + + newpara(); + + + if (options & RE_NO_BK_PARENS) + { + literal("Grouping is performed with parentheses @samp{()}. "); + + if (options & RE_UNMATCHED_RIGHT_PAREN_ORD) + literal("An unmatched @samp{)} matches just itself. "); + } + else + { + literal("Grouping is performed with backslashes followed by parentheses @samp{\\(}, @samp{\\)}. "); + } + + if (options & RE_NO_BK_REFS) + { + content("A backslash followed by a digit matches that digit. "); + } + else + { + literal("A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis "); + if (options & RE_NO_BK_PARENS) + literal("@samp{(}"); + else + literal("@samp{\\(}"); + content(". "); + } + + + newpara(); + if (!(options & RE_LIMITED_OPS)) + { + if (options & RE_NO_BK_VBAR) + literal("The alternation operator is @samp{|}. "); + else + literal("The alternation operator is @samp{\\|}. "); + } + newpara(); + + if (options & RE_CONTEXT_INDEP_ANCHORS) + { + literal("The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified. "); + } + else + { + literal("The character @samp{^} only represents the beginning of a string when it appears:"); + beginenum(); + enum_item("\nAt the beginning of a regular expression"); + enum_item("After an open-group, signified by "); + if (options & RE_NO_BK_PARENS) + { + literal("@samp{(}"); + } + else + { + literal("@samp{\\(}"); + } + newline(); + if (!(options & RE_LIMITED_OPS)) + { + if (options & RE_NEWLINE_ALT) + enum_item("After a newline"); + + if (options & RE_NO_BK_VBAR ) + enum_item("After the alternation operator @samp{|}"); + else + enum_item("After the alternation operator @samp{\\|}"); + } + endenum(); + + newpara(); + literal("The character @samp{$} only represents the end of a string when it appears:"); + beginenum(); + enum_item("At the end of a regular expression"); + enum_item("Before a close-group, signified by "); + if (options & RE_NO_BK_PARENS) + { + literal("@samp{)}"); + } + else + { + literal("@samp{\\)}"); + } + if (!(options & RE_LIMITED_OPS)) + { + if (options & RE_NEWLINE_ALT) + enum_item("Before a newline"); + + if (options & RE_NO_BK_VBAR) + enum_item("Before the alternation operator @samp{|}"); + else + enum_item("Before the alternation operator @samp{\\|}"); + } + endenum(); + } + newpara(); + if (!(options & RE_LIMITED_OPS) ) + { + if ((options & RE_CONTEXT_INDEP_OPS) + && !(options & RE_CONTEXT_INVALID_OPS)) + { + literal("The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression. "); + } + else + { + if (options & RE_BK_PLUS_QM) + literal("@samp{\\*}, @samp{\\+} and @samp{\\?} "); + else + literal("@samp{*}, @samp{+} and @samp{?} "); + + if (options & RE_CONTEXT_INVALID_OPS) + { + content("are special at any point in a regular expression except the following places, where they are not allowed:"); + } + else + { + content("are special at any point in a regular expression except:"); + } + + beginenum(); + enum_item("At the beginning of a regular expression"); + enum_item("After an open-group, signified by "); + if (options & RE_NO_BK_PARENS) + { + literal("@samp{(}"); + } + else + { + literal("@samp{\\(}"); + } + if (!(options & RE_LIMITED_OPS)) + { + if (options & RE_NEWLINE_ALT) + enum_item("After a newline"); + + if (options & RE_NO_BK_VBAR) + enum_item("After the alternation operator @samp{|}"); + else + enum_item("After the alternation operator @samp{\\|}"); + } + endenum(); + } + } + + + newpara(); + if (options & RE_INTERVALS) + { + if (options & RE_NO_BK_BRACES) + { + literal("Intervals are specified by @samp{@{} and @samp{@}}. "); + if (options & RE_INVALID_INTERVAL_ORD) + { + literal("Invalid intervals are treated as literals, for example @samp{a@{1} is treated as @samp{a\\@{1}"); + } + else + { + literal("Invalid intervals such as @samp{a@{1z} are not accepted. "); + } + } + else + { + literal("Intervals are specified by @samp{\\@{} and @samp{\\@}}. "); + if (options & RE_INVALID_INTERVAL_ORD) + { + literal("Invalid intervals are treated as literals, for example @samp{a\\@{1} is treated as @samp{a@{1}"); + } + else + { + literal("Invalid intervals such as @samp{a\\@{1z} are not accepted. "); + } + } + + } + + newpara(); + if (options & RE_NO_POSIX_BACKTRACKING) + { + content("Matching succeeds as soon as the whole pattern is matched, meaning that the result may not be the longest possible match. "); + } + else + { + content("The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. "); + } + newpara(); +} + + + +static void +menu(void) +{ + int i, options; + const char *name; + + output("@menu\n", 0); + for (i=0; + options = get_regex_type_flags(i), + name=get_regex_type_name(i); + ++i) + { + output("* ", 0); + output(name, 0); + content(" regular expression syntax"); + output("::", 0); + newline(); + } + output("@end menu\n", 0); +} + + +static void +describe_all(const char *up) +{ + const char *name, *next, *previous; + int options; + int i, parent; + + menu(); + + previous = ""; + + for (i=0; + options = get_regex_type_flags(i), + name=get_regex_type_name(i); + ++i) + { + next = get_regex_type_name(i+1); + if (NULL == next) + next = ""; + begin_subsection(name, next, previous, up); + parent = get_regex_type_synonym(i); + if (parent >= 0) + { + content("This is a synonym for "); + content(get_regex_type_name(parent)); + content("."); + } + else + { + describe_regex_syntax(options); + } + previous = name; + } +} + + + +int main (int argc, char *argv[]) +{ + const char *up = ""; + program_name = argv[0]; + + if (argc > 1) + up = argv[1]; + + describe_all(up); + return 0; +} diff --git a/lib/regextype.c b/lib/regextype.c new file mode 100644 index 0000000..768a82b --- /dev/null +++ b/lib/regextype.c @@ -0,0 +1,158 @@ + +/* regextype.c -- Decode the name of a regular expression syntax into am + option name. + + Copyright 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. */ + +/* Written by James Youngman, . */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include "regextype.h" +#include "regex.h" +#include "quote.h" +#include "quotearg.h" +#include "xalloc.h" +#include "error.h" + + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + + + +struct tagRegexTypeMap +{ + char *name; + int option_val; +}; + +struct tagRegexTypeMap regex_map[] = + { +#ifdef FINDUTILS + { "findutils-default", RE_SYNTAX_EMACS|RE_DOT_NEWLINE }, +#endif + { "awk", RE_SYNTAX_AWK }, + { "egrep", RE_SYNTAX_EGREP }, +#ifndef FINDUTILS + { "ed", RE_SYNTAX_ED }, +#endif + { "emacs", RE_SYNTAX_EMACS }, + { "gnu-awk", RE_SYNTAX_GNU_AWK }, + { "grep", RE_SYNTAX_GREP }, + { "posix-awk", RE_SYNTAX_POSIX_AWK }, + { "posix-basic", RE_SYNTAX_POSIX_BASIC }, + { "posix-egrep", RE_SYNTAX_POSIX_EGREP }, + { "posix-extended", RE_SYNTAX_POSIX_EXTENDED }, +#ifndef FINDUTILS + { "posix-minimal-basic", RE_SYNTAX_POSIX_MINIMAL_BASIC }, + { "sed", RE_SYNTAX_SED }, + /* ,{ "posix-common", _RE_SYNTAX_POSIX_COMMON } */ +#endif + }; +enum { N_REGEX_MAP_ENTRIES = sizeof(regex_map)/sizeof(regex_map[0]) }; + +int +get_regex_type(const char *s) +{ + unsigned i; + size_t msglen; + char *buf, *p; + + msglen = 0u; + for (i=0u; i 0u) + { + strcpy(p, ", "); + p += 2; + } + p += sprintf(p, "%s", quote(regex_map[i].name)); + } + + error(1, 0, _("Unknown regular expression type %s; valid types are %s."), + quote(s), + buf); + /*NOTREACHED*/ + return -1; +} + + +const char * +get_regex_type_name(unsigned int ix) +{ + if (ix < N_REGEX_MAP_ENTRIES) + return regex_map[ix].name; + else + return NULL; +} + +int +get_regex_type_flags(unsigned int ix) +{ + if (ix < N_REGEX_MAP_ENTRIES) + return regex_map[ix].option_val; + else + return -1; +} + + +int get_regex_type_synonym(unsigned int ix) +{ + unsigned i; + int flags; + + if (ix >= N_REGEX_MAP_ENTRIES) + return -1; + + flags = regex_map[ix].option_val; + for (i=0u; i. + */ + +int get_regex_type(const char *s); + + +const char * get_regex_type_name(unsigned int ix); +int get_regex_type_flags(unsigned int ix); +int get_regex_type_synonym(unsigned int ix); diff --git a/lib/savedirinfo.c b/lib/savedirinfo.c new file mode 100644 index 0000000..304bf8b --- /dev/null +++ b/lib/savedirinfo.c @@ -0,0 +1,387 @@ +/* savedirinfo.c -- Save the list of files in a directory, with additional information. + + Copyright 1990, 1997, 1998, 1999, 2000, 2001, 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. */ + +/* Written by James Youngman, . */ +/* Derived from savedir.c, written by David MacKenzie . */ + +#if HAVE_CONFIG_H +# include +#endif + +#if HAVE_SYS_STAT_H +# include +#endif + +#if HAVE_SYS_TYPES_H +# include +#endif + +/* The presence of unistd.h is assumed by gnulib these days, so we + * might as well assume it too. + */ +#include + +#include + +#if HAVE_DIRENT_H +# include +#else +# define dirent direct +# if HAVE_SYS_NDIR_H +# include +# endif +# if HAVE_SYS_DIR_H +# include +# endif +# if HAVE_NDIR_H +# include +# endif +#endif + +#ifdef CLOSEDIR_VOID +/* Fake a return value. */ +# define CLOSEDIR(d) (closedir (d), 0) +#else +# define CLOSEDIR(d) closedir (d) +#endif + +#include +#include +#include + +#include "xalloc.h" +#include "extendbuf.h" +#include "savedirinfo.h" + +/* In order to use struct dirent.d_type, it has to be enabled on the + * configure command line, and we have to have a d_type member in + * 'struct dirent'. + */ +#if !defined(USE_STRUCT_DIRENT_D_TYPE) +/* Not enabled, hence pretend it is absent. */ +#undef HAVE_STRUCT_DIRENT_D_TYPE +#endif +#if !defined(HAVE_STRUCT_DIRENT_D_TYPE) +/* Not present, so cannot use it. */ +#undef USE_STRUCT_DIRENT_D_TYPE +#endif + + +#if defined(HAVE_STRUCT_DIRENT_D_TYPE) && defined(USE_STRUCT_DIRENT_D_TYPE) +/* Convert the value of struct dirent.d_type into a value for + * struct stat.st_mode (at least the file type bits), or zero + * if the type is DT_UNKNOWN or is a value we don't know about. + */ +static mode_t +type_to_mode(unsigned type) +{ + switch (type) + { +#ifdef DT_FIFO + case DT_FIFO: return S_IFIFO; +#endif +#ifdef DT_CHR + case DT_CHR: return S_IFCHR; +#endif +#ifdef DT_DIR + case DT_DIR: return S_IFDIR; +#endif +#ifdef DT_BLK + case DT_BLK: return S_IFBLK; +#endif +#ifdef DT_REG + case DT_REG: return S_IFREG; +#endif +#ifdef DT_LNK + case DT_LNK: return S_IFLNK; +#endif +#ifdef DT_SOCK + case DT_SOCK: return S_IFSOCK; +#endif + default: + return 0; /* Unknown. */ + } +} + +#endif + +struct new_savedir_direntry_internal +{ + int flags; /* from SaveDirDataFlags */ + mode_t type_info; + size_t buffer_offset; +}; + + + +static int +savedir_cmp(const void *p1, const void *p2) +{ + const struct savedir_direntry *de1, *de2; + de1 = p1; + de2 = p2; + return strcmp(de1->name, de2->name); /* POSIX order, not locale order. */ +} + + +static struct savedir_direntry* +convertentries(const struct savedir_dirinfo *info, + struct new_savedir_direntry_internal *internal) +{ + char *p = info->buffer; + struct savedir_direntry *result; + int n =info->size; + int i; + + + result = xmalloc(sizeof(*result) * info->size); + + for (i=0; ibuffer = NULL; + result->size = 0u; + result->entries = NULL; + internal = NULL; + + while ((dp = readdir (dirp)) != NULL) + { + /* Skip "", ".", and "..". "" is returned by at least one buggy + implementation: Solaris 2.4 readdir on NFS file systems. */ + char const *entry = dp->d_name; + if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0') + { + /* Remember the name. */ + size_t entry_size = strlen (entry) + 1; + result->buffer = extendbuf(result->buffer, namebuf_used+entry_size, &namebuf_allocated); + memcpy ((result->buffer) + namebuf_used, entry, entry_size); + + /* Remember the other stuff. */ + internal = extendbuf(internal, (1+result->size)*sizeof(*internal), &entrybuf_allocated); + internal[result->size].flags = 0; + +#if defined(HAVE_STRUCT_DIRENT_D_TYPE) && defined(USE_STRUCT_DIRENT_D_TYPE) + internal[result->size].type_info = type_to_mode(dp->d_type); + if (dp->d_type != DT_UNKNOWN) + internal[result->size].flags |= SavedirHaveFileType; +#else + internal[result->size].type_info = 0; +#endif + internal[result->size].buffer_offset = namebuf_used; + + /* Prepare for the next iteration */ + ++(result->size); + namebuf_used += entry_size; + } + } + + result->buffer = extendbuf(result->buffer, namebuf_used+1, &namebuf_allocated); + result->buffer[namebuf_used] = '\0'; + + /* convert the result to its externally-usable form. */ + result->entries = convertentries(result, internal); + free(internal); + internal = NULL; + + + if (flags & SavedirSort) + { + qsort(result->entries, + result->size, sizeof(*result->entries), + savedir_cmp); + } + + + save_errno = errno; + if (CLOSEDIR (dirp) != 0) + save_errno = errno; + if (save_errno != 0) + { + free (result->buffer); + free (result); + errno = save_errno; + return NULL; + } + + return result; +} + +void free_dirinfo(struct savedir_dirinfo *p) +{ + free(p->entries); + p->entries = NULL; + free(p->buffer); + p->buffer = NULL; + free(p); +} + + + +static char * +new_savedirinfo (const char *dir, struct savedir_extrainfo **extra) +{ + struct savedir_dirinfo *p = xsavedir(dir, SavedirSort); + char *buf, *s; + size_t bufbytes = 0; + unsigned int i; + + if (p) + { + struct savedir_extrainfo *pex = xmalloc(p->size * sizeof(*extra)); + for (i=0; isize; ++i) + { + bufbytes += strlen(p->entries[i].name); + ++bufbytes; /* the \0 */ + + pex[i].type_info = p->entries[i].type_info; + } + + s = buf = xmalloc(bufbytes+1); + for (i=0; isize; ++i) + { + size_t len = strlen(p->entries[i].name); + memcpy(s, p->entries[i].name, len); + s += len; + *s = 0; /* Place a NUL */ + ++s; /* Skip the NUL. */ + } + *s = 0; /* final (doubled) terminating NUL */ + + if (extra) + *extra = pex; + else + free (pex); + return buf; + } + else + { + return NULL; + } +} + + +#if 0 +/* Return a freshly allocated string containing the filenames + in directory DIR, separated by '\0' characters; + the end is marked by two '\0' characters in a row. + Return NULL (setting errno) if DIR cannot be opened, read, or closed. */ + +static char * +old_savedirinfo (const char *dir, struct savedir_extrainfo **extra) +{ + DIR *dirp; + struct dirent *dp; + char *name_space; + size_t namebuf_allocated = 0u, namebuf_used = 0u; +#if defined(HAVE_STRUCT_DIRENT_D_TYPE) && defined(USE_STRUCT_DIRENT_D_TYPE) + size_t extra_allocated = 0u, extra_used = 0u; + struct savedir_extrainfo *info = NULL; +#endif + int save_errno; + + if (extra) + *extra = NULL; + + dirp = opendir (dir); + if (dirp == NULL) + return NULL; + + errno = 0; + name_space = NULL; + while ((dp = readdir (dirp)) != NULL) + { + /* Skip "", ".", and "..". "" is returned by at least one buggy + implementation: Solaris 2.4 readdir on NFS file systems. */ + char const *entry = dp->d_name; + if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0') + { + /* Remember the name. */ + size_t entry_size = strlen (entry) + 1; + name_space = extendbuf(name_space, namebuf_used+entry_size, &namebuf_allocated); + memcpy (name_space + namebuf_used, entry, entry_size); + namebuf_used += entry_size; + + +#if defined(HAVE_STRUCT_DIRENT_D_TYPE) && defined(USE_STRUCT_DIRENT_D_TYPE) + /* Remember the type. */ + if (extra) + { + info = extendbuf(info, + (extra_used+1) * sizeof(struct savedir_dirinfo), + &extra_allocated); + info[extra_used].type_info = type_to_mode(dp->d_type); + ++extra_used; + } +#endif + } + } + + name_space = extendbuf(name_space, namebuf_used+1, &namebuf_allocated); + name_space[namebuf_used] = '\0'; + + save_errno = errno; + if (CLOSEDIR (dirp) != 0) + save_errno = errno; + if (save_errno != 0) + { + free (name_space); + errno = save_errno; + return NULL; + } + +#if defined(HAVE_STRUCT_DIRENT_D_TYPE) && defined(USE_STRUCT_DIRENT_D_TYPE) + if (extra && info) + *extra = info; +#endif + + return name_space; +} +#endif + + +char * +savedirinfo (const char *dir, struct savedir_extrainfo **extra) +{ + return new_savedirinfo(dir, extra); +} diff --git a/lib/savedirinfo.h b/lib/savedirinfo.h new file mode 100644 index 0000000..365f144 --- /dev/null +++ b/lib/savedirinfo.h @@ -0,0 +1,73 @@ +/* Save the list of files in a directory, with additional information. + + Copyright 1997, 1999, 2001, 2003, 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. */ + +/* Written by James Youngman . + * Based on savedir.h by David MacKenzie . + */ + +#if !defined SAVEDIRINFO_H_ +# define SAVEDIRINFO_H_ + + +typedef enum tagSaveDirControlFlags + { + SavedirSort = 1 + } +SaveDirControlFlags; + + +typedef enum tagSaveDirDataFlags + { + SavedirHaveFileType = 1 + } +SaveDirDataFlags; + + +/* We keep the name and the type in a structure together + * to allow us to sort them together. + */ +struct savedir_direntry +{ + int flags; /* from SaveDirDataFlags */ + char *name; /* the name of the directory entry */ + mode_t type_info; /* the type (or zero if unknown) */ +}; + +struct savedir_dirinfo +{ + char *buffer; /* The names are stored here. */ + size_t size; /* The total number of results. */ + struct savedir_direntry *entries; /* The results themselves */ +}; + + +struct savedir_extrainfo +{ + mode_t type_info; +}; + +/* savedirinfo() is the old interface. */ +char *savedirinfo (const char *dir, struct savedir_extrainfo **extra); + +/* savedir() is the 'new' interface, but the function has the same name + * as the function from findutils 4.1.7 and 4.1.20. + */ +struct savedir_dirinfo * xsavedir(const char *dir, int flags); +void free_dirinfo(struct savedir_dirinfo *p); + +#endif diff --git a/lib/wait.h b/lib/wait.h new file mode 100644 index 0000000..a7b0803 --- /dev/null +++ b/lib/wait.h @@ -0,0 +1,41 @@ +/* wait.h -- POSIX macros for evaluating exit statuses + Copyright (C) 1990 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. */ + +#include /* For pid_t. */ +#if HAVE_SYS_WAIT_H +#include +#endif + +#ifndef WIFSTOPPED +#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f) +#endif +#ifndef WIFSIGNALED +#define WIFSIGNALED(w) (((w) & 0xff) != 0x7f && ((w) & 0xff) != 0) +#endif +#ifndef WIFEXITED +#define WIFEXITED(w) (((w) & 0xff) == 0) +#endif + +#ifndef WSTOPSIG +#define WSTOPSIG(w) (((w) >> 8) & 0xff) +#endif +#ifndef WTERMSIG +#define WTERMSIG(w) ((w) & 0x7f) +#endif +#ifndef WEXITSTATUS +#define WEXITSTATUS(w) (((w) >> 8) & 0xff) +#endif diff --git a/lib/waitpid.c b/lib/waitpid.c new file mode 100644 index 0000000..ac3d06e --- /dev/null +++ b/lib/waitpid.c @@ -0,0 +1,81 @@ +/* Emulate waitpid on systems that just have wait. + Copyright 1994, 1995, 1998, 1999 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; see the file COPYING. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#ifndef errno +extern int errno; +#endif + + +#if defined _MSC_VER || defined __MINGW32__ +/* Native Woe32 API. */ +#include +#else +/* Unix API. */ +#include "wait.h" +#endif + +#define WAITPID_CHILDREN 8 +static pid_t waited_pid[WAITPID_CHILDREN]; +static int waited_status[WAITPID_CHILDREN]; + +pid_t +waitpid (pid_t pid, int *stat_loc, int options) +{ + int i; + pid_t p; + + if (!options && (pid == -1 || 0 < pid)) + { + /* If we have already waited for this child, return it immediately. */ + for (i = 0; i < WAITPID_CHILDREN; i++) + { + p = waited_pid[i]; + if (p && (p == pid || pid == -1)) + { + waited_pid[i] = 0; + goto success; + } + } + + /* The child has not returned yet; wait for it, accumulating status. */ + for (i = 0; i < WAITPID_CHILDREN; i++) + if (! waited_pid[i]) + { + p = wait (&waited_status[i]); + if (p < 0) + return p; + if (p == pid || pid == -1) + goto success; + waited_pid[i] = p; + } + } + + /* We cannot emulate this wait call, e.g. because of too many children. */ + errno = EINVAL; + return -1; + +success: + if (stat_loc) + *stat_loc = waited_status[i]; + return p; +} diff --git a/locate/Makefile.am b/locate/Makefile.am new file mode 100644 index 0000000..7466ed3 --- /dev/null +++ b/locate/Makefile.am @@ -0,0 +1,54 @@ +# The default database to build and search. +AUTOMAKE_OPTIONS = std-options +LOCATE_DB = $(localstatedir)/locatedb +localedir = $(datadir)/locale + +AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = frcode code bigram +bin_PROGRAMS = locate +libexec_PROGRAMS = frcode code bigram +bin_SCRIPTS = updatedb +man_MANS = locate.1 updatedb.1 locatedb.5 +BUILT_SOURCES = dblocation.texi +EXTRA_DIST = locatedb.h updatedb.sh $(man_MANS) +CLEANFILES = updatedb dblocation.texi +locate_SOURCES = locate.c word_io.c +code_SOURCES = code.c word_io.c + +INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\" + +LDADD = ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ + +$(PROGRAMS) $(LIBPROGRAMS): ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a + +updatedb: updatedb.sh + rm -f $@ + 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}," \ + -e "s,@""SORT""@,$(SORT)," \ + -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \ + $(srcdir)/updatedb.sh > $@ + chmod +x $@ + +install-data-hook: + $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir) + +dblocation.texi: Makefile + echo '@set LOCATE_DB $(LOCATE_DB)' > $@ + +SUBDIRS = testsuite + +dist-hook: findutils-check-manpages + +findutils-check-manpages: + $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) diff --git a/locate/Makefile.in b/locate/Makefile.in new file mode 100644 index 0000000..c442bdc --- /dev/null +++ b/locate/Makefile.in @@ -0,0 +1,1131 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = locate$(EXEEXT) +libexec_PROGRAMS = frcode$(EXEEXT) code$(EXEEXT) bigram$(EXEEXT) +subdir = locate +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(man5dir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) +bigram_SOURCES = bigram.c +bigram_OBJECTS = bigram.$(OBJEXT) +bigram_LDADD = $(LDADD) +bigram_DEPENDENCIES = ../find/version.o ../lib/libfind.a \ + ../gnulib/lib/libgnulib.a +am_code_OBJECTS = code.$(OBJEXT) word_io.$(OBJEXT) +code_OBJECTS = $(am_code_OBJECTS) +code_LDADD = $(LDADD) +code_DEPENDENCIES = ../find/version.o ../lib/libfind.a \ + ../gnulib/lib/libgnulib.a +frcode_SOURCES = frcode.c +frcode_OBJECTS = frcode.$(OBJEXT) +frcode_LDADD = $(LDADD) +frcode_DEPENDENCIES = ../find/version.o ../lib/libfind.a \ + ../gnulib/lib/libgnulib.a +am_locate_OBJECTS = locate.$(OBJEXT) word_io.$(OBJEXT) +locate_OBJECTS = $(am_locate_OBJECTS) +locate_LDADD = $(LDADD) +locate_DEPENDENCIES = ../find/version.o ../lib/libfind.a \ + ../gnulib/lib/libgnulib.a +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = bigram.c $(code_SOURCES) frcode.c $(locate_SOURCES) +DIST_SOURCES = bigram.c $(code_SOURCES) frcode.c $(locate_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +man1dir = $(mandir)/man1 +man5dir = $(mandir)/man5 +NROFF = nroff +MANS = $(man_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\" +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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 = $(datadir)/locale +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# The default database to build and search. +AUTOMAKE_OPTIONS = std-options +LOCATE_DB = $(localstatedir)/locatedb +AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = frcode code bigram +bin_SCRIPTS = updatedb +man_MANS = locate.1 updatedb.1 locatedb.5 +BUILT_SOURCES = dblocation.texi +EXTRA_DIST = locatedb.h updatedb.sh $(man_MANS) +CLEANFILES = updatedb dblocation.texi +locate_SOURCES = locate.c word_io.c +code_SOURCES = code.c word_io.c +LDADD = ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ +SUBDIRS = testsuite +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(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 locate/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits locate/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(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) + +installcheck-binPROGRAMS: $(bin_PROGRAMS) + bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err &2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad +install-libexecPROGRAMS: $(libexec_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" + @list='$(libexec_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) $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-libexecPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(libexec_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \ + rm -f "$(DESTDIR)$(libexecdir)/$$f"; \ + done + +clean-libexecPROGRAMS: + -test -z "$(libexec_PROGRAMS)" || rm -f $(libexec_PROGRAMS) + +installcheck-libexecPROGRAMS: $(libexec_PROGRAMS) + bad=0; pid=$$$$; list="$(libexec_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(libexecdir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err &2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad +bigram$(EXEEXT): $(bigram_OBJECTS) $(bigram_DEPENDENCIES) + @rm -f bigram$(EXEEXT) + $(LINK) $(bigram_OBJECTS) $(bigram_LDADD) $(LIBS) +code$(EXEEXT): $(code_OBJECTS) $(code_DEPENDENCIES) + @rm -f code$(EXEEXT) + $(LINK) $(code_OBJECTS) $(code_LDADD) $(LIBS) +frcode$(EXEEXT): $(frcode_OBJECTS) $(frcode_DEPENDENCIES) + @rm -f frcode$(EXEEXT) + $(LINK) $(frcode_OBJECTS) $(frcode_LDADD) $(LIBS) +locate$(EXEEXT): $(locate_OBJECTS) $(locate_DEPENDENCIES) + @rm -f locate$(EXEEXT) + $(LINK) $(locate_OBJECTS) $(locate_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 + +installcheck-binSCRIPTS: $(bin_SCRIPTS) + bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err &2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigram.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/code.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frcode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/word_io.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +install-man5: $(man5_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" + @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.5*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 5*) ;; \ + *) ext='5' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \ + done +uninstall-man5: + @$(NORMAL_UNINSTALL) + @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.5*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 5*) ;; \ + *) ext='5' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(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) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +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: + +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-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(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-man + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + +install-dvi: install-dvi-recursive + +install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-libexecPROGRAMS + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: install-man1 install-man5 + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: installcheck-binPROGRAMS installcheck-binSCRIPTS \ + installcheck-libexecPROGRAMS + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-libexecPROGRAMS uninstall-man + +uninstall-man: uninstall-man1 uninstall-man5 + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-data-am install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libexecPROGRAMS ctags ctags-recursive \ + dist-hook 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-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libexecPROGRAMS install-man install-man1 install-man5 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am \ + installcheck-binPROGRAMS installcheck-binSCRIPTS \ + installcheck-libexecPROGRAMS installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-libexecPROGRAMS uninstall-man uninstall-man1 \ + uninstall-man5 + + +$(PROGRAMS) $(LIBPROGRAMS): ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a + +updatedb: updatedb.sh + rm -f $@ + 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}," \ + -e "s,@""SORT""@,$(SORT)," \ + -e "s,@""SORT_SUPPORTS_Z""@,$(SORT_SUPPORTS_Z)," \ + $(srcdir)/updatedb.sh > $@ + chmod +x $@ + +install-data-hook: + $(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir) + +dblocation.texi: Makefile + echo '@set LOCATE_DB $(LOCATE_DB)' > $@ + +dist-hook: findutils-check-manpages + +findutils-check-manpages: + $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) +# 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/bigram.c b/locate/bigram.c new file mode 100644 index 0000000..c834df0 --- /dev/null +++ b/locate/bigram.c @@ -0,0 +1,117 @@ +/* bigram -- list bigrams for locate + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +/* Usage: bigram < text > bigrams + Use `code' to encode a file using this output. + + Read a file from stdin and write out the bigrams (pairs of + adjacent characters), one bigram per line, to stdout. To reduce + needless duplication in the output, it starts finding the + bigrams on each input line at the character where that line + first differs from the previous line (i.e., in the ASCII + remainder). Therefore, the input should be sorted in order to + get the least redundant output. + + Written by James A. Woods . + Modified by David MacKenzie . */ + +#include +#include + +#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) +#include +#else +#include +#endif + +#ifdef STDC_HEADERS +#include +#endif +#include + +#include +#include +#include "closeout.h" + +/* The name this program was run with. */ +char *program_name; + +/* Return the length of the longest common prefix of strings S1 and S2. */ + +static int +prefix_length (char *s1, char *s2) +{ + register char *start; + + for (start = s1; *s1 == *s2 && *s1 != '\0'; s1++, s2++) + ; + return s1 - start; +} + +int +main (int argc, char **argv) +{ + char *path; /* The current input entry. */ + char *oldpath; /* The previous input entry. */ + size_t pathsize, oldpathsize; /* Amounts allocated for them. */ + int line_len; /* Length of input line. */ + + program_name = argv[0]; + (void) argc; + atexit (close_stdout); + + pathsize = oldpathsize = 1026; /* Increased as necessary by getline. */ + path = xmalloc (pathsize); + oldpath = xmalloc (oldpathsize); + + /* Set to empty string, to force the first prefix count to 0. */ + oldpath[0] = '\0'; + + while ((line_len = getline (&path, &pathsize, stdin)) > 0) + { + register int count; /* The prefix length. */ + register int j; /* Index into input line. */ + + path[line_len - 1] = '\0'; /* Remove the newline. */ + + /* Output bigrams in the remainder only. */ + count = prefix_length (oldpath, path); + for (j = count; path[j] != '\0' && path[j + 1] != '\0'; j += 2) + { + putchar (path[j]); + putchar (path[j + 1]); + putchar ('\n'); + } + + { + /* Swap path and oldpath and their sizes. */ + char *tmppath = oldpath; + size_t tmppathsize = oldpathsize; + oldpath = path; + oldpathsize = pathsize; + path = tmppath; + pathsize = tmppathsize; + } + } + + free (path); + free (oldpath); + + return 0; +} diff --git a/locate/code.c b/locate/code.c new file mode 100644 index 0000000..a00f635 --- /dev/null +++ b/locate/code.c @@ -0,0 +1,290 @@ +/* code -- bigram- and front-encode filenames for locate + Copyright (C) 1994, 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 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. +*/ + +/* Compress a sorted list. + Works with `find' to encode a filename database to save space + and search time. + + Usage: + + bigram < file_list > bigrams + process-bigrams > most_common_bigrams + code most_common_bigrams < file_list > squeezed_list + + Uses `front compression' (see ";login:", March 1983, p. 8). + The output begins with the 128 most common bigrams. + After that, the output format is, for each line, + an offset (from the previous line) differential count byte + followed by a (partially bigram-encoded) ASCII remainder. + The output lines have no terminating byte; the start of the next line + is indicated by its first byte having a value <= 30. + + The encoding of the output bytes is: + + 0-28 likeliest differential counts + offset (14) to make nonnegative + 30 escape code for out-of-range count to follow in next halfword + 128-255 bigram codes (the 128 most common, as determined by `updatedb') + 32-127 single character (printable) ASCII remainder + + Written by James A. Woods . + Modified by David MacKenzie . */ + +#include +#include +#include +#include +#include +#include + + +#ifdef STDC_HEADERS +#include +#endif + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + +#include "locatedb.h" +#include +#include "closeout.h" +#include "xalloc.h" +#include "gnulib-version.h" +#include "progname.h" +#include "error.h" + +#ifndef ATTRIBUTE_NORETURN +# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +#endif + + +/* The name this program was run with. */ +const char *program_name; + +/* The 128 most common bigrams in the file list, padded with NULs + if there are fewer. */ +static char bigrams[257] = {0}; + +/* Return the offset of PATTERN in STRING, or -1 if not found. */ + +static int +strindex (char *string, char *pattern) +{ + register char *s; + + for (s = string; *s != '\0'; s++) + /* Fast first char check. */ + if (*s == *pattern) + { + register char *p2 = pattern + 1, *s2 = s + 1; + while (*p2 != '\0' && *p2 == *s2) + p2++, s2++; + if (*p2 == '\0') + return s2 - strlen (pattern) - string; + } + return -1; +} + +/* Return the length of the longest common prefix of strings S1 and S2. */ + +static int +prefix_length (char *s1, char *s2) +{ + register char *start; + + for (start = s1; *s1 == *s2 && *s1 != '\0'; s1++, s2++) + ; + return s1 - start; +} + +extern char *version_string; + +static void +usage (FILE *stream) +{ + fprintf (stream, _("\ +Usage: %s [--version | --help]\n\ +or %s most_common_bigrams < file-list > locate-database\n"), + program_name, program_name); + fputs (_("\nReport bugs to .\n"), stream); +} + + +static void inerr (const char *filename) ATTRIBUTE_NORETURN; +static void outerr(void) ATTRIBUTE_NORETURN; + +static void +inerr(const char *filename) +{ + error(1, errno, "%s", filename); + /*NOTREACHED*/ + abort(); +} + +static void +outerr(void) +{ + error(1, errno, _("write error")); + /*NOTREACHED*/ + abort(); +} + + +int +main (int argc, char **argv) +{ + char *path; /* The current input entry. */ + char *oldpath; /* The previous input entry. */ + size_t pathsize, oldpathsize; /* Amounts allocated for them. */ + int count, oldcount, diffcount; /* Their prefix lengths & the difference. */ + char bigram[3]; /* Bigram to search for in table. */ + int code; /* Index of `bigram' in bigrams table. */ + FILE *fp; /* Most common bigrams file. */ + int line_len; /* Length of input line. */ + + set_program_name(argv[0]); + atexit (close_stdout); + + bigram[2] = '\0'; + + if (argc != 2) + { + usage(stderr); + return 2; + } + + if (0 == strcmp(argv[1], "--help")) + { + usage(stdout); + return 0; + } + else if (0 == strcmp(argv[1], "--version")) + { + printf (_("GNU findutils version %s\n"), version_string); + printf (_("Built using GNU gnulib version %s\n"), gnulib_version); + return 0; + } + + fp = fopen (argv[1], "r"); + if (fp == NULL) + { + fprintf (stderr, "%s: ", argv[0]); + perror (argv[1]); + return 1; + } + + pathsize = oldpathsize = 1026; /* Increased as necessary by getline. */ + path = xmalloc (pathsize); + oldpath = xmalloc (oldpathsize); + + /* Set to empty string, to force the first prefix count to 0. */ + oldpath[0] = '\0'; + oldcount = 0; + + /* Copy the list of most common bigrams to the output, + padding with NULs if there are <128 of them. */ + if (NULL == fgets (bigrams, 257, fp)) + inerr(argv[1]); + + if (256 != fwrite (bigrams, 1, 256, stdout)) + outerr(); + + if (EOF == fclose (fp)) + inerr(argv[1]); + + while ((line_len = getline (&path, &pathsize, stdin)) > 0) + { + char *pp; + + path[line_len - 1] = '\0'; /* Remove newline. */ + + /* Squelch unprintable chars in path so as not to botch decoding. */ + for (pp = path; *pp != '\0'; pp++) + { + if (!(*pp >= 040 && *pp < 0177)) + *pp = '?'; + } + + count = prefix_length (oldpath, path); + diffcount = count - oldcount; + oldcount = count; + /* If the difference is small, it fits in one byte; + otherwise, two bytes plus a marker noting that fact. */ + if (diffcount < -LOCATEDB_OLD_OFFSET || diffcount > LOCATEDB_OLD_OFFSET) + { + if (EOF ==- putc (LOCATEDB_OLD_ESCAPE, stdout)) + outerr (); + + if (!putword (stdout, + diffcount+LOCATEDB_OLD_OFFSET, + GetwordEndianStateNative)) + outerr (); + } + else + { + if (EOF == putc (diffcount + LOCATEDB_OLD_OFFSET, stdout)) + outerr (); + } + + /* Look for bigrams in the remainder of the path. */ + for (pp = path + count; *pp != '\0'; pp += 2) + { + if (pp[1] == '\0') + { + /* No bigram is possible; only one char is left. */ + putchar (*pp); + break; + } + bigram[0] = *pp; + bigram[1] = pp[1]; + /* Linear search for specific bigram in string table. */ + code = strindex (bigrams, bigram); + if (code % 2 == 0) + putchar ((code / 2) | 0200); /* It's a common bigram. */ + else + fputs (bigram, stdout); /* Write the text as printable ASCII. */ + } + + { + /* Swap path and oldpath and their sizes. */ + char *tmppath = oldpath; + size_t tmppathsize = oldpathsize; + oldpath = path; + oldpathsize = pathsize; + path = tmppath; + pathsize = tmppathsize; + } + } + + free (path); + free (oldpath); + + return 0; +} diff --git a/locate/frcode.c b/locate/frcode.c new file mode 100644 index 0000000..0cd40dc --- /dev/null +++ b/locate/frcode.c @@ -0,0 +1,365 @@ +/* frcode -- front-compress a sorted list + Copyright (C) 1994,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 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. +*/ + +/* Usage: frcode < sorted-list > compressed-list + + Uses front compression (also known as incremental encoding); + see ";login:", March 1983, p. 8. + + The input is a sorted list of NUL-terminated strings (or + newline-terminated if the -0 option is not given). + + The output entries are in the same order as the input; each entry + consists of a signed offset-differential count byte (the additional + number of characters of prefix of the preceding entry to use beyond + the number that the preceding entry is using of its predecessor), + followed by a null-terminated ASCII remainder. + + If the offset-differential count is larger than can be stored + in a byte (+/-127), the byte has the value LOCATEDB_ESCAPE + and the count follows in a 2-byte word, with the high byte first + (network byte order). + + Example: + + Input, with NULs changed to newlines: + /usr/src + /usr/src/cmd/aardvark.c + /usr/src/cmd/armadillo.c + /usr/tmp/zoo + + Length of the longest prefix of the preceding entry to share: + 0 /usr/src + 8 /cmd/aardvark.c + 14 rmadillo.c + 5 tmp/zoo + + Output, with NULs changed to newlines and count bytes made printable: + 0 LOCATE02 + 0 /usr/src + 8 /cmd/aardvark.c + 6 rmadillo.c + -9 tmp/zoo + + (6 = 14 - 8, and -9 = 5 - 14) + + Written by James A. Woods . + Modified by David MacKenzie . + Modified by James Youngman . +*/ + +#include + + +#include +#include +#include +#include +#include +#include + +#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) +#include +#else +#include +#endif + +#ifdef STDC_HEADERS +#include +#endif + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* We used to use (String) instead of just String, but apparently ISO C + * doesn't allow this (at least, that's what HP said when someone reported + * this as a compiler bug). This is HP case number 1205608192. See + * also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11250 (which references + * ANSI 3.5.7p14-15). The Intel icc compiler also rejects constructs + * like: static const char buf[] = ("string"); + */ +# define N_(String) String +#endif + + +#include "locatedb.h" +#include +#include +#include "error.h" +#include "closeout.h" + +char *xmalloc PARAMS((size_t)); + +/* The name this program was run with. */ +char *program_name; + +/* Write out a 16-bit int, high byte first (network byte order). + * Return true iff all went well. + */ +static int +put_short (int c, FILE *fp) +{ + /* XXX: The value of c may be negative. ANSI C 1989 (section 6.3.7) + * indicates that the result of shifting a negative value right is + * implementation defined. + */ + assert(c <= SHRT_MAX); + assert(c >= SHRT_MIN); + return (putc (c >> 8, fp) != EOF) && (putc (c, fp) != EOF); +} + +/* Return the length of the longest common prefix of strings S1 and S2. */ + +static int +prefix_length (char *s1, char *s2) +{ + register char *start; + int limit = INT_MAX; + for (start = s1; *s1 == *s2 && *s1 != '\0'; s1++, s2++) + { + /* Don't emit a prefix length that will not fit into + * our return type. + */ + if (0 == --limit) + break; + } + return s1 - start; +} + +static struct option const longopts[] = +{ + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {"null", no_argument, NULL, '0'}, + {NULL, no_argument, NULL, 0} +}; + +extern char *version_string; + +/* The name this program was run with. */ +char *program_name; + + +static void +usage (FILE *stream) +{ + fprintf (stream, + _("Usage: %s [-0 | --null] [--version] [--help]\n"), + program_name); + fputs (_("\nReport bugs to .\n"), stream); +} + +static long +get_seclevel(char *s) +{ + long result; + char *p; + + /* Reset errno in oreder to be able to distinguish LONG_MAX/LONG_MIN + * from values whichare actually out of range + */ + errno = 0; + + result = strtol(s, &p, 10); + if ((0==result) && (p == optarg)) + { + error(1, 0, _("You need to specify a security level as a decimal integer.")); + /*NOTREACHED*/ + return -1; + } + else if ((LONG_MIN==result || LONG_MAX==result) && errno) + + { + error(1, 0, _("Security level %s is outside the convertible range."), s); + /*NOTREACHED*/ + return -1; + } + else if (*p) + { + /* Some suffix exists */ + error(1, 0, _("Security level %s has unexpected suffix %s."), s, p); + /*NOTREACHED*/ + return -1; + } + else + { + return result; + } +} + +static void +outerr(void) +{ + /* Issue the same error message as closeout() would. */ + error(1, errno, _("write error")); +} + +int +main (int argc, char **argv) +{ + char *path; /* The current input entry. */ + char *oldpath; /* The previous input entry. */ + size_t pathsize, oldpathsize; /* Amounts allocated for them. */ + int count, oldcount, diffcount; /* Their prefix lengths & the difference. */ + int line_len; /* Length of input line. */ + int delimiter = '\n'; + int optc; + int slocate_compat = 0; + long slocate_seclevel = 0L; + + program_name = argv[0]; + if (!program_name) + program_name = "frcode"; + atexit (close_stdout); + + pathsize = oldpathsize = 1026; /* Increased as necessary by getline. */ + path = xmalloc (pathsize); + oldpath = xmalloc (oldpathsize); + + oldpath[0] = 0; + oldcount = 0; + + + while ((optc = getopt_long (argc, argv, "hv0S:", longopts, (int *) 0)) != -1) + switch (optc) + { + case '0': + delimiter = 0; + break; + + case 'S': + slocate_compat = 1; + slocate_seclevel = get_seclevel(optarg); + if (slocate_seclevel < 0 || slocate_seclevel > 1) + { + error(1, 0, + _("slocate security level %ld is unsupported."), + slocate_seclevel); + } + break; + + case 'h': + usage (stdout); + return 0; + + case 'v': + printf (_("GNU locate version %s\n"), version_string); + return 0; + + default: + usage (stderr); + return 1; + } + + /* We expect to have no arguments. */ + if (optind != argc) + { + usage (stderr); + return 1; + } + + + if (slocate_compat) + { + fputc(slocate_seclevel ? '1' : '0', stdout); + fputc(0, stdout); + + } + else + { + /* GNU LOCATE02 format */ + if (fwrite (LOCATEDB_MAGIC, 1, sizeof (LOCATEDB_MAGIC), stdout) + != sizeof(LOCATEDB_MAGIC)) + { + error(1, errno, _("Failed to write to standard output")); + } + } + + + while ((line_len = getdelim (&path, &pathsize, delimiter, stdin)) > 0) + { + path[line_len - 1] = '\0'; /* FIXME temporary: nuke the newline. */ + + count = prefix_length (oldpath, path); + diffcount = count - oldcount; + if ( (diffcount > SHRT_MAX) || (diffcount < SHRT_MIN) ) + { + /* We do this to prevent overflow of the value we + * write with put_short() + */ + count = 0; + diffcount = (-oldcount); + } + oldcount = count; + + if (slocate_compat) + { + /* Emit no count for the first pathname. */ + slocate_compat = 0; + } + else + { + /* If the difference is small, it fits in one byte; + otherwise, two bytes plus a marker noting that fact. */ + if (diffcount < LOCATEDB_ONEBYTE_MIN + || diffcount > LOCATEDB_ONEBYTE_MAX) + { + if (EOF == putc (LOCATEDB_ESCAPE, stdout)) + outerr(); + if (!put_short (diffcount, stdout)) + outerr(); + } + else + { + if (EOF == putc (diffcount, stdout)) + outerr(); + } + } + + if ( (EOF == fputs (path + count, stdout)) + || (EOF == putc ('\0', stdout))) + { + outerr(); + } + + if (1) + { + /* Swap path and oldpath and their sizes. */ + char *tmppath = oldpath; + size_t tmppathsize = oldpathsize; + oldpath = path; + oldpathsize = pathsize; + path = tmppath; + pathsize = tmppathsize; + } + } + + free (path); + free (oldpath); + + return 0; +} diff --git a/locate/locate.1 b/locate/locate.1 new file mode 100644 index 0000000..c99fe04 --- /dev/null +++ b/locate/locate.1 @@ -0,0 +1,218 @@ +.TH LOCATE 1 \" -*- nroff -*- +.SH NAME +locate \- list files in databases that match a pattern +.SH SYNOPSIS +.B locate +[\-d path | \-\-database=path] [\-e | \-E | \-\-[non\-]existing] [\-i +| \-\-ignore-case] [\-0 | \-\-null] [\-c | \-\-count] [\-w | \-\-wholename] +|\-b | \-\-basename] [\-l N | \-\-limit=N] [\-S | \-\-statistics] [\-r +| \-\-regex ] [\-\-max-database-age D] [\-P | \-H | \-\-nofollow] [\-L +| \-\-follow] [\-\-version] [\-A | \-\-all] [\-p | \-\-print] [\-\-help] pattern... +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR locate . +For each given pattern, +.B locate +searches one or more databases of file names and displays the +file names that contain the pattern. Patterns can contain shell-style +metacharacters: `*', `?', and `[]'. The metacharacters do not treat +`/' or `.' specially. Therefore, a pattern `foo*bar' can match a +file name that contains `foo3/bar', and a pattern `*duck*' can match a +file name that contains `lake/.ducky'. Patterns that contain +metacharacters should be quoted to protect them from expansion by the +shell. +.P +If a pattern is a plain string \(em it contains no metacharacters \(em +.B locate +displays all file names in the database that contain that string +anywhere. If a pattern does contain metacharacters, +.B locate +only displays file names that match the pattern exactly. As a result, +patterns that contain metacharacters should usually begin with a `*', +and will most often end with one as well. The exceptions are patterns +that are intended to explicitly match the beginning or end of a file +name. +.P +The file name databases contain lists of files that were on the system +when the databases were last updated. The system administrator can +choose the file name of the default database, the frequency with which +the databases are updated, and the directories for which they contain +entries; see \fBupdatedb\fP(1). +.P +If +.BR locate 's +output is going to a terminal, unusual characters in the output are +escaped in the same way as for the \-print action of the +.B find +command. If the output is not going to a terminal, file names are +printed exactly as-is. + +.SH OPTIONS +.TP +.I "\-0, \-\-null" +Use ASCII NUL as a separator, instead of newline. +.TP +.I "\-A, \-\-all" +Print only names which match all non-option arguments, not those matching +one or more non-option arguments. +.TP +.I "\-b, \-\-basename" +Results are considered to match if the pattern specified matches the +final component of the name of a file as listed in the database. +This final component is usually referred to as the `base name'. +.TP +.I "\-c, \-\-count" +Instead of printing the matched filenames, just print the total +number of matches we found, unless \-\-\fIprint\fP (\-p) is also present. +.TP +.I "\-d \fIpath\fP, \-\-database=\fIpath\fP" +Instead of searching the default file name database, search the file +name databases in \fIpath\fP, which is a colon-separated list of +database file names. You can also use the environment variable +.B LOCATE_PATH +to set the list of database files to search. +The option overrides the environment variable if both are used. Empty +elements in the path are taken to be synonyms for the file name of the +default database. +A database can be supplied on stdin, using `\-' as an element +of \fIpath\fP. If more than one element of \fIpath\fP is `\-', +later instances are ignored (and a warning message is printed). +.IP +The file name database format changed starting with GNU +.B find +and +.B locate +version 4.0 to allow machines with different byte orderings to share +the databases. This version of +.B locate +can automatically recognize and read databases produced for older +versions of GNU +.B locate +or Unix versions of +.B locate +or +.BR find . +Support for the old locate database format will be discontinued in a +future release. +.TP +.I "\-e, \-\-existing" +Only print out such names that currently exist (instead of such names +that existed when the database was created). +Note that this may slow down the program a lot, if there are many matches +in the database. If you are using this option within a program, +please note that it is possible for the file to be deleted after +.B locate +has checked that it exists, but before you use it. +.TP +.I "\-E, \-\-non\-existing" +Only print out such names that currently do not exist (instead of such names +that existed when the database was created). +Note that this may slow down the program a lot, if there are many matches +in the database. +.TP +.I "\-\-help" +Print a summary of the options to +.B locate +and exit. +.TP +.I "\-i, \-\-ignore-case" +Ignore case distinctions in both the pattern and the file names. +.TP +.I "\-l N, \-\-limit=N" +Limit the number of matches to N. If a limit is set via this option, +the number of results printed for the \-c option will never be larger +than this number. +.TP +.I "\-L, \-\-follow" +If testing for the existence of files (with the \-e or \-E options), +consider broken symbolic links to be non-existing. This is the default. +.TP +.I "\-\-max-database-age D" +Normally, +.B locate +will issue a warning message when it searches a database which is more +than 8 days old. This option changes that value to something other +than 8. The effect of specifying a negative value is undefined. +.TP +.I "\-m, \-\-mmap" +Accepted but does nothing, for compatibility with BSD +.BR locate . +.TP +.I "\-P, \-H, \-\-nofollow" +If testing for the existence of files (with the \-e or \-E options), treat +broken symbolic links as if they were existing files. The \-H +form of this option is provided purely for similarity with +.BR find ; +the use of \-P is recommended over \-H. +.TP +.I "\-p, \-\-print" +Print search results when they normally would not, because of the presence +of \-\-statistics (\-S) or \-\-count (\-c). +.TP +.I "\-r, \-\-regex " +The pattern specified on the command line is understood to be a +regular expression, as opposed to a glob pattern. The Regular +expressions work in the same was as in +.B emacs +and +.BR find , +except for the fact that "." will match a newline. +Filenames whose full paths match the specified regular expression are +printed (or, in the case of the \-c option, counted). If you wish to +anchor your regular expression at the ends of the full path name, then +as is usual with regular expressions, you should use the characters ^ +and $ to signify this. +.TP +.I "\-s, \-\-stdio" +Accepted but does nothing, for compatibility with BSD +.BR locate . +.TP +.I "\-S, \-\-statistics" +Print various statistics about each locate database and then exit +without performing a search, unless non-option arguments are given. +For compatibility with BSD, \-S is accepted as a synonym +for \-\-statistics. However, the ouptut of +.B locate \-S +is different for the GNU and BSD implementations of +.BR locate . +.TP +.I "\-\-version" +Print the version number of +.B locate +and exit. +.TP +.I "\-w, \-\-wholename" +Match against the whole name of the file as listed in the database. +This is the default. +.SH ENVIRONMENT +.TP +.B LOCATE_PATH +Colon-separated list of databases to search. If the value has a +leading or trailing colon, or has two colons in a row, you may get +results that vary between different versions of +.BR locate . + +.SH "SEE ALSO" +\fBfind\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), \fBxargs\fP(1), +\fBglob\fP(3), +\fBFinding Files\fP (on-line in Info, or printed) +.SH "BUGS" +.P +The locate database correctly handles filenames containing newlines, +but only if the system's sort command has a working +.I \-z +option. If you suspect that +.B locate +may need to return filenames containing newlines, consider using its +.I \-\-null +option. +.P +The best way to report a bug is to use the form at +http://savannah.gnu.org/bugs/?group=findutils. +The reason for this is that you will then be able to track progress in +fixing the problem. Other comments about \fBlocate\fP(1) and about +the findutils package in general can be sent to the +.I bug-findutils +mailing list. To join the list, send email to +.IR bug-findutils-request@gnu.org . diff --git a/locate/locate.c b/locate/locate.c new file mode 100644 index 0000000..399b542 --- /dev/null +++ b/locate/locate.c @@ -0,0 +1,1938 @@ +/* locate -- search databases for filenames that match patterns + Copyright (C) 1994, 1996, 1998, 1999, 2000, 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 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. +*/ + +/* Usage: locate [options] pattern... + + Scan a pathname list for the full pathname of a file, given only + a piece of the name (possibly containing shell globbing metacharacters). + The list has been processed with front-compression, which reduces + the list size by a factor of 4-5. + Recognizes two database formats, old and new. The old format is + bigram coded, which reduces space by a further 20-25% and uses the + following encoding of the database bytes: + + 0-28 likeliest differential counts + offset (14) to make nonnegative + 30 escape code for out-of-range count to follow in next halfword + 128-255 bigram codes (the 128 most common, as determined by `updatedb') + 32-127 single character (printable) ASCII remainder + + Earlier versions of GNU locate used to use a novel two-tiered + string search technique, which was described in Usenix ;login:, Vol + 8, No 1, February/March, 1983, p. 8. + + However, latterly code changes to provide additional functionality + became dificult to make with the existing reading scheme, and so + we no longer perform the matching as efficiently as we used to (that is, + we no longer use the same algorithm). + + The old algorithm was: + + First, match a metacharacter-free subpattern and a partial + pathname BACKWARDS to avoid full expansion of the pathname list. + The time savings is 40-50% over forward matching, which cannot + efficiently handle overlapped search patterns and compressed + path remainders. + + Then, match the actual shell glob pattern (if in this form) + against the candidate pathnames using the slower shell filename + matching routines. + + + Written by James A. Woods . + Modified by David MacKenzie . + Additional work by James Youngman and Bas van Gompel. +*/ + +#include + +#include +#include +#include +#include +#include /* for setgroups() */ +#include +#include +#include +#include +#include + +#include /* for bool/boolean */ + +/* The presence of unistd.h is assumed by gnulib these days, so we + * might as well assume it too. + */ +/* We need for isatty(). */ +#include + +#if HAVE_FCNTL_H +/* We use fcntl() */ +#include +#endif + +#define NDEBUG +#include +#include + + +#ifdef STDC_HEADERS +#include +#endif + +#include + +#ifdef HAVE_LOCALE_H +#include +#endif + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* We used to use (String) instead of just String, but apparently ISO C + * doesn't allow this (at least, that's what HP said when someone reported + * this as a compiler bug). This is HP case number 1205608192. See + * also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11250 (which references + * ANSI 3.5.7p14-15). The Intel icc compiler also rejects constructs + * like: static const char buf[] = ("string"); + */ +# define N_(String) String +#endif + +#include "locatedb.h" +#include +#include "xalloc.h" +#include "error.h" +#include "human.h" +#include "dirname.h" +#include "closeout.h" +#include "nextelem.h" +#include "regex.h" +#include "quote.h" +#include "quotearg.h" +#include "printquoted.h" +#include "regextype.h" +#include "gnulib-version.h" + +/* Note that this evaluates Ch many times. */ +#ifdef _LIBC +# define TOUPPER(Ch) toupper (Ch) +# define TOLOWER(Ch) tolower (Ch) +#else +# define TOUPPER(Ch) (islower (Ch) ? toupper (Ch) : (Ch)) +# define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) +#endif + +/* typedef enum {false, true} boolean; */ + +/* Warn if a database is older than this. 8 days allows for a weekly + update that takes up to a day to perform. */ +static unsigned int warn_number_units = 8; + +/* Printable name of units used in WARN_SECONDS */ +static const char warn_name_units[] = N_("days"); +#define SECONDS_PER_UNIT (60 * 60 * 24) + +enum visit_result + { + VISIT_CONTINUE = 1, /* please call the next visitor */ + VISIT_ACCEPTED = 2, /* accepted, call no futher callbacks for this file */ + VISIT_REJECTED = 4, /* rejected, process next file. */ + VISIT_ABORT = 8 /* rejected, process no more files. */ + }; + +enum ExistenceCheckType + { + ACCEPT_EITHER, /* Corresponds to lack of -E/-e option */ + ACCEPT_EXISTING, /* Corresponds to option -e */ + ACCEPT_NON_EXISTING /* Corresponds to option -E */ + }; + +/* Check for existence of files before printing them out? */ +enum ExistenceCheckType check_existence = ACCEPT_EITHER; + +static int follow_symlinks = 1; + +/* What to separate the results with. */ +static int separator = '\n'; + +static struct quoting_options * quote_opts = NULL; +static bool stdout_is_a_tty; +static bool print_quoted_filename; +static bool results_were_filtered; + +static const char *selected_secure_db = NULL; + + +/* Change the number of days old the database can be + * before we complain about it. + */ +static void +set_max_db_age(const char *s) +{ + char *end; + unsigned long int val; + /* XXX: we ignore the case where the input is negative, which is allowed(!). */ + + if (0 == *s) + { + error(1, 0, + _("The argument argument for option --max-database-age must not be empty")); + } + + + /* We have to set errno here, otherwise when the function returns ULONG_MAX, + * we would not be able to tell if that is the correct answer, or whether it + * signifies an error. + */ + errno = 0; + val = strtoul(s, &end, 10); + + /* Diagnose number too large, non-numbes and trailing junk. */ + if ((ULONG_MAX == val && ERANGE == errno) || + (0 == val && EINVAL == errno)) + { + error(1, errno, + _("Invalid argument %s for option --max-database-age"), + quotearg_n_style(0, locale_quoting_style, s)); + } + else if (*end) + { + /* errno wasn't set, don't print its message */ + error(1, 0, + _("Invalid argument %s for option --max-database-age"), + quotearg_n_style(0, locale_quoting_style, s)); + } + else + { + warn_number_units = val; + } +} + + + +/* Read in a 16-bit int, high byte first (network byte order). */ + +static short +get_short (FILE *fp) +{ + + register short x; + + x = (signed char) fgetc (fp) << 8; + x |= (fgetc (fp) & 0xff); + return x; +} + +const char * const metacharacters = "*?[]\\"; + +/* Return nonzero if S contains any shell glob characters. + */ +static int +contains_metacharacter(const char *s) +{ + if (NULL == strpbrk(s, metacharacters)) + return 0; + else + return 1; +} + +/* locate_read_str() + * + * Read bytes from FP into the buffer at offset OFFSET in (*BUF), + * until we reach DELIMITER or end-of-file. We reallocate the buffer + * as necessary, altering (*BUF) and (*SIZ) as appropriate. No assumption + * is made regarding the content of the data (i.e. the implementation is + * 8-bit clean, the only delimiter is DELIMITER). + * + * Written Fri May 23 18:41:16 2003 by James Youngman, because getstr() + * has been removed from gnulib. + * + * We call the function locate_read_str() to avoid a name clash with the curses + * function getstr(). + */ +static int +locate_read_str(char **buf, size_t *siz, FILE *fp, int delimiter, int offs) +{ + char * p = NULL; + size_t sz = 0; + int nread; + size_t needed; + + nread = getdelim(&p, &sz, delimiter, fp); + if (nread >= 0) + { + assert(p != NULL); + + needed = offs + nread + 1u; + if (needed > (*siz)) + { + char *pnew = realloc(*buf, needed); + if (NULL == pnew) + { + return -1; /* FAIL */ + } + else + { + *siz = needed; + *buf = pnew; + } + } + memcpy((*buf)+offs, p, nread); + free(p); + } + return nread; +} + + +struct locate_limits +{ + uintmax_t limit; + uintmax_t items_accepted; +}; +static struct locate_limits limits; + + +struct locate_stats +{ + uintmax_t compressed_bytes; + uintmax_t total_filename_count; + uintmax_t total_filename_length; + uintmax_t whitespace_count; + uintmax_t newline_count; + uintmax_t highbit_filename_count; +}; +static struct locate_stats statistics; + + +struct regular_expression +{ + struct re_pattern_buffer regex; /* for --regex */ +}; + + +struct process_data +{ + int c; /* An input byte. */ + char itemcount; /* Indicates we're at the beginning of an slocate db. */ + int count; /* The length of the prefix shared with the previous database entry. */ + int len; + char *original_filename; /* The current input database entry. */ + size_t pathsize; /* Amount allocated for it. */ + char *munged_filename; /* path or base_name(path) */ + FILE *fp; /* The pathname database. */ + const char *dbfile; /* Its name, or "" */ + int slocatedb_format; /* Allows us to cope with slocate's format variant */ + GetwordEndianState endian_state; + /* for the old database format, + the first and second characters of the most common bigrams. */ + char bigram1[128]; + char bigram2[128]; +}; + + +typedef int (*visitfunc)(struct process_data *procdata, + void *context); + +struct visitor +{ + visitfunc inspector; + void * context; + struct visitor *next; +}; + + +static struct visitor *inspectors = NULL; +static struct visitor *lastinspector = NULL; +static struct visitor *past_pat_inspector = NULL; + +static inline int visit(const struct visitor *p, + int accept_flags, + struct process_data *procdata, + const struct visitor * const stop) +{ + register int result = accept_flags; + while ( (accept_flags & result) && (stop != p) ) + { + result = (p->inspector)(procdata, p->context); + p = p->next; + } + return result; +} + +/* 0 or 1 pattern(s) */ +static int +process_simple(struct process_data *procdata) +{ + return visit(inspectors, (VISIT_CONTINUE|VISIT_ACCEPTED), procdata, NULL); +} + +/* Accept if any pattern matches. */ +static int +process_or (struct process_data *procdata) +{ + int result; + + result = visit(inspectors, (VISIT_CONTINUE|VISIT_REJECTED), procdata, past_pat_inspector); + if (result == VISIT_CONTINUE) + result = VISIT_REJECTED; + if (result & (VISIT_ABORT | VISIT_REJECTED)) + return result; + + result = visit(past_pat_inspector, VISIT_CONTINUE, procdata, NULL); + if (VISIT_CONTINUE == result) + return VISIT_ACCEPTED; + else + return result; +} + +/* Accept if all pattern match. */ +static int +process_and (struct process_data *procdata) +{ + int result; + + result = visit(inspectors, (VISIT_CONTINUE|VISIT_ACCEPTED), procdata, past_pat_inspector); + if (result == VISIT_CONTINUE) + result = VISIT_REJECTED; + if (result & (VISIT_ABORT | VISIT_REJECTED)) + return result; + + result = visit(past_pat_inspector, VISIT_CONTINUE, procdata, NULL); + if (VISIT_CONTINUE == result) + return VISIT_ACCEPTED; + else + return result; +} + +typedef int (*processfunc)(struct process_data *procdata); + +static processfunc mainprocessor = NULL; + +static void +add_visitor(visitfunc fn, void *context) +{ + struct visitor *p = xmalloc(sizeof(struct visitor)); + p->inspector = fn; + p->context = context; + p->next = NULL; + + if (NULL == lastinspector) + { + lastinspector = inspectors = p; + } + else + { + lastinspector->next = p; + lastinspector = p; + } +} + +static int +visit_justprint_quoted(struct process_data *procdata, void *context) +{ + (void) context; + print_quoted (stdout, quote_opts, stdout_is_a_tty, + "%s", + procdata->original_filename); + putchar(separator); + return VISIT_CONTINUE; +} + +static int +visit_justprint_unquoted(struct process_data *procdata, void *context) +{ + (void) context; + fputs(procdata->original_filename, stdout); + putchar(separator); + return VISIT_CONTINUE; +} + +static void +toolong (struct process_data *procdata) +{ + error (1, 0, + _("locate database %s contains a " + "filename longer than locate can handle"), + procdata->dbfile); +} + +static void +extend (struct process_data *procdata, size_t siz1, size_t siz2) +{ + /* Figure out if the addition operation is safe before performing it. */ + if (SIZE_MAX - siz1 < siz2) + { + toolong (procdata); + } + else if (procdata->pathsize < (siz1+siz2)) + { + procdata->pathsize = siz1+siz2; + procdata->original_filename = x2nrealloc (procdata->original_filename, + &procdata->pathsize, + 1); + } +} + +static int +visit_old_format(struct process_data *procdata, void *context) +{ + register size_t i; + (void) context; + + if (EOF == procdata->c) + return VISIT_ABORT; + + /* Get the offset in the path where this path info starts. */ + if (procdata->c == LOCATEDB_OLD_ESCAPE) + { + int minval, maxval; + int word; + + procdata->count -= LOCATEDB_OLD_OFFSET; + minval = (0 - procdata->count); + if (procdata->count >= 0) + maxval = (procdata->len - procdata->count); + else + maxval = (procdata->len - 0); + word = getword(procdata->fp, procdata->dbfile, + minval, maxval, &procdata->endian_state); + procdata->count += word; + assert(procdata->count >= 0); + } + else + { + procdata->count += (procdata->c - LOCATEDB_OLD_OFFSET); + assert(procdata->count >= 0); + } + + /* Overlay the old path with the remainder of the new. Read + * more data until we get to the next filename. + */ + for (i=procdata->count; + (procdata->c = getc (procdata->fp)) > LOCATEDB_OLD_ESCAPE;) + { + if (EOF == procdata->c) + break; + + if (procdata->c < 0200) + { + /* An ordinary character. */ + extend (procdata, i, 1u); + procdata->original_filename[i++] = procdata->c; + } + else + { + /* Bigram markers have the high bit set. */ + extend (procdata, i, 2u); + procdata->c &= 0177; + procdata->original_filename[i++] = procdata->bigram1[procdata->c]; + procdata->original_filename[i++] = procdata->bigram2[procdata->c]; + } + } + + /* Consider the case where we executed the loop body zero times; we + * still need space for the terminating null byte. + */ + extend (procdata, i, 1u); + procdata->original_filename[i] = 0; + procdata->len = i; + procdata->munged_filename = procdata->original_filename; + + return VISIT_CONTINUE; +} + +static int +visit_locate02_format(struct process_data *procdata, void *context) +{ + register char *s; + int nread; + (void) context; + + if (procdata->slocatedb_format) + { + if (procdata->itemcount == 0) + { + ungetc(procdata->c, procdata->fp); + procdata->count = 0; + procdata->len = 0; + } + else if (procdata->itemcount == 1) + { + procdata->count = procdata->len-1; + } + else + { + if (procdata->c == LOCATEDB_ESCAPE) + procdata->count += (short)get_short (procdata->fp); + else if (procdata->c > 127) + procdata->count += procdata->c - 256; + else + procdata->count += procdata->c; + } + } + else + { + if (procdata->c == LOCATEDB_ESCAPE) + procdata->count += (short)get_short (procdata->fp); + else if (procdata->c > 127) + procdata->count += procdata->c - 256; + else + procdata->count += procdata->c; + } + + if (procdata->count > procdata->len || procdata->count < 0) + { + /* This should not happen generally , but since we're + * reading in data which is outside our control, we + * cannot prevent it. + */ + error(1, 0, _("locate database %s is corrupt or invalid"), + quotearg_n_style(0, locale_quoting_style, procdata->dbfile)); + } + + /* Overlay the old path with the remainder of the new. */ + nread = locate_read_str (&procdata->original_filename, + &procdata->pathsize, + procdata->fp, 0, procdata->count); + if (nread < 0) + return VISIT_ABORT; + procdata->c = getc (procdata->fp); + procdata->len = procdata->count + nread; + s = procdata->original_filename + procdata->len - 1; /* Move to the last char in path. */ + assert (s[0] != '\0'); + assert (s[1] == '\0'); /* Our terminator. */ + assert (s[2] == '\0'); /* Added by locate_read_str. */ + + procdata->munged_filename = procdata->original_filename; + + if (procdata->slocatedb_format) + { + /* Don't increment indefinitely, it might overflow. */ + if (procdata->itemcount < 6) + { + ++(procdata->itemcount); + } + } + + + return VISIT_CONTINUE; +} + +static int +visit_basename(struct process_data *procdata, void *context) +{ + (void) context; + procdata->munged_filename = base_name(procdata->original_filename); + + return VISIT_CONTINUE; +} + + +/* visit_existing_follow implements -L -e */ +static int +visit_existing_follow(struct process_data *procdata, void *context) +{ + struct stat st; + (void) context; + + /* munged_filename has been converted in some way (to lower case, + * or is just the base name of the file), and original_filename has not. + * Hence only original_filename is still actually the name of the file + * whose existence we would need to check. + */ + if (stat(procdata->original_filename, &st) != 0) + { + return VISIT_REJECTED; + } + else + { + return VISIT_CONTINUE; + } +} + +/* visit_non_existing_follow implements -L -E */ +static int +visit_non_existing_follow(struct process_data *procdata, void *context) +{ + struct stat st; + (void) context; + + /* munged_filename has been converted in some way (to lower case, + * or is just the base name of the file), and original_filename has not. + * Hence only original_filename is still actually the name of the file + * whose existence we would need to check. + */ + if (stat(procdata->original_filename, &st) == 0) + { + return VISIT_REJECTED; + } + else + { + return VISIT_CONTINUE; + } +} + +/* visit_existing_nofollow implements -P -e */ +static int +visit_existing_nofollow(struct process_data *procdata, void *context) +{ + struct stat st; + (void) context; + + /* munged_filename has been converted in some way (to lower case, + * or is just the base name of the file), and original_filename has not. + * Hence only original_filename is still actually the name of the file + * whose existence we would need to check. + */ + if (lstat(procdata->original_filename, &st) != 0) + { + return VISIT_REJECTED; + } + else + { + return VISIT_CONTINUE; + } +} + +/* visit_non_existing_nofollow implements -P -E */ +static int +visit_non_existing_nofollow(struct process_data *procdata, void *context) +{ + struct stat st; + (void) context; + + /* munged_filename has been converted in some way (to lower case, + * or is just the base name of the file), and original_filename has not. + * Hence only original_filename is still actually the name of the file + * whose existence we would need to check. + */ + if (lstat(procdata->original_filename, &st) == 0) + { + return VISIT_REJECTED; + } + else + { + return VISIT_CONTINUE; + } +} + +static int +visit_substring_match_nocasefold_wide(struct process_data *procdata, void *context) +{ + const char *pattern = context; + + if (NULL != mbsstr(procdata->munged_filename, pattern)) + return VISIT_ACCEPTED; + else + return VISIT_REJECTED; +} + +static int +visit_substring_match_nocasefold_narrow(struct process_data *procdata, void *context) +{ + const char *pattern = context; + assert(MB_CUR_MAX == 1); + if (NULL != strstr(procdata->munged_filename, pattern)) + return VISIT_ACCEPTED; + else + return VISIT_REJECTED; +} + +static int +visit_substring_match_casefold_wide(struct process_data *procdata, void *context) +{ + const char *pattern = context; + + if (NULL != mbscasestr(procdata->munged_filename, pattern)) + return VISIT_ACCEPTED; + else + return VISIT_REJECTED; +} + + +static int +visit_substring_match_casefold_narrow(struct process_data *procdata, void *context) +{ + const char *pattern = context; + + assert(MB_CUR_MAX == 1); + if (NULL != strcasestr(procdata->munged_filename, pattern)) + return VISIT_ACCEPTED; + else + return VISIT_REJECTED; +} + + +static int +visit_globmatch_nofold(struct process_data *procdata, void *context) +{ + const char *glob = context; + if (fnmatch(glob, procdata->munged_filename, 0) != 0) + return VISIT_REJECTED; + else + return VISIT_ACCEPTED; +} + + +static int +visit_globmatch_casefold(struct process_data *procdata, void *context) +{ + const char *glob = context; + if (fnmatch(glob, procdata->munged_filename, FNM_CASEFOLD) != 0) + return VISIT_REJECTED; + else + return VISIT_ACCEPTED; +} + + +static int +visit_regex(struct process_data *procdata, void *context) +{ + struct regular_expression *p = context; + const size_t len = strlen(procdata->munged_filename); + + int rv = re_search (&p->regex, procdata->munged_filename, + len, 0, len, + (struct re_registers *) NULL); + if (rv < 0) + { + return VISIT_REJECTED; /* no match (-1), or internal error (-2) */ + } + else + { + return VISIT_ACCEPTED; /* match */ + } +} + + +static int +visit_stats(struct process_data *procdata, void *context) +{ + struct locate_stats *p = context; + size_t len = strlen(procdata->original_filename); + const char *s; + int highbit, whitespace, newline; + + ++(p->total_filename_count); + p->total_filename_length += len; + + highbit = whitespace = newline = 0; + for (s=procdata->original_filename; *s; ++s) + { + if ( (int)(*s) & 128 ) + highbit = 1; + if ('\n' == *s) + { + newline = whitespace = 1; + } + else if (isspace((unsigned char)*s)) + { + whitespace = 1; + } + } + + if (highbit) + ++(p->highbit_filename_count); + if (whitespace) + ++(p->whitespace_count); + if (newline) + ++(p->newline_count); + + return VISIT_CONTINUE; +} + + +static int +visit_limit(struct process_data *procdata, void *context) +{ + struct locate_limits *p = context; + + (void) procdata; + + if (++p->items_accepted >= p->limit) + return VISIT_ABORT; + else + return VISIT_CONTINUE; +} + +static int +visit_count(struct process_data *procdata, void *context) +{ + struct locate_limits *p = context; + + (void) procdata; + + ++p->items_accepted; + return VISIT_CONTINUE; +} + +/* Emit the statistics. + */ +static void +print_stats(int argc, size_t database_file_size) +{ + char hbuf[LONGEST_HUMAN_READABLE + 1]; + + printf(_("Locate database size: %s bytes\n"), + human_readable ((uintmax_t) database_file_size, + hbuf, human_ceiling, 1, 1)); + + printf( (results_were_filtered ? + _("Matching Filenames: %s ") : + _("All Filenames: %s ")), + human_readable (statistics.total_filename_count, + hbuf, human_ceiling, 1, 1)); + printf(_("with a cumulative length of %s bytes"), + human_readable (statistics.total_filename_length, + hbuf, human_ceiling, 1, 1)); + + printf(_("\n\tof which %s contain whitespace, "), + human_readable (statistics.whitespace_count, + hbuf, human_ceiling, 1, 1)); + printf(_("\n\t%s contain newline characters, "), + human_readable (statistics.newline_count, + hbuf, human_ceiling, 1, 1)); + printf(_("\n\tand %s contain characters with the high bit set.\n"), + human_readable (statistics.highbit_filename_count, + hbuf, human_ceiling, 1, 1)); + + if (!argc) + { + if (results_were_filtered) + { + printf(_("Some filenames may have been filtered out, " + "so we cannot compute the compression ratio.\n")); + } + else + { + if (statistics.total_filename_length) + { + /* A negative compression ratio just means that the + * compressed database is larger than the list of + * filenames. This can happen for example for + * old-format databases containing a small list of short + * filenames, because the bigram list is 256 bytes. + */ + printf(_("Compression ratio %4.2f%% (higher is better)\n"), + 100.0 * ((double)statistics.total_filename_length + - (double) database_file_size) + / (double) statistics.total_filename_length); + } + else + { + printf(_("Compression ratio is undefined\n")); + } + } + } + printf("\n"); +} + +/* + * Return nonzero if the data we read in indicates that we are + * looking at a LOCATE02 locate database. + */ +static int +looking_at_gnu_locatedb (const char *data, size_t len) +{ + if (len < sizeof (LOCATEDB_MAGIC)) + return 0; + else if (0 == memcmp (data, LOCATEDB_MAGIC, sizeof (LOCATEDB_MAGIC))) + return 1; /* We saw the magic byte sequence */ + else + return 0; +} + +/* + * Return nonzero if the data we read in indicates that we are + * looking at an slocate database. + */ +static int +looking_at_slocate_locatedb (const char *filename, + const char *data, + size_t len, + int *seclevel) +{ + assert(len <= 2); + + if (len < 2) + { + return 0; + } + else + { + /* Check that the magic number is a one-byte string */ + if (0 == data[1]) + { + if (isdigit((unsigned char)data[0])) + { + /* looks promising. */ + *seclevel = (data[0] - '0'); + + if (*seclevel > 1) + { + /* Hmm, well it's probably an slocate database + * of some awsomely huge security level, like 2. + * We don't know how to handle those. + */ + error(0, 0, + _("locate database %s looks like an slocate " + "database but it seems to have security level %c, " + "which GNU findutils does not currently support"), + quotearg_n_style(0, locale_quoting_style, filename), + data[1]); + return 1; + } + else + { + return 1; + } + } + else + { + /* Not a digit. */ + return 0; + } + } + else + { + /* Definitely not slocate. */ + return 0; + } + } +} + + +static int +i_am_little_endian(void) +{ + union + { + unsigned char uch[4]; + unsigned int ui; + } u; + u.ui = 0u; + u.uch[0] = 1; + u.uch[1] = u.uch[2] = u.uch[3] = 0; + return u.ui == 1; +} + + + + +/* Print or count the entries in DBFILE that match shell globbing patterns in + ARGV. Return the number of entries matched. */ + +static unsigned long +search_one_database (int argc, + char **argv, + const char *dbfile, + FILE *fp, + off_t filesize, + int ignore_case, + int enable_print, + int basename_only, + int use_limit, + struct locate_limits *plimit, + int stats, + int op_and, + int regex, + int regex_options) +{ + char *pathpart; /* A pattern to consider. */ + int argn; /* Index to current pattern in argv. */ + int nread; /* number of bytes read from an entry. */ + struct process_data procdata; /* Storage for data shared with visitors. */ + int slocate_seclevel; + int oldformat; + struct visitor* pvis; /* temp for determining past_pat_inspector. */ + const char *format_name; + enum ExistenceCheckType do_check_existence; + + + /* We may turn on existence checking for a given database. + * We ensure that we can return to the previous behaviour + * by using two variables, do_check_existence (which we act on) + * and check_existence (whcih indicates the default before we + * adjust it on the bassis of what kind of database we;re using + */ + do_check_existence = check_existence; + + + if (ignore_case) + regex_options |= RE_ICASE; + + oldformat = 0; + procdata.endian_state = GetwordEndianStateInitial; + procdata.len = procdata.count = 0; + procdata.slocatedb_format = 0; + procdata.itemcount = 0; + + procdata.dbfile = dbfile; + procdata.fp = fp; + + /* Set up the inspection regime */ + inspectors = NULL; + lastinspector = NULL; + past_pat_inspector = NULL; + results_were_filtered = false; +#if 0 + procdata.pathsize = 1026; /* Increased as necessary by locate_read_str. */ +#else + procdata.pathsize = 128; /* Increased as necessary by locate_read_str. */ +#endif + procdata.original_filename = xmalloc (procdata.pathsize); + + + nread = fread (procdata.original_filename, 1, SLOCATE_DB_MAGIC_LEN, + procdata.fp); + slocate_seclevel = 0; + if (looking_at_slocate_locatedb(procdata.dbfile, + procdata.original_filename, + nread, + &slocate_seclevel)) + { + error(0, 0, + _("%s is an slocate database. " + "Support for these is new, expect problems for now."), + quotearg_n_style(0, locale_quoting_style, procdata.dbfile)); + + /* slocate also uses frcode, but with a different header. + * We handle the header here and then work with the data + * in the normal way. + */ + if (slocate_seclevel > 1) + { + /* We don't know what those security levels mean, + * so do nothing further + */ + error(0, 0, + _("%s is an slocate database of unsupported security level %d; skipping it."), + quotearg_n_style(0, locale_quoting_style, procdata.dbfile), + slocate_seclevel); + return 0; + } + else if (slocate_seclevel > 0) + { + /* Don't show the filenames to the user if they don't exist. + * Showing stats is safe since filenames are only counted + * after the existence check + */ + if (ACCEPT_NON_EXISTING == check_existence) + { + /* Do not allow the user to see a list of filenames that they + * cannot stat(). + */ + error(0, 0, + _("You specified the -E option, but that option " + "cannot be used with slocate-format databases " + "with a non-zero security level. No results will be " + "generated for this database.\n")); + return 0; + } + if (ACCEPT_EXISTING != do_check_existence) + { + if (enable_print || stats) + { + error(0, 0, + _("%s is an slocate database. " + "Turning on the '-e' option."), + quotearg_n_style(0, locale_quoting_style, procdata.dbfile)); + } + do_check_existence = ACCEPT_EXISTING; + } + } + add_visitor(visit_locate02_format, NULL); + format_name = "slocate"; + procdata.slocatedb_format = 1; + } + else + { + int nread2; + + procdata.slocatedb_format = 0; + extend (&procdata, sizeof(LOCATEDB_MAGIC), 0u); + nread2 = fread (procdata.original_filename+nread, 1, sizeof (LOCATEDB_MAGIC)-nread, + procdata.fp); + if (looking_at_gnu_locatedb(procdata.original_filename, nread+nread2)) + { + add_visitor(visit_locate02_format, NULL); + format_name = "GNU LOCATE02"; + } + else /* Use the old format */ + { + int i; + + nread += nread2; + /* Read the list of the most common bigrams in the database. */ + if (nread < 256) + { + extend (&procdata, 256u, 0u); + int more_read = fread (procdata.original_filename + nread, 1, + 256 - nread, procdata.fp); + if ( (more_read + nread) != 256 ) + { + error(1, 0, + _("Old-format locate database %s is " + "too short to be valid"), + quotearg_n_style(0, locale_quoting_style, dbfile)); + + } + } + + for (i = 0; i < 128; i++) + { + procdata.bigram1[i] = procdata.original_filename[i << 1]; + procdata.bigram2[i] = procdata.original_filename[(i << 1) + 1]; + } + format_name = "old"; + oldformat = 1; + add_visitor(visit_old_format, NULL); + } + } + + if (basename_only) + add_visitor(visit_basename, NULL); + + /* Add an inspector for each pattern we're looking for. */ + for ( argn = 0; argn < argc; argn++ ) + { + results_were_filtered = true; + pathpart = argv[argn]; + if (regex) + { + struct regular_expression *p = xmalloc(sizeof(*p)); + const char *error_message = NULL; + + memset (&p->regex, 0, sizeof (p->regex)); + + re_set_syntax(regex_options); + p->regex.allocated = 100; + p->regex.buffer = (unsigned char *) xmalloc (p->regex.allocated); + p->regex.fastmap = NULL; + p->regex.syntax = regex_options; + p->regex.translate = NULL; + + error_message = re_compile_pattern (pathpart, strlen (pathpart), + &p->regex); + if (error_message) + { + error (1, 0, "%s", error_message); + } + else + { + add_visitor(visit_regex, p); + } + } + else if (contains_metacharacter(pathpart)) + { + if (ignore_case) + add_visitor(visit_globmatch_casefold, pathpart); + else + add_visitor(visit_globmatch_nofold, pathpart); + } + else + { + /* No glob characters used. Hence we match on + * _any part_ of the filename, not just the + * basename. This seems odd to me, but it is the + * traditional behaviour. + * James Youngman + */ + visitfunc matcher; + if (1 == MB_CUR_MAX) + { + /* As an optimisation, use a strstr() matcher if we are + * in a unibyte locale. This can give a x2 speedup in + * the C locale. Some light testing reveals that + * glibc's strstr() is somewhere around 40% faster than + * gnulib's, so we just use strstr(). + */ + matcher = ignore_case ? + visit_substring_match_casefold_narrow : + visit_substring_match_nocasefold_narrow; + } + else + { + matcher = ignore_case ? + visit_substring_match_casefold_wide : + visit_substring_match_nocasefold_wide; + } + add_visitor(matcher, pathpart); + } + } + + pvis = lastinspector; + + /* We add visit_existing_*() as late as possible to reduce the + * number of stat() calls. + */ + switch (do_check_existence) + { + case ACCEPT_EXISTING: + results_were_filtered = true; + if (follow_symlinks) /* -L, default */ + add_visitor(visit_existing_follow, NULL); + else /* -P */ + add_visitor(visit_existing_nofollow, NULL); + break; + + case ACCEPT_NON_EXISTING: + results_were_filtered = true; + if (follow_symlinks) /* -L, default */ + add_visitor(visit_non_existing_follow, NULL); + else /* -P */ + add_visitor(visit_non_existing_nofollow, NULL); + break; + + case ACCEPT_EITHER: /* Default, neither -E nor -e */ + /* do nothing; no extra processing. */ + break; + } + + /* Security issue: The stats visitor must be added immediately + * before the print visitor, because otherwise the -S option would + * leak information about files that the caller cannot see. + */ + if (stats) + add_visitor(visit_stats, &statistics); + + if (enable_print) + { + if (print_quoted_filename) + add_visitor(visit_justprint_quoted, NULL); + else + add_visitor(visit_justprint_unquoted, NULL); + } + + + if (use_limit) + add_visitor(visit_limit, plimit); + else + add_visitor(visit_count, plimit); + + + if (argc > 1) + { + past_pat_inspector = pvis->next; + if (op_and) + mainprocessor = process_and; + else + mainprocessor = process_or; + } + else + mainprocessor = process_simple; + + if (stats) + { + printf(_("Database %s is in the %s format.\n"), + procdata.dbfile, + format_name); + } + + + procdata.c = getc (procdata.fp); + /* If we are searching for filename patterns, the inspector list + * will contain an entry for each pattern for which we are searching. + */ + while ( (procdata.c != EOF) && + (VISIT_ABORT != (mainprocessor)(&procdata)) ) + { + /* Do nothing; all the work is done in the visitor functions. */ + } + + if (stats) + { + if (oldformat) + { + int host_little_endian = i_am_little_endian(); + const char *little = _("The database has little-endian " + "machine-word encoding.\n"); + const char *big = _("The database has big-endian " + "machine-word encoding.\n"); + + if (GetwordEndianStateNative == procdata.endian_state) + { + printf("%s", (host_little_endian ? little : big)); + } + else if (GetwordEndianStateSwab == procdata.endian_state) + { + printf("%s", (host_little_endian ? big : little)); + } + else + { + printf(_("The database machine-word encoding order " + "is not obvious.\n")); + } + } + if (filesize) + print_stats(argc, filesize); + } + + if (ferror (procdata.fp)) + { + error (0, errno, "%s", + quotearg_n_style(0, locale_quoting_style, procdata.dbfile)); + return 0; + } + return plimit->items_accepted; +} + + + + +extern char *version_string; + +/* The name this program was run with. */ +char *program_name; + +static void +usage (FILE *stream) +{ + fprintf (stream, _("\ +Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n\ + [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n\ + [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n\ + [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --stdio ]\n\ + [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n\ + [--max-database-age D] [--version] [--help]\n\ + pattern...\n"), + program_name); + fputs (_("\nReport bugs to .\n"), stream); +} +enum + { + REGEXTYPE_OPTION = CHAR_MAX + 1, + MAX_DB_AGE + }; + + +static struct option const longopts[] = +{ + {"database", required_argument, NULL, 'd'}, + {"existing", no_argument, NULL, 'e'}, + {"non-existing", no_argument, NULL, 'E'}, + {"ignore-case", no_argument, NULL, 'i'}, + {"all", no_argument, NULL, 'A'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {"null", no_argument, NULL, '0'}, + {"count", no_argument, NULL, 'c'}, + {"wholename", no_argument, NULL, 'w'}, + {"wholepath", no_argument, NULL, 'w'}, /* Synonym. */ + {"basename", no_argument, NULL, 'b'}, + {"print", no_argument, NULL, 'p'}, + {"stdio", no_argument, NULL, 's'}, + {"mmap", no_argument, NULL, 'm'}, + {"limit", required_argument, NULL, 'l'}, + {"regex", no_argument, NULL, 'r'}, + {"regextype", required_argument, NULL, REGEXTYPE_OPTION}, + {"statistics", no_argument, NULL, 'S'}, + {"follow", no_argument, NULL, 'L'}, + {"nofollow", no_argument, NULL, 'P'}, + {"max-database-age", required_argument, NULL, MAX_DB_AGE}, + {NULL, no_argument, NULL, 0} +}; + + +static int +drop_privs(void) +{ + const char * what = "failed"; + const uid_t orig_euid = geteuid(); + const uid_t uid = getuid(); + const gid_t gid = getgid(); + +#if HAVE_SETGROUPS + /* Use of setgroups() is restricted to root only. */ + if (0 == orig_euid) + { + /* We're either root or running setuid-root. */ + gid_t groups[1]; + groups[0] = gid; + if (0 != setgroups(1u, groups)) + { + what = _("failed to drop group privileges"); + goto fail; + } + } +#endif + + /* Drop any setuid privileges */ + if (uid != orig_euid) + { + if (0 == uid) + { + /* We're really root anyway, but are setuid to something else. Leave it. */ + } + else + { + errno = 0; + if (0 != setuid(getuid())) + { + what = _("failed to drop setuid privileges"); + goto fail; + } + + /* Defend against the case where the attacker runs us with the + * capability to call setuid() turned off, which on some systems + * will cause the above attempt to drop privileges fail (leaving us + * privileged). + */ + else + { + /* Check that we can no longer switch bask to root */ + if (0 == setuid(0)) + { + what = _("Failed to fully drop privileges"); + /* The errno value here is not interesting (since + * the system call we are complaining about + * succeeded when we wanted it to fail). Arrange + * for the call to error() not to print the errno + * value by setting errno=0. + */ + errno = 0; + goto fail; + } + } + } + } + + /* Drop any setgid privileges */ + errno = 0; + if (0 != setgid(gid)) + { + what = _("failed to drop setgid privileges"); + goto fail; + } + + /* success. */ + return 0; + + fail: + error(1, errno, "%s", + quotearg_n_style(0, locale_quoting_style, what)); + abort(); + kill(0, SIGKILL); + _exit(1); + /*NOTREACHED*/ + /* ... we hope. */ + for (;;) + { + /* deliberate infinite loop */ + } +} + +static int +opendb(const char *name) +{ + int fd = open(name, O_RDONLY +#if defined(O_LARGEFILE) + |O_LARGEFILE +#endif + ); + if (fd >= 0) + { + /* Make sure it won't survive an exec */ + if (0 != fcntl(fd, F_SETFD, FD_CLOEXEC)) + { + close(fd); + fd = -1; + } + } + return fd; +} + +int +dolocate (int argc, char **argv, int secure_db_fd) +{ + char *dbpath; + unsigned long int found = 0uL; + int optc; + int ignore_case = 0; + int print = 0; + int just_count = 0; + int basename_only = 0; + int use_limit = 0; + int regex = 0; + int regex_options = RE_SYNTAX_EMACS; + int stats = 0; + int op_and = 0; + const char *e; + FILE *fp; + int they_chose_db = 0; + bool did_stdin = false; /* Set to prevent rereading stdin. */ + + program_name = argv[0]; + +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + atexit (close_stdout); + + limits.limit = 0; + limits.items_accepted = 0; + + quote_opts = clone_quoting_options (NULL); + print_quoted_filename = true; + + /* We cannot simultaneously trust $LOCATE_PATH and use the + * setuid-access-controlled database,, since that could cause a leak + * of private data. + */ + dbpath = getenv ("LOCATE_PATH"); + if (dbpath) + { + they_chose_db = 1; + } + + check_existence = ACCEPT_EITHER; + + while ((optc = getopt_long (argc, argv, "Abcd:eEil:prsm0SwHPL", longopts, (int *) 0)) != -1) + switch (optc) + { + case '0': + separator = 0; + print_quoted_filename = false; /* print filename 'raw'. */ + break; + + case 'A': + op_and = 1; + break; + + case 'b': + basename_only = 1; + break; + + case 'c': + just_count = 1; + break; + + case 'd': + dbpath = optarg; + they_chose_db = 1; + break; + + case 'e': + check_existence = ACCEPT_EXISTING; + break; + + case 'E': + check_existence = ACCEPT_NON_EXISTING; + break; + + case 'i': + ignore_case = 1; + break; + + case 'h': + usage (stdout); + return 0; + + case MAX_DB_AGE: + /* XXX: nothing in the test suite for this option. */ + set_max_db_age(optarg); + break; + + case 'p': + print = 1; + break; + + case 'v': + printf (_("GNU locate version %s\n"), version_string); + printf (_("Built using GNU gnulib version %s\n"), gnulib_version); + return 0; + + case 'w': + basename_only = 0; + break; + + case 'r': + regex = 1; + break; + + case REGEXTYPE_OPTION: + regex_options = get_regex_type(optarg); + break; + + case 'S': + stats = 1; + break; + + case 'L': + follow_symlinks = 1; + break; + + /* In find, -P and -H differ in the way they handle paths + * given on the command line. This is not relevant for + * locate, but the -H option is supported because it is + * probably more intuitive to do so. + */ + case 'P': + case 'H': + follow_symlinks = 0; + break; + + case 'l': + { + char *end = optarg; + strtol_error err = xstrtoumax(optarg, &end, 10, &limits.limit, NULL); + if (LONGINT_OK != err) + { + STRTOL_FATAL_ERROR(optarg, _("argument to --limit"), err); + } + use_limit = 1; + } + break; + + case 's': /* use stdio */ + case 'm': /* use mmap */ + /* These options are implemented simply for + * compatibility with FreeBSD + */ + break; + + default: + usage (stderr); + return 1; + } + + + /* If the user gave the -d option or set LOCATE_PATH, + * relinquish access to the secure database. + */ + if (they_chose_db) + { + if (secure_db_fd >= 0) + { + close(secure_db_fd); + secure_db_fd = -1; + } + } + + if (!just_count && !stats) + print = 1; + + if (stats) + { + if (optind == argc) + use_limit = 0; + } + else + { + if (!just_count && optind == argc) + { + usage (stderr); + return 1; + } + } + + + if (1 == isatty(STDOUT_FILENO)) + stdout_is_a_tty = true; + else + stdout_is_a_tty = false; + + if (they_chose_db) + next_element (dbpath, 0); /* Initialize. */ + + /* Bail out early if limit already reached. */ + while (!use_limit || limits.limit > limits.items_accepted) + { + struct stat st; + int fd; + off_t filesize; + + statistics.compressed_bytes = + statistics.total_filename_count = + statistics.total_filename_length = + statistics.whitespace_count = + statistics.newline_count = + statistics.highbit_filename_count = 0u; + + if (they_chose_db) + { + /* Take the next element from the list of databases */ + e = next_element ((char *) NULL, 0); + if (NULL == e) + break; + + if (0 == strcmp (e, "-")) + { + if (did_stdin) + { + error (0, 0, + _("warning: the locate database can only be read from stdin once.")); + return 0; + } + else + { + e = ""; + fd = 0; + did_stdin = true; + } + } + else + { + if (0 == strlen(e) || 0 == strcmp(e, ".")) + { + e = LOCATE_DB; + } + + /* open the database */ + fd = opendb(e); + if (fd < 0) + { + error (0, errno, "%s", + quotearg_n_style(0, locale_quoting_style, e)); + return 0; + } + } + } + else + { + if (-1 == secure_db_fd) + { + /* Already searched the database, it's time to exit the loop */ + break; + } + else + { + e = selected_secure_db; + fd = secure_db_fd; + secure_db_fd = -1; + } + } + + /* Check the database to see if it is old. */ + if (fstat(fd, &st)) + { + error (0, errno, "%s", + quotearg_n_style(0, locale_quoting_style, e)); + /* continue anyway */ + filesize = (off_t)0; + } + else + { + time_t now; + + filesize = st.st_size; + + if ((time_t)-1 == time(&now)) + { + /* If we can't tell the time, we don't know how old the + * database is. But since the message is just advisory, + * we continue anyway. + */ + error (0, errno, "time system call"); + } + else + { + double age = difftime(now, st.st_mtime); + double warn_seconds = SECONDS_PER_UNIT * warn_number_units; + if (age > warn_seconds) + { + /* For example: + warning: database `fred' is more than 8 days old (actual age is 10 days)*/ + error (0, 0, + _("warning: database %s is more than %d %s old (actual age is %.1f %s)"), + quotearg_n_style(0, locale_quoting_style, e), + warn_number_units, _(warn_name_units), + (age/(double)SECONDS_PER_UNIT), _(warn_name_units)); + } + } + } + + fp = fdopen(fd, "r"); + if (NULL == fp) + { + error (0, errno, "%s", + quotearg_n_style(0, locale_quoting_style, e)); + return 0; + } + + /* Search this database for all patterns simultaneously */ + found = search_one_database (argc - optind, &argv[optind], + e, fp, filesize, + ignore_case, print, basename_only, + use_limit, &limits, stats, + op_and, regex, regex_options); + + /* Close the databsase (even if it is stdin) */ + if (fclose (fp) == EOF) + { + error (0, errno, "%s", + quotearg_n_style(0, locale_quoting_style, e)); + return 0; + } + } + + if (just_count) + { + printf("%ld\n", found); + } + + if (found || (use_limit && (limits.limit==0)) || stats ) + return 0; + else + return 1; +} + +#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) +static int +open_secure_db(void) +{ + int fd, i; + + const char * secure_db_list[] = + { + LOCATE_DB, + "/var/lib/slocate/slocate.db", + NULL + }; + for (i=0; secure_db_list[i]; ++i) + { + fd = opendb(secure_db_list[i]); + if (fd >= 0) + { + selected_secure_db = secure_db_list[i]; + return fd; + } + } + return -1; +} + +int +main (int argc, char **argv) +{ + int dbfd = open_secure_db(); + drop_privs(); + + return dolocate(argc, argv, dbfd); +} + diff --git a/locate/locatedb.5 b/locate/locatedb.5 new file mode 100644 index 0000000..a94905d --- /dev/null +++ b/locate/locatedb.5 @@ -0,0 +1,153 @@ +.TH LOCATEDB 5 \" -*- nroff -*- +.SH NAME +locatedb \- front-compressed file name database +.SH DESCRIPTION +This manual page documents the format of file name databases for the +GNU version of +.BR locate . +The file name databases contain lists of files that were in +particular directory trees when the databases were last updated. +.P +There can be multiple databases. Users can select which databases +\fBlocate\fP searches using an environment variable or command line +option; see \fBlocate\fP(1). The system administrator can choose the +file name of the default database, the frequency with which the +databases are updated, and the directories for which they contain +entries. Normally, file name databases are updated by running the +\fBupdatedb\fP program periodically, typically nightly; see +\fBupdatedb\fP(1). + +.SH GNU LOCATE02 database format +This is the default format of databases produced by +.BR updatedb . +The +.B updatedb +program runs +.B frcode +to compress the list of file names using front-compression, which +reduces the database size by a factor of 4 to 5. Front-compression +(also known as incremental encoding) works as follows. +.P +The database entries are a sorted list (case-insensitively, for users' +convenience). Since the list is sorted, each entry is likely to share +a prefix (initial string) with the previous entry. Each database +entry begins with an signed offset-differential count byte, which is +the additional number of characters of prefix of the preceding entry +to use beyond the number that the preceding entry is using of its +predecessor. (The counts can be negative.) Following the count is a +null-terminated ASCII remainder \(em the part of the name that follows +the shared prefix. +.P +If the offset-differential count is larger than can be stored in a +signed byte (+/\-127), the byte has the value 0x80 (binary 10000000) +and the actual count follows in a 2-byte word, with the high byte +first (network byte order). This count can also be negative (the sign +bit being in the first of the two bytes). +.P +Every database begins with a dummy entry for a file called `LOCATE02', +which \fBlocate\fP checks for to ensure that the database file has the +correct format; it ignores the entry in doing the search. +.P +Databases can not be concatenated together, even if the first +(dummy) entry is trimmed from all but the first database. This +is because the offset-differential count in the first entry of the +second and following databases will be wrong. +.P +In the future, the data within the locate database may not be sorted +in any particular order. To obtain sorted results, pipe the output of +.B locate +through +.BR "sort -f" . +.SH slocate database format +The +.B slocate +program uses a database format similar to, but not quite the same as, +GNU +.BR locate . +The first byte of the database specifies its +.I security +.IR level . +If the security level is 0, +.B slocate +will read, match and print filenames on the basis of the information +in the database only. However, if the security level byte is 1, +.B slocate +omits entries from its output if the invoking user is unable to access +them. The second byte of the database is zero. The second byte is +followed by the first database entry. The first entry in the database +is not preceded by any differential count or dummy entry. Instead +the differential count for the first item is assumed to be zero. +.P +Starting with the second entry (if any) in the database, data is +interpreted as for the GNU LOCATE02 format. + +.SH Old Locate Database format +There is also an old database format, used by Unix +.B locate +and +.B find +programs and earlier releases of the GNU ones. \fBupdatedb\fP runs +programs called \fBbigram\fP and \fBcode\fP to produce old-format +databases. The old format differs from the above description in the +following ways. Instead of each entry starting with an +offset-differential count byte and ending with a null, byte values +from 0 through 28 indicate offset-differential counts from -14 through +14. The byte value indicating that a long offset-differential count +follows is 0x1e (30), not 0x80. The long counts are stored in host +byte order, which is not necessarily network byte order, and host +integer word size, which is usually 4 bytes. They also represent a +count 14 less than their value. The database lines have no +termination byte; the start of the next line is indicated by its first +byte having a value <= 30. +.P +In addition, instead of starting with a dummy entry, the old database +format starts with a 256 byte table containing the 128 most common +bigrams in the file list. A bigram is a pair of adjacent bytes. +Bytes in the database that have the high bit set are indexes (with the +high bit cleared) into the bigram table. The bigram and +offset-differential count coding makes these databases 20-25% smaller +than the new format, but makes them not 8-bit clean. Any byte in a +file name that is in the ranges used for the special codes is replaced +in the database by a question mark, which not coincidentally is the +shell wildcard to match a single character. +.SH EXAMPLE +.nf + +Input to \fBfrcode\fP: +.\" with nulls changed to newlines: +/usr/src +/usr/src/cmd/aardvark.c +/usr/src/cmd/armadillo.c +/usr/tmp/zoo + +Length of the longest prefix of the preceding entry to share: +0 /usr/src +8 /cmd/aardvark.c +14 rmadillo.c +5 tmp/zoo + +.fi +Output from \fBfrcode\fP, with trailing nulls changed to newlines +and count bytes made printable: +.nf +0 LOCATE02 +0 /usr/src +8 /cmd/aardvark.c +6 rmadillo.c +\-9 tmp/zoo + +(6 = 14 \- 8, and \-9 = 5 \- 14) +.fi +.SH "SEE ALSO" +\fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBxargs\fP(1), +\fBFinding Files\fP (on-line in Info, or printed) +.SH "BUGS" +.P +The best way to report a bug is to use the form at +http://savannah.gnu.org/bugs/?group=findutils. +The reason for this is that you will then be able to track progress in +fixing the problem. Other comments about \fBlocate\fP(1) and about +the findutils package in general can be sent to the +.I bug-findutils +mailing list. To join the list, send email to +.IR bug-findutils-request@gnu.org . diff --git a/locate/locatedb.h b/locate/locatedb.h new file mode 100644 index 0000000..42cede8 --- /dev/null +++ b/locate/locatedb.h @@ -0,0 +1,82 @@ +/* locatedb.h -- declarations for the locate database + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef _LOCATEDB_H +#define _LOCATEDB_H 1 + +/* The magic string at the start of a locate database, to make sure + it's in the right format. The 02 is the database format version number. + This string has the same format as a database entry, but you can't + concatenate databases even if you remove it, since the differential count + in the first entry of the second database will be wrong. */ +#define LOCATEDB_MAGIC "\0LOCATE02" + +/* Common-prefix length differences in the ranges + 0..127, -127..-1 (0x00..0x7f, 0x81..0xff) fit into one byte. + This value (which is -128) indicates that the difference is + too large to fit into one byte, and a two-byte integer follows. */ +#define LOCATEDB_ESCAPE 0x80 +#define LOCATEDB_ONEBYTE_MAX (127) +#define LOCATEDB_ONEBYTE_MIN (-127) + + +/* If it is ever possible to try to encode LOCATEDB_MAGIC as a + * single-byte offset, then an unfortunate length of common prefix + * will produce a spurious escape character, desynchronising the data + * stream. We use a compile-time check in the preprocessor to prevent + * this. + */ +#if LOCATEDB_ESCAPE <= LOCATEDB_ONEBYTE_MAX +#error "You have a bad combination of LOCATEDB_ESCAPE and LOCATEDB_ONEBYTE_MAX, see above" +#endif + +/* These are used for old, bigram-encoded databases: */ + +/* Means the differential count follows in a 2-byte int instead. */ +#define LOCATEDB_OLD_ESCAPE 30 + +/* Offset added to differential counts to encode them as positive numbers. */ +#define LOCATEDB_OLD_OFFSET 14 + +# ifndef PARAMS +# if defined PROTOTYPES || (defined __STDC__ && __STDC__) +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +# endif + +typedef enum + { + GetwordEndianStateInitial = 0, + GetwordEndianStateNative = 1, + GetwordEndianStateSwab = 2 + } GetwordEndianState; + +int getword (FILE *fp, const char *filename, + size_t minvalue, size_t maxvalue, + GetwordEndianState *endian_state_flag); + +bool putword (FILE *fp, int word, + GetwordEndianState endian_state_flag); + + +#define SLOCATE_DB_MAGIC_LEN 2 + +#endif /* !_LOCATEDB_H */ diff --git a/locate/testsuite/Makefile.am b/locate/testsuite/Makefile.am new file mode 100644 index 0000000..75623bc --- /dev/null +++ b/locate/testsuite/Makefile.am @@ -0,0 +1,50 @@ +AUTOMAKE_OPTIONS=dejagnu +LOCATE = ../locate +UPDATEDB = ../updatedb +LOCATEFLAGS = +UPDATEDBFLAGS = +DEJATOOL = locate + +EXTRA_DIST_EXP = \ +config/unix.exp \ +locate.gnu/bigendian.exp \ +locate.gnu/littleendian.exp \ +locate.gnu/ignore_case1.exp \ +locate.gnu/ignore_case2.exp \ +locate.gnu/ignore_case3.exp \ +locate.gnu/bigprefix1.exp \ +locate.gnu/regex1.exp \ +locate.gnu/exists1.exp \ +locate.gnu/exists2.exp \ +locate.gnu/exists3.exp \ +locate.gnu/notexists1.exp \ +locate.gnu/notexists2.exp \ +locate.gnu/notexists3.exp \ +locate.gnu/old_prefix.exp \ +locate.gnu/space1st.exp \ +locate.gnu/sv-bug-14535.exp \ +locate.gnu/exceedshort.exp + +EXTRA_DIST_XI = \ +locate.gnu/locateddb.old.powerpc.xi \ +locate.gnu/locateddb.old.x86.xi + +EXTRA_DIST_XO = \ +locate.gnu/bigendian.xo \ +locate.gnu/littleendian.xo \ +locate.gnu/ignore_case1.xo \ +locate.gnu/ignore_case2.xo \ +locate.gnu/ignore_case3.xo \ +locate.gnu/exists1.xo \ +locate.gnu/exists2.xo \ +locate.gnu/exists3.xo \ +locate.gnu/notexists1.xo \ +locate.gnu/notexists2.xo \ +locate.gnu/notexists3.xo \ +locate.gnu/old_prefix.xo + +EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI) + +# DIST_SUBDIRS = config locate.gnu + +CLEANFILES = *.log *.sum site.exp site.bak diff --git a/locate/testsuite/Makefile.in b/locate/testsuite/Makefile.in new file mode 100644 index 0000000..58d57f0 --- /dev/null +++ b/locate/testsuite/Makefile.in @@ -0,0 +1,701 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = locate/testsuite +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXPECT = expect +RUNTEST = runtest +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = dejagnu +LOCATE = ../locate +UPDATEDB = ../updatedb +LOCATEFLAGS = +UPDATEDBFLAGS = +DEJATOOL = locate +EXTRA_DIST_EXP = \ +config/unix.exp \ +locate.gnu/bigendian.exp \ +locate.gnu/littleendian.exp \ +locate.gnu/ignore_case1.exp \ +locate.gnu/ignore_case2.exp \ +locate.gnu/ignore_case3.exp \ +locate.gnu/bigprefix1.exp \ +locate.gnu/regex1.exp \ +locate.gnu/exists1.exp \ +locate.gnu/exists2.exp \ +locate.gnu/exists3.exp \ +locate.gnu/notexists1.exp \ +locate.gnu/notexists2.exp \ +locate.gnu/notexists3.exp \ +locate.gnu/old_prefix.exp \ +locate.gnu/space1st.exp \ +locate.gnu/sv-bug-14535.exp \ +locate.gnu/exceedshort.exp + +EXTRA_DIST_XI = \ +locate.gnu/locateddb.old.powerpc.xi \ +locate.gnu/locateddb.old.x86.xi + +EXTRA_DIST_XO = \ +locate.gnu/bigendian.xo \ +locate.gnu/littleendian.xo \ +locate.gnu/ignore_case1.xo \ +locate.gnu/ignore_case2.xo \ +locate.gnu/ignore_case3.xo \ +locate.gnu/exists1.xo \ +locate.gnu/exists2.xo \ +locate.gnu/exists3.xo \ +locate.gnu/notexists1.xo \ +locate.gnu/notexists2.xo \ +locate.gnu/notexists3.xo \ +locate.gnu/old_prefix.xo + +EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI) + +# DIST_SUBDIRS = config locate.gnu +CLEANFILES = *.log *.sum site.exp site.bak +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(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 locate/testsuite/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits locate/testsuite/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +check-DEJAGNU: site.exp + srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \ + if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + then :; else exit_status=1; fi; \ + done; \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi; \ + exit $$exit_status +site.exp: Makefile + @echo 'Making a new site.exp file...' + @echo '## these variables are automatically generated by make ##' >site.tmp + @echo '# Do not edit here. If you wish to override these values' >>site.tmp + @echo '# edit the last section' >>site.tmp + @echo 'set srcdir $(srcdir)' >>site.tmp + @echo "set objdir `pwd`" >>site.tmp + @echo 'set build_alias "$(build_alias)"' >>site.tmp + @echo 'set build_triplet $(build_triplet)' >>site.tmp + @echo 'set host_alias "$(host_alias)"' >>site.tmp + @echo 'set host_triplet $(host_triplet)' >>site.tmp + @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp + @test ! -f site.exp || \ + sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @-rm -f site.bak + @test ! -f site.exp || mv site.exp site.bak + @mv site.tmp site.exp + +distclean-DEJAGNU: + -rm -f site.exp site.bak + -l='$(DEJATOOL)'; for tool in $$l; do \ + rm -f $$tool.sum $$tool.log; \ + done + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +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-DEJAGNU distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ + distclean distclean-DEJAGNU distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am + +# 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/testsuite/config/unix.exp b/locate/testsuite/config/unix.exp new file mode 100644 index 0000000..cb6e7e7 --- /dev/null +++ b/locate/testsuite/config/unix.exp @@ -0,0 +1,353 @@ +# -*- TCL -*- +# Test-specific TCL procedures required by DejaGNU. +# Copyright (C) 1994,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 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. + + +# Modified by David MacKenzie from the gcc files +# written by Rob Savoye . + + +# use the local version of find for updatedb +# +# We normalise (normalize for those over the water) pathnames +# because the updatedb shell script uses "cd", which means that +# any relative paths no longer point where we thought they did. +# Because "file normalize" requires tcl 8.4, we have a plan B +# for normalising the name of a directory, but it is slower. + +proc normalize_dir { dir } { + if [ catch { file normalize $dir } result ] then { + return [ exec /bin/sh -c "cd $dir && /bin/pwd" ] + } else { + return $result; + } +} + +set fulldir [ normalize_dir "../../find" ] +set env{find} "$fulldir/find" + +# use the local help commands for updatedb +set env(LIBEXECDIR) [ normalize_dir .. ] +# use our local version of find, too. + +# do not ignore any file systems for this test +set env(PRUNEFS) "" +global UPDATEDB +global FRCODE +global LOCATE +global FIND + +# look for binaries +set UPDATEDB [findfile $base_dir/../updatedb $base_dir/../updatedb [transform updatedb]] +set FRCODE [findfile $base_dir/../frcode $base_dir/../frcode [transform frcode ]] +set LOCATE [findfile $base_dir/../locate $base_dir/../locate [transform locate ]] +set FIND [findfile $base_dir/../../find/find $base_dir/../../find/find [transform find ]] +verbose "UPDATEDB is $UPDATEDB" 1 +verbose "FRCODE is $FRCODE" 1 +verbose "LOCATE is $LOCATE" 1 +verbose "FIND is $FIND" 1 + + +foreach exe "$UPDATEDB $FRCODE $LOCATE $FIND" { + if ![ string match "/*" $exe ] { + error "Failed to find a binary to test for $exe" + } +} + +global UPDATEDBFLAGS +if ![info exists UPDATEDBFLAGS] then { + set UPDATEDBFLAGS "" +} + +set env(find) "$FIND" + +global LOCATEFLAGS +if ![info exists LOCATEFLAGS] then { + set LOCATEFLAGS "" +} + +# Called by runtest. +# Extract and print the version number of locate. +proc locate_version {} { + global UPDATEDB + global UPDATEDBFLAGS + global LOCATE + global LOCATEFLAGS + + if {[which $LOCATE] != 0} then { + set tmp [ eval exec $LOCATE $LOCATEFLAGS --version $dbfile + + # Now run locate. + set locatecmd "$LOCATE -d $dbfile $locateoptions" + send_log "Running $locatecmd \n" + catch "exec $locatecmd > $outfile" + + set result "" + set f [open "$outfile" r] + while { [ gets $f line ] >= 0 } { + # send_log "Output fragment is $line\n" + append result "$line\n" + } + close $f + + # send_log "Output is $result\n" + + if {[string equal $result $outtext]} { + if $fail_good then { + fail "$testname-$id" + } else { + pass "$testname-$id" + } + } else { + send_log "Output mismatch.\n" + send_log "Expected: $outtext\n" + send_log "Got : $result\n" + fail "$testname-$id" + } +} + + +# Do a test in which we expect an input text file to be preserved unchanged. +proc locate_roundtrip { id intext } { + if ![regexp "\n$" $intext] { + # We like the items to be terminated by newlines. + error "The input text is not terminated by newline" + } + + locate_textonly p $id $intext "-r ." $intext +} + + + +# Run locate and leave the output in $comp_output. +# Called by individual test scripts. +proc locate_start { passfail updatedb_options locate_options + {updatedb_infile ""} {locate_infile ""} + { between_hook "" } + } { + global verbose + global LOCATE + global LOCATEFLAGS + global UPDATEDB + global UPDATEDBFLAGS + global comp_output + + set fail_good [string match "f*" $passfail] + + set scriptname [uplevel {info script}] + set testbase [file rootname $scriptname] + set testname [file tail $testbase] + + set outfile "$testbase.xo" + if {"$updatedb_infile" != ""} then { + set updatedb_infile "[file dirname [file dirname $testbase]]/inputs/$updatedb_infile" + } else { + set updatedb_infile /dev/null + } + if {"$locate_infile" != ""} then { + set locate_infile "[file dirname [file dirname $testbase]]/inputs/$locate_infile" + } else { + set locate_infile /dev/null + } + + catch "exec rm -f locate.out" + + set updatedb_cmd "$UPDATEDB $UPDATEDBFLAGS $updatedb_options < $updatedb_infile" + send_log "$updatedb_cmd\n" + if $verbose>1 then { + send_user "Spawning \"$updatedb_cmd\"\n" + } + catch "exec $updatedb_cmd" comp_output + + if {$comp_output != ""} then { + send_log "$comp_output\n" + if $verbose>1 then { + send_user "$comp_output\n" + } + # If fail_good is set, that refers to the exit + # status of locate, not updatedb... + fail "$testname: updatedb is supposed to be silent, $comp_output" + return + } else { + send_log "updatedb: OK.\n" + } + + + eval $between_hook + + set locate_cmd "$LOCATE $LOCATEFLAGS $locate_options < $locate_infile > locate.out" + send_log "$locate_cmd\n" + if $verbose>1 then { + send_user "Spawning \"$locate_cmd\"\n" + } + + catch "exec $locate_cmd" comp_output + if {$comp_output != ""} then { + send_log "$comp_output\n" + if $verbose>1 then { + send_user "$comp_output\n" + } + if $fail_good then { + pass "$testname" + } else { + fail "$testname: locate failed, $comp_output" + } + return + } + + if [file exists $outfile] then { + set cmp_cmd "cmp locate.out $outfile" + send_log "$cmp_cmd\n" + catch "exec $cmp_cmd" cmpout + if {$cmpout != ""} then { + #catch "exec diff locate.out $outfile" diffout + #puts $diffout + fail "$testname, $cmpout" + return + } + } else { + if {[file size locate.out] != 0} then { + fail "$testname, output should be empty" + return + } + } + pass "$testname" + catch "exec rm -rf tmp" +} + + + +proc locate_from_db { passfail locate_options locate_database } { + global LOCATE + global LOCATEFLAGS + global verbose + + set fail_good [string match "f*" $passfail] + set scriptname [uplevel {info script}] + set testbase [file rootname $scriptname] + set testname [file tail $testbase] + set testdir [file dirname $scriptname] + + set dbpath "$testdir/$locate_database" + set outfile "$testbase.xo" + + set locate_cmd "$LOCATE $LOCATEFLAGS -d $dbpath $locate_options > locate.out" + send_log "$locate_cmd\n" + if $verbose>1 then { + send_user "Spawning \"$locate_cmd\"\n" + } + + catch "exec $locate_cmd 2>/dev/null" comp_output + if {$comp_output != ""} then { + send_log "$comp_output\n" + if $verbose>1 then { + send_user "$comp_output\n" + } + if $fail_good then { + # XXX: in general may want to compare output, too. + pass "$testname" + } else { + fail "$testname: locate unfortunately failed, $comp_output" + } + return + } + + + if [file exists $outfile] then { + set cmp_cmd "cmp locate.out $outfile" + send_log "$cmp_cmd\n" + catch "exec $cmp_cmd" cmpout + if {$cmpout != ""} then { + #catch "exec diff locate.out $outfile" diffout + #puts $diffout + fail "$testname, $cmpout" + return + } + } else { + if {[file size locate.out] != 0} then { + fail "$testname, output should be empty" + return + } + } + pass "$testname" +} + + + + + +# Called by runtest. +# Clean up (remove temporary files) before runtest exits. +proc locate_exit {} { + catch "exec rm -f locate.out updatedb-paths.txt locate.db" +} + +# Called by runtest. +# Extract and print the version number of updatedb. +proc updatedb_version {} { + global UPDATEDB + global UPDATEDBFLAGS + + if {[which $UPDATEDB] != 0} then { + set tmp [ eval exec $UPDATEDB $UPDATEDBFLAGS --version &&*3JN-a)JNhwLmWEc^Eud%7Qy}PqSy0J;9wWX&>w7HGH Tfk@ENWhj>f3?(BzV?GlAHRmXw literal 0 HcmV?d00001 diff --git a/locate/testsuite/locate.gnu/notexists1.exp b/locate/testsuite/locate.gnu/notexists1.exp new file mode 100644 index 0000000..ba7f297 --- /dev/null +++ b/locate/testsuite/locate.gnu/notexists1.exp @@ -0,0 +1,10 @@ +# tests for -E: make sure we don't print a file if it exists. +# Since there are no matches in this case, we expect a nonzero +# return value as well. +set tmp "tmp" +exec rm -rf $tmp +exec mkdir $tmp +exec mkdir $tmp/subdir +exec touch $tmp/subdir/fred +locate_start f "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} + diff --git a/locate/testsuite/locate.gnu/notexists1.xo b/locate/testsuite/locate.gnu/notexists1.xo new file mode 100644 index 0000000..e69de29 diff --git a/locate/testsuite/locate.gnu/notexists2.exp b/locate/testsuite/locate.gnu/notexists2.exp new file mode 100644 index 0000000..e809088 --- /dev/null +++ b/locate/testsuite/locate.gnu/notexists2.exp @@ -0,0 +1,9 @@ +# tests for -E: make sure we do print a file if it does not exist. +set tmp "tmp" +exec rm -rf $tmp +exec mkdir $tmp +exec mkdir $tmp/subdir +exec touch $tmp/subdir/fred1 +exec touch $tmp/subdir/fred2 +locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} {} { exec rm "tmp/subdir/fred2" } + diff --git a/locate/testsuite/locate.gnu/notexists2.xo b/locate/testsuite/locate.gnu/notexists2.xo new file mode 100644 index 0000000..091224f --- /dev/null +++ b/locate/testsuite/locate.gnu/notexists2.xo @@ -0,0 +1 @@ +tmp/subdir/fred2 diff --git a/locate/testsuite/locate.gnu/notexists3.exp b/locate/testsuite/locate.gnu/notexists3.exp new file mode 100644 index 0000000..dc46c09 --- /dev/null +++ b/locate/testsuite/locate.gnu/notexists3.exp @@ -0,0 +1,9 @@ +# tests for -E: make sure we do not print a file if it does not exist. +set tmp "tmp" +exec rm -rf $tmp +exec mkdir $tmp +exec mkdir $tmp/subdir +exec touch $tmp/subdir/fred1 +exec touch $tmp/subdir/fred2 +locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} {} { exec rm "tmp/subdir/fred1" } + diff --git a/locate/testsuite/locate.gnu/notexists3.xo b/locate/testsuite/locate.gnu/notexists3.xo new file mode 100644 index 0000000..95fec6e --- /dev/null +++ b/locate/testsuite/locate.gnu/notexists3.xo @@ -0,0 +1 @@ +tmp/subdir/fred1 diff --git a/locate/testsuite/locate.gnu/old_prefix.exp b/locate/testsuite/locate.gnu/old_prefix.exp new file mode 100644 index 0000000..e21cc61 --- /dev/null +++ b/locate/testsuite/locate.gnu/old_prefix.exp @@ -0,0 +1,13 @@ +set tmp "tmp" +exec rm -rf $tmp +exec mkdir $tmp +exec mkdir $tmp/subdir +exec touch $tmp/subdir/________________________________________________________________________________fred1 +exec touch $tmp/subdir/________________________________________________________________________________fred2 +exec touch $tmp/subdir/________________________________________________________________________________fred3 +exec touch $tmp/subdir/________________________________________________________________________________fred4 + +locate_start p "--changecwd=. --output=$tmp/locatedb --old-format --localpaths=tmp/subdir 2>/dev/null" "--database=$tmp/locatedb tmp" {} + + +exec rm -rf $tmp diff --git a/locate/testsuite/locate.gnu/old_prefix.xo b/locate/testsuite/locate.gnu/old_prefix.xo new file mode 100644 index 0000000..909b8e7 --- /dev/null +++ b/locate/testsuite/locate.gnu/old_prefix.xo @@ -0,0 +1,5 @@ +tmp/subdir +tmp/subdir/________________________________________________________________________________fred1 +tmp/subdir/________________________________________________________________________________fred2 +tmp/subdir/________________________________________________________________________________fred3 +tmp/subdir/________________________________________________________________________________fred4 diff --git a/locate/testsuite/locate.gnu/regex1.exp b/locate/testsuite/locate.gnu/regex1.exp new file mode 100644 index 0000000..8989210 --- /dev/null +++ b/locate/testsuite/locate.gnu/regex1.exp @@ -0,0 +1,9 @@ +# regular expression tests +locate_textonly p 0 "/\n" "?" "/\n" +locate_textonly p 1 "/\n" "-r ." "/\n" +locate_textonly p 2 "/" "-r X" "" +locate_textonly p 3 "/\n/bin" "-r n" "/bin\n" +locate_textonly p 4 "/\n/bin" "-i -r BIN" "/bin\n" +locate_textonly p 5 "/\n/bin\n/binary" "-r bin\$" "/bin\n" +locate_textonly p 6 "/\n/bin\n/binary" {-r ^\[^/\]} "" +locate_textonly p 7 "/\n/bin\n/binary" {-r ^\[^X\]} "/\n/bin\n/binary\n" diff --git a/locate/testsuite/locate.gnu/space1st.exp b/locate/testsuite/locate.gnu/space1st.exp new file mode 100644 index 0000000..dc070da --- /dev/null +++ b/locate/testsuite/locate.gnu/space1st.exp @@ -0,0 +1,2 @@ +# check frcode handles space as first character +locate_textonly p 0 " fred\n" "-i fred" " fred\n" diff --git a/locate/testsuite/locate.gnu/sv-bug-14535.exp b/locate/testsuite/locate.gnu/sv-bug-14535.exp new file mode 100644 index 0000000..cc86b18 --- /dev/null +++ b/locate/testsuite/locate.gnu/sv-bug-14535.exp @@ -0,0 +1,61 @@ +# NOTE: this file contains UTF8 characters. + + +proc selectlocale { pattern } { + if [ catch { set locale_list [ split [ eval exec locale -a ] "\n" ] } ] { + # Failed to figure out which tests are supported. + return "" + } + foreach locale $locale_list { + if { [string match $pattern $locale] } { + global env + set env(LC_ALL) $locale + return $locale + } + } + return "" +} + +proc select_any_locale { patternlist } { + foreach pattern $patternlist { + set locale [ selectlocale $pattern ] + if { [ string length $locale ] } { + return $locale + } + } + return "" +} + +# localeoptions contains a list (in order of preference) of the +# locales in which we want to perform part of this test. If we can +# use any locale matching any of the patterns, we run an extra four +# tests. Otherwise, we skip them and issue a warning message. +set localeoptions { + "hu_HU.UTF-8" + "hu_*.UTF-8" + "en_IE.utf8" + "en_GB.utf8" + "en_US.utf8" + "en_*.utf8" + "*.utf8" +} + + + +# Do the regular case-fold tests which only need ASCII support. +locate_textonly p a "teste\n" "-i teste" "teste\n" +locate_textonly p b "testE\n" "-i testE" "testE\n" +locate_textonly p c "testE\n" "-i teste" "testE\n" +locate_textonly p d "teste\n" "-i testE" "teste\n" + +set locale [ select_any_locale $localeoptions ] +if { [ string length $locale ] } { + # We have a UTF-8 locale. Do the extra tests. + locate_textonly p 0 "testé\n" "-i testé" "testé\n" + locate_textonly p 1 "testÉ\n" "-i testé" "testÉ\n" + locate_textonly p 2 "testé\n" "-i testÉ" "testé\n" + locate_textonly p 3 "testÉ\n" "-i testÉ" "testÉ\n" +} else { + warning "Four tests have been skipped because I cannot find a UTF-8 locale configured on your system" +} + diff --git a/locate/updatedb.1 b/locate/updatedb.1 new file mode 100644 index 0000000..e42ec74 --- /dev/null +++ b/locate/updatedb.1 @@ -0,0 +1,144 @@ +.TH UPDATEDB 1 \" -*- nroff -*- +.SH NAME +updatedb \- update a file name database +.SH SYNOPSIS +.B updatedb [\fIoptions\fP] +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR updatedb , +which updates file name databases used by GNU +.BR locate . +The file name databases contain lists of files that were in +particular directory trees when the databases were last updated. +The file name of the default database is determined when \fBlocate\fP +and \fBupdatedb\fP are configured and installed. The frequency with +which the databases are updated and the directories for which they +contain entries depend on how often \fBupdatedb\fP is run, and with +which arguments. +.P +In networked environments, it often makes sense to build a database at +the root of each filesystem, containing the entries for that filesystem. +.B updatedb +is then run for each filesystem on the fileserver where that +filesystem is on a local disk, to prevent thrashing the network. +Users can select which databases \fBlocate\fP searches using an +environment variable or command line option; see \fBlocate\fP(1). +Databases can not be concatenated together. +.P +The file name database format changed starting with GNU +.B find +and +.B locate +version 4.0 to allow machines with different byte orderings to share +the databases. The new GNU +.B locate +can read both the old and new database formats. +However, old versions of +.B locate +and +.B find +produce incorrect results if given a new-format database. +.SH OPTIONS +.TP +.B \-\-findoptions='\fI\-option1 \-option2...\fP' +Global options to pass on to \fBfind\fP. +The environment variable \fBFINDOPTIONS\fP also sets this value. +Default is none. +.TP +.B \-\-localpaths='\fIpath1 path2...\fP' +Non-network directories to put in the database. +Default is /. +.TP +.B \-\-netpaths='\fIpath1 path2...\fP' +Network (NFS, AFS, RFS, etc.) directories to put in the database. +The environment variable \fBNETPATHS\fP also sets this value. +Default is none. +.TP +.B \-\-prunepaths='\fIpath1 path2...\fP' +Directories to not put in the database, which would otherwise be. +Remove any trailing slashes from the path names, otherwise +.B updatedb +won\'t recognise the paths you want to omit (because it uses them as +regular expression patterns). +The environment variable \fBPRUNEPATHS\fP also sets this value. +Default is /tmp /usr/tmp /var/tmp /afs. +.TP +.B \-\-prunefs='\fIpath...\fP' +File systems to not put in the database, which would otherwise be. +Note that files are pruned when a file system is reached; +Any file system mounted under an undesired file system will be +ignored. +The environment variable +\fBPRUNEFS\fP also sets this value. +Default is \fInfs NFS proc\fP. +.TP +.B \-\-output=\fIdbfile\fP +The database file to build. +Default is system-dependent. In Debian GNU/Linux, the default +is /var/cache/locate/locatedb. +.TP +.B \-\-localuser=\fIuser\fP +The user to search non-network directories as, using \fBsu\fP(1). +Default is to search the non-network directories as the current user. +You can also use the environment variable \fBLOCALUSER\fP to set this user. +.TP +.B \-\-netuser=\fIuser\fP +The user to search network directories as, using \fBsu\fP(1). +Default is \fBdaemon\fP. +You can also use the environment variable \fBNETUSER\fP to set this user. +.TP +.B \-\-old\-format +Create the database in the old format. This is a synonym for +.BR \-\-dbformat=old . +.TP +.B \-\-dbformat=F +Create the database in format F. The default format is called LOCATE02. +F can be +.B old +to select the old database format (this is the same as specifying +.BR \-\-old\-format ). +Alternatively the +.B slocate +format is also supported. When the +.B slocate +format is in use, the database produced is marked as having security +level 1. If you want to build a system-wide +.B slocate +database, you may want to run +.B updatedb +as root. +.TP +.B \-\-version +Print the version number of +.B updatedb +and exit. +.TP +.B "\-\-help" +Print a summary of the options to +.B updatedb +and exit. +.SH "SEE ALSO" +\fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBxargs\fP(1) +\fBFinding Files\fP (on-line in Info, or printed) +.SH "BUGS" +.P +The +.B updatedb +program correctly handles filenames containing newlines, +but only if the system's sort command has a working +.I \-z +option. If you suspect that +.B locate +may need to return filenames containing newlines, consider using its +.I \-\-null +option. +.P +The best way to report a bug is to use the form at +http://savannah.gnu.org/bugs/?group=findutils. +The reason for this is that you will then be able to track progress in +fixing the problem. Other comments about \fBupdatedb\fP(1) and about +the findutils package in general can be sent to the +.I bug-findutils +mailing list. To join the list, send email to +.IR bug-findutils-request@gnu.org . diff --git a/locate/updatedb.sh b/locate/updatedb.sh new file mode 100644 index 0000000..44ad850 --- /dev/null +++ b/locate/updatedb.sh @@ -0,0 +1,363 @@ +#! /bin/sh +# updatedb -- build a locate pathname database +# Copyright (C) 1994, 1996, 1997, 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 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. + +# csh original by James Woods; sh conversion by David MacKenzie. + +#exec 2> /tmp/updatedb-trace.txt +#set -x + +usage="\ +Usage: $0 [--findoptions='-option1 -option2...'] + [--localpaths='dir1 dir2...'] [--netpaths='dir1 dir2...'] + [--prunepaths='dir1 dir2...'] [--prunefs='fs1 fs2...'] + [--output=dbfile] [--netuser=user] [--localuser=user] + [--old-format] [--dbformat] [--version] [--help] + +Report bugs to ." +changeto=/ +old=no +for arg +do + # If we are unable to fork, the back-tick operator will + # fail (and the shell will emit an error message). When + # this happens, we exit with error value 71 (EX_OSERR). + # Alternative candidate - 75, EX_TEMPFAIL. + opt=`echo $arg|sed 's/^\([^=]*\).*/\1/'` || exit 71 + val=`echo $arg|sed 's/^[^=]*=\(.*\)/\1/'` || exit 71 + case "$opt" in + --findoptions) FINDOPTIONS="$val" ;; + --localpaths) SEARCHPATHS="$val" ;; + --netpaths) NETPATHS="$val" ;; + --prunepaths) PRUNEPATHS="$val" ;; + --prunefs) PRUNEFS="$val" ;; + --output) LOCATE_DB="$val" ;; + --netuser) NETUSER="$val" ;; + --localuser) LOCALUSER="$val" ;; + --old-format) old=yes ;; + --changecwd) changeto="$val" ;; + --dbformat) dbformat="$val" ;; + --version) echo "GNU updatedb version @VERSION@"; exit 0 ;; + --help) echo "$usage"; exit 0 ;; + *) echo "updatedb: invalid option $opt +$usage" >&2 + exit 1 ;; + esac +done + + + + +case "${dbformat:+yes}_${old}" in + yes_yes) + echo "The --dbformat and --old cannot both be specified." >&2 + exit 1 + ;; + *) + ;; +esac + +if test "$old" = yes || test "$dbformat" = "old" ; then + echo "Warning: future versions of findutils will shortly discontinue support for the old locate database format." >&2 + old=yes + sort="@SORT@" + print_option="-print" + frcode_options="" +else + frcode_options="" + case "$dbformat" in + "") + # Default, use LOCATE02 + ;; + LOCATE02) + ;; + slocate) + frcode_options="$frcode_options -S 1" + ;; + *) + echo "Unsupported locate database format ${dbformat}: Supported formats are:" >&2 + echo "LOCATE02, slocate, old" >&2 + exit 1 + esac + + + if @SORT_SUPPORTS_Z@ + then + sort="@SORT@ -z" + print_option="-print0" + frcode_options="$frcode_options -0" + else + sort="@SORT@" + print_option="-print" + fi +fi + +getuid() { + # format of "id" output is ... + # uid=1(daemon) gid=1(other) + # for `id's that don't understand -u + id | cut -d'(' -f 1 | cut -d'=' -f2 +} + +# figure out if su supports the -s option +select_shell() { + if su "$1" -s $SHELL -c false < /dev/null ; then + # No. + echo "" + else + if su "$1" -s $SHELL -c true < /dev/null ; then + # Yes. + echo "-s $SHELL" + else + # su is unconditionally failing. We won't be able to + # figure out what is wrong, so be conservative. + echo "" + fi + fi +} + + +# You can set these in the environment, or use command-line options, +# to override their defaults: + +# Any global options for find? +: ${FINDOPTIONS=} + +# What shell shoud we use? We should use a POSIX-ish sh. +: ${SHELL="/bin/sh"} + +# Non-network directories to put in the database. +: ${SEARCHPATHS="/"} + +# Network (NFS, AFS, RFS, etc.) directories to put in the database. +: ${NETPATHS=} + +# Directories to not put in the database, which would otherwise be. +: ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /amd /sfs /proc"} + +# Trailing slashes result in regex items that are never matched, which +# is not what the user will expect. Therefore we now reject such +# constructs. +for p in $PRUNEPATHS; do + case "$p" in + /*/) echo "$0: $p: pruned paths should not contain trailing slashes" >&2 + exit 1 + esac +done + +# The same, in the form of a regex that find can use. +test -z "$PRUNEREGEX" && + PRUNEREGEX=`echo $PRUNEPATHS|sed -e 's,^,\\\(^,' -e 's, ,$\\\)\\\|\\\(^,g' -e 's,$,$\\\),'` + +# The database file to build. +: ${LOCATE_DB=@LOCATE_DB@} + +# Directory to hold intermediate files. +if test -d /var/tmp; then + : ${TMPDIR=/var/tmp} +elif test -d /usr/tmp; then + : ${TMPDIR=/usr/tmp} +else + : ${TMPDIR=/tmp} +fi +export TMPDIR + +# The user to search network directories as. +: ${NETUSER=daemon} + +# The directory containing the subprograms. +if test -n "$LIBEXECDIR" ; then + : LIBEXECDIR already set, do nothing +else + : ${LIBEXECDIR=@libexecdir@} +fi + +# The directory containing find. +if test -n "$BINDIR" ; then + : BINDIR already set, do nothing +else + : ${BINDIR=@bindir@} +fi + +# The names of the utilities to run to build the database. +: ${find:=${BINDIR}/@find@} +: ${frcode:=${LIBEXECDIR}/@frcode@} +: ${bigram:=${LIBEXECDIR}/@bigram@} +: ${code:=${LIBEXECDIR}/@code@} + + +checkbinary () { + if test -x "$1" ; then + : ok + else + eval echo "updatedb needs to be able to execute $1, but cannot." >&2 + exit 1 + fi +} + +for binary in $find $frcode $bigram $code +do + checkbinary $binary +done + + +PATH=/bin:/usr/bin:${BINDIR}; export PATH + +: ${PRUNEFS="nfs NFS proc afs proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs sysfs shfs"} + +if test -n "$PRUNEFS"; then +prunefs_exp=`echo $PRUNEFS |sed -e 's/\([^ ][^ ]*\)/-o -fstype \1/g' \ + -e 's/-o //' -e 's/$/ -o/'` +else + prunefs_exp='' +fi + +# Make and code the file list. +# Sort case insensitively for users' convenience. + +rm -f $LOCATE_DB.n +trap 'rm -f $LOCATE_DB.n; exit' HUP TERM + +if test $old = no; then +# LOCATE02 or slocate format +if { +cd "$changeto" +if test -n "$SEARCHPATHS"; then + if [ "$LOCALUSER" != "" ]; then + # : A1 + su $LOCALUSER `select_shell $LOCALUSER` -c \ + "$find $SEARCHPATHS $FINDOPTIONS \ + \\( $prunefs_exp \ + -type d -regex '$PRUNEREGEX' \\) -prune -o $print_option" + else + # : A2 + $find $SEARCHPATHS $FINDOPTIONS \ + \( $prunefs_exp \ + -type d -regex "$PRUNEREGEX" \) -prune -o $print_option + fi +fi + +if test -n "$NETPATHS"; then +myuid=`getuid` +if [ "$myuid" = 0 ]; then + # : A3 + su $NETUSER `select_shell $NETUSER` -c \ + "$find $NETPATHS $FINDOPTIONS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" || + exit $? + else + # : A4 + $find $NETPATHS $FINDOPTIONS \( -type d -regex "$PRUNEREGEX" -prune \) -o $print_option || + exit $? + fi +fi +} | $sort -f | $frcode $frcode_options > $LOCATE_DB.n +then + : OK so far + true +else + rv=$? + echo "Failed to generate $LOCATE_DB.n" >&2 + rm -f $LOCATE_DB.n + exit $rv +fi + +# To avoid breaking locate while this script is running, put the +# results in a temp file, then rename it atomically. +if test -s $LOCATE_DB.n; then + rm -f $LOCATE_DB + mv $LOCATE_DB.n $LOCATE_DB + chmod 644 $LOCATE_DB +else + echo "updatedb: new database would be empty" >&2 + rm -f $LOCATE_DB.n +fi + +else # old + +if ! bigrams=`mktemp -t updatedbXXXXXXXXX`; then + echo mktemp failed >&2 + exit 1 +fi + +if ! filelist=`mktemp -t updatedbXXXXXXXXX`; then + echo mktemp failed >&2 + exit 1 +fi + +rm -f $LOCATE_DB.n +trap 'rm -f $bigrams $filelist $LOCATE_DB.n; exit' HUP TERM + +# Alphabetize subdirectories before file entries using tr. James Woods says: +# "to get everything in monotonic collating sequence, to avoid some +# breakage i'll have to think about." +{ +cd "$changeto" +if test -n "$SEARCHPATHS"; then + if [ "$LOCALUSER" != "" ]; then + # : A5 + su $LOCALUSER `select_shell $LOCALUSER` -c \ + "$find $SEARCHPATHS $FINDOPTIONS \ + \( $prunefs_exp \ + -type d -regex '$PRUNEREGEX' \) -prune -o $print_option" || exit $? + else + # : A6 + $find $SEARCHPATHS $FINDOPTIONS \ + \( $prunefs_exp \ + -type d -regex "$PRUNEREGEX" \) -prune -o $print_option || exit $? + fi +fi + +if test -n "$NETPATHS"; then + myuid=`getuid` + if [ "$myuid" = 0 ]; then + # : A7 + su $NETUSER `select_shell $NETUSER` -c \ + "$find $NETPATHS $FINDOPTIONS \\( -type d -regex '$PRUNEREGEX' -prune \\) -o $print_option" || + exit $? + else + # : A8 + $find $NETPATHS $FINDOPTIONS \( -type d -regex "$PRUNEREGEX" -prune \) -o $print_option || + exit $? + fi +fi +} | tr / '\001' | $sort -f | tr '\001' / > $filelist + +# Compute the (at most 128) most common bigrams in the file list. +$bigram $bigram_opts < $filelist | sort | uniq -c | sort -nr | + awk '{ if (NR <= 128) print $2 }' | tr -d '\012' > $bigrams + +# Code the file list. +$code $bigrams < $filelist > $LOCATE_DB.n + +rm -f $bigrams $filelist + +# To reduce the chances of breaking locate while this script is running, +# put the results in a temp file, then rename it atomically. +if test -s $LOCATE_DB.n; then + rm -f $LOCATE_DB + mv $LOCATE_DB.n $LOCATE_DB + chmod 644 $LOCATE_DB +else + echo "updatedb: new database would be empty" >&2 + rm -f $LOCATE_DB.n +fi + +fi + +exit 0 diff --git a/locate/word_io.c b/locate/word_io.c new file mode 100644 index 0000000..c921ed5 --- /dev/null +++ b/locate/word_io.c @@ -0,0 +1,177 @@ +/* word_io.c -- word oriented I/O + Copyright (C) 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 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. +*/ + +#include + +#include +#include +#include +#include /* for bool */ +#include + +#include "error.h" +#include "quote.h" +#include "quotearg.h" +#include "locatedb.h" + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* We used to use (String) instead of just String, but apparently ISO C + * doesn't allow this (at least, that's what HP said when someone reported + * this as a compiler bug). This is HP case number 1205608192. See + * also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11250 (which references + * ANSI 3.5.7p14-15). The Intel icc compiler also rejects constructs + * like: static const char buf[] = ("string"); + */ +# define N_(String) String +#endif + + +/* Swap bytes in 32 bit value. This code is taken from glibc-2.3.3. */ +#define bswap_32(x) \ + ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) + +enum { WORDBYTES=4 }; + +static int +decode_value(const unsigned char data[], + int limit, + GetwordEndianState *endian_state_flag, + const char *filename) +{ + int swapped; + union + { + int ival; /* native representation */ + unsigned char data[WORDBYTES]; + } u; + u.ival = 0; + memcpy(&u.data, data, WORDBYTES); + swapped = bswap_32(u.ival); /* byteswapped */ + + if (*endian_state_flag == GetwordEndianStateInitial) + { + if (u.ival <= limit) + { + if (swapped > limit) + { + /* the native value is inside the limit and the + * swapped value is not. We take this as proof + * that we should be using the ative byte order. + */ + *endian_state_flag = GetwordEndianStateNative; + } + return u.ival; + } + else + { + if (swapped <= limit) + { + /* Aha, now we know we have to byte-swap. */ + error(0, 0, + _("Warning: locate database %s was " + "built with a different byte order"), + quotearg_n_style(0, locale_quoting_style, filename)); + *endian_state_flag = GetwordEndianStateSwab; + return swapped; + } + else + { + /* u.ival > limit and swapped > limit. For the moment, assume + * native ordering. + */ + return u.ival; + } + } + } + else + { + /* We already know the byte order. */ + if (*endian_state_flag == GetwordEndianStateSwab) + return swapped; + else + return u.ival; + } +} + + + +int +getword (FILE *fp, + const char *filename, + size_t minvalue, + size_t maxvalue, + GetwordEndianState *endian_state_flag) +{ + unsigned char data[4]; + size_t bytes_read; + + clearerr(fp); + bytes_read = fread(data, WORDBYTES, 1, fp); + if (bytes_read != 1) + { + const char * quoted_name = quotearg_n_style(0, locale_quoting_style, + filename); + /* Distinguish between a truncated database and an I/O error. + * Either condition is fatal. + */ + if (feof(fp)) + error(1, 0, _("Unexpected EOF in %s"), quoted_name); + else + error(1, errno, "error reading a word from %s", quoted_name); + } + else + { + return decode_value(data, maxvalue, endian_state_flag, filename); + } +} + + +bool +putword (FILE *fp, int word, + GetwordEndianState endian_state_flag) +{ + size_t items_written; + + /* You must decide before calling this function which + * endianness you want to use. + */ + assert(endian_state_flag != GetwordEndianStateInitial); + if (GetwordEndianStateSwab == endian_state_flag) + { + word = bswap_32(word); + } + + items_written = fwrite(&word, sizeof(word), 1, fp); + if (1 == items_written) + return true; + else + return false; +} + diff --git a/m4/Makefile.am b/m4/Makefile.am new file mode 100644 index 0000000..1b13304 --- /dev/null +++ b/m4/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = findlib.m4 nullsort.m4 order-bad.bin order-good.bin withfts.m4 + + diff --git a/m4/Makefile.in b/m4/Makefile.in new file mode 100644 index 0000000..afb7330 --- /dev/null +++ b/m4/Makefile.in @@ -0,0 +1,612 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = m4 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = findlib.m4 nullsort.m4 order-bad.bin order-good.bin withfts.m4 +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(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 m4/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits m4/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +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-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + +# 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/m4/findlib.m4 b/m4/findlib.m4 new file mode 100644 index 0000000..f491936 --- /dev/null +++ b/m4/findlib.m4 @@ -0,0 +1,69 @@ +# FINDLIB_REPLACE_FUNCS(FUNCTION...) +# ----------------------------- +AC_DEFUN([FINDLIB_REPLACE_FUNCS], +[AC_FOREACH([AC_Func], [$1], [jy_FINDLIBSOURCE(AC_Func.c)])dnl +AC_CHECK_FUNCS([$1], , [_jy_FINDLIBOBJ($ac_func)]) +]) + + + +# jy_FINDLIBSOURCE(FILENAME) +# ---------------------- +# Announce we might need the file `FILENAME'. +m4_define([jy_FINDLIBSOURCE], []) + + + +# jy_FINDLIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR) +# ------------------------------------------- +# We need `FILENAME-NOEXT.o', save this into `FINDLIBOBJS'. +# We don't use AC_SUBST/2 because it forces an unnecessary eol. +m4_define([_jy_FINDLIBOBJ], +[AS_LITERAL_IF([$1], + [jy_FINDLIBSOURCE([$1.c])], + [$2])dnl +AC_SUBST([FINDLIB@&t@OBJS])dnl +case $FINDLIB@&t@OBJS in + "$1.$ac_objext" | \ + *" $1.$ac_objext" | \ + "$1.$ac_objext "* | \ + *" $1.$ac_objext "* ) ;; + *) FINDLIB@&t@OBJS="$FINDLIB@&t@OBJS $1.$ac_objext" ;; +esac +]) + + + +# jy_FINDLIBOBJ(FILENAME-NOEXT) +# ------------------------- +# We need `FILENAME-NOEXT.o', save this into `FINDLIBOBJS'. +# We don't use AC_SUBST/2 because it forces an unnecessary eol. +m4_define([jy_FINDLIBOBJ], +[_jy_FINDLIBOBJ([$1], + [AC_DIAGNOSE(syntax, + [$0($1): you should use literals])])dnl +]) + + +# _jy_FINDLIBOBJS_NORMALIZE +# --------------------- +# Adapted from autoconf's general.m4. +# Clean up FINDLIBOBJS abd LTFINDLIBOBJS +# Used with AC_CONFIG_COMMANDS_PRE. +AC_DEFUN([_jy_FINDLIBOBJS_NORMALIZE], +[ac_findlibobjs= +ac_ltfindlibobjs= +for ac_i in : $FINDLIB@&t@OBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_findlibobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltfindlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +AC_SUBST([FINDLIB@&t@OBJS], [$ac_findlibobjs]) +AC_SUBST([LTFINDLIBOBJS], [$ac_ltfindlibobjs]) +]) + + +dnl AC_CONFIG_COMMANDS_PRE(_jy_FINDLIBOBJS_NORMALIZE) diff --git a/m4/mkinstalldirs.m4 b/m4/mkinstalldirs.m4 new file mode 100644 index 0000000..1e53ec3 --- /dev/null +++ b/m4/mkinstalldirs.m4 @@ -0,0 +1,40 @@ +dnl Copyright (C) 1995-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. +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. +# Originally taken from nls.m4 serial 2 (gettext-0.14.3) + +AC_PREREQ(2.50) + +AC_DEFUN([AM_MKINSTALLDIRS], +[ + dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])]) + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but $(top_srcdir). + dnl Try to locate it. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + case "$ac_aux_dir" in + /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; + *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; + esac + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) +]) diff --git a/m4/noreturn.m4 b/m4/noreturn.m4 new file mode 100644 index 0000000..b762d89 --- /dev/null +++ b/m4/noreturn.m4 @@ -0,0 +1,33 @@ +dnl Copyright (C) 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 James Youngman , 2007. + +AC_DEFUN([jy_AC_ATTRIBUTE_NORETURN], +[AC_CACHE_CHECK([for __attribute__ ((__noreturn__)) support], + [jy_cv_cc_attribute_noreturn], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], + [void report_fatal_error(void) __attribute__ ((__noreturn__));])], + [jy_cv_cc_attribute_noreturn=yes], + [jy_cv_cc_attribute_noreturn=no])]) +if test $jy_cv_cc_attribute_noreturn = yes; then + HAVE_ATTRIBUTE_NORETURN=1 +else + HAVE_ATTRIBUTE_NORETURN=0 +fi +AC_SUBST([HAVE_ATTRIBUTE_NORETURN]) +AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_NORETURN],[$HAVE_ATTRIBUTE_NORETURN], + [Define to 1 if the compiler supports __attribute__ ((__noreturn__))]) +]) diff --git a/m4/nullsort.m4 b/m4/nullsort.m4 new file mode 100644 index 0000000..8173448 --- /dev/null +++ b/m4/nullsort.m4 @@ -0,0 +1,34 @@ +AC_DEFUN([jy_SORTZ], + [AC_PATH_PROG([SORT], [sort], [sort]) + AC_MSG_CHECKING([if $SORT supports the -z option]) +# find out if the sort command has a working -z option. +if $SORT -z -c < "${srcdir:-.}/m4/order-good.bin" 2>/dev/null >/dev/null +then + # sort has a -z option, but we have not yet established that + # sort thinks there is more than one input line there. We have + # to make sort -c do its thing with the input lines in the wrong + # order to determine that (we can't do it in one shot because + # if sort returns nonzero we cant tell that it wasn't just + # complaining about this unknown -z option. + if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null + then + # sort likes -z but it doesn't seem to make \0 + # a delimiter. + ac_sort_has_z=false + else + ac_sort_has_z=true + fi +else + # Doesn't like the z option. + ac_sort_has_z=false +fi +if $ac_sort_has_z +then + AC_MSG_RESULT([yes]) + AC_SUBST(SORT_SUPPORTS_Z,[true]) +else + AC_MSG_RESULT([no]) + AC_SUBST(SORT_SUPPORTS_Z,[false]) +fi +]) + diff --git a/m4/order-bad.bin b/m4/order-bad.bin new file mode 100644 index 0000000000000000000000000000000000000000..f264547f74fd80610ad9e53c6205da5af4a2c499 GIT binary patch literal 8 PcmYdEO=Cz*N@f563%>$Z literal 0 HcmV?d00001 diff --git a/m4/order-good.bin b/m4/order-good.bin new file mode 100644 index 0000000000000000000000000000000000000000..7773a76cf583ab00e311fda828caf5a3b9bb4c0c GIT binary patch literal 8 PcmYdHN@hq&O=AE63!4H~ literal 0 HcmV?d00001 diff --git a/m4/withfts.m4 b/m4/withfts.m4 new file mode 100644 index 0000000..3ee16e5 --- /dev/null +++ b/m4/withfts.m4 @@ -0,0 +1,13 @@ +AC_DEFUN([FIND_WITH_FTS], +[AC_ARG_WITH([fts], +[ --without-fts Use an older mechanism for searching the filesystem, instead of using fts()],[with_fts=$withval],[]) + case $with_fts in + yes|no) ;; + '') with_fts=yes ;; + *) AC_MSG_ERROR([Invalid value for --with-fts: $with_fts]) + esac + AM_CONDITIONAL(WITH_FTS, [[test x"${with_fts-no}" != xno]]) + if test x"${with_fts-no}" != xno ; then + AC_DEFINE(WITH_FTS, 1, [Define if you want to use fts() to do the filesystem search.]) + fi +]) diff --git a/po/ChangeLog b/po/ChangeLog new file mode 100644 index 0000000..2782d3f --- /dev/null +++ b/po/ChangeLog @@ -0,0 +1,338 @@ +2007-06-03 James Youngman + + * vi.po: Updated Vietnamese translation + +2007-05-31 James Youngman + + * findutils.pot, ga.po, pt.po, tr.po, pl.po: updated from the TP + website. + +2005-11-19 James Youngman + + * be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, fi.po, + findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po, + ja.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, pt_BR.po, ro.po, + ru.po, rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, vi.po, zh_CN.po, + zh_TW.po: Updated Portuguese .po file and did update-po + +2005-11-11 James Youngman + + * ro.po, ru.po, rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, vi.po, + zh_CN.po, zh_TW.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, + pt_BR.po, be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, + fi.po, findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, + it.po, ja.po: Updated Polish translation + +2005-09-04 James Youngman + + * be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, fi.po, + findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po, + ja.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, pt_BR.po, ro.po, + ru.po, rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, vi.po, zh_CN.po, + zh_TW.po: Work around compilation failure with GCC 4 and AIX 5.1, + in which open is #defined to open64 + +2005-09-03 James Youngman + + * sr.po, sv.po, tr.po, vi.po, zh_CN.po, zh_TW.po, sl.po, be.po, + ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, fi.po, + findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po, + ja.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, pt_BR.po, ro.po, + ru.po, rw.po, sk.po: Did update-po + +2005-09-01 James Youngman + + * ChangeLog: Updated with recent changes. + +2005-08-24 James Youngman + + * sl.po: Updated from Translation Project + +2005-08-24 James Youngman + + * ssl.po: Updated from Translation Project + +2005-08-11 James Youngman + + * fr.po: Updated French translation and added new PO file zh_TW.po + for Chinese (traditional) + +2005-08-02 James Youngman + + * tr.po, vi.po: + Updated Vietnamese and Turkish translations from Translation Project + + * sl.po, sr.po, sv.po, tr.po, vi.po, zh_CN.po, be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, fi.po, findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po, ja.po, ko.po, lg.po, ms.po, pl.po, pt.po, pt_BR.po, ru.po, rw.po: + Did update-po + + * et.po, sk.po, ro.po: + Updated Romanian, Slovak and Estonian translations from Translation Project + +2005-08-01 James Youngman + + * nl.po: Updated Dutch translation from Translation Project + + * ga.po: Updated Irish translation from the Translation Project + + * da.po: Updated Danish translation from the Translation Project + + * ca.po: Updated Catalan translation from Translation Project + +2005-06-18 James Youngman + + * ga.po, tr.po: Updated Irish and Turkish translations. + + * pl.po: Did update-po + + * pl.po: + Updated Polish translation file from the Translation Project + + * ca.po, da.po, de.po, el.po, eo.po, es.po, et.po, fi.po, findutils.pot, fr.po, ga.po, gl.po, hr.po, hu.po, id.po, it.po, ja.po, ko.po, lg.po, ms.po, nl.po, pl.po, pt.po, pt_BR.po, ro.po, ru.po, rw.po, sk.po, sl.po, sr.po, sv.po, tr.po, vi.po, zh_CN.po, be.po: + Did update-po + +2005-02-05 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sl.po, sv.po, + tr.po: make update-po prior to 'make distcheck' + + * fetch-po-files: This is the first version we actually used. + +2005-02-02 James Youngman + + * tr.po: Updated Turkish translation from TP + + * ro.po: Updated Romanian translation from TP + + * da.po, et.po: Updated translations from MT project website + +2005-01-31 James Youngman + + * ca.po: Updated from Translation Project + + * ChangeLog: Updated from CVS logs. + + * de.po, es.po, et.po, fr.po, gl.po, id.po, it.po, ko.po, nl.po, + pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po, da.po: Ran update-po + + * be.po, ca.po, el.po, eo.po, fi.po, hr.po, hu.po, ja.po, lg.po, + ms.po, ro.po, sl.po, sr.po, zh_CN.po: Added new translation files + from the Translation Project web site + + * da.po, de.po, es.po, et.po, fr.po, ga.po, gl.po, id.po, it.po, + ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: Updated + .po files from the Translation Project site + +2005-01-29 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + Prepared to release findutils-4.2.15 + +2005-01-25 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + Preparing to release findutils-4.2.14 + +2005-01-23 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + Merged the d_type optimisation code; this is disabled by default, + and can be enabled with 'configure --enable-d_type-optimisation' + +2005-01-22 James Youngman + + * Makefile.in.in, Makevars, da.po, de.po, es.po, et.po, + findutils.pot, fr.po, gl.po, id.po, it.po, ko.po, nl.po, pl.po, + pt_BR.po, remove-potcdate.sin, ru.po, sk.po, sv.po, tr.po: Switch + to using the gnulib gettext module, to ensure that 'make + distcheck' works with current xgettext, autoconf, etc. + +2005-01-08 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + changed .pot creation date + +2005-01-03 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + distcheck + +2004-12-06 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + distcheck + +2004-12-05 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + distcheck + +2004-11-24 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + updated po files + +2004-11-21 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + Messages changed again + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + messages changed again + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + Preparation to release findutils-4.2.6. + +2004-11-19 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + updated by make distcheck + +2004-11-10 James Youngman + + * pl.po: Applied Polish translations + +2004-11-08 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sk.po, sv.po, tr.po: + distcheck changed the po files again + + * da.po, de.po, es.po, findutils.pot, gl.po, id.po, ko.po, pl.po, + pt_BR.po, ru.po, sv.po: Turn warning messages off by default if + stdin is not a tty; allow these to be controlled explicitly by + options -warn and -nowarn + + * et.po, it.po: Updated translation files + + * sk.po: New translation file + + * fr.po, nl.po, tr.po: Updated translation files + +2004-10-31 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, tr.po: did + make distcheck, which updates these files + +2004-10-24 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, tr.po: Updates + prior to release of 4.2.2 + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, tr.po: Use + gnulib-tool --import to import the gnulib code, rather than the + odd way we were doing it before + +2004-10-17 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, + it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, tr.po: + preparation for release + +2004-10-16 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, tr.po: + findutils 4.1.20 check-in for tagging + +2004-10-02 James Youngman + + * Makefile.in.in: Search in $(top_srcdir) for mkinstalldirs, since + that's where we keep it. + +2003-06-14 James Youngman + + * POTFILES.in, da.po, de.po, es.po, et.po, findutils.pot, fr.po, + gl.po, id.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, + tr.po: Merged changes made for version 4.1.20 onto the trunk + +2003-05-26 James Youngman + + * pl.po, pt_BR.po, ru.po, sv.po, tr.po, da.po, de.po, es.po, + et.po, findutils.pot, fr.po, gl.po, id.po, it.po, ko.po, nl.po: + Changes to allow compilation on non-GNU systems (i.e. for the + macros that gnulib decides to #define to be effective) + +2003-05-24 James Youngman + + * da.po, de.po, es.po, et.po, findutils.pot, fr.po, gl.po, id.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, tr.po: + also need stpcpy (e.g. for Solaris) + + * POTFILES.in, da.po, de.po, es.po, et.po, findutils.pot, fr.po, + gl.po, id.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, ru.po, sv.po, + tr.po: Updates to the i18n files to ensure that 'make dist' + succeeds + +2001-06-09 Kevin Dalley + + * stamp-cat-id: * stamp-cat-id: Remove file. + + * Makefile.in.in: * Makefile.in.in: Upgrade to gettext-0.10.38. + + * ChangeLog: * cat-id-tbl.c: Remove file. + + * de.po, es.po, et.po, fr.po: + * fr.po, et.po, es.po, de.po: updated translations to + findutils-4.1.7. + + * tr.po: * tr.po: New Turkish translation. + +2001-06-01 gettextize + + * Makefile.in.in: Upgrade to gettext-0.10.38. + * cat-id-tbl.c: Remove file. + * stamp-cat-id: Remove file. + +2001-05-20 Kevin Dalley + + * da.po, de.po, es.po, et.po, fr.po, gl.po, id.po, it.po, ko.po, + nl.po, pl.po, pt_BR.po, ru.po, sv.po: updated to reflect changes + in source code. + + * id.po: New translation for Indonesia. + +2001-04-28 Kevin Dalley + + * sv.po, ru.po, pt_BR.po, pl.po, nl.po, ko.po, it.po, gl.po, + fr.po, et.po, es.po, de.po, findutils.pot: new translations, and + new source code to translate. + + * da.po: new Danish translation. + +2000-10-13 Kevin Dalley + + * sv.po, ru.po, pt_BR.po, pl.po, nl.po, ko.po, it.po, gl.po, + fr.po, findutils.pot, et.po, es.po, de.po: updated after addition + of lib/rpmatch.c + +2000-10-10 Kevin Dalley + + * POTFILES.in: added lib/rpmatch.c + +2000-01-26 Kevin Dalley + + * POTFILES.in: added list of files with translatable strings. + + * de.po, es.po, fr.po, it.po, ko.po, nl.po, pl.po, pt_BR.po, + ru.po, sv.po: New, slightly out of date, files imported from the + Translation Project: http://www.iro.umontreal.ca/contrib/po/HTML/ + + +2000-01-22 Kevin Dalley + + * created po directory and added existing po files from + http://www.iro.umontreal.ca/contrib/po/HTML + diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 0000000..1f5cc28 --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,384 @@ +# Makefile for PO directory in any package using GNU gettext. +# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License but which still want to provide support for the GNU gettext +# functionality. +# Please note that the actual code of GNU gettext is covered by the GNU +# General Public License and is *not* in the public domain. +# +# Origin: gettext-0.14.4 + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = @datadir@ +localedir = $(datadir)/locale +gettextsrcdir = $(datadir)/gettext/po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + +GMSGFMT = @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGMERGE = msgmerge +MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +UPDATEPOFILES = @UPDATEPOFILES@ +DUMMYPOFILES = @DUMMYPOFILES@ +DISTFILES.common = Makefile.in.in remove-potcdate.sin \ +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ +$(POFILES) $(GMOFILES) \ +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + +POTFILES = \ + +CATALOGS = @CATALOGS@ + +# Makevars gets inserted here. (Don't remove this line!) + +.SUFFIXES: +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update + +.po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + +.sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + + +all: all-@USE_NLS@ + +all-yes: stamp-po +all-no: + +# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no +# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because +# we don't want to bother translators with empty POT files). We assume that +# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. +# In this case, stamp-po is a nop (i.e. a phony target). + +# stamp-po is a timestamp denoting the last time at which the CATALOGS have +# been loosely updated. Its purpose is that when a developer or translator +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent +# invocations of "make" will do nothing. This timestamp would not be necessary +# if updating the $(CATALOGS) would always touch them; however, the rule for +# $(POFILES) has been designed to not touch files that don't need to be +# changed. +stamp-po: $(srcdir)/$(DOMAIN).pot + test ! -f $(srcdir)/$(DOMAIN).pot || \ + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) + @test ! -f $(srcdir)/$(DOMAIN).pot || { \ + echo "touch stamp-po" && \ + echo timestamp > stamp-poT && \ + mv stamp-poT stamp-po; \ + } + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ + msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ + else \ + msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ + fi; \ + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address="$$msgid_bugs_address" + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + if test -f "$(srcdir)/$${lang}.po"; then \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +install-strip: install + +installdirs: installdirs-exec installdirs-data +installdirs-exec: +installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi +installdirs-data-no: +installdirs-data-yes: + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: uninstall-exec uninstall-data +uninstall-exec: +uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +uninstall-data-no: +uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +check: all + +info dvi ps pdf html tags TAGS ctags CTAGS ID: + +mostlyclean: + rm -f remove-potcdate.sed + rm -f stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f stamp-po $(GMOFILES) + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: + $(MAKE) update-po + @$(MAKE) dist2 +# This is a separate target because 'update-po' must be executed before. +dist2: stamp-po $(DISTFILES) + dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + dists="$$dists $(DOMAIN).pot stamp-po"; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir) || exit 1; \ + else \ + cp -p $(srcdir)/$$file $(distdir) || exit 1; \ + fi; \ + done + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +force: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..8ac3f44 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = bug-findutils@gnu.org + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..ece6e93 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,26 @@ +# List of source files containing translatable strings. +# Copyright (C) 2000 Free Software Foundation, Inc. + +# Common library files +gnulib/lib/argmatch.c +gnulib/lib/error.c +gnulib/lib/getopt.c +gnulib/lib/human.c +gnulib/lib/quotearg.c +gnulib/lib/regex.c +gnulib/lib/rpmatch.c +gnulib/lib/strftime.c +gnulib/lib/strtol.c +gnulib/lib/xmalloc.c + + +#Package source files +find/util.c +find/find.c +find/fstype.c +find/parser.c +find/pred.c +find/tree.c +locate/code.c +locate/locate.c +xargs/xargs.c diff --git a/po/Rules-quot b/po/Rules-quot new file mode 100644 index 0000000..9c2a995 --- /dev/null +++ b/po/Rules-quot @@ -0,0 +1,47 @@ +# Special Makefile rules for English message catalogs with quotation marks. + +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot + +.SUFFIXES: .insert-header .po-update-en + +en@quot.po-create: + $(MAKE) en@quot.po-update +en@boldquot.po-create: + $(MAKE) en@boldquot.po-update + +en@quot.po-update: en@quot.po-update-en +en@boldquot.po-update: en@boldquot.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@quot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header + +en@boldquot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header + +mostlyclean: mostlyclean-quot +mostlyclean-quot: + rm -f *.insert-header diff --git a/po/be.gmo b/po/be.gmo new file mode 100644 index 0000000000000000000000000000000000000000..6bd37b78bbda561c1a2035cbd51e96014dd11e25 GIT binary patch literal 4142 zcmbuBPmCK^8NeTHp~X=Clm;kJ`ntv4r0KYJ63Es`LrB`LBATRab^{0!Wo%Ep!`d_3 znelF1@n@55Hg< z=TO%DHT)d>6O=gr3GaX#ZdK~ba3d7^!%*Tn3K3CLkdOKiUy`?3DEasW^l|K6xQXZC zk1Cai&%npwtMCE%SGXPCiPJ;y2`F;ULm7X)J^nX1%<~{Y6`&9Ahp)f~;5+ak_>VU4 z`*@m{Ls0TN3Z=fsq10m%yciQuhbeB)F8LyNiOLR>AA0Pi*FLA^oHbJ zdO`Y1dPn+9aw^xSxg~D7ByPE~+!EtwxFvSEZsI28Cg-$*=}8SYa?2&Trt~O>I&y-# z>)DZ0(WRyi-KuBTbhg4&QMM`jU90(1+V->^R2y~2i&8UPVMN_f+x3!LZTO9F?QGyY z({KX^ne}W~)(2S7`j-CS((8KI&$-@&hLJxp(XR$Ks!ziUoU&i_+-K43CQ7oJW~cAG zNkWER+(~>om&*xu>91=wd|*@`cfE?9bb?R{o+ZmNSo6y?$eQ63R4QCGI_iyk{*u;JddhYq*Q=W0Y^dCJb6c{qj+zsWrdJ2M<6Uo$NrOZ_v*F6Db7F!fl>BuSyhg3o zZEI05mb=r)S6q`}W2o+;jW^w8IxEO1Q8m&et0_D17%A#iWp=`{Ee?NAJnk<-66%pT zX=l=voUO=hwF(6*zfI@ATHI3DoJTYBgdIlKNML(m&8FBz{f!#i{Xo+mAG4d~vF5nm z>Di^-b=$4wO3hu!d)0*m;m>q;p^vLMQG0@C8wsbpW7l^RL6_)LVPK{l1wKr@atM~MkgneGx6p48jn}GmpX?r zBUj=UBg@H5@2{Y+ZXrw2 zF+?9+PUcm*s%%)zPQIF)kKasYl&Kz`B61p!_$7_PJ{J@5B1@P(vMdAqJeQp8t77&< zs-G%cBng)}Mox48L`(P_5@tcMdOp6UFfS3lA@xn>6y{G#pAfi6oRx3cUUGc(#3RYQ zn#@b$R*n_(qFtR;ZH_OIGDi?O<+Urpu0F5QgJwQ%r7uiPa}BH`)-4G_va2~L&98OD zIdDu87yHl43){j*yUeM%^rgL?muF1SlA3FhfcE01GCe1@9ProM6^BW%q!i7xyzQ*Z z=Iv=%#hE5mxg0MPb?S%|rgt~;EL}|%X5!cBBojfqt4&|Zp_8_qtkgMX2l%@{, 2003. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.7\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2003-11-04 05:21+0200\n" +"Last-Translator: Ales Nyakhaychyk \n" +"Language-Team: Belarusian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.0.2\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "нерэчаісны довад %s для \"%s\" " + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "неадназначны довад %s для \"%s\"" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Рэчаісныя довады:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Невядомая сыстэмная памылка" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: выбар \"%s\" ёсьць неадназначны\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: выбар \"--%s\" не дазваляе довад\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: выбар \"%c%s\" не дазваляе довад\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: выбар \"%s\" патрабуе довад\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: нераспазнаны выбар \"--%s\"\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: нераспазнаны выбар \"%c%s\"\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: недапушчальны выбар -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: нерэчаісны выбар -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: выбар патрабуе довад -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: выбар \"-W %s\" зьяўляецца неадназначным\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: выбар \"-W %s\" не дазваляе довад\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "памер блёку" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "\"" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "\"" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[тТ]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[нН]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Выкарыстаньне: %s [шлях...] [выраз]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Выкарыстаньне: %s [шлях...] [выраз]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "увага: нераспазнаная службовая пасьлядоўнасьць \"\\%c\"" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "немагчыма атрымаць бягучую тэчку" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "немагчыма атрымаць бягучую тэчку" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "невядома" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"бягучая тэчка зьяўляецца дапомным шляхам; дапомным выразам ёсьць -print\n" +"выраз можа складацца з:\n" +"дзейнікаў (у парадку памяншэньня; -and маецца на ўвазе, калі іншыя " +"незаданыя):\n" +" ( ВЫРАЗ ) ! ВЫРАЗ -not ВЫРАЗ ВЫРАЗ1 -a ВЫРАЗ2 ВЫРАЗ1 -and ВЫРАЗ2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"бягучая тэчка зьяўляецца дапомным шляхам; дапомным выразам ёсьць -print\n" +"выраз можа складацца з:\n" +"дзейнікаў (у парадку памяншэньня; -and маецца на ўвазе, калі іншыя " +"незаданыя):\n" +" ( ВЫРАЗ ) ! ВЫРАЗ -not ВЫРАЗ ВЫРАЗ1 -a ВЫРАЗ2 ВЫРАЗ1 -and ВЫРАЗ2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer ФАЙЛ -ctime N -empty -false -fstype ВІД -gid N -group НАЗВА\n" +" -ilname УЗОР -iname УЗОР -inum N -ipath УЗОР -iregex УЗОР\n" +" -links N -lname УЗОР -mmin N -mtime N -name УЗОР -newer ФАЙЛ\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path УЗОР -perm [+-]РЭЖЫМ -regex УЗОР\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user НАЗВА\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "нерэчаісны рэжым \"%s\"" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "нерэчаісны null-довад да -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "нерэчаісны від -size \"%c\"" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "нерэчаісны довад \"%s\" да \"%s\"" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "нерэчаісны довад %s для \"%s\" " + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find вэрсыі %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find вэрсыі %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "увага: нераспазнаная службовая пасьлядоўнасьць \"\\%c\"" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "увага: нераспазнанае прадпісаньне фармату \"%%%c\"" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "асяродзьдзе занадта вялікае для exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "немагчыма нарадзіць працэс" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "памылка чаканьня %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s завершаны сыгналам %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "нерэчаісны выраз" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "нерэчаісны выраз" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "нерэчаісны выраз" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "нерэчаісны выраз" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "шлях мусіць папярэднічаць выразу" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "нерэчаісны выказьнік \"%s\"" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "нерэчаісны выказьнік \"%s\"" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "нерэчаісны довад \"%s\" да \"%s\"" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "прапушчаны довад да \"%s\"" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "нерэчаісны выраз" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "нерэчаісны выказьнік \"%s\"" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "Выкарыстаньне: %s most_common_bigrams < list > coded_list\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Паведамляйце пра памылкі на ." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find вэрсыі %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "дзён" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "нерэчаісны довад \"%s\" да \"%s\"" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate вэрсыі %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "сьпіс довадаў занадта доўгі" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "увага: база даньняў \"%s\" большая за %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "асяродзьдзе занадта вялікае для exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs вэрсыі %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "двайныя" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "адзінарныя" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "сьпіс довадаў занадта доўгі" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: спынена сыгналам %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: пярэрвана сыгналам %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: нерэчаіснае значэньне для выбара -%c\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: значэньне для выбара -%c мусіць быць >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: значэньне для выбара -%c мусіць быць < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Выкарыстаньне: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n" +" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" +"str]]\n" +" [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n" +" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n" +" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" +" [загад [пачатковыя довады]]\n" + +#~ msgid "Success" +#~ msgstr "Пасьпяхова" + +#~ msgid "No match" +#~ msgstr "Няма супадзеньняў" + +#~ msgid "Invalid regular expression" +#~ msgstr "Нерэчаісны сталы выраз" + +#~ msgid "Invalid collation character" +#~ msgstr "нерэчаісны знак параўнаньня" + +#~ msgid "Invalid character class name" +#~ msgstr "нерэчаісная назва клясы знака" + +#, fuzzy +#~ msgid "Invalid back reference" +#~ msgstr "Нерэчаісны сталы выраз" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ ці [^ несупадаюць" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( ці \\( несупадаюць" + +#, fuzzy +#~ msgid "Unmatched \\{" +#~ msgstr "( ці \\( несупадаюць" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "нерэчаісны зьмест \\{\\}" + +#, fuzzy +#~ msgid "Invalid range end" +#~ msgstr "Нерэчаісны сталы выраз" + +#~ msgid "Memory exhausted" +#~ msgstr "памяць вычарпаная" + +#, fuzzy +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Нерэчаісны сталы выраз" + +#, fuzzy +#~ msgid "Premature end of regular expression" +#~ msgstr "Нерэчаісны сталы выраз" + +#~ msgid "Regular expression too big" +#~ msgstr "сталы выраз занадта вялікі" + +#, fuzzy +#~ msgid "Unmatched ) or \\)" +#~ msgstr "( ці \\( несупадаюць" + +#~ msgid "No previous regular expression" +#~ msgstr "адсутнічае папярэдні сталы выраз" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "дзеяньняў: -exec ЗАГАД ; -fprint ФАЙЛ -fprint0 ФАЙЛ -fprintf ФАЙЛ ФАРМАТ\n" +#~ " -ok ЗАГАД ; -print -print0 -printf ФАРМАТ -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Сьпіс выказьнікаў:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "віртуальная памяць вычарпаная" + +#~ msgid "inserting %s\n" +#~ msgstr "устаўка %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " від: %s %s " + +#~ msgid "left:\n" +#~ msgstr "левы:\n" + +#~ msgid "right:\n" +#~ msgstr "правы:\n" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s зьменены цягам часу выкананьня %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. зьменены цягам часу выкананьня %s" + +#~ msgid "error in %s: %s" +#~ msgstr "памылка ў %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " ВЫРАЗ1 -o ВЫРАЗ2 ВЫРАЗ1 -or ВЫРАЗ2 ВЫРАЗ1 , ВЫРАЗ2\n" +#~ "выбараў (заўсёды ісьціна): -daystart -depth -follow --help\n" +#~ " -maxdepth УЗРОЎНІ -mindepth УЗРОЎНІ -mount -noleaf --version -xdev\n" +#~ "праверак (N можа быць +N ці -N альбо N): -amin N -anewer ФАЙЛ -atime N -" +#~ "cmin N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Выкарыстаньне: %s [-d шлях | --database=шлях] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] узор...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "несупадаюць %s двукосьсі" + +#~ msgid "command too long" +#~ msgstr "загад занадта доўгі" + +#~ msgid "argument list too long" +#~ msgstr "сьпіс довадаў занадта вялікі" diff --git a/po/bg.gmo b/po/bg.gmo new file mode 100644 index 0000000000000000000000000000000000000000..96b7cddc115a0f88156b9662b54db1dc358e4201 GIT binary patch literal 23363 zcmd^`32a^0dFOB2G>z%(+az(?9A~1Eigam8&f-wEW5uFlHQGj&S4EL8A1}!ly@h^@ zD5mLDwzD`!rgjs%aospc-JpXOU1%*9Em?9<6ljqK!DCw#MT!=fAYFkLGo1<2q9`!G z|98%P_r8S`1E-h(^T5mR-E+_Kop1lXd){BY_9c%;d=|Oh%Jru|7Dc}X{OnKgkI$P% zqUdVin}OE?cL3iGtOGX#KL>mW_&o4iz^N;v=q*6^@+fKocL47L{x0wxz^h-uT)Mj71pa5> zO~C7cGr(!!uLk&%*F;f?`#IoA;2#0CuRTmI{5}eNH}GNLdx2jA&H?`g_%7hRuZyB{ zz{i2xfqOyb{lJsJyMSK<{yp%`ATtL1F_8O3;8q}yqD#QTz&`Ku8t6 z2BseXz61CkU>jHi{uWU3c@>N6`4sS{fWHJ3zGs1=+c$vf_gx@cir&WLy1x!6`I`nh z;6uP~0)GQ2yiYLM6%gb}pw|5=$ZKDJ0o+Xcw}Ha<<#g7*MuAeP4+8H5?g#Gvktq7_ zK<)E?p$y`~Pa;$|0v`eH0e%xGJ-G_y5r1w3-UO@w{~Gw)K>ni7gRJCo1^8*^{U%WI zbqCD<5b(1=t^4P|F90Xl{C9zW2>c%K5}TG>Jd2Y2AK>2szXSYBkedYl9?B{G`FG&; zz%h`~eG0r8_$W|x_*0;sUpemEZw2n+{NPj)7<|V zQ0u&JXB52vd>VKgaGJ>w`RG~TmB2p^@UMWP+dlwrWZi!PYMmISX#S4?5$Wg&;M;)D z0_hU{8Sqx%o7wcsfYZR21CIegEjj^26rvR%f6-s_57tIoZt>6W0m8cINubvII#6=) zZ$Pbc-3O6f;9bDGfG=gS*MZ+rAWczoH#Qk~0eA!OXMV=d{}Av9_ve6j1K)sfOMdFW zW5B0?kUF|zkC(?O;34MyI8ggp-5W&-_ix!3MIYn-$ z4X$x6t)tI2E|xQUqkDZIi^+k$Z|8aym-KCt3sH|MT>89~E8)6QH+=5pdL5T!r^fXX zu9WL0t~YVLh3l1Em=*h65ujvoEPVe6@Hp2ZSDg#8+UFJgmrUscIqh>_fUgI>A$)%a zP_nX*>~y78@Uic`(V-_;1!#iu2iqJl5)+} z(#1--mb%h>(nw0Jw9(w^=#kWBT%lL~)Gd}<^R6|Yy7}_lyqhk!Tr+Krk1(b_>lWwB zrTOAO8d_;{At|Mr_F%eDZ?xQWd#>qPb$2~q;@NU-rrj!6nm5hW+T-=c+>M%SCY?>% zm6lsbSglNN7A&t;NsG?YORia-t0fh;X@*DQ{d`iJSirpnA#3DmIW*>WXqE;U&VEaQs~&*WpHq4xpz}(Q*+eK)YE2dwB?dYrM`$1x}-7Jt|IS#nr>&hLc63o zU7l+rm4i3wZ9gg$G{5y#)hg7KX&YQyM--fLnw47nmfo2~l7!k{=#t|O|Gu3f_* z)aPm_%1p*2PgPHyq0fy7{y98ErFxm?n)CHG5m{HY>UrZ0zUyejn5G*a9~ZdM zz28N<67)Q2rfPsXSYDYlZdkUO$be2&7g|eQuFF2EN4zWSXgsbQ+|tcW2t?LsR(0S>rCvhe2bxbHZq1(7-E+0NX?~Y{GAc7EM%&F+k~!9j zb_e-So23MM)I{{s8U{g|#1z*S+L-IKQm&$94cA;qOXb-z>x1g}iy6El_gBui*L2l3 zw!Kzwq0*%kL^oCH|M5$lc#%uA8c7-VJC|=qX3@40L>ijsYphF92BId2Oipm42@;&* zv!Q>2iLcG!g1YY9VX!b0{p`aMn)UN`@xwU+vO?8z(-`O~>G2eI(Tw(Zk($XwTpnvu z`3yYBilHqibv< znU(y<`=by6jcM~RzjVwkG>9pPUDzsUoM4sBK0rENPK=%107=cn7TP(zMi!E})Fmx9 z-)b#PUUN+|IiA#N$^3W-qppFsTV2`jb3Qqa%dA81X@Z*)%WXA}pVnqHRa!+1*Ne!a z+Z2Qp7&qOXon=SxFKKY)++#ZNuRRhSlJ(l3+2c$Ui&UAd%h$n0f{&bhgl@!74L=?$ zycjE1ZPY8V#1=YPz~)-Xu@oPdiFD>ILkOBJH(HV9Nh+g~^wDNAn~vJV1F@tx%B4zs z27H2bCce8BV|%>ZsMq9)F*S{{Oz+mPiW%}IF&s2t3{pLyv|h2o*U=GLTMA$;9zJ1ycL zbf5yUyuXv;jBOqt=$LKP-LiY%uA?8=v;XD~9ldS$JyW8RY;0En37f&bE>&&K3k}0E zK{!e+6pm-p=*uyU<@lB_APNl1BhJYvPhQ2xM4^v{tBq3fBQheFDWFvEPyvoCUu zj~uS;JHr2^yN^WoMp=60Vq8^9Fya%oi2!HaE&C7d-Fe8xvzEwlzkAPAx6#^Mmg)E| z6TV9r5N;}Df+R=bZlTe}m&921RyJ1jaX0VZyLaclU2canH`2X_xLX`l>o)8t4ij1X zMi!g0!NoS-uXLmKJj_E%#4EgLCQ{Dwarr8gcrI_oO~ptrp;VOXR8+#~BM!`QEc-r} zwg&ArBO@+yDG@A3?XjN#Y4hx(Ybj&2@}vfRoiz?L);)aUJ8dgUa{hIAj@s|g{TV0XeCwINMA+-|l_ zjBR@{ix$Fz#DSG-)~o3v!4!r~v8{4H*~3&uFdZK{VQPW>0*0c7`D>LQ|E+wdwRWYFYk_22E~2|$j<&JR zhnlK55p)E5S1`5nWqf?2G`|#CM-1=fdlJT4NY|B>Oib!^2uY5g5h<%N5r(EjUcLZA z{C0KJ-!tc)uW^iRn%R8WUUbNcQErS7k~)#$1qDj!jIt>#lfp&W>*_+KT%zRWC6Is) z0+abc$kff1kEgZGlfg=jxv9Gj9CVxUhgbWrPUWjs_FYf6F|plmr&rd%O8UAz%oCdH z{r#|6)~!2oYZw;E1%z}g?4e)`1Op2RV5qa*|i zZb4!ws>uqBjF6Wq&K@>)YnEgpnL+A|L6(4nYv?Y&uugi ztyzz5gS@xMNYFK#xr1&X5;Od`i>aa^>_=7a!~7p5$j9x}>O-1GqGnQ)zb(zD#7M-4 z3Xf)M)B{TMW1DdV(}?wwn{C&uAn9fa(`7Dv8W&l`(v9tNI01I+w(L_B7~B7SqGG}h z9A&_Sq8y52ZZsx7rMyUM$)0B0C>8s#obTgpS3H|kh#BJ9rkUYGcORH?@tg{d04s>9 z#+c1iuJjf#F%QLhW|{m*1It5doz$&{lumJo$C?__H*qy=ubN@oyHLKN2-lzaru0OQ zSzPCl88V(*APO|LAXoUC``QFeJCwI%*1=l5B3ed>d}2_1Ri#~{_UVnY54|AeL=fL- zF$*1Uua!?&h^k#Q3GjSEJX4pc&&u`9O47uKII@9yoBF$y&G(C2K!RWnf)NUp_LizhPSGfHCOEIjnFH?vyciAg2SP_ao;IvRJ` zhlizfPH2k}Vt=#k3RU%n!>XB28jYK5NY;9ksdiS#$CM*cJ0QOf`Kjzzo?(*@FKjhm z=8FR&+NiCp3_lANKkn4e#kYLy9&K?vr=$;vlw10Ygd}~bI$g(fDz-W%6V#=;_7Zoi zhS*p%9?Pqm_zt(=Q+%x-Y=vqOD0VT9PF*EwDZOWK;*%RPR#|El7iN9Yu7I6Z3`Mvs z`!EHzBnmB-;c%AyHCtqM#1$n1iynk??--ZuO~g8Q7t|~uUzn_0+Ee8;RDtgOu%fK) zdOclm<7h#60|N^QtTy%Z_N7$nHx@I--E18MEuzKSl0AD?t5-lNU#=Tmgkm9hiC~Cv z$oqX5lMp}E;;boD%IO7T2+K0hAhD7#6dcYNGj-Ebz3~}z82DELz{OMniqxnM`*Upk z`sJ3it*-=>E!*RGviPD&iPwUngy6i|MrK66yd(x*RxXRW6zB=W4m9c?CAf}v&%}55 zTJNMOqc8HlYy8^rZQ=D=ytj#Ijz7Rlw)jwe(yB(?8dCO>ZREiIL-Easn*4CQ3vr)x z+b1U88&A9^o_L?zcHQK=-nV69+r$JN)zdar}DjT8=n}tnYs`$b$p1ZKyL_6w60mG@KV!Phj}e| z!|jJ|iLcB12|LPG@l>r;SJ7nBUB?T|kpq=BC8GEigqsp-ZNYAvH*A*y(32a+YVPVA z+_uf6aQ5((s8_Iv06(78Fi( zmOB?T!^$;Gu5X&Q^UUgl+!)fG72()k@K2}y{`T8w(|uM zpr`*Su!mw7*qOF-zh+r|#C2XU0-a*nGhxzxu4})Y7ucizLGqKJbn#mMKAv`ErzV@fI1*)SV-nT4l$$;dZ}K0AS^dHho1o%$8Ou`=L6zE*C`#Bmy#qIVZ?hX%DR_U$Y?jU5EBu)Ra5msm`zA z8Sw8G?2zqJmOgkt1=n%5fk1> zA>ipi42d<76aSZy1w<;3U$7UNnVm)Km$|G{!PXM9*`frs1V8d>l5!y;7HKa2EhAhC z&V-|ghuIa;B(&lijunGv7D}u2IBcxlCwY2C?NHd3KPTB`LWRaac=yAK+79Rek_Aom zNC(;IrWD#p@DI<^`&r$YqI!#?i18t)2shAAJNEMb+m<IZjs@hwcfD>C=WFEtl5>v}tmviddeso*(c@Bif|oRH}xC%6b~Ao%7ha z(BsAGJAUuOn0xKq>_)FaF>A3Rt6Q+s3Z;p5%<7Y0nVk*hT47Tby^~W6^$cP}sK(j3 z0_&%|m#B#h1=|E?w1S+V`YP?`>$5c4t^HFft}Yj)ml_O7XtO{OWP7yMn_kO97PqHS1H3 zSNW2~2YkTI+)N_#azBf+A1YqtoP2RILZGt@fz3FXIf4{mwGym5^AyvX(9t{yPKYT8 zGw6D*a|vSM6l|!X?c$Vu+p@)qXRu%qWLbTLDRBFuepa*qcTt)V5?7@WzAD(Afyu07`re@xd^frrb(DU!ccs;^Mc)wRYQtrHji|7z^$kOb&Pb1-`J%0 z|0eQGv1aWF`5aPw8nK9W-Qp8SJuD%lY-El!lOi#3pc09BvT%@X<@SZWYMY>&MI+4i zpg6sH(pv+Ylf5WB$!k3pq}V1Uu3{$z3g#*p2F}t^f3fmWmU`~*i`&-|V`+ti%$$su zG=vnLQ~7H{YQl#5)*o^#&%}u6OjPiONfk&1IHpeyVeCm}dx)}*_rWKGGklgQdg-E3 zXZe&Gbe=YGS*zk_CiIjffAtqKzePyt6%z(Rdc;*~>vhGbB6CFL37L?c%Y)7X90&|} z%d)^sI3`WBk`(MdX`J+=7~rLP25;RX13{C0D6ni*eOcPvw0UbFCHkbTCX>tZg+iy? zjctIQ@%MrN-}Qlv9^pV(Fvp(OV;J-fGG?5PK_PF^Z5kwwnZKQ>WB~v3n6qbR}d%3q2)) z5mI?h*JuBw<~rw@n-mFO5LnPJx*cw%PIin@2M?iHcIp%R`f%sD%t}}a&-*Dlo8wc; zY;G@;UWqiMv!~qxR%YHrSTGQwzRY%e6*d?RBkfvNR9I?ySuEn-wim4sbR!b%m5Po( zMT$6t*EM#E6b3zY>_h%6DM&w7->(y;Sh35WDeZg}6ZI9W>Z6^f^OL2tKHB-^&ab%M z$HUK-L#X}F3+(S*D4WqF zqxTW7H6i9e<#<2|tsWy0qu>MQm3&Bo2Kpg*NG&o_u=8iW+G-|h&jSL&E_tl?) z5Mmt3dx0_$6tuulZ##Wi-)M?q>`r9S3}fL$BnODeI4|XwUvosAvGKDSYVVhIM>?Kq!j5ESwoH_$@A}w&A$bSH6f8;u6Vn!5t{fV#AB;| zm@MQqk)S~vU|L_807l{t^CAXj%B7>$0N<>@C-pHBNWv(~=c+3Uu3kjHp53-56AT6G zVOs|x0Y#GDd}h!*^%)rw>dx}jZb;c0CYWA7l;V;U{3sI}BlO z=Lrny)t0;uU8`Vrp*l3_23y?t!|O`?zwfau*@q3%IVR4rige8Kzd$Dm!iogaEEcgX zCdt~IgxV--_D$LdF7jWQ1m{+(?_iJ}nC~9*9&@B7U+CC*nQ$P!&=8Kr_q60Uc0@kE z)j|3EP7gT_n>S>K=JOW1)QcVZ$8%0L@7zB-mcEPlc49P(i%n5Q0mOaq-EB}Sdo5-* zOi@dLtx6b~2vX{$zYZkn#hYxqsA~t)a9GgSOEMt`4kvt?xm zAs+$xz+|Nb1@7 z2{v{S=k4EP6%#eo8iZ~iw0 zgRKKUEg0zHe__zuoGsS(LxbK<{2pZJ?+yBU`JWwRB#_5B3%9y~v|?}XOD`W$yr{uF zF16=Hf24wl4;>{We6!fGWA6{BgCi@FT)m;^$tj5rV$9c`F|yO^x}{=oudOJvMYJ;G zvOS^D=(8C+&Vc?S*;-z73a=3Qf*tT7$_eHwtB6lT3{vPIt0PEd2p;6;>bmwq$%}2w z{{4=1<}IIQly07og-SNO_os1^pUY-^7znpcaN@Oi=vAoNq^(})hf5HzbBOKb}zM6>b;ZBHm_zfBQM^20z~9Bc=}gqqFUA)>W^ z<{}J-NV-->>MV8BqMq3teq{^ijBmaG92i4)%lE~SA+sS+#kWmj$&9f=YG(wu{FFJC zF#_6_e+5g}>IoYZhnMl7)myaoXUc6#{j^Tg4k=D5;mku4&10CuU>^whT*tp{6E2c% zE3gkE4r;CW0#OuNgosDn$xd4JFbDduo;2E<8jC};2qPJ93u0r0S2%YeVGQr&WxH_3 z67Qkd^kqIK_2Fkc60#lwuS;GfXKN9-@awvvNLW>%YdC^w*!aOL_{Xn=VBRq48Jv6d z6UI2qB1ANu(1|dGboLh9ECW;Ow?xC|^jdBOHlvR*oFfz7bM(n8zd928dUEW%)TY-o zLj=`W-Y=~>l`(9GS%|7Q$xsvD`gNvTNb{vN_Dvk%I{{4uB|u11@r*BK7X1g}|LeEt@sCLTP&8y_LMMsBFGWIYXwRbTavt%f)Kyl!tjv?>O=rfKFG4-roG9 zm15xFG}3^4r>l>ci~1r{_a4u{;$$z^Gh%c-q67lL0Db22kqI~5fPa8iofQsrLVthA f7KP(IFCp{`hM`{jflzi($G-#eYh&{^R)_h&&q8$& literal 0 HcmV?d00001 diff --git a/po/bg.po b/po/bg.po new file mode 100644 index 0000000..b6084a9 --- /dev/null +++ b/po/bg.po @@ -0,0 +1,1153 @@ +# Translation of findutils to Bulgarian +# Copyright (C) 2006 Free Software Foundation, Inc. +# This file is distributed under the same license as the findutils package. +# Anton Zinoviev , 2006. +# +# Look at the CHECK string. +# +# This file should be sent to translation@iro.umontreal.ca with the +# following subject line: TP-Robot findutils-VERSION.bg.po +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.1\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-11-13 23:03+0200\n" +"Last-Translator: Anton Zinoviev \n" +"Language-Team: Bulgarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "недопустим аргумент %s за %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "двусмислен аргумент %s за %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Допустими аргументи са:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Непозната системна грешка" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: опцията „%s“ е двусмислена\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: опцията „--%s“ не допуска аргумент\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: опцията „%c%s“ не допуска аргумент\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: опцията „%s“ изисква аргумент\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: непозната опция „--%s“\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: непозната опция „%c%s“\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: неправилна опция -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: неправилна опция -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: опцията изисква аргумент -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: опцията „-W %s“ е двусмислена\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: опцията „-W %s“ не допуска аргумент\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "блоковият размер" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "„" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "“" + +# Клавишът О (латинско) генерира "Д" според подредбата по БДС +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[дДoOyY]" + +# Клавишът K (латинско) генерира "Н" според подредбата по БДС +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[нНkKnN]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Използване: %s [-H] [-L] [-P] [-Oниво] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [път...] [израз]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Пренебрегва се непознатият флаг за програмно тестване %s" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "Празен аргумент за опцията -D." + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "Опцията -O трябва непосредствено да се следва от десетично цяло число." + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "Моля, задайте десетично цяло число непосредствено след -O" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "Нреправилно ниво за оптимизация %s" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"Нивото за оптимизация %lu е твърде високо. Ако желаете да намирате " +"файловете много бързо, обмислете да използвате GNU locate." + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Променливата от обкръжението FIND_BLOCK_SIZE не се поддържа. Единственото " +"нещо, което влияе на размера на блока, е променливата POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "не може да се установи текущият каталог" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "не може да се установи текущият каталог" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Внимание: файловата система %s бе размонтирана неотдавна." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Внимание: файловата система %s бе монтирана неотдавна." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s е изменен по време на изпълнението на %s (стар номер на устройство %ld, " +"нов номер на устройство %ld, типът на файловата система е %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s е изменен по време на изпълнението на %s (стар номер на i-възел %ld, " +"нов номер на i-възел %ld, типът на файловата система е %s) [ref %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Символната връзка „%s“ е част от цикъл в йерархията на каталозите; соченият " +"каталог вече бе посетен." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Открит бе цикъл във файловата система; „%s“ има същия номер на устройство и " +"i-възел като каталога, който е %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "ниво по-високо във йерархията на файловата система" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "нива по-високо в йерархията на файловата система" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "внимание: символната връзка %s не се следва" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"ВНИМАНИЕ: Броят твърди връзки за %s е погрешен. Това може да се дължи на " +"програмен дефект в драйвера на използваната файлова система. Автоматично се " +"включва опцията „-noleaf“ на find. В предходните резултати може и да са били " +"пропуснати по погрешка някои каталози." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "непознат" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"внимание: задали сте опцията „%s“ след неопционния аргумент %s, макар че не " +"е позиционна (опцията %s влияе както на тестовете, описани преди нея, така и " +"на тестовете след нея). Моля, задавайте опциите преди всички други " +"аргументи.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"внимание: опцията „-d“ е остаряла; моля, вместо нея използвайте „-depth“ тъй " +"като тази опция е според стандарта POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"по подразбиране пътят е текущият каталог; изразът по подразбиране е „-" +"print“\n" +"изразът се състои от оператори, опции, тестове и действия:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"оператори (в намаляващ приоритет; при липса на оператор се подразбира -" +"and):\n" +" ( ИЗРАЗ ) ! ИЗРАЗ -not ИЗРАЗ ИЗРАЗ1 -a ИЗРАЗ2 ИЗРАЗ1 -and " +"ИЗРАЗ2\n" +" ИЗРАЗ1 -o ИЗРАЗ2 ИЗРАЗ1 -or ИЗРАЗ2 ИЗРАЗ1 , ИЗРАЗ2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"позиционни опции (винаги са истина): -daystart -follow -regextype\n" +"\n" +"нормални опции (винаги са истина, задават се преди другите изрази):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"тестове (N може да бъде +N, -N или N): -amin N -anewer ФАЙЛ -atime N -cmin " +"N\n" +" -cnewer ФАЙЛ -ctime N -empty -false -fstype ТИП -gid N -group ИМЕ\n" +" -ilname ОБРАЗЕЦ -iname ОБРАЗЕЦ -inum N -iwholename ОБРАЗЕЦ -iregex " +"ОБРАЗЕЦ\n" +" -links N -lname ОБРАЗЕЦ -mmin N -mtime N -name ОБРАЗЕЦ -newer ФАЙЛ" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path ОБРАЗЕЦ -perm [+-]РЕЖИМ -regex ОБРАЗЕЦ\n" +" -readable -writable -executable\n" +" -wholename ОБРАЗЕЦ -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user ИМЕ -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"actions: -delete -print0 -printf ФОРМАТ -fprintf ФАЙЛ ФОРМАТ -print \n" +" -fprint0 ФАЙЛ -fprint ФАЙЛ -ls -fls ФАЙЛ -prune -quit\n" +" -exec КОМАНДА ; -exec КОМАНДА {} + -ok КОМАНДА ;\n" +" -execdir КОМАНДА ; -execdir КОМАНДА {} + -okdir КОМАНДА ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Докладвайте при откриване на програмни дефекти и следете напредъка на\n" +"поправянето им чрез страницата за докладване на програмни дефекти на\n" +"findutils на http://savannah.gnu.org/ или (ако нямате достъп до уеб)\n" +"чрез електронно писмо до . За грешки в\n" +"българския превод съобщавайте на ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "проверката на библиотечната функция fnmatch() за правилност пропадна. " + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"внимание: Файловите имена на Юникс обикновено не съдържат наклонени черти " +"(макар че файловите пътеки обикновено съдържат такива). Това означава, че " +"при вашата операционна система „%s %s“ по всяка вероятност винаги ще се " +"изчислява като лъжа. Тестът „-wholename“ би могъл да ви се стори по-полезен " +"или може би тестът „-samefile“. Или пък ако е инсталирана версията на grep " +"на ГНУ, може да използвате „find ... -print0 | grep -FzZ %s“." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"внимание: предикатът -ipath е остарял; моля, вместо него използвайте -" +"iwholename." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Не може да се отвори входният файл „%s“" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "неправилен режим „%s“" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"внимание: посочили сте образец за режим за достъп %s, който е еквивалентен " +"на 000. Скоро смисълът на -perm /000 ще бъде променен да бъде съгласуван с -" +"perm -000. Т.е. в момента на него не пасва никой файл, но скоро ще бъде " +"изменен така, че да му пасват всички файлове." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "недопустим празен аргумент на -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "неправилен тип „%c“ на -size" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "неправилен аргумент „%s“ за „%s“" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" +"Опцията -show-control-chars приема единствен аргумент, който трябва да бъде " +"„literal“ или „safe“" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "недопустим аргумент %s за %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "find на ГНУ, версия %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "findutils на ГНУ, версия %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Разрешени свойства:" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "внимание: непозната обратно наклонена черта „\\%c“" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "внимание: непозната форматна директива „%%%c“" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Текущият каталог е включен в променливата от обкръжението PATH, което е " +"несигурно при използване на действието %s на find. Моля, премахнете текущия " +"каталог от $PATH (т.е. премахнете „.“ или началните или крайни двоеточия)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Текущият каталог е включен в променливата от обкръжението PATH, което е " +"несигурно при използване на действието %s на find. Моля, премахнете текущия " +"каталог от $PATH (т.е. премахнете „.“ или началните или крайни двоеточия)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Не може да използвате {} при името на команда за -execdir и -okdir, тъй като " +"това създава проблем със сигурността." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "С -exec%s ... + е позволено само едно използване на {}" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "Обкръжението е твърде голямо за exec()." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Не може да се отвори входният файл „%s“" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "не може да се създаде нов процес с fork" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "изчакване на грешка за %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s бе прекратен със сигнал %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "неправилен израз" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"неправилен израз; използвали сте двуместният оператор „%s“ с нищо преди него." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "между „%s“ и „)“ се очакваше израз" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "след „%s“ се очаква израз" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "неправилен израз; има твърде много „)“" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"неправилен израз; очакваше се някъде да се срещне затваряща скоба „)“, но " +"такава не бе открита. Вероятно след „%s“ има нужда от допълнителен предикат." + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "неправилен израз; не се позволяват празни скоби." + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" +"неправилен израз; очакваше се някъде да се срещне затваряща скоба „)“, но " +"такава не бе открита." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "Опа! Неправилен тип на израза!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "Опа! Неправилен тип на израза (%d)!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "пътищата трябва да предхождат израза: %s" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "неправилен предикат „%s“" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "неправилен предикат „%s“" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "неправилен аргумент „%s“ за „%s“" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "липсващ аргумент за „%s“" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "има твърде много „)“" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "неочакван допълнителен предикат „%s“" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "неочакван допълнителен предикат" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "Опа! Неправилно вмъкване по подразбиране на оператор „И“!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Използване: %s [--version | --help]\n" +"или %s най-чести_биграми < файлов-списък > база-данни-на-locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Докладвайте за грешки на .\n" +"За грешки в българския превод на .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "findutils на ГНУ, версия %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "дена" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "неправилен аргумент „%s“ за „%s“" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "базата данни „%s“ на locate е повредена или грешна" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Размер на базата данни на locate: %s байта\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Файлови имена: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Файлови имена: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "със съвкупна дължина %s байта" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tот които %s съдържат интервали и/или табулации, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s съдържат знаци за нов ред, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tи %s съдържат знаци и вдигнат старши бит.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Степен на компресия %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Степен на компресия %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "базата данни „%s“ на locate е повредена или грешна" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Форматът на базата данни %s е %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Използване: %s [-d път | --database=път] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=ТИП]\n" +" [-version] [--help]\n" +" образец...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "locate на ГНУ, версия %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "аргумент на --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"внимание: базата данни на locate може да се чете от стандартния вход само " +"веднъж." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "внимание: базата данни „%s“ е по-стара от %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" +"Неправилна поредица с обратно наклонена черта %s в описанието на входния " +"разделител." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Неправилна поредица с обратно наклонена черта %s в описанието на входния " +"разделител; стойностите на знаците не може да превишават %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Неправилна поредица с обратно наклонена черта %s в описанието на входния " +"разделител; стойностите на знаците не може да превишават %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Неправилна поредица с обратно наклонена черта %s в описанието на входния " +"разделител; крайните знаци %s не са познати." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Неправилно описание на входния разделител %s: разделителят трябва да бъде " +"или единичен знак, или поредица с обратно наклонена черта „\\“." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "обкръжението е твърде голямо за exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" +"внимание: стойността %ld за опцията -s е твърде голяма, вместо нея се " +"използва %ld" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "xargs на ГНУ, версия %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Не може да се отвори входният файл „%s“" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Променливите на обкръжението заемат %lu байта\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" +"Горна и долна граница на дължината на аргументите според POSIX: %lu, %lu\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" +"Горна и долна граница на дължината на аргументите според POSIX: %lu, %lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Максимална дължина на командата, която може да се използва: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Размер на командния буфер, който действително се използва: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"%s кавичка без съответна втора кавичка; по подразбиране кавичките са " +"специални за xargs, освен ако използвате опцията -0" + +# CHECK: да се провери използва ли се другаде, освен в xargs/xargs.c +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "Двойна" + +# CHECK: да се провери използва ли се другаде, освен в xargs/xargs.c +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "Единична" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "реда с аргументи е твърде дълъг" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "грешка при очакване на дъщерен процес" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: завърши с код 255; прекратяване" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: спрян със сигнал %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: прекратен със сигнал %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: неправилно число за опцията -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: стойността на опцията -%c трябва да бъде не по-малка от %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: стойността на опцията -%c трябва да бъде по-малка от < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Използване: %s [-0prtx] [--interactive] [--null] [-d|--" +"delimiter=разделител]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=низ-за-край-на-файла]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=брой-редове]]\n" +" [-I replace-str] [-i[низ-за-замяна]] [--replace[=низ-за-замяна]]\n" +" [-n макс-брой-аргументи] [--max-args=макс-брой-аргументи]\n" +" [-s макс-брой-знаци] [--max-chars=макс-брой-знаци]\n" +" [-P макс-брой-процеси] [--max-procs=макс-брой-процеси]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n" +" [--version] [--help] [команда [начални-аргументи]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "Опа! Неправилен тип на израза в mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "Опа! Неправилен тип на израза в mark_type!" + +#~ msgid "old" +#~ msgstr "стар" + +#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n" +#~ msgstr "Стойността на arg_max (%ld) се намалява до arg_size (%ld)\n" diff --git a/po/boldquot.sed b/po/boldquot.sed new file mode 100644 index 0000000..4b937aa --- /dev/null +++ b/po/boldquot.sed @@ -0,0 +1,10 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g +s/“/“/g +s/”/”/g +s/‘/‘/g +s/’/’/g diff --git a/po/ca.gmo b/po/ca.gmo new file mode 100644 index 0000000000000000000000000000000000000000..1b87b9c98947781af3cd83801f36cde95288fe70 GIT binary patch literal 15052 zcmd6uYm6P|S;wa|rOmcYdM_;mUME?07w>G=Zrmhm*NN+_+fD4XyI$u~H+5#u%sD&p zoSBoEIeQ6(7SRd{qE`Y!<%3H>ZRMs&iPTC70^}nKRaJ_}H;T$dLbUyYgaRr>Nc{fq zJ2U6(#g0RX;K;N8Gc)h?d7t}p{GHcb^SH++;QA@9n_udAzYI?QIDh!u{tD0A1Kt6? z4Ll3p2!0%#0-pqb75rQ9tzdMm=M~_Gz(>L7z?;GLnCHC({B=E4=19&uekt0Y3zO1JpW> zU+;Mbzy!Pv{5|li;NO7X13$$gJ_&x{wQk<)Sj1WGZvwTB4}$x^-vmYXuYscH55bp# z$?F~Fp!T%^{s4Ro)HxOmqV<0QwCaG-2V!wbNV9q z8SvYn_;H<=UjRQ1eil5$B--D1K)t`_CPxPY>KyI?XTT09djA$EzWqw|{2#zuxPJ|c z;;VNTC_089OZ7emvSsf}p!W0UpxS*OoCU9Aa;@`D@W;SML0Hi%L5=faQ0w?IsB`}Y zD0%&RkR$Pa2y(REYZ1POzzOhU;72Na!vwV8{&V0n;9d?}`}t?^R`5+sayxi0_;=uk z!S8_~oBTMq$RUZo-vM**Rnv}69|UjX{xjel_$>H~;B_>98TcC&ej3!ieg}LG{9RDz z^GOyVdOiheAJ2lX2ESk3{{Uob-t`do8t?$9apypm=-maX|0AHr`!!JX{SpXiy>Edm z$$JhIefB`?2f*7vhW0)ILIUqkKm&dkJOEzHVThma1Ys?24SXB;ILJ`m*Fl~Ce}LZv zZ{E*2zr^$Y6vgcjFz7PwofbO23bS9I5yF5T9F1t5cwO;2f7eCmeY10w3m*zIiW~K5yU> zU+Qy`OKUi)8$N8senj`vT%yYYm-erZ=%X{xXWoIeQ~G)xm*_0oy_QQdrTvHp^tsl7 zm3{Hgyj;R<23A-aZ=pXN&7Qd-Z`wn z!l)helhX78W{YXfgspy_M`>xoIFDLomTw+3b+c%rmq$erXQ>+dy*y6Kv5|+}U{gCT z;-WNJd(LFNC=VEd&1SulZhT>#C7_){2tAt{^PmAV>BebLMxj~RG)3G=gT#!7yb^&{ zgS5k&u+Nko6KzB-Hp4O?2CpZxgm=+e+=@)v@2*6-8BfA#QGK_^?Kp{w&7zFDrrhjB z+RJz`WzOaiqb1=(S3hT*X5r2$cRsy}8Rys)hZwq(FUp|o7iRx~0|!m8!fCQ?mNjSM zB#Amu#?jOGz8PC&@iGOxq2lWsXI#pUy2xgOwx- z=ZyER#WO}q#H^vbBzohVcm2?6mK|@Btc5)9c)S5O65!mbE@q zP1@_Dj-n*)A|SabdQmHG$BfM~X1pJv^TDA$HkR;(>GsiGX;vbQt%xHWPqG((ij5y} ziZTyk%u8pu9ceVXjfxwKC>+jlMS{{14u>Cx1h+JS`66r*^bgR^X(t&mW(Hk@gl|7S zl$cdqPNltX#yjp9BCPqZKuYGc(v?lj!kBj=*oeFRu1TV_gF!;Mx3X?mredAhtPEf? z`lzK%(=XIj!f-O>Hp95aDKm<1==k%$Al5GWJ(s4lQQsYCx)_K#* zvyKcLqrvMN>~hLk(X}|RG-<4;9{ahqv$PuP1)azQrCBY@-rOy>6v0}Mrork=WovJN zK+`5}o6W3mR)aN6M#h#_uz)S5o3<7&N<$45bver`nQd=*HzVx?xs~)oHd{&bsUyqp zMuOMkJWHj$;qg3{JWp31gcbe*Tbhe_BKC?*u%x^3KOmR0)1s>OKV!_PB$E2bqi)7t z#4J0U2Gh>7uJ)Uoo9#L#%T)*zv)QWKjWaijZx~AZ*4H5$X9<46l-=oW>o><17Vkdy z&f_PK-h1x!!h7endC6>Z+_)JmDidRrs~X)-9<U#(A_JiYM1 z@dwWxJ-M_re{^|Q!g*)X^J%u8n#z5M@;uAEGX=+Q`S`5w*Xr>Dn3B~f={+>Y&h&wh z-K;3jiKVmj95yo#x&<0t&VirEXF6=0%Jgdq8T0P5HodmLoJAhZdG`l-%C6>Y*J>#Y zzZw(}x5Y`b@0BP@nXsS2{WDkJqn|c?9)wxt(TTE1n?y=nQ8AZPeq8c4=vMYh!iCdl zT{}NJ&sP{bY6a>`H*0GG)5}U07~{fN#?ugp9ZcDs@!o$nU3`eYn-4zZJ?z!)q47~g z5r)J$oU;|S&9Re9Cyp!|zik~+?iY^FHxKPIGiFI&H<@)!st(mnf+ySNkL}GAeKd)W z+fvqjwJ&q@?cRp;b#<(vWv$UO8JF32wKI?(wcTP0Vo2?8tU3Y0- zJuE+vtqPlt!$@S8M+eOU3&o?^z%81n~O4-sZ9;kv`qU+GCV*Xi}u^RCXx!}!$fWmNwgLvHrT_$Rw6bMHLS)&Qh952 z)3Xhcb;82uY1xel)i{=hXf?gEtOw8gOyeSkI=sVvMi^`tR$&$Qc-vbJDeNMr$?rJT2UxR522C~mWt^1lDI{*>y835nW39=tM^PNUW?MHxk|t$ z&HMwWmdq3qzQ=tv#@CtI$Hu}w2DV@J(@M|vfSL4le>G0^INRP1akI^up3_w~ua^}t ze5L@^dH6)2L9&kIV8Z&*)EpX%8+kvdmdplGI18O-QB(}rfmzg%MeESOX=wZtEDldw_HDh5)@U21 zb8Vt-kM;TOAi)Uv?ZRrC{=tKB--a6=w8$*L{50w&6_qP6zmmGwwK zOLkhIHXrR{We>`&tYzCiabjfSC-@I_;6kx}Na{M%W?v{QIH}k`Z~d4rOMaIYgj)3 z_jJ=l3dW=wrK0W8;qqJNvXnwWS%1QLK8$KT6%--{P7$iOaKdkn2SY*5310|dVt?&^ zLOLop=%m#EML6LXY)HCxf}xHigqZSyQOBE&&yLqcS1Bz;yu=8-X-h5_lZa>&c4h?@ zwU_b%+s^pM9(%90I5VWAv&2#h8d0k)HoGesicd!UJgtXq_114P31~c0;XzT5lRDm11z- zeNp1MV;)=B$A(SRz2Q!zq)shfZrvkdR4smFur1k=D!hF7eR39>`L;B135+Ur$q`~( z$G5a@Om>w-KwPw7xUkCA1Z|Nj!1$+r{isTQ(F(fa9Mno*T%ofZu?Lfk)PxzzbnevW z7&qLI^+?`LV|46=WsKuP-VB#-PbXLB~@ZJO43+vje*WAE&~*;yL;OXO&kJQ}v6(E)$|tl4+# z+<{y7&eC)2cuRnQZZ2LRT zEFbf4AGXtq+EMP$r>#sO>zujWCo!*_Jk*s2j8bB*R*(-a*c3mqinOqWRNr`>XEy5} zi{Ex@kK=Ff0+sC#$jZY%iq>8`ZDqH1q!Ar<>aeI}!g^};3bS4jUe zS1afao{%o2m!jjy48BO`q)GqB3jdk)ph+fbCuH!{jviGpU~3y>gKerDKpYfKST``N z$^k9dfMt^@LDkzEqp9pSR}p~K2!6}QFcUo%R7B|}R;w-vtitF4xeeY@6_6^^+~hJ^ zG0TJA(0Gz=>EP*ZlxKPp#)T8rKG{da50_dQq-kw;*o^N4z9Vf#kh)nJ_eje#mNrGI zMqk@;xgi(Tw%b`pc;O4x3c|>bpKq16jTZZ(tZm)m0!yN)I*haM#xc7gU50Lj{~j)r&%eOIla=O~XKONd2;De(9p>5SN~T z4q^#>SRHn+iDcYZqs`S=RB)m5?(dcFC%(gr>2I$_j0~k*{0o@b78(8r?T3pEwyk#8 zWsZ`GqML-ftE~8T!59`Nc6n71f0VjP52sP5A6BbqnheP>(!{M4X+db62es{x#Y++n zPJg6QadjQ)g2kn0wpT2?4I7!oaIrFCE6P%- z&yErXTH-P#jFC5$BV?0$BacT)7}ZmjNZDfWM}sf00EjSQy%iiw6w|oV4MWjk-TgE` z)apt`t+T3}JNl4e86(Bl4+9eCFXHG2p&{iMov1V$-$yJM0!ZmqOQ9U1G?lG~{C`>w zwUZZjIglW-c~t}@-f%28LLqCV#E~!VIw%iglU)rgz=n=U8rp2|bV~5htjc7Tzb?y= z=s^rKyh&&;olj}zL>yYtO}2{~GUtTACb%;^gpx`PB=4$6cW{A{jq5pqUxr7l!F$-R zu5l^i#{yh9Tc}ygx>jm!T}GzGu2NqA;DVDHn`G9CwpMBy&t@_vVChSL7bq=ae54Da zC~|CRXz89Tu`a-r8;S!gO(Kxx%Fqg0CkgSO@ zQDgXhabJc?<74##)pqbIlu1cz;<>%$wioZpjW0E|8*YC4;A`QS0)J(+qMe zNlLuix-aqztpQXHuS3y=g;(Vqt4l=FWJ2zh)mI{vHaTPFl`2kIp4hAU#YgS(S<Ik#K^hh#UO~SFT{kh_ZOB6?e1w7N?Mf~ymP8;MIP_;1QrYK3HyUTq{@Lk zQALN17tSs^_Ntsc@0b#IP=D|=<^-+2Yq`f&9Nb^pti*u|JyCH^%&+QCpXA3Olc?eo z@Vgx6JRY_djwqhgA+!5V=Eh(R4!;UO(bCqtLVgBMrE}hqwZRiCgp=FF8)a&?=Dazk zlvCGM^`$j)_5E1Lwyukr>4lO&Tm3<_RTUx_a_5~=@{_(muXy(cT zJ4@uKY=<4)3I(aHE2+=l)}^3bowj2|J2&m6N{J>|d>J{i6C6Zf9?>~bES1RariQ9s zocs&xMm4QviL;GYE1D1MQiK}Triq>E3`RI{=^|C0(Q^;>cu`M5)R09+4@h;at+csv z`z;4r)wh(`Fq4?PELZTsYN&L{VJxfimMEb5*5C;hxUks#EY$jzq|oi@V`qoOo&US? zmSRA1Gd8X1f+_Y@P)WfJAP`bCWfywoDpx&4y~~1+T>g3SL_(Uc)E<+a)iUUfJ_JTdSfpTuxQN?1@VxRPBtU-2Dr7$=m@63DLGWHPj_Ip0J`~C2C04?W&koX;|r;psJy%VqlL< z;ZHG9`A7IdO$zKJhg|tevQImFPMaBR8$>ux=IBtkq$~l*cL;a>fikYDK?* zU0pD@o#QWE9M;yDi=S#M4n(;Pp2q8=wkGx!_tLN~tzCMC1vjNNn-;Or6Elx^lLSk{ z`kG?MQAZOOM8&h zTswxqUdL4bsI~?D>Du#UX;sM$)h*M<16l5AQ#-bntU=}4R%$`N8L+BCTp~4+C>^Qb z%myaS`XTw&gqKu^`|%{4BU-~4QWE+#I6j!NNo)Kr+{W;hv8>yr^s{-HY%CnMG4=t1vY}E!Dd&h9Y z0F%Z;oiEckT*0W}61!O8Dml@?7frw^b3oghk1SI?5arV&{8bN4UpQ)HncK``y**_; b#Xw>K{SquL`}&_1wg%`@I&8(IZM^>mT(gEo literal 0 HcmV?d00001 diff --git a/po/ca.po b/po/ca.po new file mode 100644 index 0000000..4927674 --- /dev/null +++ b/po/ca.po @@ -0,0 +1,1286 @@ +# Catalan translation of GNU fileutils. +# Copyright © 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# Jordi Mallach , 2002, 2003, 2004, 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.27\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-05-20 14:54+0200\n" +"Last-Translator: Jordi Mallach \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "l'argument %s no és vàlid per a %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "l'argument %s és ambigu per a %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Els arguments vàlids són:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "S'ha produït un error desconegut del sistema" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: l'opció «%s» és ambigu\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: l'opció «--%s» no accepta cap argument\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: l'opció «%c%s» no accepta cap argument\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: l'opció «%s» requereix un argument\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "" +"%s: opció «--%s» no reconeguda\n" +"\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: opció «%c%s» no reconeguda\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opció il·legal -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: opció no vàlida -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: l'opció requereix un argument -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: l'opció «-W %s» és ambigua\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: l'opció «-W %s» no accepta cap argument\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "mida del bloc" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "«" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "»" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[sS]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Forma d'ús: %s [-H] [-L] [-P] [camí...] [expressió]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Forma d'ús: %s [camí...] [expressió]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "avís: seqüència d'escapament «\\%c» no reconegut" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"La variable d'entorn FIND_BLOCK_SIZE no està suportada, l'única cosa que " +"afecta a la mida dels blocs és la variable d'entorn POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "no es pot obtenir el directori actual" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "no es pot obtenir el directori actual" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Avís: el sistema de fitxers %s ha estat desmuntat fa poc." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Avís: el sistema de fitxers %s ha estat muntat fa poc." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s ha canviat durant l'execució de %s (el número de dispositiu vell era %" +"ld, el número del nou dispositiu és %ld, el tipus de sistema de fitxers és %" +"s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s ha canviat durant l'execució de %s (el número del node-i vell era %ld, " +"el número del node-i nou és %ld, el tipus de sistema de fitxers és %s) [ref %" +"ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"L'enllaç simbòlic «%s» és part d'un bucle a la jerarquia del directori. Ja " +"hem visitat el directori al qual apunta." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"S'ha detectat un bucle al sistema de fitxers; «%s» té el mateix número de " +"dispositiu i node d'idenficació que un directori que és %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "nivell més alt a la jerarquia del sistema de fitxers" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "nivells més alt a la jerarquia del sistema de fitxers" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "avís: no es seguirà l'enllaç simbòlic %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"AVÍS: el compte d'enllaços durs és incorrecte per a %s: això pot ser un " +"error al vostre controlador del sistema de fitxers. S'està habilitant " +"automàticament l'opció -noleaf. Els resultats anteriors poden no haver " +"inclós directoris que s'haurien d'haver cercat." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "desconegut" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"avís: he especificat l'opció %s després d'un argument no-opció %s, però les " +"opcions no són posicionals (%s afecta a les comprovacions especificades " +"abans d'ella com també aquelles especificades després d'ella). Si us plau, " +"especifiqueu les opcions abans d'altres arguments.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"avís: l'opció -d està desaconsellada; si us plau, utilitzeu -depth en el seu " +"lloc, ja que aquesta és una funcionalitat que compleix amb POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"el camí per defecte és el directori actual; l'expressió per defecte és -" +"print\n" +"l'expressió pot consistir d'operadors, opcions, avaluacions i accions:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operadors (prioritat decreixent; -and és implícit quan no es donen altres):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"opcions posicionals (sempre vertaderes): -daystart -follow -regextype\n" +"opcions normals (sempre vertaderes, especificades abans d'altres " +"expressions):\n" +" -depth -help -maxdepth NIVELLS -mindepth NIVELLS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"avaluacions (N pot ser +N o -N o N): -amin N -anewer FITXER -atime N -cmin " +"N\n" +" -cnewer FITXER -ctime N -empty -false -fstype TIPUS -gid N -group NOM\n" +" -ilname PATRÓ -iname PATRÓ -inum N -iwholename PATRÓ -iregex PATRÓ\n" +" -links N -lname PATRÓ -mmin N -mtime N -name PATRÓ -newer FITXER" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATRÓ -perm [+-]MODE -regex PATRÓ\n" +" -wholename PATRÓ -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NOM -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"accions: -delete -print0 -printf FORMAT -fprintf FORMAT FITXER -print \n" +" -fprint0 FITXER -fprint FITXER -ls -fls FITXER -prune -quit\n" +" -exec ORDRE ; -exec ORDRE {} + -ok ORDRE ;\n" +" -execdir ORDRE ; -execdir ORDRE {} + -okdir ORDRE ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Informeu (i feu un seguiment del procés de solució) dels errors a través de " +"la\n" +"pàgina d'informes d'error de findutils en http://savannah.gnu.org/ o, si no\n" +"teniu accés a la web, enviant correu a ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" +"la comprovació de sanitat de la funció fnmatch() de la biblioteca ha fallat." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"avís: els noms de fitxers de Unix no contenen barres (però sí els camins). " +"Això vol dir que «%s %s» probablement sempre avaluarà com a fals en aquest " +"sistema. És possible que la comprovació «-wholename» siga més útil, o potser " +"«-samefile». Alternativament, si esteu utilitzant GNU grep, podeu utilitzar " +"«find ... -print0 | grep -FzZ %s»." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"avís: el predicat -ipath està desaconsellat; utilitzeu -iwholename en el seu " +"lloc." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "el mode «%s» no és vàlid" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"avís: heu especificat un patró de mode %s que és equivalent a 000. El " +"significat de -perm /000 canviarà prompte per a que siga consistent amb -" +"perm -000; això vol dir, de moment no concorda amb cap fitxer, però prompte " +"canviarà per a que concorde amb tots." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "l'argument nul no és vàlid per a -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "el tipus de -size «%c» no vàlid" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "l'argument «%s» no és vàlid per a «%s»" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "l'argument %s no és vàlid per a %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versió %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils versió %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Funcionalitats habilitades: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "avís: seqüència d'escapament «\\%c» no reconegut" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "avís: directiva de format «%%%c» no reconeguda" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"El directori actual està inclós a la variable d'entorn PATH, el qual és " +"insegur en combinació amb l'acció %s de find. Elimineu el directori actual " +"del vostre $PATH (és a dir, elimineu «.» o els dos punts del principi o " +"final)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"El directori actual està inclós a la variable d'entorn PATH, el qual és " +"insegur en combinació amb l'acció %s de find. Elimineu el directori actual " +"del vostre $PATH (és a dir, elimineu «.» o els dos punts del principi o " +"final)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"No pdeu utilitzar {} dins del nom de la utilitat per a -execdir i -okdir, ja " +"que això és un problema de seguretat potencial." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Només es suporta una instància de {} amb -exec%s ... +" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "l'entorn és massa gran per a l'execució" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ?" + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "no es pot fer «fork»" + +# Suggerències? jm +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "error a l'esperar al procés %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s finalitzat pel senyal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "expressió no vàlida" + +#: find/tree.c:101 +#, fuzzy, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"l'expressió no és vàlida; heu utilitzat un operador binari sense res davant " +"d'ell." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "s'ha trobat un predicat extra no esperat" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "l'expressió no és vàlida; teniu massa «)»" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"l'expressió no és vàlida; s'esperava un «)» en algun lloc però no s'ha " +"trobat cap." + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "l'expressió no és vàlida; teniu massa «)»" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" +"l'expressió no és vàlida; s'esperava un «)» en algun lloc però no s'ha " +"trobat cap." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "ep -- el tipus d'expressió no és vàlid!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "ep -- el tipus d'expressió (%d) no és vàlid!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "els camins han de precedir la expressió" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "el predicat «%s» no és vàlid" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "el predicat «%s» no és vàlid" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "l'argument «%s» no és vàlid per a «%s»" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "manca un argument per a «%s»" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "l'expressió no és vàlida; teniu massa «)»" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "s'ha trobat un predicat extra no esperat" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "s'ha trobat un predicat extra no esperat" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oops -- inserció per defecte d'«and» no vàlida!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Forma d'ús: %s [--version | --help]\n" +" %s biagrames_més_comuns < llista-fitxers > base-de-dades-locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Informeu dels errors a .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils versió %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dies" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "l'argument «%s» no és vàlid per a «%s»" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"avís: el camí de la base de dades de locate «%s» té dos punts al principi, i " +"això no és un nom de base de dades vàlid" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "la base de dades de locate «%s» és corrupta o invàlida" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Mida de la base de dades de locate: %s octets\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Noms de fitxers: %s" + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Noms de fitxers: %s" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "amb una longitud acumulada de %s octets" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tdels quals %s contenen espais, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s contenen caràcters de retorn de carro, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\ti %s contenen caràcters amb el bit alt establert.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "El ràtio de compressió és %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "El ràtio de compressió és %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "la base de dades de locate «%s» és corrupta o invàlida" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "La base de dades %s és en el format %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Forma d'ús: %s [-d camí | --database=camí] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --" +"count]\n" +" [-P | -H | --nofollow] [-L |--follow] [-m | --mmap] [-s | --" +"stdio]\n" +" [-A | --all] [-p | --print] [-r | --regex] [--regextype=TIPUS]\n" +" [--version] [--help]\n" +" patró...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versió %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argument per a --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"avís: la base de dades de locate només es pot llegir una vegada des de " +"l'entrada estàndard." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "avís: la base de dades «%s» té més de %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" +"La seqüència d'escapament %s és il·legal en una especificació de delimitació " +"d'entrada." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"La seqüència d'escapament %s és il·legal en una especificació de delimitació " +"d'entrada; els valors dels caràcters no han d'excedir %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"La seqüència d'escapament %s és il·legal en una especificació de delimitació " +"d'entrada; els valors dels caràcters no han d'excedir %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"La seqüència d'escapament %s és il·legal en una especificació de delimitació " +"d'entrada; no es reconeixen el caràcters finals %s." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"La seqüència d'escapament %s és il·legal en una especificació de delimitació " +"d'entrada: el delimitador ha de ser un únic caràcter o una seqüència " +"d'escapament que comence amb \\." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "l'entorn és massa gran per a l'execució" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versió %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Les vostres variables d'entorn utilitzen %ld octets\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" +"límits inferior i superior POSIX per a la mida dels arguments: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" +"límits inferior i superior POSIX per a la mida dels arguments: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "La mida màxima de l'ordre que podem utilitzar: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "La mida de la memòria intermèdia que s'està utilitzant: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"s'ha trobat una cometa %s no emparellada. Per defecte, les cometes són " +"especials per a xargs a no ser que s'utilitze l'opció -O" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "doble" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "simple" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "línia d'arguments massa llarga" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "error a l'esperar al procés fill" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: ha acabat amb estat 255; avortant" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: interromput pel senyal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: terminat pel senyal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: número no vàlid per a l'opció -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: el valor per a l'opció -%c ha de ser >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: el valor per a l'opció -%c ha de ser < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Forma d'ús: %s [-0prtx] [--interactive] [--null] [-d|--deliminter=delim]\n" +" [-E cadena-eof] [-e[cadena-eof]] [--eof=[cadena-eof]]\n" +" [-L màx-línies] [-l[màx-línies] [--max-lines[=màx-línies]]\n" +" [-I cadena-de-reemplaçament] [-i[cadena-de-reemplaçament]]\n" +" [--replace=[cadena-de-reemplaçament]]\n" +" [-n màx-arguments] [--max-args=màx-arguments]\n" +" [-s màx-caràcters] [--max-chars=màx-caràcters]\n" +" [-P màx-processos] [--max-procs=màx-processos]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fitxer]\n" +" [--version] [--help] [ordre [arguments-inicials]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "ep -- el tipus d'expressió no és vàlid!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "ep -- el tipus d'expressió no és vàlid!" + +#~ msgid "old" +#~ msgstr "vella" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "S'està reduint arg_max (%ld) a arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Èxit" + +#~ msgid "No match" +#~ msgstr "No hi ha cap coincidència" + +#~ msgid "Invalid regular expression" +#~ msgstr "Expressió regular no vàlida" + +#~ msgid "Invalid collation character" +#~ msgstr "Caràcter de seqüència invàlid" + +#~ msgid "Invalid character class name" +#~ msgstr "Caràcter de nom de clase no vàlid" + +#~ msgid "Trailing backslash" +#~ msgstr "Barra invertida final" + +#~ msgid "Invalid back reference" +#~ msgstr "Referència cap enrere no vàlida" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ o [^ no emparellat" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( o \\( no emparellat" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ no emparellat" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Contingut no vàlid de \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Final de rang no vàlid" + +#~ msgid "Memory exhausted" +#~ msgstr "Memòria exhaurida" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Expressió regular precedent no vàlida" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Final prematur de la expressió regular" + +#~ msgid "Regular expression too big" +#~ msgstr "Expressió regular massa gran" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") o \\) no emparellat" + +#~ msgid "No previous regular expression" +#~ msgstr "No hi ha cap expressió regular prèvia" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "accions: -exec ORDRE ; -fprint FITXER -fprint0 FITXER -fprintf FITXER " +#~ "FORMAT\n" +#~ " -fls FITXER -ok ORDRE ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" + +# "Llista de predicats?" jm +#~ msgid "Predicate List:\n" +#~ msgstr "Llista de predicats:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Arbre d'avaluació\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Arbre d'avaluació optimitzat:\n" + +#~ msgid "Optimized command line:\n" +#~ msgstr "Línia d'ordres optimitzada:\n" + +# Igual que la gent d'es@li.org, ací està el dubte de si ficar +# "memòria exhaurida", llevant el "virtual", ja que en UNIX no +# hi ha diferència de cara a l'usuari. De moment ho deixe com +# està en l'original, però tenen raó. jm +#~ msgid "virtual memory exhausted" +#~ msgstr "memòria virtual exhaurida" + +#~ msgid "inserting %s\n" +#~ msgstr "s'està inserint %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tipus: %s %s " + +#~ msgid "left:\n" +#~ msgstr "esquerra:\n" + +#~ msgid "right:\n" +#~ msgstr "dereta:\n" + +#~ msgid "[stat called here] " +#~ msgstr "[s'ha cridat a stat aquí] " + +#~ msgid "[type needed here] " +#~ msgstr "[es necessita el tipus aquí] " + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Arbre d'avaluació normalitzat:\n" + +#~ msgid "error in %s: %s" +#~ msgstr "error en %s: %s" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "avís: el camí de la base de dades de locate «%s» conté dos punts al " +#~ "final, i això no és un nom de base de dades vàlid" + +#~ msgid "command too long" +#~ msgstr "ordre massa llarga" + +# Açò vol dir que de tots els arguments, només un no cap, no? jm +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "un argument no cap en el límit de mida de la llista d'arguments" + +#~ msgid "argument list too long" +#~ msgstr "llista d'arguments massa llarga" + +#~ msgid "memory exhausted" +#~ msgstr "memòria exhaurida" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s ha canviat durant l'execució de %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. ha canviat durant l'execució de %s" + +#~ msgid "unmatched %s quote" +#~ msgstr "cometa %s no emparellada" diff --git a/po/da.gmo b/po/da.gmo new file mode 100644 index 0000000000000000000000000000000000000000..3a420a5b33903648f90593e21888a1a308ba58fc GIT binary patch literal 13032 zcmchde~et$RmWe_Buyr1X%h&g1$u3=>~6hpymsxznYEob_Bz?byKC&Vkj# z3Oowl1>OWd0yaTeR|-B1ei8g$@Yg|+^AEvC!Eb}#2mUK4^WXC!<^mrB9|y03Z-T!7 zz5_n@VaNFbc;tKRe18UBJ`Cl*YzXBfQ{_7zBoPXnw_~S?R+4cqSF!w$1N5C(G^88OgdEdW)EXDaC zixJ#k;0dtK{S{E=|7q|p@J$d`a()j)WalqIvF|$|DtGSUB{J`$pxAF7#01VWAYGj6 zU<3Rdcntgl@Q=X%1pg6ygT=iD{t}DEC7nmvjAEA=Q0Dm@DE9mkDC55g-U9ENwtoFG zDE8a{Mc&uJcfp?o#SWjvnMB@S24%iCK(?0i7a*#3z6~OZ^IzaS;3sf8nNNWVoB_oi zOQ7f{24%i4gP7j=9Z=@^YmhDJ{5vRe-i^{lUkji-zY2=JUIE3PKM%4L=WC$I`4%Yi z-vOonG|njYc?NtFY=V!lz>m*4&Qsjial-q+7<6f02W5RkIXIlecIj{TZ(^)Pkox}V$m)-m-Q|b_fLYd4*7^a_i>576h%Lm= z9^`tF>ok{qP^W_{n2##(V+EEVc00qC4O)(m&6g-BQJ5uN9_G!u4`P&TxYq?bIAucG9U4k8rP3;VG8Fs z*9W-d^Dx&(%{OZ^`HGu34{)90TH%tkQZU2XmYF_fXkb zdtfS6tvJfOAX1Uu2!lwgR@Y0sR;H75PC2y)yvSE$y+%*fMv!$?*43&Tbh@e;WGdBJ zy~dchtv0$rt2;iBhD@geucc+$3wjVInQG>pRAsR`&KI{GM1GzHVfs`j%Ik5`IVqF* zy6xp*rUo8w3+T-YTX~Y`C{uor=vEdd!v$4#)3*nSPSYTcq_aCnf+(wvHTJ!stT+wQ zOvUYniU&IJn1aQ|gN$K(LCy@2m7@r0Yt$TcfKK{B?nO(w^$5fpbQ?*#39f0deG7;%KJ^7sHxDO6Rq#m+zvvW4%1BcRW=-GS<6&9 ztF9%Q*+T#N-rpHSvA_M5+gtbW#s;gxh`zOant55Cs>4T*E-0^wHCZ-dHB=CWx`Sq{ zK9%dLsg~%EC(*hW27al4cAO}8s#SEH?6Q4u(Q7`m4&<^2A_B}Vew(m)lIjeC$v73&(W~lv!a-Lbaq$G%_ zb%K{{y(#QnHk!z??MWE7*w5RVZ{tnrMC&=*(J$pn(OyFYY7Pk(HD}qo9rW|Q3U$;W zP_gM-albDiWP^BRbVDr3ao3^BQyD5sT8+4k3A#bVc8Z7%4E%}LWXWkhkPun!Hdg`) zuM;I5aEkCbBlBlO>z*1UaYq6lv!R3A?8R9dUDpH8=&p*c((EQC{?e;9@H$#~nd)ZQ zpmFeE>aBZGrB_0|a`F-vL^8C$$=&O|~T`7)L6dqMbK;oMo< zDR^50x5C_Kv4y42pIUns%dQ7W9LcU$>s}Iwo#%?oVw@r+#wMaXQFc>8vsk^#OQ_4n zZ_%o(zpm8zP>Wk7x*xNa9g~S_Cvjiao2bW(95Y!L1qCd&7`DH@AGKg>Pu4A8F+xE0 z>>x-;zL+&D-AR6Rc4_6zji=A8o__wu#igr@viK+_b(ZEP{h*{+93$(>jOOKDyG^FE z*{_My_DDakn6x0h&#zuwx^nKt8>d$R=}E=j`;C6}I5b}PB%4yiepO{_2D zGPX!`!+F6=B39KfLkm%uzU!qZw}quycT?+#7v>S(U*G$PJgUaLh_gzj7tONUWJ`%x z6wW1~Ajo*?^@}(rn~P$?qrk>gF} z;PJMFno}j(Djyd?8*oZjP^Qkz;uxQyW~iDe1YNwTA7swR$DJ1O2s0A+d*%0z&bHTp zj_(aq$B%Oi;*4)S%xB)kd#t%dD~|Dhwc!O)x0q~(gxeci-GH=)nI+meWdY-w-DfH@ z>XGTHy;=$`EeVn-%OTaHn^GUJRKe=$s6ySLX+bR^D4Fi|fFNLELTuuh^3?R~v`XW? z-sox~VKbMam;y^8ik2{<>pMecxVmD9;CK#@DTcEY*W*fx@n^B8b&RP>Uk?}a z6wUG0et4egR*jr1hB<>c#o=Q)xY){%lZh8@uyaUZxt?thvAD@R4rgvVHpMl?LPy^g zXRp;FDZh3eJEv0IGiV1=k7~Rh_Y(z(+ZIQ%w9)`^aX^`5^Ne!)-fi1(Zt?Qsxr;QA ztxb=rLDGRJiKN>u<5ZQgT!ybJmlGMUy@8c{;?fNYBjRBc@6cRxQZJGK-s)B5}}$n?NGJz$eaLGoBS@>NX$=sF-Jr-v!aMjtX3UZkt)D7e^*3{9xG5Q zVlusf4s3*`J|W}K+A>eeWwgfo@H*Q^_Xo)5w!M%fY}w@twzQl?Y{whs4WIYE~EM;dx*m#0*FaSov&goEwx$Fo$9 zYf=REwHL8f!jKFn$=6#^m& zPEIc3h0|_j9ufsy1ho*GiS@Pf5Sk)U#H6lAAe?qn79_EDnyF5O5EN1a6OM;f%}&+D zPzhRc65@<7m^13KXA)7`w0W}}EXpe7Rnt$oXJ5H0ORSGHX*02e1({K#O^5wvOyHBG z-lO-ZuRL|D6DARo9ZlR6{$xQ7Y#lD|FJgflf!Mg?g_l;Lm$4`bub!=PU20I`tVb|t z+Y{iJbn?dHL|2xfW`mk)nq4Y^!B+QaM&(X=Y>^);H<96$cd|=L%4s*b$F@-+{Mcj@ zr)ZtFJXoBYFG;aby>Ft6J=hkM7AB-Vn40KarR-6d6@l@>;tcP#MO7ZjKXS{af)t?_ zdZjohgT8o$*m5i%%rH}R%n$}_dpsw(QHE@2sSacp#8_`6jeUQR$z~~zS@t1ETuZG@ z=7lo3r<~@^na!i9>*ttUmOna3BbPa3JLi-576p*I-u~tD#osygW%c(HxIM zFMkSl)!(3&W&hOu-bsc;ot#6MyQaN025~E# zEn1eGOJeZxA~y3ao%VuuW=P<;BYrmaJkuSHXhdv^Al1D?UqYUtfDJhVZQNGf^&sq7 z24^&JALr5iB<~v**fSi*I|+OF7Eu!RU>7DB{!~tcQxQtdD=WpCv=aQD<1**f!8ba(tR?vOh+QvF413 z#Kij!UnER31thSK?m9ZLl(E-N!yKWJqP>+demn9>h3ue!S0ibndUtRX_LgOgvw*3X zNpqg>YCnZG?$gQA#zWS#t(8n*6N{-8r0;glc<*mD9I?Cgt=n7Q_pJ@|Zg@&xg76Ljz^UlE;JPBcI=S$s7l^{E=wiv{oMsWY-Tqey@yv=0{Xoq-dWf& zZ3`Fa6GFB+ZG(ng{2A-@paDm=vwF75+WKgmOcsNpe>p9WlrFyt7%8#$B%{2C?t7$_ z(NG|-rS@c{Q<8xX=Miy2mZ=#+jAAU*4TDU?;cX^3NhIIG zFjt{@hOpMY6Y>Z4vm-xpv0FB0ZO9gOxyq~4rY*4}wfqdmDc;w$!RGGlvczBlsfpQs zZug|bTYRCjDcL20@?F<{jf$Hj%IYyzGvTyHkKM9G-8m!9yEVkKY8IN2Y+-X%KL~H# zDQV?M4nEHoDa)h^YGzUa$KYr)F&P8>K{4YIkfErniuCd`gAqpbP*-PfQG_FLMC?Z2 zJLZ};#~`Uc3wqgKPwT2}#tE}*R6@e(3|X$M7z331PHuZbG3#X3S)N?MR%V&ynwT+e z={X~ij!eE5-x+Mev9nGEbBJnyt(i zi7wF)i`4fr%xmv7P+Uqp)9BP}GV@D~9Q}k2kG%D$c$3*lLX2WK%O;Be0?aD0+bLLcGQ^ zKsF$-d@0BBj*K7N zMskW6mT@kgiyZt=6)U1}3fE8;_PBobPg1B`-Z_4i6E?>u;}IKc6X${q6y9Y(jxHEgx8 z#3fs4DdTOV^2*ZX#Z#9SFO1R3V@?0p#4;Wp`}&6Ct1Zziklc6bR!Sio8{n5!#5E_L5Cxr-2|qU9)b4;>R=9 zxs$-DN&V53Gbk-%^s{WRbSTxP&>m1O)>(vm#`DY`B&`sO$uA}Ayqu497eB)pCs=3e zUj5A!5@n2Jwo_BB*;7W-OX_2+vn`L%M_J69A}JZ;otruuiX3}joJabzry5gr$uYzx zV#_*y>zpE=rI;sWq%a;GAI5*G2?~KH zrm{si$#$LKYaDvokjx`>6o+rLK=z^>mSY(;mX`A^3DuCyquydZ@;VY5&TOPhYA$UE z<|, 2000, 03, 04, 05. +# +# Konventioner: +# +# positional -> positionsafhængig +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.24\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2005-08-01 18:25+0200\n" +"Last-Translator: Ole Laursen \n" +"Language-Team: Danish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "ugyldig parameter %s til %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "tvetydig parameter %s til %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Gyldige parametre er:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Ukendt systemfejl" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: tilvalget '%s' er tvetydigt\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: tilvalget '--%s' må ikke have en parameter\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: tilvalget '%c%s' må ikke have en parameter\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: tilvalget '%s' skal have en parameter\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: ukendt tilvalg '--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: ukendt tilvalg '%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ugyldigt tilvalg - %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: ugyldigt tilvalg - %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: tilvalget skal have en parameter - %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: tilvalget '-W %s' er tvetydigt\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: tilvalget '-W %s' skal ikke have en parameter\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "blokstørrelse" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "'" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +# tillad både 'j' eller 'J' såvel som 'y' eller 'Y' til ja/nej-spørgsmål +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yYjJ]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Brug: %s [-H] [-L] [-P] [sti...] [udtryk]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Brug: %s [sti...] [udtryk]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "advarsel: ukendt undvigetegn '\\%c'" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Miljøvariablen FIND_BLOCK_SIZE er ikke understøttet, det eneste der påvirker " +"blokstørrelsen er miljøvariablen POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "kan ikke hente det aktuelle katalog" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "kan ikke hente det aktuelle katalog" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Advarsel: filsystemet %s er blevet afmonteret for nylig." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Advarsel: filsystemet %s er blevet monteret for nylig." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s ændrede sig under kørsel af %s (tidligere enhedsnummer %ld, nyt " +"enhedsnummer %ld, filsystemtype er %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s ændrede sig under kørsel af %s (tidligere inode-nummer %ld, nyt inode-" +"nummer %ld, filsystemtype er %s) [ref %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Symbolsk kæde '%s' er del af en løkke i kataloghierarkiet; det katalog som " +"den peger på, er allerede blevet besøgt." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Filsystemsløkke fundet; '%s' har det samme enhedsnummer og indekseringsknude " +"som et katalog hvilket er %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "niveau højere i filsystemshierarkiet" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "niveauer højere i filsystemshierarkiet" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "advarsel: kunne ikke følge det symbolske link %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"ADVARSEL: Antallet af hårde kæder for %s er forkert: dette kan være en fejl " +"i styringsprogram til filsystemet. Slår automatisk find's tilvalg -noleaf " +"til. Tidligere resultater kan have mislykket at medtage kataloger som skulle " +"have været gennemsøgt." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "ukendt" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"advarsel: du har angivet tilvalget %s efter parameteren %s som ikke er et " +"tilvalg, men tilvalg er ikke positionsafhængige (tilvalget %s påvirker både " +"test angivet før og efter det); angiv venligst tilvalg før andre parametre.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"advarsel: tilvalget -d er forældet; benyt -depth i stedet som er i " +"overenstemmelse med POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"hvis ikke andet angivet er stien det aktuelle katalog og udtrykket -print\n" +"udtryk kan bestå af: operatorer, tilvalg, test og handlinger:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operatorer (i aftagende prioritet, udeladelse medfører -and):\n" +" ( UDTR ) ! UDTR -not UDTR UDTR1 -a UDTR2 UDTR1 -and UDTR2\n" +" UDTR1 -o UDTR2 UDTR1 -or UDTR2 UDTR1 , UDTR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"positionsafhængige tilvalg (altid sande): -daystart -follow -regextype\n" +"\n" +"normale tilvalg (altid sande, angives før andre udtryk): -depth\n" +" -depth --help -maxdepth NIVEAUER -mindepth NIVEAUER -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"test (N kan være +N eller -N eller N): -amin N -anewer FIL -atime N -cmin N\n" +" -cnewer FIL -ctime N -empty -false -fstype TYPE -gid N -group NAVN\n" +" -ilname MØNSTER -iname MØNSTER -inum N -iwholename MØNSTER -iregex " +"MØNSTER\n" +" -links N -lname MØNSTER -mmin N -mtime N -name MØNSTER -newer FIL" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path MØNSTER -perm [+-]RETTIGHEDER -regex MØNSTER\n" +" -wholename MØNSTER -size N[bckwMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAVN -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"handlinger: -delete -print0 -printf FORMAT -fprint FIL FORMAT -print \n" +" -fprint0 FIL -fprint FIL -ls -fls FIL -prune -quit\n" +" -exec KOMMANDO ; -exec KOMMANDO {} + -ok KOMMANDO ;\n" +" -execdir KOMMANDO ; -execdir KOMMANDO {} + -okdir KOMMANDO ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Rapportér (og følg fremgangen på) fejl via findutils' fejlrapporteringsside\n" +"på http://savannah.gnu.org/ eller, hvis du ikke kan tilgå denne, ved\n" +"at sende et brev til ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "fornuftighedstjek af biblioteksfunktionen fnmatch() mislykkedes." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"advarsel: Unix-filnavne indeholder som regel ikke skråstreger (selvom stier " +"gør). Det betyder at '%s %s' sandsynligvis vil være falsk altid på dette " +"system. Muligvis vil testen '-wholename' eller måske '-samefile' være mere " +"brugbar. Alternativt kan du hvis du bruger GNU grep, benytte 'find ... -" +"print0 | grep -FzZ %s'." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"advarsel: udsagnet -ipath er forældet; brug venligst -iwholename i stedet." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Kan ikke åbne inddatafilen '%s'" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "ugyldig tilstand '%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "ugyldig tom parameter til -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "ugyldig -size type '%c'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "ugyldig parameter '%s' til '%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "ugyldig parameter %s til %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find version %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils version %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Faciliteter aktiveret: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "advarsel: ukendt undvigetegn '\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "advarsel: ukendt formatteringsdirektiv '%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Det aktuelle katalog er medtaget i miljøvariablen PATH hvilket er usikkert " +"når det kombineres med handlingen %s til find. Fjern venligst det aktuelle " +"katalog fra din $PATH (dvs. fjern \".\" eller begyndende og afsluttende " +"koloner)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Det aktuelle katalog er medtaget i miljøvariablen PATH hvilket er usikkert " +"når det kombineres med handlingen %s til find. Fjern venligst det aktuelle " +"katalog fra din $PATH (dvs. fjern \".\" eller begyndende og afsluttende " +"koloner)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Det kan ikke bruge {} i programnavnet for -execdir og -okdir fordi der er et " +"potentielt sikkerhedsproblem." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Kun en forekomst af {} er understøttet med -exec%s ... +" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "miljø for stort til at eksekvere" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Kan ikke åbne inddatafilen '%s'" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +# der er plads nok at tage af +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "kan ikke fraspalte en ny proces" + +# ditto, ingen grund til kryptiskhed +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "fejl i forbindelse med at vente på %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s afsluttet af signal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "ugyldigt udtryk" + +#: find/tree.c:101 +#, fuzzy, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "ugyldigt udtryk; binær operator uden noget foran" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "uventet ekstra udsagn" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "ugyldigt udtryk; for mange ')'" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "ugyldigt udtryk; ')' var forventet, men blev ikke fundet" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "ugyldigt udtryk; for mange ')'" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "ugyldigt udtryk; ')' var forventet, men blev ikke fundet" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "ups - ugyldig udtrykstype!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "ups - ugyldig udtrykstype (%d)!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "stier skal stå før udtrykket" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "ugyldigt udsagn '%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "ugyldigt udsagn '%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "ugyldig parameter '%s' til '%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "manglende parameter til '%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "ugyldigt udtryk; for mange ')'" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "uventet ekstra udsagn" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "uventet ekstra udsagn" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "ups - ugyldig automatisk indsættelse af 'and'!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Brug: %s [--version | --help]\n" +"eller %s mest-brugte-bigrammer < liste > locate-database\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Rapportér fejl til (oversættelsesfejl til " +").\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils version %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dage" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "ugyldig parameter '%s' til '%s'" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"advarsel: locate-databasestien '%s' starter med et kolon hvilket ikke er et " +"gyldigt databasenavn" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "locate-databasen '%s' er ødelagt eller ugyldig" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Locate-databasestørrelse: %s byte\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Filnavne: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Filnavne: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "men en kumulativ længde på %s byte" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\taf hvilke %s indeholder mellemrum, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s indeholder linjeskift, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tog %s indeholder tegn med den højeste bit sat.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Komprimeringsforhold %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Komprimeringsforhold %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "locate-databasen '%s' er ødelagt eller ugyldig" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Database %s er i formatet %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Brug: %s [-d STI | --database=STI] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n" +" [-l N | --limit=N] [-S | --statistics] [-0 | --null] [-c | --count]\\n" +"\"\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --stdio ]" +"\\n\"\n" +" [-A | --all] [-p | --print] [-r | -regex] [--regextype=TYPE]\n" +" [--version] [--help]\n" +" MØNSTER...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate version %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "parameter til --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "advarsel: locate-databasen kan kun læses fra standard-ind en gang." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "advarsel: databasen '%s' er mere end %d %s gammel" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "miljø for stort til at eksekvere" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs version %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Kan ikke åbne inddatafilen '%s'" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Din miljøvariabel optager %ld byte\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "POSIX nedre og øvre grænser på parameterlængde: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "POSIX nedre og øvre grænser på parameterlængde: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Maksimal længde af kommando der faktisk kunne bruges: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Størrelsen af det kommandomellemlager som faktisk bruges: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"uafbalanceret citationstegn %s; som standard er citationstegn specielle for " +"xargs medmindre du bruger tilvalget -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dobbelt" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "enkelt" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "parameterlinje for lang" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "fejl i forbindelse med at vente på afkomproces" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: stoppede med status 255; afbryder" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: standset af signal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: afsluttet af signal %d" + +# omvendt ordstilling for at undgå sammensætningsproblem +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: ugyldig værdi til tilvalget -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: værdien for tilvalget -%c skal være >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: værdien for tilvalget -%c skal være < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Brug: %s [-0prtx] [-e[eof-str]] [-i[erstatnings-str]] [-l[maks-linjer]]\n" +" [-n maks-param] [-s maks-tegn] [-P maks-proc] [--null] [--eof[=eof-" +"str]]\n" +" [--replace[=erstatningsstreng]] [--max-lines[=maks-linjer]] [--" +"interactive]\n" +" [--max-chars=maks-tegn] [--verbose] [--exit] [--max-procs=maks-" +"processer]\n" +" [--max-args=maks-parametre] [--no-run-if-empty] [--arg-file=fil]\n" +" [--version] [--help] [kommando [startparametre]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "ups - ugyldig udtrykstype i mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "ups - ugyldig udtrykstype i mark_type!" + +#~ msgid "old" +#~ msgstr "gammel" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "Reducerer arg_max (%ld) til arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Succes" + +#~ msgid "No match" +#~ msgstr "Intet passende fundet" + +#~ msgid "Invalid regular expression" +#~ msgstr "Ugyldigt regulært udtryk" + +#~ msgid "Invalid collation character" +#~ msgstr "Ugyldigt sammenligningstegn" + +#~ msgid "Invalid character class name" +#~ msgstr "Ugyldigt tegnklassenavn" + +#~ msgid "Trailing backslash" +#~ msgstr "Afsluttende omvendt skråstreg" + +#~ msgid "Invalid back reference" +#~ msgstr "Ugyldig tilbagereference" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Uafbalanceret [ eller [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Uafbalanceret ( eller \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "Uafbalanceret \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Indholdet af \\{\\} er ugyldigt" + +#~ msgid "Invalid range end" +#~ msgstr "Ugyldig intervalafslutning" + +#~ msgid "Memory exhausted" +#~ msgstr "Løbet tør for hukommelse" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Forudgående regulært udtryk er ugyldigt" + +#~ msgid "Premature end of regular expression" +#~ msgstr "For tidlig afslutning på det regulære udtryk" + +#~ msgid "Regular expression too big" +#~ msgstr "Det regulære udtryk er for stort" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Uafbalanceret ) eller \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "Intet foregående regulært udtryk" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "handlinger: -exec KOMMANDO ; -fprint FIL -fprint0 FIL -fprintf FIL " +#~ "FORMAT\n" +#~ " -fls FIL -ok KOMMANDO ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Liste over udsagn:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Evalueringstræ:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Optimeret evalueringstræ:\n" + +#~ msgid "Optimized command line:\n" +#~ msgstr "Optimeret kommandolinje:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "løbet tør for virtuel hukommelse" + +#~ msgid "inserting %s\n" +#~ msgstr "indsætter %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " type: %s %s " + +#~ msgid "left:\n" +#~ msgstr "venstre:\n" + +#~ msgid "right:\n" +#~ msgstr "højre:\n" + +#~ msgid "[stat called here] " +#~ msgstr "[stat kaldt her]" + +#~ msgid "[type needed here] " +#~ msgstr "[type påkrævet her]" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Normaliseret evalueringstræ\n" + +#~ msgid "error in %s: %s" +#~ msgstr "fejl i %s: %s" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "advarsel: locate-databasestien '%s' slutter med et kolon hvilket ikke er " +#~ "et gyldigt databasenavn" + +#~ msgid "command too long" +#~ msgstr "kommando for lang" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "kan ikke indpasse enkelt parameter inden for parameterlistestørrelsen" + +#~ msgid "argument list too long" +#~ msgstr "parameterliste for lang" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s ændret under kørsel af %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. ændret under kørsel af %s" diff --git a/po/de.gmo b/po/de.gmo new file mode 100644 index 0000000000000000000000000000000000000000..320d3945b7e5eec9f5090e5971b7464048aeb916 GIT binary patch literal 4225 zcmb7`&yO5O6~_w*zZMLR6MlpMemlv;BzCuFHeS4*EXIy^ZI;B|#NLgCLL%36*YuR9 zr+Qq~y|cSQaOQ^;aX_3vL=lKX{sE+fD3^!}9N>Vs5N;r(L<+JZ4nFXG)jc!2-tn50 z)ce`4epU7Ay>HcRg z#8$+MAWTIB&VtuLUjHW``}s2X1@KLf_kR;S1RnZ?5MKrBAg{Ls@_wHO9|d!e zz+ZyA&Kn?xinluY&~s7vyywI4A@{E^6S{ zz+>Q1a2;g-5e^@}V_+Q*ug&@A9K&_N$B5_Q#`7Ha|CL(d{PVeEopHmIzQJ|h*uN$o zUYE5I;^8yGjbpvDagMnW9*#R}Z)dv~FC2f)MFS7-`93_XwMX!9?74A_X7O-LIWMd! z&Ij)qQt=I;5g*3GaU8e0qg>g(HZoT+wYSLW#K@HDv8cNisZGuOL!EcYXd#$d{R3#caq_$7G6rTUqL4mV$az8SXaOJGkn(R*&lL z2*sIl=15L5O|v0ML((QiUzxm|W^4>o?MU|9Iw`Wk?fq)ijY3-mn>)=B1Rr3*;3|D^ z>pOZl&AFWcb$K=zOiR>$Ni2+2QI;6JjgjL(aa7CbO#SYIFoQ#~i2YF*hK$qnO%fL_ zty4#vm^PGkobWoL%$;c#K}CDIH<2l~t9RY>Og1#+wp_0Iq^!-Xc+M+jlvSk1s+M^1 zd2{In{N4J_3*wp>XLX!>c8XP1cVaY>Qf(CFSq6U~&^Em4LDkzzMADcnXZzmh|3u{! z71lyW6hjqJp4lxC%PlA3tZ1i7D6^q$W>{$~EI%)nQhr&rsUqRsr=iq*AV%Ko?TorQ zjcH)BNI55Tbut3>jPk94A_)D+xPQEx$p%M5#-FaS@bU};-DIHJ96;Qhm+@StNYhEg zFu*T5{tWwA`^@=?`WmCLk?}I46|!vLSc@Y+V%3pFil`W;a2Y@dSqFzIo)x!SPJHq^ zofW(QVq26t5JPDVdRnwgiONNi!}48@%XAZ@vM)!O(;FPaI$J+uv+KxZuo4H)l_G6< z$riaz9i0f9;ap?pvKrtL3og1u$H9|D;)1oTMeQO9Sl!Kv&qaet82kIt0ZqT zSc1x1G}maH3>se#8mFka&^mGIXrtL^z%aP1HZ;e7V)uB^YzB>!G}mm+pD68~mM#z0 ztTZl_&|Hfyv1gZL(T7NB(HL2rN&1_iQTgear=>{>nW$h*$$pD2;KIh`wHT{2sb=?1 z&sudU z8!VeBi+xHKg0{vTyM*f-QQcN=FCO+XrM48stt{Il?gcw)quXv z>GG|pm&mpnLM>cHsI8QVRUXpWcH0(FcUEx8SvSh2vS{NbS>01m)=hFN&2<8AuJSaU zTNdY5Q4M9KR@sN;tu{8@HBI$#31h0+Yg}JyxP<(o)Kl8f*{Zfovxcp9IrUW+F@Q>v zI~XYob;j)EU1sE)_Wxhs*P9w8ipz11>+5a~R|D?m^K^I1+JhZVQn^p=O`^Ioh3s~w zejodtS{bFj2mMb{UnZxDFe~G>&pvkeT-&EiRW|^1yQ@sy-d&cdoxSU(t;+Q*UGb%= zqq?cGp}0_raI6!B0%PLc<*FtwjwPbp*p!bCtG0%uhk|uD65F=Ysq)&|E-1y355<#Q zyb}BV+e$pe_X6iy88WKC-zp{0f%PHx7Dh*1zLNd1l)b!A_;E(q6=sjR1{G|mqOMaZ za}$Qub}>Tr6k_QHe0MmfTqq_dd0CsT!c_uU)JnH}DMKK~Hg}5j zGy~4Tj%18YES)V}j4P=Zidwk>?uV(z88xiBkw*8)HLk`!DA>;qZzf4!tqSQ9ZcbU` z8A_OTh&Ew+om&Y~%h9R@sHNpyGg@O-jE0VSkfD*Q4nHDh1q9NOm, 1996, 2000, 2001, 2003. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.20\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2003-11-07 21:54+0100\n" +"Last-Translator: Nils Naumann \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "Ungültiges Argument %s für \"%s\"." + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "Mehrdeutiges Argument %s für \"%s\"." + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Gültige Argumente sind:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Unbekannter Systemfehler." + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: Die Option \"%s\" ist mehrdeutig.\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: Die Option \"--%s\" erlaubt kein Argument.\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: Die Option \"%c%s\" erlaubt kein Argument.\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: Die Option \"%s\" erfordert ein Argument.\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: Unerkannte Option \"--%s\".\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: Unerkannte Option \"%c%s\".\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: Unerlaubte Option -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: Ungültige Option -- %c.\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: Die Option erfordert ein Argument -- %c.\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: Die Option \"-W %s\" ist mehrdeutig.\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: Die Option \"-W %s\" gestattet kein Argument.\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "Blockgröße" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "\"" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "\"" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Aufruf: %s [Pfad...] [Suchkriterium]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Aufruf: %s [Pfad...] [Suchkriterium]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Warnung: Unerkanntes Fluchtsymbol \"\\%c\"." + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "Kann nicht in das aktuelle Verzeichnis wechseln." + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "Kann nicht in das aktuelle Verzeichnis wechseln." + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "unbekannt" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"Das aktuelle Arbeitsverzeichnis und der Ausdruck \"-print\" werden " +"vorgegeben.\n" +"Der Syntax des Ausdruckes ist:\n" +"Operatoren (Im abnehmenden Vorrang, kein Operator bedeutet \"-and\".):\n" +" ( AUSDR ) ! AUSDR -not AUSDR AUSDR1 -a AUSDR2 AUSDR1 -and AUSDR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"Das aktuelle Arbeitsverzeichnis und der Ausdruck \"-print\" werden " +"vorgegeben.\n" +"Der Syntax des Ausdruckes ist:\n" +"Operatoren (Im abnehmenden Vorrang, kein Operator bedeutet \"-and\".):\n" +" ( AUSDR ) ! AUSDR -not AUSDR AUSDR1 -a AUSDR2 AUSDR1 -and AUSDR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer DATEI -ctime N -empty -false -fstype TYP -gid N -group NAME\n" +" -ilname SUCHMUSTER -iname SUCHMUSTER -inum N -ipath SUCHMUSTER \n" +" -iregex SUCHMUSTER -links N -lname SUCHMUSTER -mmin N -mtime N \n" +" -name SUCHMUSTER -newer DATEI\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path SUCHMUSTER -perm [+-]MODUS -regex SUCHMUSTER\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NAME\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "Ungültiger Modus \"%s\"." + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "\"-size\" erfordert ein Argument." + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "Ungültige Einheit \"%c\" für \"-size\"." + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "Ungültiges Argument \"%s\" für \"%s\"." + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "Ungültiges Argument %s für \"%s\"." + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find Version %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find Version %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "Warnung: Unerkanntes Fluchtsymbol \"\\%c\"." + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "Warnung: Unerkannte Formatanweisung \"%%%c\"." + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "Der Umgebungsspeicher ist für \"exec\" nicht ausreichend." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "Kann keinen neuen Prozeß starten." + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "Fehler beim Warten auf das Prozeßende von %s." + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "Der Prozeß %s wurde durch das Signal %d abgebrochen." + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "Ungültiger Ausdruck." + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "Ungültiger Ausdruck." + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "Ungültiger Ausdruck." + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "Oops -- ungültiger Ausdruckstyp!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "Oops -- ungültiger Ausdruckstyp!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "Der Pfad muß vor dem Suchkriterium stehen." + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "ungültige Option `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "ungültige Option `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "Ungültiges Argument \"%s\" für \"%s\"." + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "Fehlendes Argument für \"%s\"." + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "Ungültiger Ausdruck." + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "ungültige Option `%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "Oops -- Das automatische Einfügen von \"-and\" ist ungültig!" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Aufruf: %s häufigste_gemeinsame_Buchstabenpaare < Liste > " +"komprimierte_Liste\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Fehler bitte an melden.\n" +"Für die deutsche Übersetzung ist die Mailingliste zuständig." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find Version %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "Tage" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "Ungültiges Argument \"%s\" für \"%s\"." + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate Version %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "Die Argumentzeile ist zu lang." + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "Warnung: Die Datenbank `%s' ist älter als %d %s." + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "Der Umgebungsspeicher ist für \"exec\" nicht ausreichend." + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs Version %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "doppelte" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "einfache" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "Die Argumentzeile ist zu lang." + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "Fehler beim Warten auf das Ende des Kindsprozesses." + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "Prozeß %s mit Rückgabewert 255 beendet. Abbruch!" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "Prozeß %s wurde durch das Signal %d angehalten." + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "Prozeß %s wurde durch das Signal %d abgebrochen." + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: Ungültiger Wert für die \"-%c\" Option.\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: Der Wert für die \"-%c\" Option muß größer als %ld sein.\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: Der Wert für die \"-%c\" Option muß kleiner als %ld sein.\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Aufruf: %s [-0prtx] [-e[Dateiendezeichen]] [-i[Ersatzzeichen]]\n" +" [-l[Zeilenanzahl]] [-n Argumentanzahl] [-s Zeichenanzahl]\n" +" [-P Prozessanzahl] [--null] [--eof[=Dateiendezeichenkette]]\n" +" [--replace[=Ersatzzeichenkette]] [--max-lines[=Zeilenanzahl]]\n" +" [--interactive] [--max-chars=Zeichenanzahl] [--verbose] [--exit]\n" +" [--max-procs=Prozeßanzahl] [--max-args=Argumentanzahl]\n" +" [--no-run-if-empty] [--version] [--help] [Kommando " +"[Anfangsargumente]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "Oops -- ungültiger Ausdruckstyp!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "Oops -- ungültiger Ausdruckstyp!" + +#~ msgid "Success" +#~ msgstr "Erfolg" + +#~ msgid "No match" +#~ msgstr "Kein Treffer" + +#~ msgid "Invalid regular expression" +#~ msgstr "Ungültiger regulärer Ausdruck." + +#~ msgid "Invalid collation character" +#~ msgstr "Ungültiges Vergleichszeichen." + +#~ msgid "Invalid character class name" +#~ msgstr "Ungültiger Zeichenklassenname." + +#~ msgid "Trailing backslash" +#~ msgstr "Angehängter umgekehrter Schrägstrich." + +#~ msgid "Invalid back reference" +#~ msgstr "Ungültiger Rückbezug." + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Nicht korrespondierende [ oder [^." + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Nicht korrespondierende ( oder \\(." + +#~ msgid "Unmatched \\{" +#~ msgstr "Nicht korrespondierende \\{." + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Ungültiger Inhalt von \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Ungültiges Bereichsende." + +#~ msgid "Memory exhausted" +#~ msgstr "Der Arbeitsspeicher ist erschöpft." + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Der vorhergehende reguläre Ausdruck ist ungültig." + +#~ msgid "Premature end of regular expression" +#~ msgstr "Der reguläre Ausdruck ist unfertig." + +#~ msgid "Regular expression too big" +#~ msgstr "Der reguläre Ausdruck ist zu lang." + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Fehlendes korrespondierendes ) oder \\)." + +#~ msgid "No previous regular expression" +#~ msgstr "Es fehlt ein vorhergehender regulärer Ausdruck." + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "Aktionen: -exec KOMMANDO ; -fprint DATEI -fprint0 DATEI -fprintf DATEI " +#~ "FORMAT\n" +#~ " -ok KOMMANDO ; -print -print0 -printf FORMAT -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Optionsliste:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Auswertbaum:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Optimierter Auswertbaum:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Optimierter Auswertbaum:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "Der virtuelle Arbeitsspeicher ist erschöpft." + +#~ msgid "inserting %s\n" +#~ msgstr "Füge %s ein.\n" + +#~ msgid " type: %s %s " +#~ msgstr " Typ: %s %s " + +#~ msgid "left:\n" +#~ msgstr "links:\n" + +#~ msgid "right:\n" +#~ msgstr "rechts:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Normalisierter Auswertbaum:\n" + +#~ msgid "memory exhausted" +#~ msgstr "Der Arbeitsspeicher ist erschöpft." + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s wurde während des Ausführens von %s geändert." + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. wurde während des Ausführens von %s geändert." + +#~ msgid "error in %s: %s" +#~ msgstr "Fehler in %s: %s." + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " AUSDR1 -o AUSDR2 AUSDR1 -or AUSDR2 AUSDR1 , AUSDR2\n" +#~ "Optionen (immer wahr): -daystart -depth -follow --help\n" +#~ " -maxdepth EBENEN -mindepth EBENEN -mount -noleaf --version -xdev\n" +#~ "Tests (N kann +N, -N oder N sein): -amin N -anewer File -atime N -cmin N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Aufruf: %s [-d Pfad | --database=Pfad] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] Suchmuster...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "Fehlendes korrespondierendes %s Anführungszeichen." + +#~ msgid "command too long" +#~ msgstr "Das Kommando ist zu lang." + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "Kann ein Argument nicht innerhalb der Argumentliste einfügen." + +#~ msgid "argument list too long" +#~ msgstr "Die Argumentliste ist zu lang." diff --git a/po/el.gmo b/po/el.gmo new file mode 100644 index 0000000000000000000000000000000000000000..c13b01b967612776ce6684fe5dcf620d3464cdae GIT binary patch literal 9618 zcmcJTTWlOx8OIOTf++>col-afOcI*e*l7}y&82N_Rn)YJf(tFBO~$+9^^o0}?Ob9T z@zA76OCT-c&I1x4Ks+RN>ZZoAonXiV5+G(@xI7dg@qh$K2q8q_fd_uynal2GZIhxh z((HfdoHOTqm;d*j@67LRe&tsb*KY22b8mdPQV)U$Uda#FGp|x=EjSIn3w$07!56?s z!B4(gsSkj^1>Xt2>;|RY2i^k8^G}v2Hy<+1!OAqvKx^Nyb+Xf z?*PTLn?Ova%HS&SE>PB~fTHI(_;&E?pxFHxQ0(_}@MiE&;CsM-gR<@|uTSl@0bI-T zJ)j0-a5MN-P}cheDD(Xi#N_I);K#s!g5uAEH{pBm$DsJ}rZ=Si83g~p^AYg7D83gX z@8$W=Z&K=ZZ~&psf>rRB;NL)*_a_)b{PP}^y9?Y83ST}4?gO6z#Si}kw}KYVk@gyR zH#h}u0bj^)J<67N9tAgnUjui7zsT@Lj5fscJsExrgwpCCpzz{fpzz_fkW1|Meo*+e z3lzIN0>;dTkoCiMxDO_;(`&0QQ z!Ovo+8*nOMWB?4u-wLvvv4`j`e#@@u#(!+5r)RC{Z^T!%-y=ok}_3+M`7nl5?wzJfy`ssIqhU?jpQ`N&0I&^EE zUDy3py6CKo+Fp&GY8<#;O*`XGg*kjr`y-m}HGZ8w=eS#Ov==vqoj~{3tLwDqj4jnX z;?|vTB8;4djwYIpc0(pvs~-v+W~)~pzWy~`&#(3_+1q*@E0)p97465|XjF%h9mS#E zuxZmaZ4YBa)JCkbcI$PghGqPw(ciLke?{y^k9XXzyVcwPBYvQ*{z^8mdr0rgS zN`JUoSA8e+R!7>d*ZnbVd)f|aal`SVbedu?L$RIR7{}zuD}iV|fLtmUZj}PQ|Zz?x%ROFqBv|wa$|L#t3OY zK8zjR?K~Zh`Y{Y2cJy{3=yi?Uxg#CATJcV(OQn*)PJM?~ci(rvmN3-EogkDb>c@3? zqlwL)p1NNlG<%xIAx7BMdaph1HsXe^J6;VQ6Q32o(Xd%;%;B%7VOOFUW=-fgbjqoa zS)y1Y9MjFfuR)wpBi@KR4*l1rdE~fj>u3}c<#|M!t-xd&M)fuAnxpMVk490m zyncOXAGbZv9xY|rX1(@$jMm55wO-!LXWMjrf>$xqU9=-@~8KXBl|BfAeCKD>AL(2@(Q`@LhHKj!Hy zzd1qR2kQP1qhRV#KV(_C(?1Q@N1b}};XX2jTy!`5FghX*^SvVkbznC_C@0y=s=HwX zeNrM=RXehW?a=8{A2mrQPY^_U;FQ%P4|(@J%5{h`X=)OFW$ zFt*PUr+AbzNlbSjY_OsJ|o5vr;m;}q5D zDI8+fVx2VHWKU7XTzbrQCEw-}_BK{VU3d&dg)%Bnyq0m6*-^-&tBdwRmA2CPD@E5) z$!n-8SiI-Dx3#Wu2N(ard(Ya-Q5)NpwlMT%we6@0%LN~+7{s5&Ed zT#tAT9rl`ZVy<(xLw%n#I^De)zJ2vW*Q0)e} zAYHvqDu3($0xu*=!yk!I3l*E~L^t6!@QnZ`S^*_0e?qE4Q~2Yh!6cX>(S# zTK9%Ew`%R8c(sQ7ve{;eO(!p2`wkr(vUUe}7~QNraHgy`3=DkO8rW$8&;I@OyUI!%kffmToT%_8qFnfnB%uK|X3#?KRDFxMPEam~`z}Y+pRO?J~MVd|}v;0}{P{EiPX1L5; zr;-cVJM+nmrs1*HSxxIAQzcU}q&RIP=UHlj1%D_b=grFqk*=4_B=h{8WWWq>&YC$| zrzJf8FUOGoS(w&i#$?mUTq-cC1nM*Dum(62(Mlq)(Og)LAR~&+sPPLw5N*RY8 zPa9hrvxyC}ms?L_oeRc4@<)7_%wd`CvsGD4wv1aYi^V5-@i``#!vV8$23nW-OP0b@ z;xhhDr*wb?I8VtDNK_WWAnR%V&uW%=jA<5l?P4<3S=?jRc?O**Wbd#IW9Ni*xx>5X z$j@8F3@a|v(|PrroUyJhXrtnlOhhC;kxa4>T5BAHs~{J8rL}&qDokT0X`305Zj!}Udnl1oCUDZa;kUIqnltDcBPcD5}}vMGijnJ zYy1m6rcIb!Os=%fh})ANw9e8oL+i5K$=v(mUr&8lumk_kvDTC}jGtbf@kCY!KSf}8 zTLgIfP>RSe(VY45_3FY3=T|btJYlqG@^J4VcFFGSB)eo^S~d1`CEuWloM1??C~li# zU6b^16ACYqVTd}(KZ|SyBw6fp**r;tc}fCPe5#G*T2ErjS=z+*i!zFTQ#|vojLOc$ zU3=i9WLQZ{I7v1`*`d;1ZCbBc@zmVMxJlkQW4vp!H?CX2dCw6GC)>r(HRtF|*=3K> z$&_SeHsCyuO`7aKXUxz#K@NL7dDi44I3ekJQI6T``b+@gFx9BQX$6+&Y!4O5*AllA%299X> zqC~#t6M%vvY2ru?j8zM2EV)ao*uOK!-!FKefli-T3@sc5oU%E#lE!3Bwz9`HPcVRU4p)}r4nC8dv{j^HHDK^PV zPpO`yc*s)W(iNKd4%11Uj#^JG%`+)Cr50<`O|EeAqp@=1W41&srvB2*l30!u25vlmB z#YT`42HhkU#cea974aa>` z#WKh$x)PTiF|n9^ZIk6NwmEFhvk!_+x~JH|bC|(cOOEe__p=k)KuP5io3+#W=tAlk zN@h%z^Cf$uno2A?Z)PZ=+eL)EghUtCiGy*hRAtmb{4rjj-gvI{G|w~ncfFLwDIG2o zjgr85pX{FbHvO=-vV6>q)0Yah>?@y4X;LC}0%uf8iEK3d6QM=It3}WVd-(1l+e2^B zD3%n}uw}1?5-mm;tNrnCWzjo%xXfup#E}RVc3etXAPJjYnFbEn@apP0K0Q*jujs^1 z>f)G1I7VJdCzO)-1lxR<d1VN^fd>u``l_k-fMrO>VLOD((ozWx$7PIoEp=b6nER%(m Kvto{qss91&nxsDf literal 0 HcmV?d00001 diff --git a/po/el.po b/po/el.po new file mode 100644 index 0000000..3e4cc36 --- /dev/null +++ b/po/el.po @@ -0,0 +1,1206 @@ +# translation of findutils-4.2.6.po to Greek +# This file is distributed under the same license as the findutils-4.2.6 package. +# Copyright (C) 2004 Free Software Foundation, Inc. +# Lefteris Dimitroulakis , 2004, 2005. +msgid "" +msgstr "" +"Project-Id-Version: findutils-4.2.6\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2005-01-02 13:54+0200\n" +"Last-Translator: Lefteris Dimitroulakis \n" +"Language-Team: Greek \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.3.1\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "Το όρισμα %s δεν είναι έγκυρο για την %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "Το όρισμα %s είναι ασαφές για την %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Έγκυρα ορίσματα είναι:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Αγνωστο σφάλμα συστήματος" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: η επιλογή «%s» είναι ασαφής\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: η επιλογή «--%s» δεν επιτρέπει όρισμα\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: η επιλογή «%c%s» δεν επιτρέπει όρισμα\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: η επιλογή «%s» απαιτεί όρισμα\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: μη αναγνωριζόμενη επιλογή «--%s»\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: μη αναγνωριζόμενη επιλογή «%c%s»\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: παράτυπη επιλογή -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: άκυρη επιλογή -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: η επιλογή απαιτεί όρισμα -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: η επιλογή «-W %s» είναι ασαφής\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: η επιλογή «-W %s» δεν επιτρέπει όρισμα\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "μέγεθος μπλόκ" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "«" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "»" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Χρήση: %s [-H] [-L] [-P] [διαδρομή...] έκφραση]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Χρήση: %s [διαδρομή...] [έκφραση]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "προειδοποίηση: μη αναγνωριζόμενη ακολουθία διαφυγής «\\%c»" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Η μεταβλητή περιβάλλοντος FIND_BLOCK_SIZE δεν υποστηρίζεται, αυτό που " +"επιρρεάζει το μέγεθος μπλοκ είναι η μεταβλητή περιβάλλοντος POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" + +#: find/find.c:391 +#, fuzzy, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Το σύστημα αρχείων %s αποπροσαρτήθηκε πρόσφατα." + +#: find/find.c:401 +#, fuzzy, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Το σύστημα αρχείων %s έχει προσφάτως προσαρτηθεί." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s άλλαξε κατά την εκτέλεση του %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s άλλαξε κατά την εκτέλεση του %s (παλαιός αριθμός inode %ld, νέος " +"αριθμός inode %ld, ο τύπος συστήματος αρχείων είναι %s) [ref %ld]" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "άγνωστο" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"προειδοποίηση: έχεις ορίσει την επιλογή %s μετά το non-option όρισμα %s, " +"αλλά η θέση έχει σημασία στις επιλογές (%s επιρρεάζει τα τεστ που ορίζονται " +"τόσο πριν όσο και μετά). Παρακαλώ καθόρισε επιλογές πριν από άλλα " +"ορίσματα.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"προειδοποίηση: η επιλογή -d έχει καταργηθεί, στη θέση της δώσε -depth που " +"συμφωνεί με το POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"προεπιλεγμένη διαδρομή είναι ο τρέχων κατάλογος,\n" +"προεπιλεγμένη έκφραση είναι η -print\n" +"η έκφραση μπορεί ν' αποτελείται από:\n" +"τελεστές (μειούμενης προτεραιότητας,\n" +"ο -and υπονοείται όταν δεν δείνονται άλλοι):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"προεπιλεγμένη διαδρομή είναι ο τρέχων κατάλογος,\n" +"προεπιλεγμένη έκφραση είναι η -print\n" +"η έκφραση μπορεί ν' αποτελείται από:\n" +"τελεστές (μειούμενης προτεραιότητας,\n" +"ο -and υπονοείται όταν δεν δείνονται άλλοι):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" + +#: find/parser.c:1048 +#, fuzzy +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +" EXPR1 -o EXPR2 EXPR1 -ή EXPR2 EXPR1 , EXPR2\n" +"επιλογές θέσεως (πάντοτε αληθής): -daystart -follow\n" +"κανονικές επιλογές (πάντοτε αληθής, οριζόμενη πριν από άλλες εκφράσεις): -" +"depth\n" +" --help -maxdepth ΕΠΙΠΕΔΑ -mindepth ΕΠΙΠΕΔΑ -mount -noleaf --version -" +"xdev\n" +" -ignore_readdir_race -noignore_readdir_race\n" +"tests (N μπορεί νάναι +N ή -N ή N): -amin N -anewer ΑΡΧΕΙΟ -atime N -cmin N" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer ΑΡΧΕΙΟ -ctime N -empty -false -fstype ΤΥΠΟΣ -gid N -group " +"ΟΝΟΜΑ\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer ΑΡΧΕΙΟ" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user ΟΝΟΜΑ -xtype [bcdpfls]" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Αναφορές για σφάλματα (and track progress on fixing)\n" +"μέσω της σελίδας findutils bug-reporting\n" +"στο http://savannah.gnu.org/ ή, αν δεν έχεις πρόσβαση στο web,\n" +"αποστέλοντας μήνυμα στη διεύθυνση ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "η συνάρτηση βιβλιοθήκης fnmatch(), δεν πέρασε τον έλεγχο ακεραιότητος." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"προειδοποίηση: το κατηγόρημα -ipath είναι υπό κατάργηση· παρακαλώ " +"χρησιμοποείστε στη θέση του το -iwholename." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "άκυρη κατάσταση «%s»" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "το όρισμα null είναι άκυρο για την επιλογή -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "Ο τύπος «%c» για την επιλογή -size είναι άκυρος" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "Το όρισμα %s δεν είναι έγκυρο για την %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find έκδοση %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils έκδοση %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "προειδοποίηση: μη αναγνωριζόμενη ακολουθία διαφυγής «\\%c»" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "προειδοποίηση: άγνωστη οδηγία μορφοποίησης «%%%c»" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "το περιβάλλον είναι πολύ μεγάλο γιά την εκτέλεση" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "Δεν μπορώ να κλωνοποιήσω" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "σφάλμα περιμένοντας γιά %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s τερματίστηκε από το σήμα %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "άκυρη έκφραση" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "μη αναμενόμενο extra κατηγόρημα" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "άκυρη έκφραση" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "άκυρη έκφραση" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oops -- άκυρος τύπος έκφρασης!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oops -- άκυρος τύπος έκφρασης!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "οι διαδρομές πρέπει να προηγούνται των εκφράσεων" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "το κατηγόρημα «%s» είναι άκυρο" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "το κατηγόρημα «%s» είναι άκυρο" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "Το όρισμα για την «%s» απουσιάζει" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "άκυρη έκφραση" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "μη αναμενόμενο extra κατηγόρημα" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "μη αναμενόμενο extra κατηγόρημα" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oops -- η παρεμβολή της προεπιλεγμένης παραμέτρου «and» είναι άκυρη!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Χρήση: %s [--version | --help]\n" +"ή %s most_common_bigrams < file-list > locate-database\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Αναφορά σφαλμάτων στην .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils έκδοση %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "μέρες" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"προειδοποίη: η διαδρομή «%s» της βάσεως δεδομένων locate περιέχει στην αρχή " +"της της ένα δίστιγμο που δεν αποτελεί έγκυρο όνομα της βάσεως" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "η βάση δεδομένων locate «%s» δεν είναι έγκυρη ή έχει υποστεί αλλοίωση" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "η βάση δεδομένων locate «%s» δεν είναι έγκυρη ή έχει υποστεί αλλοίωση" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Χρήση: %s [-d διαδρομή | --database=διαδρομή] [-e | --existing]\n" +" [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n" +" [--version] [--help] pattern...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate έκδοση %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "όρισμα επιλογής --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "προειδοποίηση: η βάση δεδομένων «%s» είναι περισσότερο από %d %s παλιά" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "το περιβάλλον είναι πολύ μεγάλο γιά την εκτέλεση" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs έκδοση %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Οι μεταβλητές περιβάλλοντος καταλαμβάνουν %ld bytes\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Άνω και κάτω όριο κατά POSIX για μήκος ορίσματος: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Άνω και κάτω όριο κατά POSIX για μήκος ορίσματος: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Μέγιστο μήκος εντολής που θα μπορούσαμε να χρησιμοποιήσουμε: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Μέγεθος του buffer εντολών που χρησιμοποιούμε: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"unmatched %s quote; εκ προεπιλογής τα εισαγωγικά έχουν ειδική σημασία για το " +"xargs εκτός κι αν χρησιμοπείτε την επιλογή -0." + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "διπλά" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "μονά" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "γραμμή ορισμάτων πολύ μεγάλη" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "σφάλμα αναμένοντας τη θυγατρική διεργασία" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: τερματίστηκε με ένδειξη 255, απότομο σταμάτημα" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: σταμάτησε από το σήμα %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: τερματίστηκε από το σήμα %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: άκυρος αριθμός γιά την επιλογή -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s:η τιμή για την επιλογή -%c πρέπει να είναι >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: η τιμή για την επιλογή -%c πρέπει να είναι < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Χρήση: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n" +" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" +"str]]\n" +" [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n" +" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n" +" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" +" [command [initial-arguments]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oops -- άκυρος τύπος έκφρασης!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oops -- άκυρος τύπος έκφρασης!" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "Μείωση του arg_max (%ld) σε arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Επιτυχία" + +#~ msgid "No match" +#~ msgstr "Δεν υπάρχει ταίριασμα" + +#~ msgid "Invalid regular expression" +#~ msgstr "Άκυρη κανονική έκφραση" + +#~ msgid "Invalid collation character" +#~ msgstr "Άκυρος χαρακτήρας διαταξινόμησης" + +#~ msgid "Invalid character class name" +#~ msgstr "Άκυρο όνομα κλάσεως χαρακτήρα" + +#~ msgid "Trailing backslash" +#~ msgstr "Αντιπλαγία στο τέλος" + +#~ msgid "Invalid back reference" +#~ msgstr "Άκυρη παραπομπή προς τα πίσω" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Δε βρέθηκε [ ή [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Δε βρέθηκε ( ή \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "Δε βρέθηκε \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Το περιεχόμενο του \\{\\} είναι άκυρο" + +#~ msgid "Invalid range end" +#~ msgstr "Ακυρο τέλος περιοχής" + +#~ msgid "Memory exhausted" +#~ msgstr "Μνήμη εξαντλημένη" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Η προηγούμενη κανονική έκφραση είναι άκυρη" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Πρόωρο τέλος κανονικής έκφρασης" + +#~ msgid "Regular expression too big" +#~ msgstr "Πολύ μεγάλη κανονική έκφραση" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Δε βρέθηκε ) ή \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "Δεν προηγήθηκε κανονική έκφραση" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "ενέργειες: -exec ΕΝΤΟΛΗ ; -fprint ΑΡΧΕΙΟ -fprint0 ΑΡΧΕΙΟ -fprintf ΑΡΧΕΙΟ " +#~ "ΜΟΡΦΗ\n" +#~ " -fls ΑΡΧΕΙΟ -ok ΕΝΤΟΛΗ ; -print -print0 -printf ΜΟΡΦΗ -prune -ls -" +#~ "delete\n" +#~ " -quit\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Λίστα κατηγορημάτων:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Δέντρο αξιολόγησης:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Βελτιστοποιημένο δέντρο αξιολόγησης:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Βελτιστοποιημένο δέντρο αξιολόγησης:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "η εικονική μνήμη εξαντλήθηκε" + +#~ msgid "inserting %s\n" +#~ msgstr "παρεμβολή του %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " τύπος: %s %s " + +#~ msgid "left:\n" +#~ msgstr "αριστερό:\n" + +#~ msgid "right:\n" +#~ msgstr "δεξιό:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Κανονικοποιημένο δέντρο αξιολόγησης:\n" + +#~ msgid "error in %s: %s" +#~ msgstr "σφάλμα στο %s: %s" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "προειδοποίη: η διαδρομή «%s» της βάσεως δεδομένων locate περιέχει στο " +#~ "τέλος της ένα δίστιγμο που δεν αποτελεί έγκυρο όνομα της βάσεως" + +#~ msgid "command too long" +#~ msgstr "διαταγή πολύ μεγάλη" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "δεν μπορώ να περιλάβω μοναδικό όρισμα μέσα\n" +#~ "στο περιορισμένο μέγεθος της λίστας ορισμάτων" + +#~ msgid "argument list too long" +#~ msgstr "λίστα ορισμάτων πολύ μεγάλη" diff --git a/po/en@boldquot.header b/po/en@boldquot.header new file mode 100644 index 0000000..fedb6a0 --- /dev/null +++ b/po/en@boldquot.header @@ -0,0 +1,25 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# diff --git a/po/en@quot.header b/po/en@quot.header new file mode 100644 index 0000000..a9647fc --- /dev/null +++ b/po/en@quot.header @@ -0,0 +1,22 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# diff --git a/po/eo.gmo b/po/eo.gmo new file mode 100644 index 0000000000000000000000000000000000000000..79f29b2c5c03f74884fb52ab7c4427f4f14e32d3 GIT binary patch literal 3987 zcmb7`OKco97{|>U0_9Plyr~0SLMgM|q)AD)p%j`@f@patfKUO&JL628owXO+lLsnX z5JE^?I3OVoNQetaNE{JD0&%G-Bsjo{OFM&PR;2R{Mt0>1@s1W$ptfSWF6Y%93Enj`Hh4Yw zQ91r)$sa&$$$l&OJ4pMS0?E!lL6X1r62^wWd%(-V36SO=1Yrt$5yVm!gTvq=Naw!= zlAa%cH-KM*^E9z5*f2j)Uai??Cd~ zAK+^+VC!YYIUho4j`1%+I`1d&PVjG#^caRQcY{+P=_x^)f4v<47^L&R2kD%@z-{2x zD+>FkL5hbcf4@@lJrHWJ&p?XD=is&AHz38~BuM@_Rr0b;MZVk)QamP0?gMF`X^`}P z7$iR?AVk?Q@JjGako0>OB>68u^3&HK*>wUWzy1c2zW;(`|1A)veRqQ#oCU7|b8rNF z1Ee^73Q|6w0C$1EfF!r&sv-{KAY9L;K=R)~ko=}V(w}st{q9Atq0<_Yr@f&Hy8xZ! zsUdW1XZWwsk@lf`M|nn#{7DTeghu`xMW;BD&2@CLks8@N*eG_?I6B!wxi{FzcJd$j zxPeYNPI04Ly9=Filp4iu7(GHKzu$w7lwv#3ks_hNbap;E`M=+4j(cf4N((O&-dg2O zrCMaXmav*@a=D^td|CMg?!551<6{#Od%0*C>y=K!B9&z_g^cNXWi*c>UWP>sd8L& zS}M&=?$*v)`BJW|#F~xvh@x{iFnX4s`|1rfTu-?{hdOV%-Sq->wjk!(%Gjh@y$s2| zqsXg;ch;Q`P8h-^nSy=1Uau4O@dr3NbmVD1uXMtfq;(YV8oW${nTe4_Ylc@4DRT@r!Io6MAKlr2+WmV0wo+Qtd zmfRZyeUP9nXw^nmzbsiSv^JjBw|oDm((^dC7J0-IWJTC1s7K zOryjK`{F1Wj+HAiWG5yyl+iq zU{9n!HAji(4Fp{!C|9~jZi-8PFP&#u78Iq*HJF^ z^ho5q$TN6FJBh~tiD2e&sghxK=E_Q^VCgWU1K``d$OE=4tj0)_pO%Tz#e&@OJo#n) zB?x6l^dhI0$cHsr{e(4(h-EaBM9&mS+6*b1dzCppULUQGHHMy&T|8pZVV9~TdMHm_ zG;5l?m8TJ9cUZbV)p_06bm)o4XQKmF3NkaAMwU1ESfg=Y)Yu(0_VCfk=J=i+jnPH} z3!|sxk|O_C>&BzTXw(?zqZ7?B$V_0}W5W4p)(Y)1ft+jd={lblndFBMESVs`rV`i1 z+Fk57PIHmUXjY0&lOJ?liH#7ZDPL|#r+Z9B((KQa^RDhpZet05 zrLwN2-#2u4=J3JFIivN)&;g@8vOJnaGB!~aR{TyVp!8lIF9_?Tzh5~MO-@eiiFQ?s z>BMFJ0J zVjYZN1JjKa^0ulhm<^>xaBVs*YdB(A))uTR-nDAY8u4PFEG>90%9H5TDXNOmy~;rc zhnt2V2*lTy#=wK}ggGYK=IHbAk;38O4loGL61!9p07ghCS z@lmQL{a98jv1v%9fr5g1f)wz`F)Ap6DoQ&=+9xQgjKXP_5Ok_4s``mXRVyyqJ{K82 zG!o;KwD}@lWiL{*$dcT&GQm1{dQG8RI3etd`+{UHYYXh*cyDxqi$Q0FS{KY57*+{n zLS-?m%KDdq(&X8_W{{x37h9`LL=MaXG5q@`DEN&lWXUddn v1`l9X7e3cz$}oWs7>_4^AYG+vi!OZvL%&dW)>%^&9r{{md$mM{gqrgo)>Ion literal 0 HcmV?d00001 diff --git a/po/eo.po b/po/eo.po new file mode 100644 index 0000000..549503d --- /dev/null +++ b/po/eo.po @@ -0,0 +1,1190 @@ +# Esperanto translations for findutils messages +# Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# D. Dale Gulledge , 2004. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.20\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2004-01-04 15:27-0500\n" +"Last-Translator: D. Dale Gulledge \n" +"Language-Team: Esperanto \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-3\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "malvalida argumento %s por %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "plursenca argumento %s por %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Validaj argumentoj estas:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Nekonata sistemeraro" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: opcio `%s' estas plursenca\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: opcio `--%s' ne permesas argumenton\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: opcio `%c%s' ne permesas argumenton\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: opcio `%s' postulas argumenton\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: nerekonata opcio `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: nerekonata opcio `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: malpermesata opcio -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: malvalida opcio -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opcio postulas argumenton -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: opcio `-W %s' estas plursenca\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: opcio `-W %s' malpermesas argumenton\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "blokgrandeco" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[jJ]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Uzado: %s [pado...] [esprimo]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Uzado: %s [pado...] [esprimo]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "averto: nerekonata eskapsigno `\\%c'" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "ne povas preni aktualan dosierujon" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "ne povas preni aktualan dosierujon" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "nekonata" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"defaýlta pado estas la aktuala dosierujo; defaýlta esprimo estas -print\n" +"esprimo povas konsisti de:\n" +"operatoroj (en ordo de malpliiøanta antaýeco; -and estas implicita kie " +"neniuj\n" +"aliaj estas donitaj):\n" +" ( ESPR ) ! ESPR -not ESPR ESPR1 -a ESPR2 ESPR1 -and ESPR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"defaýlta pado estas la aktuala dosierujo; defaýlta esprimo estas -print\n" +"esprimo povas konsisti de:\n" +"operatoroj (en ordo de malpliiøanta antaýeco; -and estas implicita kie " +"neniuj\n" +"aliaj estas donitaj):\n" +" ( ESPR ) ! ESPR -not ESPR ESPR1 -a ESPR2 ESPR1 -and ESPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer DOSIERO -ctime N -empty -false -fstype SPECO -gid N -group " +"NOMO\n" +" -ilname ÞABLONO -iname ÞABLONO -inum N -ipath ÞABLONO -iregex ÞABLONO\n" +" -links N -lname ÞABLONO -mmin N -mtime N -name ÞABLONO -newer DOSIERO\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path ÞABLONO -perm [+-]REØIMO -regex ÞABLONO\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOMO\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "malvalida reøimo `%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "malvalida senvalora argumento por -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "malvalida -size speco `%c'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "malvalida argumento `%s'por `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "malvalida argumento %s por %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versio %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find versio %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "averto: nerekonata eskapsigno `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "averto: nerekonata formatdirektivo `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "medio estas tro granda por exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "ne povas forki" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "eraro atendante por %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s æesigita per signalo %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "malvalida esprimo" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "malvalida esprimo" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "malvalida esprimo" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "up -- malvalida esprimospeco!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "up -- malvalida esprimospeco!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "padoj devas esti antaý ol esprimo" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "malvalida predikato `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "malvalida predikato `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "malvalida argumento `%s'por `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "mankas argumento por `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "malvalida esprimo" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "malvalida predikato `%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "up -- malvalida defaýlta enþovado de ``and'' (kaj)!" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "Uzado: %s plej_oftaj_dusigna¼oj < listo > kodita_listo\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Raportu cimoj al (bonvolu angle)." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find versio %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "tagoj" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "malvalida argumento `%s'por `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versio %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "argumentlinio tro longa" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "averto: datumbazo `%s'estas pli aøa ol %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "medio estas tro granda por exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versio %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "duobla" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "unuobla" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "argumentlinio tro longa" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "eraro atendante ida proceso" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: finis kun stato 255; æesanta" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: haltigita per signalo %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: æesigita per signalo %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: malvalida nombro por -%c opcio\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: valoro de -%c opcio devas esti >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: valoro de -%c opcio devas esti < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Uzado: %s [-0prtx] [-e[dosierfina-æeno]] [-i[anstataýa-æeno]]\n" +" [-l[maksimumo-da-linioj]] [-n maksimumo-da-argumentoj]\n" +" [-s maksimumo-da-signoj] [-P maksimumo-da-procesoj] [--null]\n" +" [--eof[=dosierfina-æeno]] [--replace[=anstataýa-æeno]]\n" +" [--max-lines[=maksimumo-da-linioj]] [--interactive]\n" +" [--max-chars=maksimumo-da-signoj] [--verbose] [--exit]\n" +" [--max-procs=maksimumo-da-procesoj] [--max-args=maksimumo-da-" +"argumentoj]\n" +" [--no-run-if-empty] [--version] [--help] [ordono [komencaj-" +"argumentoj]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "up -- malvalida esprimospeco!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "up -- malvalida esprimospeco!" + +#~ msgid "Success" +#~ msgstr "Sukceso" + +#~ msgid "No match" +#~ msgstr "Neniu kongrua¼o" + +#~ msgid "Invalid regular expression" +#~ msgstr "Malvalida regula esprimo" + +#~ msgid "Invalid collation character" +#~ msgstr "Malvalida ordiza signo" + +#~ msgid "Invalid character class name" +#~ msgstr "Malvalida signoklasnomo" + +#~ msgid "Trailing backslash" +#~ msgstr "Sekvanta retroklino" + +#~ msgid "Invalid back reference" +#~ msgstr "Malvalida retroreferenco" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Senpara [ aý [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Senpara ( aý \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "Senpara \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Malvalida enhava¼o de \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Malvalida intervalofino" + +#~ msgid "Memory exhausted" +#~ msgstr "Memoro elæerpita" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Malvalida antaýa regulesprimo" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Tro frua fino de regulesprimo" + +#~ msgid "Regular expression too big" +#~ msgstr "Regulesprimo tro granda" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Senpara ) aý \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "Neniu antaýa regulesprimo" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "agoj: -exec ORDONO ; -fprint DOSIERO -fprint0 DOSIERO -fprintf DOSIERO " +#~ "FORMATO\n" +#~ " -ok ORDONO ; -print -print0 -printf FORMATO -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Predikatolisto:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Arbo de Elvalorado:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Optimumigita Arbo de Elvalorado:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Optimumigita Arbo de Elvalorado:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "virtuala memoro elæerpita" + +#~ msgid "inserting %s\n" +#~ msgstr "enþovas %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " speco: %s %s " + +#~ msgid "left:\n" +#~ msgstr "maldekstre:\n" + +#~ msgid "right:\n" +#~ msgstr "dekstre:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Nomigita Arbo de Elvalorado:\n" + +#~ msgid "memory exhausted" +#~ msgstr "memoro elæerpita" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s þanøis dum plumumado de %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. þanøis dum plumumado de %s" + +#~ msgid "error in %s: %s" +#~ msgstr "eraro en %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " ESPR1 -o ESPR2 ESPR1 -or ESPR2 ESPR1 , ESPR2\n" +#~ "opcioj (æiam vera): -daystart -depth -follow --help\n" +#~ " -maxdepth NIVELOJ -mindepth NIVELOJ -mount -noleaf --version -xdev\n" +#~ "provoj (N povas esti +N aý -N aý N): -amin N -anewer DOSIERO -atime N -" +#~ "cmin N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Uzado: %s [-d pado | --database=pado] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] þablono...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "senpara %s citilo" + +#~ msgid "command too long" +#~ msgstr "ordono tro longa" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "argumentlista grandecolimo estas tro malgranda por eæ sola argumento" + +#~ msgid "argument list too long" +#~ msgstr "argumentlisto tro longa" diff --git a/po/es.gmo b/po/es.gmo new file mode 100644 index 0000000000000000000000000000000000000000..3be7b041abf28ab62494b7983958db85bb636e11 GIT binary patch literal 7745 zcmb7|ON<;x8OJLjye1DIyaEYO4qogf+v~MsJNDRdoH$Oj#4p*-3*+q8%+$=Z-P1Mh z$9gwH;*^9#BnXHo;)2ZUl1p-m5E4=(E-2(gfP+ya3pnIpL1HP0CPhgx4gBMJ<)cbXg0F&K2G4^j_&#_BJoPc9 z)`NcozXV?Qai#7AZwKZ39&ieL0{ja23^)P)q8$GN81VglP=o6~q0~3P{ork21l|rl z1AYxWSK{lS$aMkyCV1l~*&Eyrej3~Xeh!=kMUJPyFMx~S=fNL<+rVFeuYu>m7r-Ak ziuWdNRO$rZo1m=oBFK@|%O$=F%6_kbqPO3Gvi@Jd&w>|0mQvT%jX#*{2Q4ITyh%f-ixh_g6sC-y7hq;5*<~!4E;%_x76$eQg0J`Thu~!5rKU zz6i>GZ-TPkTOcY|{{kNe{{xCW58s0A!Ph~t<1L>m?6VpCC*SA5c@DlGB?o-}^=FE6 zy#@Y^@9%;?1YbbNuY-4@46)-w;0ACGl>MIrXTYC>a*jWNBKLdc_#G%?Gv5z_qMz@9 zV&`+92LA|(J}#EuZ^WoFJ_R8)1@@C1D!1m ztqxNbnbao|%W6^Qw3{Vb<4aX0klhTefZ6rA-SZa%{wE z>M)9I56!rtKYtMDiMHsEC-H)b!cL`tu1j<<(Jm)0pR)4ha%6s@J&|tE9cR;cL#9m> zxwG2D+9bVvVB@S1HbY}*wu$Q|$UHLSzXYw$y%vo!VAh?DNgU2z{Rf|{7UQ@!= zgwtaRO*1zfu5`!d6*Nelad9zlOXtmJJs?WU=is#rcw|cqpblP`09^SHg zw>aok&D?WuF?ECDom5XxPYdkP_i6R;p+~iZp8e2=n=76~u1#pJ7+%CN z(q*Fu&0;vn2RgEG4?iY8+ioy0Y0j(UlUHI*uSVUI-HxOL*u7lZ2)fS^d!L zp$F$4IBq8?3A3aU=^i6E$q{#|^% zZ=>PK2AM)G9uHia&56NWJV#I`W{~1?lD&c`Of%f4aD<>^GSf1tZK%h5(y0;zk)GJ5 zdg?@c=p_G_o;<1MRh=N}JR*CEk58nkdQ(SXY*Dsj3vyjOOx+0Bd=O@8q!QJ}sOXb5 zPFJ6MHq-4qNyH8vl1@8w$&%`rrBroXj#1ROr7(!!i+zf4lbWKuy7XBSO1`ZmTshe8 zhxjorDlVg{#2a{H`HDgw-B6F$M;RTudZm6eFL{ll3f3>$#i4`%5n2z$c@&MbD7ukN z>&MLRgg#RJLW7XEIY_-twS#lRR8n0fN5^(e9%Xz_Ew!d7tOVmab@|MZOulxmQ>lr= zY>5hOaaY1!JhdASOxEsioW!WD#3W0)o5yXxZkLd(?@aD8yGw$!64{S&rh15n)StO=BrqHK8)X6nov|y&p%Id61VuT=_ zBXLkCYaF9vkwUcC*`gA-3iC?Pcp4987y*CwPDcHaPB@zSPu(r)ppuM-Cqk_9a-E z^92v$H%+}|X6Bw?W_vKRQ*YkU+`99wnawjZObm|FrAkDP=4}l&Zwa>Ctv7FPZo8+L zcfh1sa6B<_ieI^;sgL1Dq3JpOSQr`opo`l!(z^-01-|cAI8DX7|n> zI~?rTv2ACtc{Evs>)IsPAGe(p%ckBDv_cw0rVR3!B$Vh@*v4`=%GEUf9fyx3n&YMR z-LclcZ**Gw2$zsL49bSrwR&mXZ@dpE&Fva58Y2j@Pj=nRK-c-7bsmAJ4 z;@mRP^97Weg+sqcO1Y!{%X(do!P2R=!V@m13D+(koWTX*TB4Ot$E3QFNSE`LCVh-) zU82*X1-P6;kkFkHs^ErRb7W$n5@RiIsUgb31*ilTF{EU)UA_RHsCxWjfnuH+Ut%=7 zBop*krbGFr)51?a7!d(itTp}uMGz$y{eoHbacrr%VPwJRV6eUs03USPCZP$F(R-WlG!Vf1w}?MHNvg zl15J8(Sf!lIwnbcbTkX^NL?q08p8`ce&CQV^aegfR{5)36@k`fEo^P$DF^{&w~_G~ zmLrsf=o0=i<>`P#xI_jANX;o`teJY%0W)GNh{TCqf~#CkTo|H6U*PycTujGIp+@}y z3EqkJ8b%n4;gD=H#Dujj-DNII4jG>R?SEw?l@6keIWC%**Qu$E0RYM(+ z+Eum=d@NET&5Dah1SdUqQoXF|St44=c8Z{yNL6$(w%+RXEOCf|NqtF+7&T)H_)x3} z&kB{QF2wngXf=vZHvy00E0xU)8`?OzL18m->fE9;*P^%+!&s#vMIkQZDY)ufG(wI% zH;QT(KvN_6;D9m9c(KMPlBMC2CoJVdz&j#`Ex6LEPy691r;1u8wVa|+klU)(c+OPo zNHn>;46*v?>Adiz<mqLPy1i=TTZMxq)Ae-l^*R3d!9%#o>fdB(7zuq+vRA zK=n5!2*)ZLqE^_7LYPvU(VB~S-x1~|VWdXqD~K2D+uM{Dp#zI33W`(g%1@3)%)u}b z2){pt4Mok;vg pvVwo3pmQR)NgMc`2n*Xgg2@X_SIdaB%fzZzbeXj5b&v}8`yT-<3331c literal 0 HcmV?d00001 diff --git a/po/es.po b/po/es.po new file mode 100644 index 0000000..368aff4 --- /dev/null +++ b/po/es.po @@ -0,0 +1,1524 @@ +# Mensajes en español para GNU findutils. +# Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc. +# Iñaky Pérez González , 1996. +# Santiago Vila Doncel , 2001, 2004. +# +msgid "" +msgstr "" +"Project-Id-Version: GNU findutils 4.2.6\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2004-12-23 16:57+0100\n" +"Last-Translator: Santiago Vila Doncel \n" +"Language-Team: Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argumento %s inválido para %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumento %s ambiguo para %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Los argumentos válidos son:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Error del sistema desconocido" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: la opción `%s' es ambigua\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: la opción `--%s' no admite ningún argumento\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: la opción `%c%s' no admite ningún argumento\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: la opción `%s' necesita un argumento\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: opción no reconocida `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: opción no reconocida `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opción ilegal -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: opción inválida -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: la opción necesita un argumento -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: la opción `-W %s' es ambigua\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: la opción `-W %s' no admite ningún argumento\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "tamaño del bloque" + +# No ha habido ninguna queja en coreutils, pongamos aquí también los +# símbolos de cita tradicionales en español. +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "«" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "»" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[sS]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +# ¿Cómo traducir "path"? Me inclino por ahora por camino, pero quizá sería +# más mejor que bueno poner directorio o algo así. IPG +# ¡Olé! Gracias a tos los de es@li.org que me habeis dado "ruta de acceso". +# No se qué significado tendría mi vida sin vuestra ayuda ;), snif ... :~) +# IPG +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Modo de empleo: %s [-H] [-L] [-P] [ruta-de-acceso...] [expresión]\n" + +# ¿Cómo traducir "path"? Me inclino por ahora por camino, pero quizá sería +# más mejor que bueno poner directorio o algo así. IPG +# ¡Olé! Gracias a tos los de es@li.org que me habeis dado "ruta de acceso". +# No se qué significado tendría mi vida sin vuestra ayuda ;), snif ... :~) +# IPG +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Modo de empleo: %s [ruta-de-acceso...] [expresión]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "atención: secuencia de escape `\\%c' no reconocida" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"La variable de entorno FIND_BLOCK_SIZE no está soportada, lo único que\n" +"afecta al tamaño del bloque es la variable de entorno POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "no se puede obtener el directorio actual" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "no se puede obtener el directorio actual" + +#: find/find.c:391 +#, fuzzy, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "El sistema de ficheros %s ha sido desmontado recientemente." + +#: find/find.c:401 +#, fuzzy, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "El sistema de ficheros %s ha sido montado recientemente." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s ha cambiado durante la ejecución de %s (número de dispositivo antiguo %" +"ld,\n" +"número de dispositivo nuevo %ld, el tipo de sistema de ficheros es %s [ref %" +"ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s ha cambiado durante la ejecución de %s (número de nodo-i antiguo %ld,\n" +"número de nodo-i nuevo %ld, tipo de sistema de ficheros %s) [ref %ld]" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "desconocido" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"atención: ha especificado la opción %s después de un argumento %s que no\n" +"es una opción, pero las opciones no son de posición (%s afecta tanto a\n" +"las evaluaciones especificadas antes de él como a las especificadas\n" +"después). Por favor especifique las opciones antes de otros argumentos.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"atención: la opción -d está obsoleta; por favor utilice -depth en su lugar,\n" +"ya que se trata de una característica que cumple con POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +# sugerencia: si no se dan -> si no hay otros. sv +# +# No, aquí creo que no vale, ya que es "si no das operadores", esto +# es, si no das ninguno, no que no haya otros. Se refiere al caso +# de que no se dé un operador entre dos `sentencias' (además claro +# de que sólo se puede dar uno). +# +# Bueno, el plural ("others") del original tiene un sentido "respectivo", +# Quiere decir que si en cada sitio donde puedes poner un operador o no +# ponerlo, no pones uno que sea distinto de -and, se supone -and. +# Obviamente para poner otro que no sea -and tienes que poner alguno... +# La única diferencia, yo creo, es que según el original, si pones -and, +# no le hace caso, y toma el operador por defecto, que vuelve a ser -and +# ¡Mira que son retorcidos! :-) sv +# +# Bueno, déjalo así si quieres, pero fíjate en lo soso que queda el "dan", +# queda a mil kilómetros de la palabra "operadores" (me refiero a lo lejos +# que están el verbo y el objeto directo, me suena un poco rarillo). +# Parece que es "si no se dan de tortas". sv +# +# Sugerencia: "se supone -and si no se da ningún operador" +# o mejor "si no se da ninguno". sv +# +# Lo dejo así. ipg +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"la ruta de acceso por defecto es el directorio actual; la expresión por\n" +"defecto es -print\n" +"la expresión puede ser:\n" +"operadores (prioridad decreciente; se supone -and si no se dan):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" + +# sugerencia: si no se dan -> si no hay otros. sv +# +# No, aquí creo que no vale, ya que es "si no das operadores", esto +# es, si no das ninguno, no que no haya otros. Se refiere al caso +# de que no se dé un operador entre dos `sentencias' (además claro +# de que sólo se puede dar uno). +# +# Bueno, el plural ("others") del original tiene un sentido "respectivo", +# Quiere decir que si en cada sitio donde puedes poner un operador o no +# ponerlo, no pones uno que sea distinto de -and, se supone -and. +# Obviamente para poner otro que no sea -and tienes que poner alguno... +# La única diferencia, yo creo, es que según el original, si pones -and, +# no le hace caso, y toma el operador por defecto, que vuelve a ser -and +# ¡Mira que son retorcidos! :-) sv +# +# Bueno, déjalo así si quieres, pero fíjate en lo soso que queda el "dan", +# queda a mil kilómetros de la palabra "operadores" (me refiero a lo lejos +# que están el verbo y el objeto directo, me suena un poco rarillo). +# Parece que es "si no se dan de tortas". sv +# +# Sugerencia: "se supone -and si no se da ningún operador" +# o mejor "si no se da ninguno". sv +# +# Lo dejo así. ipg +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"la ruta de acceso por defecto es el directorio actual; la expresión por\n" +"defecto es -print\n" +"la expresión puede ser:\n" +"operadores (prioridad decreciente; se supone -and si no se dan):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" + +#: find/parser.c:1048 +#, fuzzy +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +"opciones de posición (siempre verdaderas): -daystart -follow\n" +"opciones normales (siempre verdaderas, se ponen después de otras " +"expresiones):\n" +" -depth --help -maxdepth NIVELES -mindepth NIVELES -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +"evaluaciones (N puede ser +N, -N o N): -amin N -anewer FICHERO -atime N\n" +" -cmin N" + +# FIXME: ¿Cómo traducir pattern? Plantilla queda de pena; he dejado EXPR-REG, +# a ver si cuela. IPG +# Consulto mi "Libro gordo de Petete metido a hacker" (uséase, mi madre) +# y dice que ella en todos los libros de UNIX ha visto que se le llama +# expresión regular, y que le parece el término más adecuado (cosa +# que a mí también). Me inclino por su experiencia (que para algo es +# una telekita que lleva desarrollando en UN*X desde que lo inventaron) +# y usaré esta traducción, hasta que salga una que parezca mejor. IPG +# +# También me han sugerido `patrón', pero prefiero EXPR-REG. IPG +# +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer FICHERO -ctime N -empty -false -fstype TIPO -gid N\n" +" -group NOMBRE -ilname EXPR-REG -iname EXPR-REG -inum N\n" +" -iwholename EXPR-REG -iregex EXPR-REG -links N -lname EXPR-REG\n" +" -mmin N -mtime N -name EXPR-REG -newer FICHERO" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path EXPR-REG -perm [+-]MODO -regex EXPR-REG\n" +" -wholename EXPR-REG -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NOMBRE -xtype [bcdpfls]" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Informe sobre bichos (y siga el progreso de su corrección) a través de la\n" +"página de comunicación de bichos en http://savannah.gnu.org/ o bien, si no\n" +"tiene acceso a web, enviando un mensaje a ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" +"la comprobación de adecuación de la función de biblioteca fnmatch() falló." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"atención: el predicado -ipath está obsoleto; por favor use -iwholename en\n" +"su lugar" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "modo inválido `%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +# Nota: No es que no se haya dado el argumento requerido a la opción -size, +# sino que se ha dado un argumento nulo, que es distinto. +# Para ver la sutil diferencia, poner LANG=C y comparar esto: +# +# find . -size +# +# con esto otro: +# +# find . -size "" +# +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "argumento nulo inválido para la opción -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "tipo dado a -size inválido `%c'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "argumento `%s' inválido para la opción `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "argumento %s inválido para %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versión %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils versión %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "atención: secuencia de escape `\\%c' no reconocida" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "atención: directiva de formato `%%%c' no reconocida" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "el entorno es demasiado grande para exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +#, fuzzy +msgid "Failed to change directory" +msgstr "no se puede volver al directorio de partida" + +# FIXME: ¿¿¿??? ¡¡¿¿Y cómo leches traduzco yo esto??!! IPG +# Después de que me hayan llamado de todo por intentar traducir +# una llamada al sistema ;) sigo pensando que este mensaje es +# más claro e informativo que el original (de hecho, es un +# pelín más largo y no exige saber tanto UNIX ...) IPG +# +# Esto me parece muy muy muy largo. +# Sugerencia: "No se puede ejecutar fork". sv +# E insisto: Si no eres experto en programación Unix lo mismo te da +# "duplicar un proceso" que "fork". +# De hecho, yo todavía no sé lo que es (ninguna de las dos cosas). sv +# +# ¡¡Otia!! Eso es grave ... fork() es la llamada al sistema que se usa +# para duplicar un programa en dos idénticos, pero con distinto PID. +# Una vez que vuelve, en el padre devuelve el PID del hijo, y en el +# hijo, cero. El hijo entonces lo detecta y una de dos, o sigue, o +# ejecuta otro programa con exec() (que solapa todo el espacio del +# proceso con el del nuevo programa). Prefiero dejar la explicación +# larga, en beneficio de gente como tú :) ipg +# +# Vale, pues ahora te digo: +# +# 1. Nada de lo anterior es evidente con la simple vista de +# la frase "se duplica el proceso". +# 2. Ahora que ya me lo has explicado, lo mismo me da que me pongas +# exclusivamente lo de fork() a que me pongas la larga parrafada que +# tienes en este momento. sv +# +# ¿Ves por qué no me acaba de gustar? sv +# +# Nota: Jim Meyering tenía en fileutils un mensaje parecido a este, que al +# final conseguimos (Ulises y yo) que lo cambiara por +# msgid "fork system call failed" +# que yo traduje así: +# msgstr "falló la llamada al sistema `fork'" +# ¿Qué te parece? +# +# Al fin y al cabo es la coletilla que tengo yo al final de mi +# comentario, ¿no? Me parece lo mismo, má o meno, pero por no meternos +# en darle caña y acabar ya esto de una vez :) ... +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "falló la llamada al sistema `fork()'" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "error esperando al proceso %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminado por la señal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "expresión inválida" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "predicado extra inesperado" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "expresión inválida" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "expresión inválida" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +# Creo que la traducción ideal de oops sería ¡huy! sv +# Y si no: ¿A algún español le has visto que diga "oops"? +# +# Si :) Todas las mañanas en el espejo. De todas maneras, +# `¡huy!' creo que no expresa exactamente el `indicar que +# parece que hay un problema' ... yo creo que quedaría +# mejor `oh, oh' (Rainman ... :). ipg +# +# Pero si después del huy te dicen que la expresión no es válida, está +# claro que había un problema... +# Ya, pero puestos, casi podríamos buscar una expresión común para +# los `oops' +# Pon `oh, oh', si crees que es lo apropiado. +# Lo decía más que nada por no dejarlo en inglés siendo el español +# tan rico y variado para las interjecciones. +# (Y me consta que tú sabes bastante de esto :-) +# ¡¡Carajo!! ¿yo?. Voy a dejar `oh, oh', y si a la gente le gusta +# (a mí me parece coñero), lo dejamos, y si no, ponemos `huy'. ipg +# Vale. sv +# +# Aquí también tengo pensado hacer publicidad ;-) sv +# +# Aparte de lo anterior. Si vas a dejar "oh, oh", ¿no sería mejor +# ponerlo sin tantas exclamaciones? (no me pegan) +# +# Ok. ipg +# +# Pero yo decía al revés... (como en el original). +# Lo cambio. sv +# E incluso si te parece, no ponemos ninguna exclamación en ninguno +# de los dos sitios. +# (Donde menos me pegan es en el "oh, oh", parece cosa de Papá Noel...). sv +# +# Será por las fechas ... ;) ok, claudico. ipg +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oh, oh -- ¡tipo de expresión inválido!" + +# Creo que la traducción ideal de oops sería ¡huy! sv +# Y si no: ¿A algún español le has visto que diga "oops"? +# +# Si :) Todas las mañanas en el espejo. De todas maneras, +# `¡huy!' creo que no expresa exactamente el `indicar que +# parece que hay un problema' ... yo creo que quedaría +# mejor `oh, oh' (Rainman ... :). ipg +# +# Pero si después del huy te dicen que la expresión no es válida, está +# claro que había un problema... +# Ya, pero puestos, casi podríamos buscar una expresión común para +# los `oops' +# Pon `oh, oh', si crees que es lo apropiado. +# Lo decía más que nada por no dejarlo en inglés siendo el español +# tan rico y variado para las interjecciones. +# (Y me consta que tú sabes bastante de esto :-) +# ¡¡Carajo!! ¿yo?. Voy a dejar `oh, oh', y si a la gente le gusta +# (a mí me parece coñero), lo dejamos, y si no, ponemos `huy'. ipg +# Vale. sv +# +# Aquí también tengo pensado hacer publicidad ;-) sv +# +# Aparte de lo anterior. Si vas a dejar "oh, oh", ¿no sería mejor +# ponerlo sin tantas exclamaciones? (no me pegan) +# +# Ok. ipg +# +# Pero yo decía al revés... (como en el original). +# Lo cambio. sv +# E incluso si te parece, no ponemos ninguna exclamación en ninguno +# de los dos sitios. +# (Donde menos me pegan es en el "oh, oh", parece cosa de Papá Noel...). sv +# +# Será por las fechas ... ;) ok, claudico. ipg +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oh, oh -- ¡tipo de expresión inválido!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "Las rutas-de-acceso deben preceder la expresión" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "predicado inválido `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "predicado inválido `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "argumento `%s' inválido para la opción `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "falta el argumento de `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "expresión inválida" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "predicado extra inesperado" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "predicado extra inesperado" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oh, oh -- ¡inserción por defecto de `and' inválida!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Modo de empleo: %s [--version | --help]\n" +"o bien %s bigramas_más_comunes < lista-de-ficheros > base-de-datos-de-" +"locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Comunicar bichos a .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils versión %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "días" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "argumento `%s' inválido para la opción `%s'" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"atención: la ruta de acceso de la base de datos de locate `%s' comienza\n" +"por dos puntos, no es un nombre válido de base de datos" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "la base de datos de locate `%s' está corrupta o es inválida" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "la base de datos de locate `%s' está corrupta o es inválida" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Modo de empleo: %s [-d ruta-de-acceso | --database=ruta-de-acceso]\n" +" [-e | --existing] [-i | --ignore-case] [--wholepath] [--basename]\n" +" [--limit=N | -l N] [--version] [--help] expr-reg...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versión %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argumento para --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "atención: la base de datos `%s' tiene una antigüedad de más de %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "el entorno es demasiado grande para exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versión %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Las variables de entorno ocupan %ld bytes\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" +"Límites POSIX inferior y superior sobre la longitud del argumento: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" +"Límites POSIX inferior y superior sobre la longitud del argumento: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Máxima longitud de orden que se podría usar realmente: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Tamaño del búfer de órdenes que se está usando realmente: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"comilla %s desemparejada; por omisión las comillas son especiales para " +"xargs\n" +"a menos que utilice la opción -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "doble" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "simple" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "línea de argumentos demasiado larga" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "error esperando al proceso hijo" + +# Pregunta (no es por crear polémica): ¿"status" o "estado"? sv +# +# "Estado", aunque también existe "status". ¿Dejamos "status"? ipg +# +# No sé, si se refiere a lo que en MS-DOG se llama ERRORLEVEL, +# y al resultado numérico que devuelve el main() del proceso, la +# pregunta sería: ¿cómo se le llama a eso en español? sv +# +# Creo que podríamos dejar `status', ya que existe en castellano, +# (Nota: Ver http://www.anaya.es/dict por ejemplo). +# y expresa un estado de actividad, siendo más preciso que `estado' +# (¡ahora, que el/la que lo confunda con el Estado Español, es pa +# matal-le! :). ipg +# +# Me quedo con la duda de cómo se llama eso en español. +# Esperemos que lo vea otro. sv +# +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: acabó con status 255; abortando" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: interrumpido por la señal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: terminado por la señal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: número inválido para la opción -%c\n" + +# Me he tomado la libertad de poner mayor o igual que en lugar de >= ... +# queda mucho mejor. Si a alguien no le gusta, que me lo diga ;). IPG +# Me parece acertado y lo digo :-) sv +# falen ... :) ... ipg +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: el valor para la opción -%c debería ser mayor o igual que %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: el valor para la opción -%c debería ser menor que %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Modo de empleo: %s [-0prtx] [-e[cadena-eof]] [-i[cadena-de-reemplazo]]\n" +" [-l[máx-líneas]] [-n máx-argumentos] [-s máx-caracteres]\n" +" [-P máx-procesos] [--null] [--eof[=cadena-eof]]\n" +" [--replace[=cadena-de-reemplazo]] [--max-lines[=máx-líneas]]\n" +" [--interactive] [--max-chars=máx-caracteres] [--verbose] [--exit]\n" +" [--max-procs=máx-procesos] [--max-args=máx-argumentos]\n" +" [--no-run-if-empty] [--version] [--help]\n" +" [orden [argumentos-iniciales]]\n" + +# Creo que la traducción ideal de oops sería ¡huy! sv +# Y si no: ¿A algún español le has visto que diga "oops"? +# +# Si :) Todas las mañanas en el espejo. De todas maneras, +# `¡huy!' creo que no expresa exactamente el `indicar que +# parece que hay un problema' ... yo creo que quedaría +# mejor `oh, oh' (Rainman ... :). ipg +# +# Pero si después del huy te dicen que la expresión no es válida, está +# claro que había un problema... +# Ya, pero puestos, casi podríamos buscar una expresión común para +# los `oops' +# Pon `oh, oh', si crees que es lo apropiado. +# Lo decía más que nada por no dejarlo en inglés siendo el español +# tan rico y variado para las interjecciones. +# (Y me consta que tú sabes bastante de esto :-) +# ¡¡Carajo!! ¿yo?. Voy a dejar `oh, oh', y si a la gente le gusta +# (a mí me parece coñero), lo dejamos, y si no, ponemos `huy'. ipg +# Vale. sv +# +# Aquí también tengo pensado hacer publicidad ;-) sv +# +# Aparte de lo anterior. Si vas a dejar "oh, oh", ¿no sería mejor +# ponerlo sin tantas exclamaciones? (no me pegan) +# +# Ok. ipg +# +# Pero yo decía al revés... (como en el original). +# Lo cambio. sv +# E incluso si te parece, no ponemos ninguna exclamación en ninguno +# de los dos sitios. +# (Donde menos me pegan es en el "oh, oh", parece cosa de Papá Noel...). sv +# +# Será por las fechas ... ;) ok, claudico. ipg +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oh, oh -- ¡tipo de expresión inválido!" + +# Creo que la traducción ideal de oops sería ¡huy! sv +# Y si no: ¿A algún español le has visto que diga "oops"? +# +# Si :) Todas las mañanas en el espejo. De todas maneras, +# `¡huy!' creo que no expresa exactamente el `indicar que +# parece que hay un problema' ... yo creo que quedaría +# mejor `oh, oh' (Rainman ... :). ipg +# +# Pero si después del huy te dicen que la expresión no es válida, está +# claro que había un problema... +# Ya, pero puestos, casi podríamos buscar una expresión común para +# los `oops' +# Pon `oh, oh', si crees que es lo apropiado. +# Lo decía más que nada por no dejarlo en inglés siendo el español +# tan rico y variado para las interjecciones. +# (Y me consta que tú sabes bastante de esto :-) +# ¡¡Carajo!! ¿yo?. Voy a dejar `oh, oh', y si a la gente le gusta +# (a mí me parece coñero), lo dejamos, y si no, ponemos `huy'. ipg +# Vale. sv +# +# Aquí también tengo pensado hacer publicidad ;-) sv +# +# Aparte de lo anterior. Si vas a dejar "oh, oh", ¿no sería mejor +# ponerlo sin tantas exclamaciones? (no me pegan) +# +# Ok. ipg +# +# Pero yo decía al revés... (como en el original). +# Lo cambio. sv +# E incluso si te parece, no ponemos ninguna exclamación en ninguno +# de los dos sitios. +# (Donde menos me pegan es en el "oh, oh", parece cosa de Papá Noel...). sv +# +# Será por las fechas ... ;) ok, claudico. ipg +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oh, oh -- ¡tipo de expresión inválido!" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "Se reduce arg_max (%ld) a arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Éxito" + +#~ msgid "No match" +#~ msgstr "No hay ninguna coincidencia" + +#~ msgid "Invalid regular expression" +#~ msgstr "Expresión regular inválida" + +#~ msgid "Invalid collation character" +#~ msgstr "Carácter de secuencia inválido" + +#~ msgid "Invalid character class name" +#~ msgstr "Nombre de clase de caracteres inválido" + +#~ msgid "Trailing backslash" +#~ msgstr "Barra invertida final" + +#~ msgid "Invalid back reference" +#~ msgstr "Referencia hacia atrás inválida" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ o [^ desemparejado" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( o \\( desemparejado" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ desemparejada" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Contenido de \\{\\} inválido" + +#~ msgid "Invalid range end" +#~ msgstr "Final de rango inválido" + +#~ msgid "Memory exhausted" +#~ msgstr "Memoria agotada" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Expresión regular precedente inválida" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Fin prematuro de la expresión regular" + +#~ msgid "Regular expression too big" +#~ msgstr "Expresión regular demasiado grande" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") o \\) desemparejado" + +#~ msgid "No previous regular expression" +#~ msgstr "No hay ninguna expresión regular anterior" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "acciones: -exec ORDEN ; -fprint FICHERO -fprint0 FICHERO\n" +#~ " -fprintf FICHERO FORMATO -fls FICHERO -ok ORDEN ;\n" +#~ " -print -print0 -printf FORMATO -prune -ls -delete -quit\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Lista Predicado:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Árbol de Evaluación:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Árbol de Evaluación Optimizado:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Árbol de Evaluación Optimizado:\n" + +# Propongo eliminar la palabra virtual. En un sistema GNU, la memoria virtual +# y la otra son la misma cosa, desde el punto de vista de las aplicaciones +# no se distinguen una de otra. Quedaría más corto, más sencillo y más bonito. +# Y además Javier Romañach (hello) está de acuerdo conmigo. sv +# Y a mí me apoya Richard Stallman };) (qui malo soy :) +# Fuera coñas ... sí, estoy de acuerdo ipg +# +# En cualquier caso, me gustaría saber por qué en GNU se empeñan en poner +# siempre "virtual". Parece como si hacerlo así estuviera el mensaje +# más orientado al usuario final [ quitando el virtual el mensaje estaría +# escrito desde el punto de vista de la aplicación (para la cual, todos +# los malloc()'s son iguales ante la ley...) ] +# +# No estoy completamente convencido de qué deberíamos hacer. +# De hecho, esto contradice mis principios (la fidelidad ante todo). +# (Creo que tendré que revisar mis principios...). sv +# +# Sí ... a fondo :) ipg +# +# FIXME: Preguntar a Richard Stallman por qué se empeña en usar la +# palabra virtual. sv +#~ msgid "virtual memory exhausted" +#~ msgstr "memoria agotada" + +#~ msgid "inserting %s\n" +#~ msgstr "insertando %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tipo: %s %s " + +#~ msgid "left:\n" +#~ msgstr "izquierda:\n" + +#~ msgid "right:\n" +#~ msgstr "derecha:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Árbol de Evaluación Normalizado:\n" + +#~ msgid "error in %s: %s" +#~ msgstr "error en %s: %s" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "atención: la ruta de acceso de la base de datos de locate `%s'\n" +#~ "contiene dos puntos al final, no es un nombre válido de base de datos" + +#~ msgid "command too long" +#~ msgstr "orden demasiado larga" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "Un argumento no cabe dentro del tamaño límite de la lista de argumentos" + +#~ msgid "argument list too long" +#~ msgstr "lista de argumentos demasiado larga" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s cambió durante la ejecución de %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. cambió durante la ejecución de %s" + +#~ msgid "unmatched %s quote" +#~ msgstr "comilla %s desemparejada" + +#~ msgid "cannot open current directory" +#~ msgstr "no se puede abrir el directorio actual" + +#~ msgid "wait got pid %d, expected pid %d" +#~ msgstr "wait obtuvo el pid %d, y se esperaba un pid %d" + +#~ msgid "%s stopped by signal %d" +#~ msgstr "%s interrumpido por la señal %d" diff --git a/po/et.gmo b/po/et.gmo new file mode 100644 index 0000000000000000000000000000000000000000..37c0c4e3fdbb7d26e737278070214952546b83fd GIT binary patch literal 16776 zcmcJWd5j!cea8!SSzuU}1vX)q4cTX4m>KM9kIkMlyT-;I?+%_T_Sn0N*VxtFue)oy zx~jL1o*52_z#lYcy$d%v^%-Iv__VUKH_`{%g7ag*o$F8IFZ@`vlrG0)ov-UYr6 zoCRMACg2qKLGaz+=fQsj=U(7>F9+4Fo|l2M;M3qAfv*Ply^y}Zlc4l-$vwXdJiznE zz*m4@0>{DcyYky^^E{vDSx|u?_!{s%;GN*7!MnjPf%kylb9l>(>^xrszLxS8@LAwn z!P~*NgR;I~0TuWu@Fn2a!8^b$Q0Ds+@Mpo7(&%Tv*MhGCkAe?_O|TCBw!@oW?0F5I z+u%FEFN3nK1v;1ct%3J}?*ShGzW}zuAA|RTmtN|5p8-D%9tIbg%!4c`s(uSHM?;_k#r(gMSDLf8NdD@_r8d zdGI5k%=b@0q1#tLsdpJf->&!F?m_n zx4|jO{~46|-b!Uz*90g>>QV4;3fL~D#$_s8Hbf<6d8)8H!jE{ET8=+`_?Q~pj6*6_X$3jLmQ(4LzK@Ho%sL7~%c zfkN-w==5{oy`c2}Z~UQ4?;aNO2)GFT75H9I&h;{XBJiD{%-z^#fj%8$dK@XMp1@Z%;Z zeDxdPH^Dy#Wj-IAK|Vo{KLZ)c`%9SX`QT4LIkz`4DdAI}%~Iez_&jh8d>qWcMe2PS zlzHCude1upJ_Mcwe;Hf?zX9F@zUru5-*J#BdolQV@Dt!m!R9eb#|`jVJfG&4Yn8jl z{R`Y857=(g{>5OEJLFc}GS*Yvu(#naS)=fqTq$>rn=Ln&&_`&>k*cl*enA>@!Fpy- z*FeZ)dLj3m`NjS_eA?k1pzwiQ!e@_iLpq~70dol-jd9DqESnPa0(dL;MfZFb zl=Jgk?%TOfa3AL$z23-!@ctsV@Tgql7R+DS@7Hh(zsQwasQ&idFX2bIR=8ireHZtA z+!?ps!F>yNdCl{q!TlKbKJGfV zTyk#93-+uoSl`Hi^RDCp!LjF$XR49Jc@V}b*6UFiYt`rkY0$`ZnjKKo2;!z1sWp77 z*2BD`@{U%Wu-#GhFjtw*Yh$!YT57!$HaepXDadu!4;os!J+1pmnyY%z&QzYLhxy^R z!nj%FVU!(h$3-nk+ef6crfvmAl&gNgXd$&3uu-I`j&s!vQ{BjubaPgf)$~R`)mauM zu~hc^X&C2YBZa+SQ&yaXS+0`Sj7s`C4d{Z!CjFdd{9v9rAS;IuQZ_T@DRcR8Qe-++ zU^`8UJ|oDyR*tQ%&YfQ3NvAz^e!qWVarwlY@>AW`8|B+E*F~y>W>Al`^4HTax4-m; zZWQKsS!=zML^=+7x@@leEPRVrOXus2_3q-M7nGl;1)b!ZeXS^L_FGYQg5n}09^1=y_rf^Hsa)SwS=f$)NR2mnC41iq;x=!Z1=MUSJ6EAF z`^@XfB;uVOgbl6YqE~02@u+z~7;3NLRv77QGs|^PnTfDXFm-VplnCLRP4 zgm(mJCGg02!&Tf~Wp`s&a%sFVo=vD`qO*7+S3wjd>u{k8(st2<-)%QlWvW8EpjQvu z1zfrNZK|IxI3d)zS|7gu3^oD94dBj$o@Mx2%TCFB^l zCj!oSkZCD^I!Im-X*@7&FAxDb*X!q-)vk+tlp6jCx1ySNQp2CJu?PqRNpnVdk1m~6 zB0$vu!7XQV9EK=5Fwf56Ao*n8dWp*!9y#m=DCpkyD zp_%A-l>Gk>vGG$5k*7h3`fU%FBVy4k!?83pAC7TNg3^#<0?P~uZfF7rYjigB4-oNj z8x>TkbA`Y{Ozhk~B%zUhRxUm@oPbE7UYMB;RFNKN)J5hkSe9y*EG`;rM%Gc^M5&H> zi@`?ND|$4D+o(jCxzC(WE8qcG$MY$_yZ zqZ@4=utq}@+7&`NB}dC1pqjT5X*ti9sX4gNy%F|M6HXa~y`FA{oHdpaw1oftWzSha zld^a=ztL6w6q^Fug{3l$4Mv%=2GSr5%yw1=k`!ZG$jYfT)(_fR1-a_vd4J~M!7LaA zaU67N&Wt+9-X2h)U1uj4pfVHaUB|d-Fx&y7@pasku5=GJyp~1goe?8sWaH{ZtHp}g zzaZrv?jGIA{uN{1sz|TpQXZGAI7*dPBD#)U#P}GJ57Q0%DYfm9!t1`+s%aAW!nV-K z7;GvJx*8oRL=o|%8soKQ(*Y;^!Jo0)wgM>X%rG|Vgmn4^(%;CNT(ymZ+m z_(z7PWM%ox{1XdLUOc{h`t;oK)jcWfosGM3vK}jEGwL)=QtxaA&l|~d-uFwD_crW@ zj*j{l#vp-QP`sC9`9%>jNqiAQDGhoVYFrMuABhie#GPWllv!ij`hM(!I`1#YpB4GD zY$TohI-$IC#^5X2jm=HG9u}jfe7F}=${U_3uYu5q9q6N5{%-4hw>|lK!d8kDQ>e`+iYGc^<5fm}vFVjY5m}bV;6KPORd^ojPHv_0y+9!4bZdh>@ z%TZA%I_(7g%-A%sSifcm&#V6M5hsieC+|i?Z6`#> zr;X00XDT9iuU`{0)|hk^uas<(BoGoGza&x_W5Nv8SY9>&g8jD7+gWqCdp5=~Io_PQ zZY?U5!6-F}2}zvD%nJ%MbW^-3B$JqnBCmV>C~OdNvmA&)2Z8bYAf#69aG>L<87HMC z)!Y*+r_~htaG(9DBz%>Zzvb;AIyTRTsZ|y*lKedE`f|)wz%}zk1vq!i ztzkqMi1POONrqfWB-mt)Iig8Hw2pwngemmY42ppVaYB&b#z=HQHIV{iWB8?FXYbYa zKuwe@p=FZJ6oS^_~&D5w0M0*PvF}hl%I;ad0 zpXLMQ6GemBFG{=*@qZB`AGH%FdlZj(SrCi9ZFDp?6852(N3EE6K%+A`g(9fK)|;wT z#3mrATA1k~F032pnTVyDTv8|jR;%_ei52LZze_^JfE6ghfB``{4vtZyKK3c$MM@jy zZMlrbXdQ;Lb*$|2TS0`);I}d(hF70lnNxmS0*-(Qh)RsH>?w@42QU#2qw&lT|415! zd&D}4TkR1#MIm-GX|ki^o?Bk8obC33h70mg{iSZw8{5R_S%>?wskFpQ zBnl*|#cVB_$S|LwBqGk3ht~F{S7Uf0Qn526*d$y!;aA&-h9z{4X^RkIeXSxQs-7yO zn$bxUe#U}CT2Ii`u?T-md?aEA_}9)q75O#vuItG#Y^$z_po;3U7Qc!bB4au6NM4DF&#Jz4@nw7` zD-Oka-EgU}NX^TQerWev19F$VJMj z#l~Qkm6}1=N|<3p;Y`v~<(^8$XSc#YzhVHcYcWvd7$t1~a5i@QFqhM|BLq|qyG`+w z_C-dB*BC_s#(A%RXM}#kkQnna;WDqHz&1l{B~8{auKoF@f6m5wXUt)=LEd|7ud5w$ z={0{bLp1wuAj#&hCNm~#RK<|WB-_}^@~VFvRuet!pMc$G)Zyvr2mI;#{pp9)p$BK~ zeQ5vmq3LNV`lreANOXBv?|%Q#A^xdDhiC3RynmXOV+%o+`>QFEhovRyj9N{S9`ri{ z5JR_5HS=_|7dD9Ja1?7=AE9O3E^zGqRUPzZ)Eqg0n6slE*7?yWG%3Nc#reg#;ldBq zrpJyG6vCkPS1}1BJ+P4<>_=oYZD^RBQ z=##{h{3Sa;f-s0k)5#$m1RYI2h`qle!b69gdTOl&!i-hLk(WKm6PY+(_cClA_9Qzh zRytw(rpb`n8u_*k@+%$P3%gyDAUzkhgQf^mgiLPYdqLAAHlu4LO9w&Nm9T6`Gx0;z zT9R}#Y>_UVL`l+~C300(VO>#^<484^CoM|`m&3a1CP^0SX5ez9vX!#%!R4H2Cea=y zhu((>5~LeIp62zkq>E?IkR@fXVUl$DM42SDFH6foM4!!!-dK*b?Ak<^eySAd{NnuH zDN;yCoRQ36$exoQCHm8b1Dc-6k@kv0Qid=@{-YnMU=6K5Nf?%>BrAdKM-!t37569> zn=Z_*pjKc5m0!8im#s0m(LsnPLQ1;i=v4;`{cf19?H+Bf@*5m(Mn#wVI_Lbt`Q3sg zo3v<2jhN+ArKks}gF?6?6ql(?iw>X>!4|iA!#k4r-tl@@E9u4N?Z{Y|-YX9=bon=1 z1%n0}Wh7-|z4JwUx#0YkQg>TBoA?Ml*6uEsyQ_ zHZS7lkjj=mcF{ZDjAk_DxSCY-U~4NC7G?Ol>}4-dgRKzh&{N$aw3!y!OS4H=YmpU1 zxO>zIxzi?FTeaOI)p?Bh>Use0a4xz*CSN$n&jH2*61R|K=Q){RB-zb=Q8bI;hSj_U zxJu}R_GlXUvMbGL&d1()&XHHn#)HTY17euXHh=~Hr=&u|tu z&?#BWXWXe34+Bh9s{v68Y%%mK35c62+6-PnSMEtR8t?%|Ny`xig=f?iJU-jAp@16% zIrJ1?NVJ0io{yn(HHsKtJ=sIEXGktF8q3rq@e|9EA)&2KZc+$!32u_6LXSmZS3Wkf zyqcpARd*|sSbH}!iOW9v*=#ZmB{jJsLA7o`;)Mxq%RUMPL@Wve+wNcmtP<(|N(YaN z$Z$U(jZ~&7cg&bzy7UlA$Ht1NsZ$)&EJ+3=vM?7z`ZHkwctq-i@~KB29&n?P*BRz0 z#o?3OM=vB>iN_aHJze8CQp=t9Wwo}IauBVkHaoV>{+NWz=_My>iFuI)oaD8w2>UXa z8ZkcyI#6j~5|d1kWX#xAlahlU8rhL+5{~ZZuOVIVy0*6D`vYCaQ6!2JV3KAwF&Qc- zeH|<48r#?}I)jwCGfK6Gq$iC8k_4qCzzF*ZEmBF#OLEhGgCn)kaC>AU2gre;^a|B5 z;V1{!WgJiGtlLe<&KeaCNmnGZ$hok_rZLwB_*JF7#&*KR!U@*jcBYn`ux^raVifX~ zZ$U8Sn58%(W_Ph5q(gRhrvYdObfaTlP7bR|8d0WdP8G*leh&{f<{(*!usP+~RH4M8 zx;f4Og{X8qTw!#(JVbWMx#e zVcM{gCu7?O*qJyKG34@wrCM_=C7FXHp79<__(Y&U5RMvVG8<^QCZDu)f}kBj<=XYD zMu@g>q=8{^>~triBpC(o*-W5VSeOHqu&P9biV>rw-bUEG_3g-(!kDxoHECur4;j#IJc~uo(B}Yi5vWYrr9;zIndAeGT@YEO2oLV@0rpghP&t;lVl?A(Ugw+eH zCS(iBqO$R589730)mD;6Sb>6P7b$m?$rEA%kXB2iSZp^*d6Kni$r3JpIeM7wlmpMxmq4b@7Lsb>oGx|ExWt~#AR|IzU zTUCBZ;-(`laZN}fmbI)Gz2gycMk9a;&pV1bvxPY9)C8XvLkY>*S-n@=(Rh|=cQ75% zRD6X(%xZW#cUOHTGg_h)-XH1!-cDod~SBA@wK4}94^pM757FD z6MoxC<+yTtPH?X(E+J?mFKV(I@EtaX5OQIs%E9G)tZ8EhWV6PY>dCj?!Y{<#i5E*c zQCgd{VU_HfRL9O8TR1^RaG(2S(t);+xV*eH2|@EqGJ;hRn$H%xI8FH?am6Eb8Fgp- z17%|bJJDQDt>^@1D_npqs*boQX`35#_5~tA>=B7PNrF(sL4KJ8dh>c2LNVc?)m2)T zwlZI^;3QyApyx|5!?%+9`U%3-V`t_@(u3~t|2jE1Vrq>f1!dzkCYVGfVMh5d&X|Lx zSg&~m6sd%l4#7>dZgOcvag!tzn};l+!2dc;X!PZE(uCjn&dSa-A#t`c*yqxOWem?| z35QR+l7!VOn@)Q^v=U4)ww{sst|o#M)+g}5SEHS6Mxq#KO(p3< zd<0~u^CS2o%W}Q(WTR#`4Z}W6GD-Js6B?G-lW{pXfTSqyNpptYEDv!lH6Optm7>L`=%wLXj_s{*ewg0@<>7u z^&y$Vt+bor%VMgFC*B)P6NUpA!;%P9<7i`@T$?7OTXr5}0uNcV+V%5<6*Zw9vJ~0~ zMG3YxAp#<(dN1@h$wB@jg>Dz literal 0 HcmV?d00001 diff --git a/po/et.po b/po/et.po new file mode 100644 index 0000000..d02bfec --- /dev/null +++ b/po/et.po @@ -0,0 +1,1117 @@ +# Estonian translations for findutils +# Copyright (C) 2000 Free Software Foundation, Inc. +# Toomas Soome , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.1\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-11-11 12:42+0200\n" +"Last-Translator: Toomas Soome \n" +"Language-Team: Estonian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "vigane argument %s (%s)" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "segane argument %s (%s)" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Lubatud argumendid on:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Tundmatu süsteemi viga" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: võti `%s' on segane\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: võti `--%s' ei luba argumenti\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: võti `%c%s' ei luba argumenti\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: võti `%s' nõuab argumenti\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: tundmatu võti `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: tundmatu võti `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: lubamatu võti -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: vigane võti -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: võti nõuab argumenti -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: võti `-W %s' on segane\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: võti `-W %s' ei luba argumenti\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "bloki suurus" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[jJ]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[eE]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Kasuta: %s [-H] [-L] [-P] [-Otase] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [tee...] [avaldis]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Ignoreerin tundmatut silumise võtit %s" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "Võtmel -D puudub argument." + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "Võtme -O järel peab olema numbriline argument" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "Palun kirjutage võtme -O järel number" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "Vigane optimeerimise tase %s" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"Optimiseerimise tase %lu on liiga kõrge. Kui soovite leida faile väga " +"kiiresti, kasutage GNU locate programmi." + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Keskkonnamuutujat FIND_BLOCK_SIZE ei toetata, bloki suurust mõjutab ainult " +"keskkonna muutuja POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "ei õnnestu leida jooksvat kataloogi" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "ei õnnestu leida jooksvat kataloogi" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Hoiatus: failisüsteem %s on just lahti haagitud." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Hoiatus: failisüsteem %s on just haagitud." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s muutus %s töö ajal (vana seadme number %ld, uus seadme number %ld, " +"failisüsteemi tüüp on %s) [viit %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s muutus %s töö ajal (vana i-kirje number %ld, uus i-kirje number %ld, " +"failisüsteemi tüüp on %s) [viit %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Nimeviide `%s' on osa tsüklist kataloogipuus; me oleme juba külastanad " +"kataloogi, millele see viitab." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Failisüsteemis on tuvastatud tsükkel; `%s' omab sama seadme ja i-kirje " +"numbreid kui kataloog %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "samm kõrgemal failisüsteemi puus" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "sammu kõrgemal failisüsteemi puus" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "hoiatus: ei järgi nimeviidet %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"HOIATUS: %s viidete arv on vale: see võib olla viga teie failisüsteemi " +"draiveris. Kasutan automaatselt find'i -noleaf võtit. Varasemad tulemused " +"ei pruugi sisaldada kõiki katalooge." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "tundmatu" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"hoiatus: te olete kasutanud võtit %s peale mitte-võtit %s, aga võtmed ei ole " +"positsioonilised (%s mõjutab eelnevalt ja järgnevalt määratud teste). Palun " +"andke võtmed enne muid argumente.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"hoiatus: võti -d on aegunud; kasutage palun võtit -depth, viimane on POSIX-" +"ühilduv." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"vaikimisi tee on jooksev kataloog; vaikimisi avaldis on -print\n" +"avaldis võib koosneda: operaatorid, võtmed, testid ja tegevused:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operaatorid (kahanevas eelistusjärjekorras; kui muid pole, on operaator -" +"and):\n" +" ( AVALD ) ! AVALD -not AVALD AVALD1 -a AVALD2 AVALD1 -and AVALD2\n" +" AVALD1 -o AVALD2 AVALD1 -or AVALD2 AVALD1 , AVALD2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"positsioonilised võtmed (alati tõesed): -daystart -follow -regextype\n" +"tavalised võtmed (alati tõesed, kasutatakse muude avaldiste ees):\n" +" -depth --help -maxdepth TASE -mindepth TASE -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"testid (N võib olla +N või -N või N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FAIL -ctime N -empty -false -fstype TÜÜP -gid N -group NIMI\n" +" -ilname MUSTER -iname MUSTER -inum N -iwholename MUSTER -iregex " +"MUSTER\n" +" -links N -lname MUSTER -mmin N -mtime N -name MUSTER -newer FAIL" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path MUSTER -perm [+-]MOOD -regex MUSTER\n" +" -readable -writable -executable\n" +" -wholename MUSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NIMI -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"tegevused: -delete -print0 -printf VORMING -fprintf FAILI VORMING -print \n" +" -fprint0 FAIL -fprint FAIL -ls -fls FAIL -prune -quit\n" +" -exec KÄSKLUS ; -exec KÄSKLUS {} + -ok KÄSKLUS ;\n" +" -execdir KÄSKLUS ; -execdir KÄSKLUS {} + -okdir KÄSKLUS ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Vigadest teatage (ja protsessi saab jälgida) findutils vea raporti lehel\n" +"http://savannah.gnu.org/ vï kui teil puudub juurdepääs veebile, saates\n" +"emaili aadressil ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "funktsiooni fnmatch() korrektsuse kontroll ebaõnnestus." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"hoiatus: failinimed Unixis ei sisalda tavaliselt kaldkriipse (kuigi teed " +"sisaldavad). See tähendab et '%s %s' saab ilmselt selles süsteemis kogu aeg " +"väärtuse 'false'. Tõenäoliselt on '-wholename' või siis '-samefile' test " +"märksa kasulikum. Alternatiivina, kui te kasutate GNU grep, võiks proovida " +"'find ... -print0 | grep -FzZ %s'." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"hoiatus: predikaat -ipath on aegunud; kasutage selle asemel palun -" +"iwholename." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Ei õnnestu avada sisendfaili `%s'" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "vigane mood `%s'" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"hoiatus: te määrasite moodi mustri %s, mis on sama kui 000. -perm /000 " +"tähendus muudetakse varsti, et oleks kooskõlas -perm -000; see tähendab, " +"praegu selline muster ei leia ühtegi faili, aga hakkab leidma kõiki faile. " + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "vigane tühi argument -size predikaadile" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "vigane tüüp `%c' -size predikaadile" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "vigane argument `%s' predikaadil `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "Võti -show-control-chars vajab argumenti 'literal' või 'safe'" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "vigane argument %s (%s)" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versioon %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils versioon %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Lubatud omadused: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "hoiatus: tundmatu paojada `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "hoiatus: tundmatu formaadidirektiiv `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Keskkonnamuutuja PATH sisaldab jooksvat kataloogi, mis on find tegevuse %s " +"korral ebaturvaline. Palun eemaldage jooksev kataloog PATH muutujast " +"(eemaldage \".\" või algavad või lõpetavad koolonid)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Keskkonnamuutuja PATH sisaldab jooksvat kataloogi, mis on find tegevuse %s " +"korral ebaturvaline. Palun eemaldage jooksev kataloog PATH muutujast " +"(eemaldage \".\" või algavad või lõpetavad koolonid)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Võtmetega -execdir ja -okdir ei ole lubatud programmi nimes kasutada {}, " +"kuna see võib olla turvarisk." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Predikaadiga -exec%s ... + on lubatud kasutada ainult ühte {} paari" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "exec() funktsioonile antud keskkond on liiga suur." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Ei õnnestu avada sisendfaili `%s'" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "fork ebaõnnestus" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "viga %s oodates" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s katkestati signaaliga %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "vigane avaldis" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"vigane avaldis; te olete kasutanud binaarset operaatorit '%s', aga tema ees " +"ei ole midagi." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "'%s' ja ')' vahel peab olema avaldis" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "'%s' järel oodati avaldist" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "vigane avaldis; liiga palju ')'" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"vigane avaldis; eeldasin leida sümbolit ')', aga see puudub. Võibolla tuleb " +"lisada '%s' järele predikaat" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "vigane avaldis; tühjad sulud pole lubatud." + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "vigane avaldis: eeldasin leida sümbolit ')', aga see puudub." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oops -- vigane avaldise tüüp!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oops -- vigane avaldise tüüp (%d)!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "teed peavad olema enne avaldist: %s" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "vigane predikaat `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "vigane predikaat `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "vigane argument `%s' predikaadil `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "`%s' nõuab argumenti" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "liiga palju ')'" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "ootamatu täiendav predikaat '%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "ootamatu täiendav predikaat" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oops -- vigane konjunktsioonioperaatori lisamine!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Kasuta: %s [--version | --help]\n" +"või %s enamus_bigram_koode < faili-loend > locate-andmebaas\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Vigadest teatage aadressil .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils versioon %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "päeva" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "vigane argument `%s' predikaadil `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "locate andmebaas `%s' on katki" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Locate andmebaasi maht: %s baiti\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Failinimed: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Failinimed: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "kogumahuga %s baiti" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tmillest %s sisaldab tühemikke, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s sisaldab reavahetuse sümboleid, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tja %s sisaldab sümboleid, milles on kõrgeim bitt seatud.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Tihenduse suhe %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Tihenduse suhe %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "locate andmebaas `%s' on katki" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Andmebaas %s kasutab %s vormingut.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Kasuta: %s [-d tee | --database=tee] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TÜÜP]\n" +" [--version] [--help]\n" +" muster...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versioon %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "võtme --limit argument" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "hoiatus: locate andmebaasi saab standardsisendist ainult korra lugeda." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "hoiatus: andmebaas `%s' on rohkem, kui %d %s vana" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "Sisendi eraldaja määrangus on vigane paojada %s." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Sisendi eraldaja määrangus on vigane paojada %s; sümboli väärtus ei või " +"ületada %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Sisendi eraldaja määrangus on vigane paojada %s; sümboli väärtus ei või " +"ületada %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Sisendi eraldaja määrangus on vigane paojada %s; lõpetavad sümbolid %s on " +"tundmatud." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Vigane sisendi eraldaja määrang %s: eraldaja peab olema kas üks sümbol või " +"sümboliga \\ algav paojada." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "exec funktsioonile antud keskkond on liiga suur" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "hoiatus: võtme -s väärtus %ld on liiga suur, kasutan %ld" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versioon %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Ei õnnestu avada sisendfaili `%s'" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Teie keskkonnamuutujad kasutavad %lu baiti\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "POSIX alumine ja ülemine piirang argumendi pikkusele on: %lu, %lu\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "POSIX alumine ja ülemine piirang argumendi pikkusele on: %lu, %lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Tegelikult kasutatava käsu maksimum pikkus on: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Tegelikult kasutatava käsupuhvri suurus on: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"puudub kvoot %s; vaikimisi kasutatab xargs omi kvoote, kui just pole " +"kasutatud võtit -O" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dubleeritud" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "ühekordne" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "argumendi rida on liiga pikk" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "viga alamprotsessi ootamisel" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: lõpetas olekuga 255; katkestan" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: peatatud signaaliga %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: katkestatud signaaliga %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: vigane number võtmele -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: võtme -%c väärtus peab olema suurem või võrdne kui %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: võtme -%c väärtus peab olema väiksem kui %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Kasuta: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=eraldaja]\n" +" [-E eof-sõne] [-e[eof-sõne]] [--eof[=eof-sõne]]\n" +" [-L maks-ridu] [-l[maks-ridu]] [--max-lines[=maks-ridu]]\n" +" [-I asendus-sõne] [-i[asendus-sõne]] [--replace[=asendus-sõne]]\n" +" [-n maks-argumente] [--max-args=maks-argumente]\n" +" [-s maks-sümboleid] [--max-chars=maks-sümboleid]\n" +" [-P maks-protsesse] [--max-procs=maks-protsesse]\n" +" [--null] [--eof[=eof-sõne]] [--replace[=asendus-sõne]]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fail]\n" +" [--version] [--help] [käsk [argumendid]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oops -- vigane avaldise tüüp mark_stat'is!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oops -- vigane avaldise tüüp mark_type's!" + +#~ msgid "old" +#~ msgstr "vana" diff --git a/po/fi.gmo b/po/fi.gmo new file mode 100644 index 0000000000000000000000000000000000000000..8c9c0436b03f014da9ac1f92ad35edde1d1efc64 GIT binary patch literal 3957 zcmb7`O^h5z8HOvwK(gT{fBf1&?ciA_I6awlY+_Fw$BJVk<2bRRO%Ni9Tr*ueQ`u^i{Z&wczXaF7-+^BT-vC& zya9**3Ua-t;cOf1gIw=*a1DG1q~Gs>4}l+oT;~AU<0l~Fdhm-ikAR%#C`kRR zfp>%FLFVU&AoDf=nU|k}Uj}~x(w{d$#`$NEas6Zd{omks@%`|ZYX6=B`TQElbt1_5 ze+`}le+$z70}%hk9asb@6ZeAO0}q28@DfOW5r#O1o6k5eeW4$m6H5zj6O^dB7*8_) z%v|u|zB*KWs{P|fuFH%0dlWb8$e16&&D`;#b`~%C%!^uJT-4g)bsxS^@6;sy=fyg) z2COq{%!{>>xR2vr#Z7H6erf|!s4j#qK7*U}Xs))GL6>7=RnV#IPo+0Qt8&>+McenJ z-Z32CHen=vP$7DG;?$`pr0Tme7(1+tOrGl@-f=}R&dMZ_?ZHa@#7b< zN}03=bHn{62Vb6#TyGEB{+LXi_V!qiD$m`vR932T7{}U%dYZ-er$vHEeD*N0Qveg2|8M?OWf{!)4AbCe#O46w3+lCy|Ub~+v6oP0`(A3XP>+%z_o6J2^1yp1e#Fn0r}=)mv}D&_Z$zGyS+wypG2 zAM{x2vUH_*sZz>rRZ*T&_r$9|vCqANztbPTBCdF+XfaUM zxm=;<>%g37WCYtLMP;hwa_nzvV0wQI8n-^@% z^G5c3p_;jQ4Exkn6{sc}8@vr~n`L%aaIWyw)UJQ2-c&J1=+zzO{xXAKZi0G^)oyvrgo$d?`daC>P_X23n!Hqt ztyf7e29tYvva{ZKeB}jQ;4Dh6`k_gar{mBk8?Gn&ahOn~mF4-NjU87GSFSz3kz6RX zVwA}<5Nl7K=yo4Zy5CQ_XXN_n-pMn^yX)O943ii1#4!DPb|(^;u6JekOz-4l$Gea9 zVEC-^A=xOE^|^wudh)6Y!N@DlXJ%}0%A7@D!JJn`%#{tQvuV!ZB|D62sFMw?#yxq- zSZn-9o(=PPxN5*7L~uSgKKPDzu^ecmX{b9^hjS}eFJHa5my`8Qcjbb!0SZnwAhaG1 z^_}o&kt<`Lkb{vby$(+r?~>D}Pn}8DPwiQA$xU4*7wy2MRq;;uO?9ZsO#4hvgNFYG zo0W|Ldo<70Zg(ggoQo9NLThN=n$4_W56O&1g9u?N*$e_Svv{KEVwUN=aO@Gfgr?CS zlDXlSFV<&NW43ILW~{|t(URIok3L~!p-MH@p)|94mIcGw%;j26GjF_xXF=mwvCAwc z3X)lv?tl?b%l~WLs$JZs<)=G&z`w-|7gIm0syJ`%`)k;g3-wu2;t;9LprB$L3=8>V zqU%)M%B0H43VvFBS_hF!8%Q&{*gvYljR>XJ4sFfKEzKq}!x28xVndZ%jtWK2COA2 zk1jONauvPK76!s}w6%~dIbUJ_TU95@uxD@*a?WZ^1huzP5n~83icv&3kQepZEZRcz zX(g`EC8uyD, 2002. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.7\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2002-07-10 09:43+03:00\n" +"Last-Translator: Matti Koskimies \n" +"Language-Team: Finnish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "%s on epäkelpo parametri \"%s\":lle" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "Moniselitteinen parametri %s \"%s\":lle" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Tarjolla olevat parametrit:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Tuntematon järjestemävirhe" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: valitsin \"%s\" ei ole yksiselitteinen\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: valitsin \"--%s\" ei salli parametriä\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: valitsin \"%c%s\" ei salli parametriä\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: valitsin \"%s\" vaatii parametrin\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: tunnistamaton valitsin \"--%s\"\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: tunnistamaton valitsin \"%c%s\"\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: kielletty valitsin -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: epäkelpo valitsin -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: valitsin vaatii parametrin -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: valitsin \"-W %s\" ei ole yksiselitteinen\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: valitsin \"-W %s\" ei salli parametriä\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "lohkokoko" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "\"" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "\"" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[kKyY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[eEnN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Käyttö: %s [polku...] [lauseke]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Käyttö: %s [polku...] [lauseke]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "varoitus: tunnistamaton ohjausmerkki \"\\%c\"" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "työhakemiston nouto ei onnistu" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "työhakemiston nouto ei onnistu" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "tuntematon" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"Työhakemisto on oletuspolkuna ja \"-print\" oletuslausekkeena.\n" +"Lausekeen voi muodostaa seuraavasti:\n" +"operaattorit (laskeva arvojärjestys; \"-and\" on oletuksena kun muuta ei\n" +"ole annettuna):\n" +" ( LAUS ) ! LAUS -not LAUS LAUS1 -a LAUS2 LAUS1 -and LAUS2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"Työhakemisto on oletuspolkuna ja \"-print\" oletuslausekkeena.\n" +"Lausekeen voi muodostaa seuraavasti:\n" +"operaattorit (laskeva arvojärjestys; \"-and\" on oletuksena kun muuta ei\n" +"ole annettuna):\n" +" ( LAUS ) ! LAUS -not LAUS LAUS1 -a LAUS2 LAUS1 -and LAUS2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer TIEDOSTO -ctime N -empty -false -fstype TYYPPI -gid N -group " +"NIMI\n" +" -ilname MALLI -iname MALLI -inum N -ipath MALLI -iregex MALLI\n" +" -links N -lname MALLI -mmin N -mtime N -name MALLI -newer TIEDOSTO\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path MALLI -perm [+-]TILA -regex MALLI\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NIMI\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "epäkelpo tila \"%s\"" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "epäkelpo tyhjä parametri \"-size\":lle" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "eläkelpo \"-size\"-tyyppi \"%c\"" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "\"%s\" on epäkelpo parametri \"%s\":lle" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "%s on epäkelpo parametri \"%s\":lle" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versio %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find versio %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "varoitus: tunnistamaton ohjausmerkki \"\\%c\"" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "varoitus: tunnistamaton muotoilumäärite \"%%%c\"" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "ympäristö on liian iso \"exec\":ille" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "haarautuminen ei onnistu" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "%s:n odotuksenaikainen virhe" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s keskeytettiin signaalilla %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "epäkelpo lauseke" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "epäkelpo lauseke" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "epäkelpo lauseke" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "hupsista -- epäkelpo lauseketyyppi!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "hupsista -- epäkelpo lauseketyyppi!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "polkujen täytyy olla ennen lauseketta" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "epäkelpo predikaatti \"%s\"" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "epäkelpo predikaatti \"%s\"" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "\"%s\" on epäkelpo parametri \"%s\":lle" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "\"%s\":n parametri puuttuu" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "epäkelpo lauseke" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "epäkelpo predikaatti \"%s\"" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "hupsista -- epäkelpo \"and\"-operaattorin oletuslisäys" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "Käyttö: %s yleisimmät_bigrammit < lista > koodattu_lista\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Lähetä virheraportit osoitteeseen ." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find versio %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "päivää" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "\"%s\" on epäkelpo parametri \"%s\":lle" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versio %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "liian pitkä parametririvi" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "varoitus: tietokanta \"%s\" on vanhempi kuin %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "ympäristö on liian iso \"exec\":ille" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versio %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "kaksinkertainen" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "yksinkertainen" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "liian pitkä parametririvi" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "lapsiprosessin oduksenaikainen virhe" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: poistumisstatus 255; keskeytetään" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: pysäytetty signaalilla %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: keskeytetty signaalilla %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: epäkelpo numero -%c -valitsimelle\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: -%c -valitsimelle annetun arvon täytyy olla >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: -%c -valitsimelle annetun arvon täytyy olla < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Käyttö: %s [-0prtx] [-e[tiedostonlopetusmerkkijono]] [-i" +"[korvausmerkkijono]]\n" +" [-l[max-rivit]] [-n max-parametrit] [-s max-merkit] [-P max-" +"prosessit]\n" +" [--null] [--eof[=tiedostonlopetusmerkkijono]] [--replace" +"[=korvausmj]]\n" +" [--max-lines[=max-rivit]] [--interactive] [--max-chars=max-merkit]\n" +" [--verbose] [--exit] [--max-procs=max-prosessit] [--max-args=max-" +"param]\n" +" [--no-run-if-empty] [--version] [--help] [komento [alkuparametrit]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "hupsista -- epäkelpo lauseketyyppi!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "hupsista -- epäkelpo lauseketyyppi!" + +#~ msgid "Success" +#~ msgstr "Onnistui" + +#~ msgid "No match" +#~ msgstr "Ei täsmännyt" + +#~ msgid "Invalid regular expression" +#~ msgstr "Epäkelpo säännöllinen lauseke" + +#~ msgid "Invalid collation character" +#~ msgstr "Epäkelpo vertailumerkki" + +#~ msgid "Invalid character class name" +#~ msgstr "Epäkelpo merkkiluokan nimi" + +#~ msgid "Trailing backslash" +#~ msgstr "Kenoviiva viimeisenä" + +#~ msgid "Invalid back reference" +#~ msgstr "Epäkelpo takaisinviittaus" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Pariton [ tai [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Pariton ( tai \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "Pariton \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "\\{\\} -rakenteen epäkelpo sisältö" + +#~ msgid "Invalid range end" +#~ msgstr "Epäkelpo arvoalueen loppupää" + +#~ msgid "Memory exhausted" +#~ msgstr "Muisti loppu" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Epäkelpo edeltävä säännöllinen lauseke" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Säännöllisen lausekkeen ennenaikainen loppu" + +#~ msgid "Regular expression too big" +#~ msgstr "Liian iso säännöllinen lauseke" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Pariton ) tai \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "Ei edeltävää säännöllistä lauseketta" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "toiminnot: -exec KOMENTO ; -fprint TIEDOSTO -fprint0 TIEDOSTO\n" +#~ " -fprintf TIEDOSTOTYYPPI -ok KOMENTO ; -print -print0\n" +#~ " -printf MUOTOILU -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Predikaattilista:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Arvopuu:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Optimoitu arvopuu:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Optimoitu arvopuu:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "näennäismuisti loppui" + +#~ msgid "inserting %s\n" +#~ msgstr "lisätään %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tyyppi: %s %s " + +#~ msgid "left:\n" +#~ msgstr "vasen:\n" + +#~ msgid "right:\n" +#~ msgstr "oikea:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Normalisoitu arvopuu\n" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s muuttui \"%s\":n ajon aikana" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. muuttui \"%s\":n ajon aikana" + +#~ msgid "error in %s: %s" +#~ msgstr "virhe \"%s\":ssa: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " LAUS1 -o LAUS2 LAUS1 -or LAUS2 LAUS1 , LAUS2\n" +#~ "valitsimet (aina tosia): -daystart -depth -follow --help\n" +#~ " -maxdepth TASOT -mindepth TASOT -mount -noleaf --version -xdev\n" +#~ "testit (N voi olla +N tai -N tai N): -amin N -anewer TIEDOSTO -atime N -" +#~ "cmin N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Käyttö: %s [-d polku | --database=polku] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] malli...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "Pariton lainausmerkki: %s" + +#~ msgid "command too long" +#~ msgstr "liian pitkä komento" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "yksi parametri ei sovi parametrien listan kokorajoihin" + +#~ msgid "argument list too long" +#~ msgstr "liian pitkä parametrilista" diff --git a/po/findutils.pot b/po/findutils.pot new file mode 100644 index 0000000..9369d77 --- /dev/null +++ b/po/findutils.pot @@ -0,0 +1,1002 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "" + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "" + +#: find/find.c:211 +msgid "cannot stat current directory" +msgstr "" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, c-format +msgid "invalid mode %s" +msgstr "" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "" + +#: find/parser.c:2027 +#, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, c-format +msgid "Invalid argument %s to -used" +msgstr "" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "" + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "" + +#: find/tree.c:1239 +#, c-format +msgid "unknown predicate `%s'" +msgstr "" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "" + +#: locate/locate.c:156 +msgid "days" +msgstr "" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "" + +#: xargs/xargs.c:1306 +#, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" diff --git a/po/fr.gmo b/po/fr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..e67f752f327a0cdcef5bbd914f3544028296fee8 GIT binary patch literal 15210 zcmc(meT-#iUB?enXgdNG3J8_T)50(_bkFVV($ej0yL7vqr965l|gNew23XrxAsi3DFFD*i>(tQzB9i1H5_)R_4BKF>Ml z-g(<@0rh6jeD68udHp@V_ut*Wd)0Lx^Y{c@Z{T|Ki#_iH;GviDhtJU)JnuH}Uhr+; zdGL1dBj6PHo8S+Fe*@kEhBta%4n6}u4SpSbGuR#Tyw`(20;>O~tNSm2hq(U-@K*4q z@ASNJ&1CexM(~ab9|5(#i{M+qkAW`&{{Z|h z@DD-l>r3FPz<&c@4c_o_x6WI^*K&Uk_!@8#ybtVvtKctJc-<>Jug(1$_zd``pw=;e zljq$H#^62RC&AwazYGq*pI{L`4!-}DZr)e0i1XaP3Di1%06Yx-6ezlX9uz(Q6MP96 z-|R30wXZGk8{j2S=a@5y*8fqEN8Yc3kl1?;gk;|5LACoU@H+5oppN|Opy={nApg8u z*}V311pIFBG^lfa3ee>nBxxM zU2InL+W?P)SHO92f=!4Y3(yCD2K*=Rk3jM5vuxtyjPn=Z+qi$qxc{RjAQaGb$E4E{cNKREX$x85HDTikyVWDDM3f*Sv;paI{=ubtp!WS1Q0KS; zYP>a2>-qr5k$683ajKF)r&w&33 zUIG6F{4+NBDe!YFo}>2Od#E}mkR$T0fbRfb!Xh64XTcu>e-L~L_-cqKyam+040t_X zZU;rDx8BJagNvZ{w*hM39|jHhb08$~o&z<`--9m&{~4SH{}t4_-pI{K@E%Zn{5}xU zd%psz{~v>rv#)_#?~5V2<~<4O94~_6_n!u5z~2Dx1HS@FP9`9h=yM9xIX(l5FMl2U zEciw6Ec^N(%y63fFT)I4r+>HSJ;?LBK%LtrLUKL$lVA*f0{jT?Z-7bp>iz6dcV1rv zd)zNG=?eIJp!oP^7RM{^5%71x4}#k7iDQnw+Uqjc6I>U#^jUD=y%T(rOLTZQmp-rN zy2XBTe8X{CI_eQyvY+etdxncGcynBk+lD|E zx%7FQ>s?$g=R!;@zd=5G-r|iLxayD2{B>Ngv;CaqFDztft_SD1#DC&Vj^65S@%5uz z_2&V;yq@blT=QJ|h&T0-&e3_+pPTq1z7mg!e_q2?e-Ih_InLh`T;hu{u2*rP4x5ko z*&DlYJU8t$DS{|5Nw^tDNod;ZK^C-&Fv|}aS_DbQjIW;H5I z9u}=J`lMa6xgNFGM?3PM2=ji>4mIrQu%BjySuNLcQ>5lTzWCiJ>6Aqj=MStUWh>3r zj%%<^*bU0KF#UkpB3d(HyUemMDNHBI!gi5n+s91ZEZpj6VV*~6qQ-tdi;`k&`=E+21 zf;dh$IVuxmYh@3naKki>X$tLv-fFZ~re(hOZ5BRV!bY??Xbj(f0TcRxWje?0FNXZRB~+<1M%;-|=*=V%;!r2gqX%*MteO zto5O4l75Lg3gf7UfMh1`hwZ2vF*eI+dEY|kV?%vxEa7w0E74s^S|E+>kRu$A)BpV` zw!XzFiY$mQFKff?NTbb7%%E$K z@ZHCU60?fSskHaBym`kEotpo0q+~`bUERhkjCl*eR@5tdCJvJ|3=+z{o%VV%6`Rav zWdNH|qL#KznX9XWVJYD@#kfWZGm3BM_`dHKYv*NOrm)tkz6=M`Nf_?%Dl<8$@u6V* zqUmSpnhYGH!RuS>a>`lJjVQ1*X{@Lo`NLNYoQ4WvtAVanLF>ygN-0bg7sEq zYwv_WhfLHp+i7XmgAGhZ%9d8KfNiEbWG!BpbTm}h<1DXcw!M}8jI{XdyNq6IaKrUyeMOE#;Wz2FMN_}Ku zFJ&)cmOV~`>1Jt9`_0Uo?K&olbqEx(*{a*^t=q*n45fYR>yVAp7{6f3?sUKPn^SX( z4_$b0e(B^R7tYMRdsds5%r?i3o57+|F-Ebj(e30xw~I&Pyqr~((?uBhk~RNoy}Wd0 z?y>pDFPvODeR}rf%D#m2&L$U=bTcuP`w(VXnt5k)j^Fa}dEc+qtWn~VvL>X z10j29UR)4Mr^y9uW)}2vG`gGvKbFsQ+&Go#*Ag=3owGK*w!fT37S4E&23f+cW^C7L zDGa|J$Yb(3k=r0P)J#CWn@{@C73QKCtF z+?Jy5t9_Z1OA8Ap79TRlj8!7dJw&;~u-oRrvC(cK$F82EkLu2&&yJ0GjYHM=U1A>j z1mn3^vx2elM3JWO48CFW7>D17n=qB$kjK3?`iNs>jEnX6wXoPLwq7UL&b>}rav@Exc6auJ;HtAn5FH!+EMkb^jQxazjLB_-fU&K>AFkv z>Ph*5Y*pBF97ZDhJUV9PSSTLN7Vd*xF5Rs|6PSsq36rP2a1-+uqS_Vw;7CiOgi<46 zYu^DIZ7#}SrnWUu(=sXJczA$17VWorO(fNk4->jQ#NkF5+h7k1TZ!06)UX~ANoDQz zZO=AD)(H!rr)4i9RO470qSf?D(>^@!GmVQF>hKQx8Dg+qScO%*&D-5_NMRQ_O^$b_ zp0^bZ>NwC$cEWas@zA=UKs)Tn(L<S{Wxk9?Yg7DOs44O%<4U}7Hx#d)J!E{ zlV-cSI&*vCzBcE|9cw%9;9w~~gO~Y$hnLSMlTp|V= zxy3`(Ae#DOt}eRcMbLDZ6uk#jfFD*%2DY4|*chV_5#}zq&y)Z}+6@8sxu~OxmSgy4=kUZIJDLUA*l1Lx)X_@L<70AxkgVsGFM%Cg+2HTM>slv-A-y>(CnQuoEm%yk}mmDFs zb$mzb#$;DX1jI!Ph6}4)P0$so0*rs+*N>{?7pLx-`yRts|`?_f%PAe<4Rv`VW#z_E*vw8}~L%>s<2K z^3sZb62_2K^hqxf4IP=DzQ><_yFY!eIec{Hu6ys8K0G~5L;o~+S|yN%?Pzqjf8=du z`smE`G~a1AALNCvZD$}<{v#4zy}5rfA?!Omh1=g03?jwqoshJ*Ef!o+B91h(ssj=1Hi==7^FL)v2zc?F zt@Q7H-N-edRPbrxx{h)WurGe0xlE$cRueiUxi%8*yM}PZ1b8MUp#s}eR0v!ug)luW zQK*D@DPBy(x64;6G0dYe2I$%%B@t|F)R+&j3z_K*C_a#ALpQU+kw$1$$XOg4izg}( z+|}HvSeuvF2wP)kiP(nz5sIBrzXCIeDtQqV<$#0iFxG%-L|CdEp*u0FzG7yqq(aHg zL>+W0$BG(28DOLbLzg0Rq7dwA`nZ@lC93!WA+0 ztZ4N43th>~fdsAD)RsMps_c|2QTp3ji4*Hxf^p!P?;}Lb5o3Lo$x4$1 zsi;rF(XwKKT`e4~DryHx<|F44jpl5`7{oVZ$}8nCQc8)ht;bbLD)WJ{6%}U0Ax;LN zO~8ww9r?P@q;gHhWvG`bOD<)zL0ifz&pOxjIjvbfW}Qa-Hda~A463q9XJUXYp|)j{ z!nJ5fH@U@<;O`HHB^I<~q0d8uuKG|PPQEnR@8)#4yFjIM0Er6o@foOf4|$(x0f z;D_3m;~1>Xd)|^#Y3mwDk1HdQkhuWQT_C2&ZGox8=-fv(fo#BqPI#el5RY3kMY6!J z%#`m!eZ&uzZF~{R^Qt@Xh@&fJyc6eUPp{0KIWxO3ySQSNN4;W>rWu^&I8QShw8Ne? zE>yaTLF=0Oizjw>?+mH|&RI#oU6ylvsR|=F0VMk}HlE)h;X+%JFUPs(EWayJS&o#_ zz+b6LRIo{1p<>S@IG-*jsJar!6QYQlC`ie-u8LJi75l6>ob7zeb*hsO&&{5GVWle9 z#UECyst3alc9g7WQfDe_`cyTmrt?UFYS@3rL*iGoWy3%^OlgM74Yo>~ zXI9CRNw$i;Y3!O7S=z5GKx!9O)aZ{ctnRigppGBxGUQOr`G#q*c$7U#~*o;ds1NbPR;oY|`YIon=(ftB ztp+&01}{r_Poy{x%C56RS}&=7vaY#mASXlEREbvjRBjrUg1xF_h&qMwR4HVoiV#Ec zuM$17%3C%tLkQu$9{N);7uv0IS{c^*lPG98leK%G!EFx|-j4F2G@vyOB8-iM(Uqzu zw!@f!6bc+zLlg<9=~tm#Mc7LtRYV)&DK8a`y0zC(P2A;@LuQUsKTNZgMD2w~mPR7E z3uEyDc6A$`FqLJtnXcw(d_}rH-{{wF_NBVIh^vitkL`amfQO(c6yV2e?Z|f40Ll?m zDLQ;esKD#*ibHlmNCVz*;InkoK1Ge6)3BXGqTG7dH(|n@sW`L literal 0 HcmV?d00001 diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..52fa603 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,1292 @@ +# Messages français pour GNU concernant findutils. +# Copyright © 2004 Free Software Foundation, Inc. +# Michel Robitaille , traducteur depuis/since 1996. +# +msgid "" +msgstr "" +"Project-Id-Version: GNU findutils 4.2.27\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-05-23 08:00-0500\n" +"Last-Translator: Michel Robitaille \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "le paramètre %s est invalide pour %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "le paramètre %s est ambiguë pour %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Les paramètres valides sont:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Erreur système inconnue" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: l'option « %s » est ambiguë\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: l'option « --%s » ne requiert pas de paramètre\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: l'option « %c%s » ne requiert pas de paramètre\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: l'option « %s » requiert un paramètre\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: option non reconnue « --%s »\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: option non reconnue « %c%s »\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: option illégale -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: option invalide --%c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: l'option requiert un paramètre -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: l'option « -W %s » est ambiguë\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: l'option « -W %s » ne requiert pas de paramètre\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "taille des blocs" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Usage: %s [-H] [-L] [-P] [CHEMIN...] [EXPRESSION]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Usage: %s [chemin...] [expression]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "AVERTISSEMENT: séquence d'échappement « \\%c » inconnue." + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"La variable d'environnement FIND_BLOCK_SIZE n'est pas supportée, la seule " +"chose qui peut affecter la taille de bloc est la variable d'environnement " +"POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "Ne peut trouver le répertoire courant" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "Ne peut trouver le répertoire courant" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "AVERTISSEMENT: le système de fichier %s a été récemment démonté." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "AVERTISSEMENT: le système de fichiers %s a été récemment monté." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s a été modifié durant l'exécution de %s (ancien no de périphérique %ld, " +"nouveau no de périphérique %ld, type du système de fichiers est %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s a été modifié durant l'exécution de %s (ancien no d'inode %ld, nouveau " +"no d'inode %ld, type du système de fichiers est %s) [ref %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Le lien symbolique `%s' fait parti d'une boucle dans la hiérarchie du " +"répertoire; le répertoire sur lequel il pointe a déjà été visité." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Boucle détecté dans le système de fichiers; `%s' a le même numéro de " +"périphérique et d'inode que le répertoie lequel est %d %s" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "plus haut niveau dans la hiérarchie du système de fichiers" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "plus haust niveaux dans la hiérarchie du système de fichiers" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "AVERTISSEMENT: ne lien symbolique ne sera pas suivi %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"AVERTISSEMENT: lien direct (hard link) est erroné pour %s: cela est peut-" +"être dû à une anomalie dans le pilote du système de fichiersé L'option -" +"noleaf est automatiquement activée. Les résultats antérieurs peuvent avoir " +"échoués à inclure des répertoires qui auraient dû être recherchés." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "inconnu" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"AVERTISSEMENT: vous avez spécifié l'option %s après un argument qui n'est " +"pas une option %s mais les options sont positionnelles (%s affecte les tests " +"spécifiés avant aussi bien qu'après)\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"AVERTISSEMENT: l'option -d est obsolète; svp utilisez -depth à la place, " +"parce celle-ci est est une option se conformant à POSIX" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"Le répertoire utilisé par défaut est le répertoire courant;\n" +"l'option par défaut est -print active.\n" +"Une expression peut être constituée: d'opérateurs, d'options, de tests et " +"d'actions:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"les opérateurs (par précédence décroissante; -and est implicite\n" +"lorsqu'aucun autre paramètre n'est fourni):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"les options positionnelles (toujours vraies i.e. « true »):\n" +" -daystart -follow -regextype\n" +"les options normales (toujours vraies i.e. « true » et devant être " +"spécifiées\n" +"avant les autres expressions):\n" +" -depth --help -maxdepth NIVEAUX -mindepth NIVEAUX -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"les options de tests (N peut être +N ou -N ou N):\n" +" -amin N -anewer FICHIER -atime N -cmin N -cnewer FICHIER -ctime N " +"-empty -false -fstype TYPE -gid N -group NOM\n" +" -ilname MODÈLE -iname MODÈLE -inum N -iwholename MODÈLE -iregex " +"MODÈLE\n" +" -links N -lname MODÈLE -mmin N -mtime N -name MODÈLE -newer FICHIER" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path MODÈLE -perm [+-]MODE -regex MODÈLE\n" +" -wholename MODÈLE -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NOM -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"actions: -delete -print0 -printf FORMAT -fprintf FICHIER FORMAT -print \n" +" -fprint0 FILE -fprint FICHIER -ls -fls FICHIER -prune -quit\n" +" -exec COMMANDE ; -exec COMMANDE {} + -ok COMMANDE ;\n" +" -execdir COMMANDE ; -execdir COMMANDE {} + -okdir COMMANDE ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Rapporter (et faire le suivi du progrès de correctif) toutes anomalies selon " +"les instructions se situant sur la\n" +"page http://savannah.gnu.org/ ou si vous n'avez pas d'accès web en adressant " +"un courriel à\n" +"." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" +"la vérification d'intégrité par la fonction de fnmatch() de la librairie a " +"échoué." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"AVERTISSEMENT: les noms de fichiers Unix habituellement ne contiennent pas " +"de barre obliques (sauf pour les chemins). Cela signifie que '%s %s' sera " +"évaluer comme étant faux tout le temps sur ce système. Vous pouvez trouver " +"que le test '-wholename' est plus utile ou encore celui de '-samefile'. " +"Alternativement, si vous utilisez GNU grep, vous devriez utiliser 'find ... -" +"print0 | grep -FzZ %s'." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"AVERTISSEMENT: le prédicat -ipath est obsolète; svp utilisez -iwholename à " +"la place." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Ne peut ouvrir le fichier d'entrée `%s'" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "mode invalide « %s »" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"AVERTISSEMENT: vous avez spécifier un type de modèle %s lequel est " +"équivalent à 000. Cela signifie que -perm /000 sera bientôt changé pour être " +"consistant avec -perm -000 pour qu'à ce moment il ne concorde avec aucun " +"fichier mais il sera bient^t changer pour concorder avec tous les fichiers." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "Paramètre nul invalide pour l'option -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "Type invalide pour l'option -size « %c »" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "Paramètre invalide « %s » pour « %s »" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "le paramètre %s est invalide pour %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "« find » de GNU version %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils version %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Options activées: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "AVERTISSEMENT: séquence d'échappement « \\%c » inconnue." + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "AVERTISSEMENT: directive de formatage « %%%c » inconnue." + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Le répertoire courant est inclus dans la variable d'environnement du CHEMIN, " +"lequel est non sécuritaire dans la combinaison avec l'action %s de find. SVP " +"enlever le répertoire courant de $PATH (i.e enlver \".\" ou : en préfixe et " +"suffixe)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Le répertoire courant est inclus dans la variable d'environnement du CHEMIN, " +"lequel est non sécuritaire dans la combinaison avec l'action %s de find. SVP " +"enlever le répertoire courant de $PATH (i.e enlver \".\" ou : en préfixe et " +"suffixe)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Vous ne pouvez utiliser {} à l'intérieur du nom de l'utilitaire pour --" +"execdir et -okdir, parce qu'il pose un problème potentiel de sécurité." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Une seule instance de {} est supportée avec -exec%s ... +" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "L'environnement est trop large pour l'exécution." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Ne peut ouvrir le fichier d'entrée `%s'" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +#, fuzzy +msgid "Failed to change directory" +msgstr "Ne peut retourner au répertoire de départ." + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "Ne peut faire un clonage (fork)." + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "Erreur s'attendait à %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s a terminé son exécution par le signal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "expression invalide" + +#: find/tree.c:101 +#, fuzzy, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"expression invalide; vous avez utilisé un opérateur binaire sans être " +"précédé d'une expression." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "prédicat superflu inattendu" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "expression invalide; il y a trop de ')'" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "expression invalide; ')' était attendu mais n'a pas été détecté" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "expression invalide; il y a trop de ')'" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "expression invalide; ')' était attendu mais n'a pas été détecté" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "Le type d'expression est invalide." + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oups -- type (%d) de l'expression invalide!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "les chemins doivent précéder l'expression" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "prédicat invalide « %s »" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "prédicat invalide « %s »" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "Paramètre invalide « %s » pour « %s »" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "Paramètre manquant pour « %s »" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "expression invalide; il y a trop de ')'" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "prédicat superflu inattendu" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "prédicat superflu inattendu" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "L'insertion du paramètre par défaut « and » est invalide." + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Usage: %s [--version | --help]\n" +"ou %s bigrammes_les_plus_communs < liste_de_fichiers > base-de-données-" +"locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Rapporter toutes anomalies à .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils version %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "jours" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "Paramètre invalide « %s » pour « %s »" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"AVERTISSEMENT: le chemin de localisation de la base de données `%s' contient " +"un ; de tête qui n'est valide dans un nom de base de données" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "la localisation de la base de données « %s » est corrompu ou invalide" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Taille de la base de données localisée: %s octets\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Noms de fichiers: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Noms de fichiers: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "avec une longueur cumulaive de %s octets" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tduquel %s contient des espaces blancs, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s contient des caractères de chariot (newline), " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tet %s contient des caractères avec le bit du haut mis à un.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Taux de compression %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Taux de compression %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "la localisation de la base de données « %s » est corrompu ou invalide" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "La base de données %s est dans le format %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Usage: %s [-d chemin | --database=chemin] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--version] [--help]\n" +" modèle...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate version %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argument à --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"AVERTISSEMENT: la base de données des localisations peut seulement être lue " +"une seule fois à partir de stdin." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "AVERTISSEMENT: la base de données « %s » est plus vieille de %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" +"Séquence d'échappement invalide %s dans la spécification d'entrée de " +"délimiteur" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Séquence d'échappement invalide %s dans la spécification d'entrée de " +"délimiteur; la valeur du caractère ne doit pas excéder %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Séquence d'échappement invalide %s dans la spécification d'entrée de " +"délimiteur; la valeur du caractère ne doit pas excéder %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Séquence d'échappement invalide %s dans la spécification d'entrée de " +"délimiteur; la valeur du caractère en suffixe %s n'est pas reconnu." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Spécification d'entrée de délimiteur invalide %s: le délimituer doit être " +"soit un caractère simple ou une séquence d'échappement débutant par \\." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "L'environnement est trop large pour l'exécution." + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs version %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Ne peut ouvrir le fichier d'entrée `%s'" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Vos variables d'environnement prennent %ld octets\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" +"Les limites inférieures et supérieures de POSIX sur la longueure de " +"l'argument: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" +"Les limites inférieures et supérieures de POSIX sur la longueure de " +"l'argument: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "La longueur maximale de la commande qui pourrait être utilisée: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Taille du tampon de la commande qui est actuellement utilisé: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"guillemets %s non pairés; par défaut les guillemets sont particuliers à " +"xargs à moins d'utiliser l'option -O" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "double" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "simple" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "La ligne de paramètres est trop longue." + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "Erreur lors de l'attente de la fin d'exécution du processus enfant." + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: a terminé son exécution avec le statut 255; arrêt abrupt." + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: stoppé par le signal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s a terminé son exécution par le signal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: l'option -%c contient un nombre invalide.\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: la valeur de l'option -%c devrait être >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: la valeur de l'option -%c devrait être < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=délimiteur]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L nb-lignes-max] [-l[nb-lignes-max]] [--max-lines[=nb-lignes-max]]\n" +" [-I chaîne-remplacement] [-i[chaîne-remplacement]] [--replace[=chaîne-" +"remplacement]]\n" +" [-n nb-args-max] [--max-args=nb-args-max]\n" +" [-s nb-carac-max] [--max-chars=nb-carac-max]\n" +" [-P nb-proc-max] [--max-procs=nb-proc-max]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fichier]\n" +" [--version] [--help] [command [arguments-initiaux]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oups -- type de l'expression est invalide dans mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oups -- type de l'expression est invalide dans mark_type!" + +#~ msgid "old" +#~ msgstr "ancien" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "Réduction de arg_max (%ld) à arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Succès" + +#~ msgid "No match" +#~ msgstr "Pas de concordance" + +#~ msgid "Invalid regular expression" +#~ msgstr "expression régulière invalide" + +#~ msgid "Invalid collation character" +#~ msgstr "Caractère de fusion invalide" + +#~ msgid "Invalid character class name" +#~ msgstr "Caractère de nom de classe invalide" + +#~ msgid "Trailing backslash" +#~ msgstr "Barre oblique inverse de suffixe" + +#~ msgid "Invalid back reference" +#~ msgstr "Référence arrière invalide" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ ou [^ non pairée" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( ou \\( non pairée" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ non pairée" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Contenu invalide de \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Fin de l'intervalle invalide" + +#~ msgid "Memory exhausted" +#~ msgstr "Mémoire épuisée." + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "expression précédant l'expression régulière est invalide" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Fin prématurée de l'expression régulière" + +#~ msgid "Regular expression too big" +#~ msgstr "Expression régulière trop grosse" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") ou \\) non pairée" + +#~ msgid "No previous regular expression" +#~ msgstr "Pas d'expression régulière précédente" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "actions: -exec COMMANDE ; -fprint FICHIER -fprint0 FICHIER -fprintf " +#~ "FICHIER FORMAT\n" +#~ " -fls FICHIER -ok COMMANDE ; -print -print0 -printf FORMAT -prune -" +#~ "ls -delete\n" +#~ " -quit\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Liste des prédicats:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Arbre de l'évaluation:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Arbre optimisé de l'évalution:\n" + +#~ msgid "Optimized command line:\n" +#~ msgstr "Ligne de commande optimisé:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "Mémoire virtuelle épuisée." + +#~ msgid "inserting %s\n" +#~ msgstr "Insertion de %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " type: %s %s " + +#~ msgid "left:\n" +#~ msgstr "laissé:\n" + +#~ msgid "right:\n" +#~ msgstr "droit:\n" + +#~ msgid "[stat called here] " +#~ msgstr "[stat appelé ici]" + +#~ msgid "[type needed here] " +#~ msgstr "[type est attendu ici]" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Évalution normalisée de l'arborescence:\n" + +#~ msgid "error in %s: %s" +#~ msgstr "Erreur rencontrée dans %s: %s" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "AVERTISSEMENT: le chemin de localisation de la base de données `%s' " +#~ "contient un ; de queue qui n'est valide dans un nom de base de données" + +#~ msgid "command too long" +#~ msgstr "La commande est trop longue." + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "Ne peut inclure un paramètre simple à l'intérieur de la\n" +#~ "limite de taille de la liste de paramètres." + +#~ msgid "argument list too long" +#~ msgstr "La liste de paramètres est trop longue." + +#~ msgid "memory exhausted" +#~ msgstr "mémoire épuisée" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s a été modifié durant l'exécution de %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. a été modifié durant l'exécution de %s" + +#~ msgid "unmatched %s quote" +#~ msgstr "Le paramètre %s n'est pas repérable par apostrophe." + +#~ msgid "cannot open current directory" +#~ msgstr "Ne peut ouvrir le répertoire courant." + +#~ msgid "wait got pid %d, expected pid %d" +#~ msgstr "obtenu le pid %d, s'attendait au pid %d" + +#~ msgid "%s stopped by signal %d" +#~ msgstr "%s stoppé par le signal %d" diff --git a/po/ga.gmo b/po/ga.gmo new file mode 100644 index 0000000000000000000000000000000000000000..b4580335d8b087704f88fc5dfe2cc85f2780826d GIT binary patch literal 19266 zcmcJWeT*Duea9yy1aiEGKuUOf5^~&`cs7nn0y#S`j(tw9`0iZ$@bD^yi2ZK+yRs)&O6rWXDH_49q6 znc3aDwPRko^4xb`p4Z>=dw(8(?W)T^?(usM*Q>a$zTET9fzN*~fA~E)<9XMCe+<46 z{5p6&c+K-XZwI&lz8`FXUj@GfUJL%|^F1#IzYabIKKKI9y8-+X_zLjbpxSxv3*GaL z;7*MBI17HXeE(U{=lScP0blYW&wD+%8~jP|Vepk;2EG>j`4T?^YMf7jZvejo zUIxDI#h%AMZ0$&b(8+;k~?3d6c_)2gu zco(=1zO%%C1e-kHLuc;=e-qR^=U(diT?DV;IRtM7-vz!2d;;u%-vn;~k1~kQf$s-* zgLl*UgJ2Hc1%4TP2z(xcdm3zk^WX}Ne+=9JHIFMH+9Tj=z&Y@7Q13ql-VA;Yd?WZY z_!#(VCjDvfBcRq{4~r~1MBuZ*pDpnNpy>M%@H^ngK=IWFSsc;pw?L-i{UHb|d0zox z8SfuJm3tb51-&bHxB`40sP(uC)c9@z?K+k3qY^&^-pKcJ<@dh@4bR^NnX-2+#AYbo zZcubz=8x9>BzPEnH+UQP7hnQj@fycB15n?89ps<)@BGm`Uc?|o*VlvMuT>CId7I_) zFM#6TKL8E*&)`$wvv|;az5-r(ndkjCsD8iCOU?IIgklHp_ktR48>XVF_df7B;2BWs zeHL7z++_%r=KU5r(>iT{cY;rYhroG+gr>X!sCD~g@NV#n;J<*+VeuuG-vVJB?hfu5iuYm@97K6A6 zya9yN-WvF3FatHtPlMvSr^@#~(eS+6dENsuC2s)U0{$v^9r%|e{wJvMUQOe|UEm$y zAyD-AAjq`5FM)`x_hnG)`1hdt{Vx!bcrV}OluLJyT?KC`$s_4I}3_lPl9Uy zufc=h%MhM-gO8T@cVNQvTM^bX;Fmzr<0O-$OYftg_~=QHCcLM?J>a!WvIjl@YW{x$ z{u}sxQ2l+AMR^za2AJnQ@VCJ=@ISzBfCt~?+VdgqCwP7v_!{tkz_)`hqftogy%*Gc zJ_Az4`vR!`zXx`~+ga?-gP#H!niuj><$ncyHu$^XmEdPV(f3L4d*J6mqvySjzW)SX z%k$+d$_)5g5YhDB0K&@Nz2LLJlc3s5LD6Xwd?om6p!obe2noDzfUu(XN{GSIdy60} z<`pHL0bxn+DbRr51=ZfQcR9Jg3uH>(5m58~F!%xR3!wO6^={S-%s{QvpM$RfzXxia zUbWAy+cK#BPl4i}-vHI`pMk3Pzu?!vxqIC675mX0mm%|@_~qaMC-)x)Z|40kfrj^A zTy*^Yub}Ah0t&wiyas$X9;pE%4P#uD_oFMYrDr`Q&{K6d%p~ zl;h{C-{SOf1Eg8I_U{It$90%XKdsk$?46ryz`fy$xkM}dUc&VNSI#B6o#0Y`*Kj?T zOFVOgOF!``-FYiqk8bRAD~OJFKUeh=Js#tNw3erD1LwJZ zg6l>ursy5z`f0A$aY>%Xf6{A^*Z!_3u@7ckSC-F`-Och|d?%UN;L;j*xZcTii0ct9 z{R%Ev)AEScU%yja*V;R$Gwv<#Q}6}lz2I`Lw{cy~^$-`VQ2+LF_lolA?h+$VysIC} z>Ye67-B`Z^nD{-1C-JX-vs_KCmvTMM6>{k(e$wwjuGe#|a*3yI=UV1!b4eBlT&NMt zXMpuPU}x``9{BYfcqhRZm-kndD0uDIy>1Vd&v$}5%ljL^<6O_;+Q;>5t`~8=kgLn} z4letfxpFo)%`_>3C^1R65l2aAn%y7^nnjr9JB>GUWstPYSgFxhvk?_tQ*=YqjXGVk z9u+1Ji^dFf(ze;?M$PVcMP3wP-Vd6gnmrQs)2uM-gHCRW)a>QPZ%0XMP(*QlcPAM% z(yVi*8f%5^U=SCkAJAJwX*z5UvMfvr(~7dNS)|$K9#a(yPxrGh&!aR^VZWb6Nij3_ zvKMS>#(9(%CT%a6v>#>xO)%NCUr>!3##sQGIfT%=g&EJ-pP!_IJj@K($WvfRBW2?`3YZ<;*nBtdLuTYS>mcY~zEm(~Dkc8nXVD9k$Zc|MK# z7M_Zlp-Be4bvl}jTRX*2(_XiuILtTmBJ3GE5SD2+-(eofLRyPk$1c6kC`nt}yWIZv z5_()SxOccjq2g*2BF}`nRo1!0Il2btp;Y$Lv zQ+Q;ySr(iuvb}Qo=EQ7sHlH)CG|ZE^!US=gZoq{m$U1`_{O+2m3sV%@1-1xGk-aN`8ci?rY0&W;NgVbujQNKgoACqYnJ z)gn2nI_gaQZi(Q&vxbP&pUn-1Xc_0a4UgI-d}JMVBs=RE4U zRH{n&2TCF|yn`VuEnc8sbWdx+c=xW{Z=`e0DRjNWc@`e3URp)G?Ms|C(GlBTpN2#8 ziMLCgB(=(-rnvM_D@4zmb{ur*%Udc%Cd``wDlCUv!vr0oNus@z{s0Xh#!(N!%uL=7 zn^8NWe}>xlQ7Z2lnK)w?JU6`o<{(K6v_LatptEuM|KG*wAF+!f3nDCbXEYsYQag=O z3ZVI@kBbtNibxhLGa|U92}~bi=AnOpRY*Emt=a=H=r}aX*5yNaT7~IU>7%0oNOAR| z+%BMr!&4y^Cif0GmTFZjE+c29Vto@kJmW0~MYF3}ZjqVg;B?d*^k^vQV1Y43&9v8( z&E8;)R$?*U1C;2d!T8anM0YjeF~!S?62>WRqvAW>C8^2>efcD;zIAMTnK{TQ(Y?`I zoig@#plU^$S_i0M%u?HIrUSDP;F=(TR<^9|k!WlhlyUQ9yt&i)A1!D)5J`%PDO!T=GxcNYupsgoKiFWpc9&)Fx{f)FWhuf9-Io2BLlWSzA$@r0Lcms73+PUk#@)51JMSreITdr0nqhkGW zYPVCFV;aXl8Z8UnB`#j(>SHK2e7VzE8v7Cx=x=>WQv@eN%y1<_l|e7P+<-d_-judes>^7`IkdX}Eys^8y>(Gk z(%RR8jc3p3Q>lQ$suVlQ0H$je2r}Q+k;9X$5`3xdd2@L6=+Z-n9zMQ*^~jOM{cBSx z?A@Q7Owx_Slx}U9WohQ!pCe0FlRe`5m5F^PE>1U$`^RP=fqqcDm*&NBDX%m+jxU!5 zy&O+NOzy`DQ|>IagJ0>$nTfXVJ7ym759!Zg{aLk|Rd)xB_ki_DD|TaXvv9$CFvt=s zQC2rOPn=N*dj2_>Fd0ranwtk|sNR=F1u9*Yfd ztiPqzC7!cUm!F>G7HtwX1J$LPb$kNTPYVVZp%5)6s|j=+T;6MV>ap|^5DP7yzgP+& zP2o(~Wck|(6 z-U+XYR*jDt4^ek6{@qn#+Z0DJ0V-HNKN*3#@>U0&X|a=`2{)|A%IFv5+76|P_G8LuW5*iv)+RaJTX-JTh* z4uVE5FdQwy<6%_nZ)|!)_8NuL8NJ3-`$!sYrZ8TFTEbptL!By(GhaQjPK9zqUSTV~Z&vZ@5Fig~r#*}DEFFXU!>Fa=5sW|KoU zN`W{RVUDovLM7J2Vneo5WvuMY?U?i0SZ;|>YFb&^H!jlwdz|8RC(O5gC+(x0!&reT z8g?lQ8|D*+&3V=PdPzpBwC&Rgjff!#>x!efO?kD)EJ0a997_z*xAMXQ!?f@Sdf^7X zEP7s{g`#zthfp>lY)ox1v~g7*y_uj;^3bYKTg^u2QjXQYM?>3Fj=+)7x`A#0Ww#3M zt6s6MVb%@$xpf^A1s`?^F^>=wU(W_yW9vArJ1nnrgT&nUz?+)x)PdC{t=0?3+9d(5 zX_WLm&H$qKj z&F-dW3u1?!xg=49^_<7YVEal_2uW6^B2twV#M=*Xa9zp@H~BhmYst~-xvbRuY-`6e zmZCtFJ~Z=q>SXrpxS&8YY$=#U`N=Dn`ReuKs7aF4aUgy(1Sar?kQj^TRG92oC>7zn zS$yd55wipL;5v6}lyEGndwso`hVAoiN>wlDNw>SpcFNc3)^eytTdc0Rv#jRH%9PP? zIfpTAA_e62(;U^6Dm~~dDfz!3-arT9(G9{K3)mhW6a!);tj}DgL8S#|W=IPtoS9Y^ zm)*tq$Uw<;mPBJi$ZHy5;rfJq&YLoRFF5U999n!}@z7CT;Jn%r^$R&OA|pO%yRta7 zU*=Q&l<~=X!tBSDp~b=+CzispCFzvcGhQAfazC2g5SI~mSq?`#Asy4~&hNn1ti#ru zraee(3fVZF+VETy?b#f&nO{+WB6s1&6*axD807A~@Dk`?%}GKfG<) zuhle~<7Md1m2tYuZwE0hl;6&+8eV(&@S^cMN)ZD#g{`b`)lw8srkqg^G1-=8{^2glx4_&dw8sl)Fmy^)@O``u-$3Jru2S?05pM8#QO(}g0mDzCVQN-bK(&(YLAh1UuhN!^gfDANGaU!z0@X@~w!Ys*{?Mns#lCQyl#${&3vK1Imp z$-&3pswp-`l$4rtYQx%ZWGdh6t*59?xo;<>f@-Q;7r)N)qGOSGG_RcQJ*Mw6DeAw} z6-xOa*yCYEXyTwy7KO@zi}eWLrKy#}X}g^1*yz-w3li$+zzVR9DUo6+4r7DiydcoU zuV~^}ObmEr9sS7e9bIJHV`5egeyp)Nv#MNonS?v>sJyJYzlkE4aipN!Gh+#HtY#-l zyW}@%GV7N5b@GA%TBjLnOESSNwMvyk8g*AY7b86`g2BdR(B<417f4mF%DoLrxgf2w z3}P!W!bt*B;$=gMod;0o(}Xph%2TmVY!F*MC$<+O}lcs%|F?Pvu|aL~Pb6 z3h@7X19(RC8)Y6DmyOiCngSD!*x@XFJKnj!)bby2srCgcj4sE1OXH1=-Q|X;znr6* z{d?FJ_1Dq`o1Cjtb=9`$%;D8Fe?P1yJM15T-51R6UAx}o@4C(3b-TIw%?r2Oe&ep2 zckQB}e}sKGCHF_=Zu4*6?eDtT?7DT~7V6wexkEu-_-h%OhpDC6f_V$I5_42BkVv`r zBq@4s@9rq4*FZw@Ek3ZKn>h}c88t4x_}aiCh0_JF+9T-`0!i` zi$xjRih0^3zYhPh_A^)Vc~nWQ=KbLrdZCtDJsPIy-~lzGyg59FVqWi(UZz~LJBT_L z+uxSvAsg3Cd)=TFQ%6b!{a?OKXwziFvq7&*da)eRo*8PLaLQCso5_i2sko(>O7SYQ z{%3o5Hd54#&)-!_-{ed})fQ$_e3dYbvf(-Mb!ms)-UM0^SO#%G8k3!H(X1otFvyI- zUBZ6&k>Mw?`lJ2u;V&K-+Yi^*%IA>Mbi3e}ydUlww|TlBWj}o1(#rCb{qUn~Jq9g% zdLa(S*GE&=uK2#9n*~tAmVuYp6@lAX0MV7_`5Y@ghqwXwSGdLRcm;5y$jo?&93WNVqQ0g z5@>blgJUP#2dnz7&JQ-8vCZZmu%g|4cU?}-q}rGN;U_ajU2VII_op+ywYKe6sYrUTld?(IJb4%Ya8WE zyxrH4T(EkK$qIFj3F|Qg35`sfZ$bt|J|fUMn^9#?VgUtD0NaL>l2c5*>$ zF_p*U&J93%G&cDo79fG*dCe{p?7`YRYWq!dmaE|%3ZwO|O1SY=W&y7~z$KN4zh4iQ1bo9QyJO2|MDmA-X-r9a19=sExr-(K)w0?f3Nb3CNY*SqaO6wjbX zt)T1do7zt9m4D1C@uCyxfPkF#%waNWj^rRUwEee0*_{D4(y74tDIsm>`D zsb&UDjkpo*hA>=cjcY-jy4a;bTJ`RQA#8-AAc3s^_VW&KGwQtK{4poyoOfaN3CS5V zI^ZDDuTD5HJI!Nz1SG2|LRxF02UrOqU|Xk4Ha#To1)~(?Z8-W+k_z)_6<7<_vI-2TQv|H=hb(*QvH}JEV428P~`$6!QPh#8yZoAJcUYfq=7T8%tK)n32y{2 z!=k|jH_2-WHSSiIarNkv;|*?_BxLvrTEhiwn#URV*NQzdPR}LPP zQ5VE6QSJ>tSt-JtGYEBpeRS|aB-3w}@Y$YrP`G(q3z2gQg3Sd|Zvh7&;t076MyDUv zOTWr5Rr<`9uC||pC{0Fr7GfnBu_gk+8WM*rct@nhT3vE2`1*DxV?h{mW0(*wFRYP) z$Q^WE#J1lh)U(dfw7M)U1RD!sume4~M@mRmMw)Tm?|#K?TC-0kQT`oo>7^T#EKm1SOg3VR@;U@#BvyZd8`JPenI=Ov*n!i(!t#;iPy2P>3%igOnB5UYX`*p7)^ z@LQjWA#_T4;9JSM)Mc$JD0NzDcIgW84;@U>8KkBT@1!U^DHAp?X@?rbY*u1uQ)#-| ziL&Q1E>_Ye?A*x=W#F`_PvcQvmZsm$kU&-^M9r|BGCbc$>d>0j>g7_W+Y93#Q@A{@ zv88aex|1HZj%`?v#wBaqPXF|xV~jJszzOACEN|(~bJVb!OP(ZCnevK_x~Zhpc@F4a zC}i$L90=du+LZ8%_%m9Ep~a4Aj4wC6-i5oYv?t8pBv!z=7@lpId*<45>?K?{P^E@s zqbI`KYg${0`-UOV@#-q4gdW_&3Daf(k3}h_fzGu0(~3w)s|+rl`dMOFo2#>Y17lWh zshnQ85k7JPS2_qdpSX{Wksv2Z`zq?1WP~yKwx>NNrZ>Kbqk?g(%W8d$7`HNa<@Z_^OB7a9bEQH(yEcjtb&3RcXTA*$TrfC% zB7q>!c!mV4eTGP&+^N{!0DBh$$R{>X?{rlzhe%kH@4_cYmhQQ4_<^NE6NgAf?|$6p zNNSDF;Q;;%9qNL^tqRnTkhA&^XB-cZd2!x5R!Lr;cE&Kv^?4I_t|W@Rde=s0OYY!U z$xaTHxHx6nv69LKx%k17s?^1gmh4|zSscC(vQ3;W(H=|Xq>N6NxDA~8bV>C%?Q}`` ztv+3%=c+*+379-x;!0oebcy@yPM5e@c@v7P($mVR;*W^P&se~nHL0T^&u-sX6^y6a z#!RQA8})x($TDSFnJ}{~#VR?DP;jMkD^+Qyp%>Uch^SKSTo>vJql zce0;|K~<1Hv1DZ__H!YKO{G=o4pxUeTniPGxU()>hFi^^;cN>4PbdK77?4~{9Cy?z zWOj#KG$W-OwEbOWHpf~nCy2i~<`0!;UoJM;iNi0%?lKol+3G_wKxq_@b#j3;axIj` zos1b#-EMe~oOW5(Dw|QBi>b@HO#U>sTsR?r8lYOY_FpT9y>6~#!15MVTOD#Jjd$5Ia(8RSZ3x)TEXyyTjjnB zZ8~cLZ(>O0@JVuc>S!^GAYJd`rbx`IEN|7l`l-!oJzUh5Y%Ae9%hM(m2CvJ6VS$*U PjmkYHJ?6^V9IW?$^SJb? literal 0 HcmV?d00001 diff --git a/po/ga.po b/po/ga.po new file mode 100644 index 0000000..f6f96cd --- /dev/null +++ b/po/ga.po @@ -0,0 +1,1257 @@ +# Irish translations for findutils. +# Copyright (C) 2003 Free Software Foundation, Inc. +# Kevin Patrick Scannell , 2003, 2004, 2005, 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.2\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-12-01 05:47-0500\n" +"Last-Translator: Kevin Scannell \n" +"Language-Team: Irish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argóint neamhbhailí %s chun %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argóint dhébhríoch %s chun %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Na hargóintí bailí:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Earráid anaithnid an chórais" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: Tá an rogha `%s' débhríoch\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `--%s'\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `%c%s'\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: rogha anaithnid `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: rogha anaithnid `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: rogha neamhcheadaithe -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: rogha neamhbhailí -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: Tá an rogha `-W %s' débhríoch\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `-W %s'\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "méid bloc" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +# allow yes, but also 'i' as in 'is sea' or 's' for 'sea' -- KPS +# neither of these letters is near the 'N' on standard keyboard... +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yYiIsS]" + +# fortunately, 'n' for 'no' or 'ní hea' - KPS +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Úsáid: %s [-H] [-L] [-P] [-Oleibhéal] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [conair...] [slonn]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Ag déanamh neamhshuim ar bhratach anaithnid dífhabhtaithe %s" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "Argóint fholamh tar éis rogha -D." + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "Ní mór slánuimhir dheachúlach a bheith go díreach tar éis rogha -O" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "Sonraigh slánuimhir dheachúlach go díreach tar éis -O" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "Leibhéal neamhbhailí optamaithe %s" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"Leibhéal optamaithe %lu ró-ard. Más mian leat comhaid a aimsiú go tapa, déan " +"breithniú ar \"GNU locate\"." + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Níl an athróg thimpeallachta FIND_BLOCK_SIZE le fáil, níl aon rud ag dul i " +"bhfeidhm ar an méid bloic ach an athróg thimpeallachta POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "níl an chomhadlann reatha ar fáil" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "níl an chomhadlann reatha ar fáil" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Rabhadh: bhí an córas comhaid %s dífheistithe le gairid." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Rabhadh: bhí an córas comhaid %s feistithe le gairid." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"Athraíodh %s%s le linn rith %s (seanuimhir ghléis %ld, uimhir nua gléis %ld, " +"cineál córas comhad %s) [tag %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"Athraíodh %s%s le linn rith %s (seanuimhir inode %ld, uimhir nua inode %ld, " +"cineál córas comhad %s) [tag %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Tá an nasc siombalach `%s' cuid de lúb sa chóras chomhadlainne; thugamar " +"cuairt cheana ar an gcomhadlann lena bhfuil sé nasctha." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Braitheadh lúb sa chóras comhaid; tá an uimhir ghléis agus inode céanna ag `%" +"s' agus comhadlann eile atá %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "leibhéal amháin níos airde sa chóras comhaid" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "leibhéal níos airde sa chóras comhaid" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "rabhadh: ní leanfar nasc siombalach %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"RABHADH: tá líon na nasc crua mícheart le haghaidh %s: is féidir go bhfuil " +"fabht le do thiománaí córais comhaid. Gníomhachtófar an rogha -noleaf go " +"huathoibríoch. Is féidir gur fágadh roinnt comhadlanna ar lár sna torthaí " +"roimhe seo." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "anaithnid" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"rabhadh: thug tú an rogha %s i ndiaidh na hargóinte %s nach bhfuil ina " +"rogha, ach ní bhacann roghanna lena suímh in aon chor (.i. téann %s i " +"bhfeidhm ar thrialacha ar gach taobh de). Tabhair na roghanna roimh na " +"hargóintí eile.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"rabhadh: tá an rogha -d as feidhm; bain úsáid as -depth ina ionad, os rud é " +"go bhfuil -depth oiriúnach leis an chaighdeán POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"is an chomhadlann reatha an chonair réamhshocraithe;\n" +"is `-print' an slonn réamhshocraithe\n" +"is éard is féidir a bheith sa slonn:\n" +"oibreoirí, roghanna, trialacha, agus gníomhartha:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"oibreoirí (ord de réir tosaíochta; tá `-and' intuigthe mura bhfuil eile " +"ann):\n" +" ( SLONN ) ! SLONN -not SLONN SLONN1 -a SLONN2 SLONN1 -and " +"SLONN2\n" +" SLONN1 -o SLONN2 SLONN1 -or SLONN2 SLONN1 , SLONN2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"roghanna ionaid (fíor i gcónaí): -daystart -follow -regextype\n" +"\n" +"gnáthroghanna (fíor i gcónaí, tugtha roimh na sloinn eile):\n" +" -depth --help -maxdepth LEIBHÉIL -mindepth LEIBHÉIL -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"trialacha (N = +N, -N, nó N): -amin N -anewer COMHAD -atime N -cmin N\n" +" -cnewer COMHAD -ctime N -empty -false -fstype CINEÁL -gid N -group " +"AINM\n" +" -ilname PATRÚN -iname PATRÚN -inum N -iwholename PATRÚN -iregex " +"PATRÚN\n" +" -links N -lname PATRÚN -mmin N -mtime N -name PATRÚN -newer COMHAD" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATRÚN -perm [+-]MÓD -regex PATRÚN\n" +" -readable -writable -executable\n" +" -wholename PATRÚN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user AINM -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"gníomhartha: -delete -print0 -printf FORMÁID -fprintf COMHAD FORMÁID -" +"print \n" +" -fprint0 COMHAD -fprint COMHAD -ls -fls COMHAD -prune -quit\n" +" -exec ORDÚ ; -exec ORDÚ {} + -ok ORDÚ ;\n" +" -execdir ORDÚ ; -execdir ORDÚ {} + -okdir ORDÚ ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Tabhair tuairisc ar fhabhtanna (agus breathnaigh agus iad á gcur i gceart) " +"via\n" +" an leathanach fabhtanna findutils ag http://savannah.gnu.org/ nó, mura " +"bhfuil\n" +" rochtain ar an nGréasán agat, seol r-phost chuig ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "theip ar sheiceáil slánchéille don fheidhm leabharlainne fnmatch()." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"rabhadh: níl slaiseanna in ainmneacha comhaid Unix de ghnáth (cé go bhfuil " +"slaiseanna i gconairí). Dá bhrí sin, is dócha go luachálfar '%s %s' mar " +"`falsa' gan teip ar an gcóras seo. Is féidir go mbeidh an tástáil '-" +"wholename' níos áisiúla, nó b'fhéidir '-samefile'. Nó, má tá GNU grep agat, " +"is féidir 'find ... -print0 | grep -FzZ %s' a úsáid mar mhalairt." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"rabhadh: tá an phreideacáid -ipath as feidhm; bain úsáid as -iwholename ina " +"hionad, le do thoil." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Ní féidir an t-inchomhad `%s' a oscailt" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "mód neamhbhailí `%s'" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"rabhadh: shonraigh tú patrún móid %s atá ar comhbhrí le 000. Athrófar an " +"bhrí a bhaineann le `-perm /000' d'fhonn go mbeidh sé i gcomhréir le `-perm -" +"000'; .i., ní mheaitseálann sé comhad ar bith faoi láthair, ach " +"meaitseálfaidh sé gach uile chomhad roimh i bhfad." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "argóint nialasach neamhbhailí i ndiaidh -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "argóint neamhbhailí `%c' i ndiaidh -size" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "argóint neamhbhailí `%s' chun `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" +"Glacann rogha -show-control-chars le hargóint aonair, ceann de 'literal' nó " +"'safe'" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "argóint neamhbhailí %s chun %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find, leagan %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils, leagan %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Gnéithe arna gcumasú: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "rabhadh: seicheamh éalúcháin anaithnid `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "earráid: %s ag deireadh an teaghráin fhormáidithe" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "rabhadh: treoir fhormáide anaithnid `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Tá an chomhadlann reatha san áireamh san athróg thimpeallachta PATH, agus is " +"neamhdhaingean é seo in éineacht leis an ghníomh %s. Bain an chomhadlann " +"reatha as $PATH (.i., bain \".\", nó idirstad ar dtús/i ndeireadh, amach)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Tá an chomhadlann reatha san áireamh san athróg thimpeallachta PATH, agus is " +"neamhdhaingean é seo in éineacht leis an ghníomh %s. Bain an chomhadlann " +"reatha as $PATH (.i., bain \".\", nó idirstad ar dtús/i ndeireadh, amach)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Ní cheadaítear {} mar chuid d'ainm uirlise le -execdir nó -okdir, de bharr " +"gur neamhdhaingean é seo." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Ní thacaítear ach aon phéire amháin {} le -exec%s ... +" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "Tá an timpeallacht rómhór le haghaidh exec()." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +# "fork" not in standard refs/corpus. Maybe want a "gabhl*" word instead? -KPS +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "ní féidir forc a dhéanamh" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "earráid ag feitheamh le %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "Stopadh %s leis an chomhartha %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "slonn neamhbhailí" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"slonn neamhbhailí; tá oibreoir dénártha '%s' in úsáid agat agus níl aon rud " +"roimhe." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "bhíothas ag súil le slonn idir '%s' agus ')'" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "bhíothas ag súil le slonn tar éis '%s'" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "slonn neamhbhailí; an iomarca ')'" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"slonn neamhbhailí; bhíothas ag súil le ')' ach ní fhaca mé é. B'fhéidir go " +"bhfuil preideacáid bhreise de dhíth ort tar éis '%s'" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "slonn neamhbhailí; ní cheadaítear lúibíní folmha." + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "slonn neamhbhailí; bhíothas ag súil le ')' áit éigin." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "úps! -- is neamhbhailí an cineál sloinn seo!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "úps! -- cineál neamhbhailí sloinn (%d)!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "caithfidh conairí a theacht roimh an slonn: %s" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "preideacáid neamhbhailí `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "preideacáid neamhbhailí `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "argóint neamhbhailí `%s' chun `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "tá argóint de dhíth i ndiaidh na rogha `%s'" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "an iomarca ')' agat" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "preideacáid bhreise gan choinne '%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "preideacáid bhreise gan choinne" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "úps! -- ionsá neamhbhailí de `and'!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Úsáid: %s [--version | --help]\n" +"nó %s bigramanna_níos_coitianta < liosta > locate-bunachar-sonraí\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Seol tuairiscí fabhtanna chuig .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils, leagan %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "lá" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "argóint neamhbhailí %s chun %s" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "Tá an bunachar sonraí locate `%s' truaillithe nó neamhbhailí" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Méid an bhunachair sonraí `Locate': %s beart\n" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "Ainmneacha comhaid a mheaitseálann: %s " + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "Gach ainm comhaid: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "le fad iomlán = %s beart" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\ttá %s beart ina spás bán, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s beart ina línte nua, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tagus %s beart lena ngiotán níos airde socraithe.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" +"Seans go ndearnadh scagadh ar roinnt ainmneacha comhaid, agus dá bhrí sin ní " +"féidir an cóimheas comhbhrúite a aimsiú.\n" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Cóimheas comhbhrúite %4.2f%%\n" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "Cóimheas comhbhrúite gan socrú\n" + +#: locate/locate.c:1002 +#, fuzzy, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" +"Tá cuma bhunachar sonraí slocate ar `%s', ach dealraíonn sé go bhfuil " +"leibhéal slándála %c air, agus ní thacaíonn GNU findutils leis an leibhéal " +"sin faoi láthair" + +#: locate/locate.c:1119 +#, fuzzy, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" +"Is bunachar sonraí \"slocate\" é `%s'. Is formáid nua é seo, agus is dócha " +"go mbeidh fadhbanna leis (tar éis an tsaoil, tháinig an cód seo ó CVS)." + +#: locate/locate.c:1133 +#, fuzzy, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "Is bunachar sonraí \"slocate\" é `%s'. Cuirfear rogha '-e' i ngníomh." + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" +"Thug tú rogha -E, ach ní cheadaítear an rogha sin le bunachar sonraí slocate " +"a bhfuil leibhéal deimhneach slándála aige. Ní ghinfear aon torthaí le " +"haghaidh an bhunachair sonraí seo.\n" + +#: locate/locate.c:1161 +#, fuzzy, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "Is bunachar sonraí \"slocate\" é `%s'. Cuirfear rogha '-e' i ngníomh." + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "Tá an bunachar sonraí locate `%s' truaillithe nó neamhbhailí" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Bunachar sonraí %s san fhormáid %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Úsáid: %s [-d conair | --database=conair] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=CINEÁL]\n" +" [--version] [--help]\n" +" patrún...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "theip ar phribhlíedí grúpa a ligean síos" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "theip ar phribhléidí setuid a ligean síos" + +#: locate/locate.c:1510 +#, fuzzy +msgid "Failed to fully drop privileges" +msgstr "Theip ar phribhléidí a ligean síos" + +#: locate/locate.c:1528 +#, fuzzy +msgid "failed to drop setgid privileges" +msgstr "theip ar phribhléidí setuid a ligean síos" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate, leagan %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argóint i ndiaidh --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"rabhadh: ní féidir an bunachar sonraí `locale' a léamh ó stdin ach aon uair " +"amháin." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "rabhadh: tá an bunachar sonraí `%s' thar %d %s d'aois" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; ní " +"cheadaítear carachtair le luach níos mó ná %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; ní " +"cheadaítear carachtair le luach níos mó ná %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; " +"carachtair anaithnid %s ag an gcríoch." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Sonrúchán neamhcheadaithe %s ar theormharcóir ionchurtha; caithfidh an " +"teormharcóir a bheith ina charachtar aonair nó seicheamh éalúcháin le \\ ar " +"tosach." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "Tá an timpeallacht rómhór á rith" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "rabhadh: luach %ld tar éis rogha -s rómhór, úsáidfear %ld ina ionad" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs, leagan %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Ní féidir an t-inchomhad `%s' a oscailt" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Líonann do chuid athróga timpeallachta %lu beart\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Íosluach agus uasluach d'fhad na hargóintí de réir POSIX: %lu, %lu\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Íosluach agus uasluach d'fhad na hargóintí de réir POSIX: %lu, %lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Uasfhad d'ordú gur féidir linn a úsáid: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Méid an mhaoláin ordaithe atá in úsáid i ndáiríre: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"comhartha athfhriotail %s corr; caitheann xargs le comharthaí athfhriotail " +"go speisialta mura bhfuil an rogha -0 tugtha agat" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dúbailte" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "singil" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "tá líne na n-argóintí rófhada" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "earráid ag feitheamh le próiseas sleachta" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: stádas scortha 255; á thobscor" + +# does "stopped" have the implication of "temporarily"? +# might then want to distinguish from following msgid... --KPS +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: stopadh leis an chomhartha %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: stopadh leis an chomhartha %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: uimhir neamhbhailí i ndiaidh na rogha -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: caithfidh an luach i ndiaidh na rogha -%c a bheith >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: caithfidh an luach i ndiaidh na rogha -%c a bheith < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Úsáid: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=tm]\n" +" [-E teaghrán-eof] [-e[teaghrán-eof]] [--eof[=teaghrán-eof]]\n" +" [-L uas-línte] [-l[uas-línte]] [--max-lines[=uas-línte]]\n" +" [-I ionadaí] [-i[ionadaí]] [--replace[=ionadaí]]\n" +" [-n uas-args] [--max-args=uas-args]\n" +" [-s uas-char] [--max-chars=uas-char]\n" +" [-P uas-próis] [--max-procs=uas-próis] [[--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=comhad]\n" +" [--version] [--help] [ordú [argóintí-tosaigh]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "úps! -- cineál neamhbhailí sloinn i mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "úps! -- cineál neamhbhailí sloinn i mark_type!" + +#~ msgid "old" +#~ msgstr "sean" + +#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n" +#~ msgstr "Ag laghdú arg_max (%ld) go arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "D'éirigh leis" + +# ugh. Not clear what kind of things we're matching -- KPS +#~ msgid "No match" +#~ msgstr "Níl a leithéid ann" + +#~ msgid "Invalid regular expression" +#~ msgstr "Slonn ionadaíochta neamhbhailí" + +#~ msgid "Invalid collation character" +#~ msgstr "Carachtar neamhbhailí comhordaithe" + +#~ msgid "Invalid character class name" +#~ msgstr "Ainm neamhbhailí ar aicme charachtar" + +#~ msgid "Trailing backslash" +#~ msgstr "Cúlslais ag deireadh" + +#~ msgid "Invalid back reference" +#~ msgstr "Cúltagairt neamhbhailí" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ nó [^ corr" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( nó \\( corr" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ corr" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Ábhar neamhbhailí idir \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Deireadh raoin neamhbhailí" + +#~ msgid "Memory exhausted" +#~ msgstr "Cuimhne ídithe" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Is neamhbhailí an slonn ionadaíochta roimhe seo" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Deireadh le slonn ionadaíochta gan choinne" + +#~ msgid "Regular expression too big" +#~ msgstr "Slonn ionadaíochta rómhór" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") nó \\) corr" + +#~ msgid "No previous regular expression" +#~ msgstr "Níl aon slonn ionadaíochta roimhe seo" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "gníomhartha: -exec ORDÚ; -fprint COMHAD -fprint0 COMHAD -fprintf COMHAD " +#~ "FORMÁID\n" +#~ " -fls COMHAD -ok ORDÚ ; -print -print0 -printf FORMÁID -prune -ls -" +#~ "delete\n" +#~ " -quit\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Liosta Preideacáidí:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Géagchórais `Eval':\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Géagchóras `Eval' Optamaithe:\n" + +#~ msgid "Optimized command line:\n" +#~ msgstr "Líne na n-orduithe optamaithe:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "cuimhne fhíorúil ídithe" + +#~ msgid "inserting %s\n" +#~ msgstr "ag ionsá %s\n" + +# don't know if alignment matters here, so use 4-letter 'sórt' vs. 'cineál'-KPS +#~ msgid " type: %s %s " +#~ msgstr " sórt: %s %s " + +#~ msgid "left:\n" +#~ msgstr "taobh clé:\n" + +#~ msgid "right:\n" +#~ msgstr "taobh deas:\n" + +#~ msgid "[stat called here] " +#~ msgstr "[glaodh stat anseo] " + +#~ msgid "[type needed here] " +#~ msgstr "[tá gá le cineál anseo] " + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Géagchóras `Eval' Normalaithe:\n" diff --git a/po/gl.gmo b/po/gl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..096ebb0a4948eb5be404279b59cecebe3d9893e4 GIT binary patch literal 3833 zcmbW3O^g&p6vs(L_&1BWLtv!cDz+Koc|`IFPvU;8Wm_AO~07p0B?VL>JovlKsX&vdeL>1BG7)$-WDBjIYIJ73W z+eVP=T?NSwJ3u<$A&~6d0?A)W81);AdQD0`SUFhM`Q1STfvXP z8h8;TeOKYxhzGA(qqV4!??^AWqu*#hYP25NlKjH)kUz+$bWXAj>3KIEY91c4!)82C zHEU$=wRm8PEGFUV?CfL@@)b3TEwV59lp5J&Q}!$WqO(vVUs9v9QX^kb8^uHCBwOR^ zW;WRZvZ~{Wv>l~IA_Lx<=T3!MM7$bcsLAD=qW)QxoZ>DKN$U96`1md^TE-?yhnbLy zA{k;w}$84z=qz-{KloPtKlH!$_90b ziQ_?z`Zp)0+DhMqTAjtrzM;sfxpfAPXGW+X;CADDyjH6b_V8ypJMiLh-c~x`U1=RT zyb3E*XJmXt(TeUlc*-s7J+5c8nbq9QyF_-lwANU5B8!xsSK%Hjo9ra(b?``O$rEF+ z4dSka&1Mj+XC?E6)+V9gn(6%xWy1Z`T7(A=;A}rJcAf=d-m$=>tw=JdyUH3(0YveV zt&6Q>7Nc@b`Yh9m&k99xo^@BG$_fbCQB4 zF&K4AqjD}rV3JMy6LcCy{ZOX~*~V`k+A;Sz7!3hg3+xN7p}rCW4-uN7UxzlpjC+_QZ5>6Vy^P0P&H zeAC&3NjgkLD7|SZI!%56!R{+$pxt4dMqXk?korD$p7Lc{YpYrs_%-SFR1P0Jyno3K zjat33&*%hE>rErLnn>Pr$+kEWO7G(SDPf&Vo>9(t6BFZ;USmm^)NM=a?bp5uGJj39 zRF*q?`9ClmM#YsXrGF=`rrbw#NF;v`v7F-on zLRwZb^x;niZlXkxg}7f>4{dUO)^o9sb|2M8#AZ zeEjW^dB!i@8rHW)Ry|0Bl7CquPug@Z>9m>2L}?m|N@nf6O7%qyE6NEJy>>+sLbi)3 z&X)Eswq|Lsx}ch5mpPy-g}(@tQBZ5B0GCxM, 2000. +# +# Se desexas colaborar connosco na traducción de programas libres ó galego, +# vai mira-la páxina do noso grupo: http://www.ctv.es/USERS/jtarrio/trans +# +# First Version: 2000-02-16 23:49+0100 +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.5\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2000-05-30 10:11+0200\n" +"Last-Translator: Jesús Bravo Álvarez \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "argumento %s de `%s' non válido" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumento %s de `%s' non válido" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Os argumentos válidos son:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Erro de sistema descoñecido" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: a opción `%s' é ambigua\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: a opción `--%s' non permite ningún argumento\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: a opción `%c%s' non permite ningún argumento\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: a opción `%s' require un argumento\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: opción `--%s' descoñecida\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: opción `%c%s' descoñecida\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opción ilegal -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: opción non válida -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: a opción require un argumento -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: a opción `-W %s' é ambigua\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: a opción `-W %s' non permite ningún argumento\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "tamaño do bloque" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Uso: %s [camiño...] [expresión]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Uso: %s [camiño...] [expresión]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "aviso: secuencia de escape `\\%c' descoñecida" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "non se pode obte-lo directorio actual" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "non se pode obte-lo directorio actual" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "descoñecido" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"a rota por defecto é o directorio actual; a expresión por defecto é -print\n" +"expresión pode consistir en:\n" +"operadores (precedencia decrecente; -and está implícito cando non se " +"indican\n" +"outros):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"a rota por defecto é o directorio actual; a expresión por defecto é -print\n" +"expresión pode consistir en:\n" +"operadores (precedencia decrecente; -and está implícito cando non se " +"indican\n" +"outros):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer FICHEIRO -ctime N -empty -false -fstype TIPO -gid N -group " +"NOME\n" +" -ilname PATRÓN -iname PATRÓN -inum N -ipath PATRÓN -iregex PATRÓN\n" +" -links N -lname PATRÓN -mmin N -mtime N -name PATRÓN -newer FICHEIRO\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATRÓN -perm [+-]MODO -regex PATRÓN\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOME\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "modo `%s' non válido" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "argumento nulo de -size non válido" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "tipo `%c' de -size non válido" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "argumento `%s' de `%s' non válido" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "argumento %s de `%s' non válido" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versión %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find versión %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "aviso: secuencia de escape `\\%c' descoñecida" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "aviso: directiva de formato `%%%c' descoñecida" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "o ambiente é grande de máis para exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +#, fuzzy +msgid "Failed to change directory" +msgstr "non se pode voltar ó directorio inicial" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "non se pode facer fork" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "erro agardando a %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminado por sinal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "expresión non válida" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "expresión non válida" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "expresión non válida" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "ups -- tipo de expresión no válida" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "ups -- tipo de expresión no válida" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "os camiños teñen que preceder á expresión" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "predicado `%s' non válido" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "predicado `%s' non válido" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "argumento `%s' de `%s' non válido" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "non atopado argumento de `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "expresión non válida" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "predicado `%s' non válido" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "ups -- inserción dun and por defecto non válida" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "Uso: %s bigramas_máis_comúns < lista > lista_codificada\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find versión %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "días" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "argumento `%s' de `%s' non válido" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versión %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "liña de argumentos longa de máis" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "aviso: a base de datos `%s' ten máis de %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "o ambiente é grande de máis para exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versión %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dobre" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "simple" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "liña de argumentos longa de máis" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "erro agardando polo proceso fillo" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: saíu con estado 255; abortando" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: parado por sinal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: terminado por sinal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: número para a opción -%c non válido\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: o valor para a opción -%c ten que ser >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: o valor para a opción -%c ten que ser < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Uso: %s [-0prtx] [-e[cadea-eof]] [-i[remprazar-cadea]] [-l[máx-liñas]]\n" +" [-n máx-args] [-s máx-cars] [-P máx-procs] [--null] [--eof[=cadea-" +"eof]]\n" +" [--replace[=remprazar-cadea]] [--max-lines[=máx-liñas]] [--" +"interactive]\n" +" [--max-chars=máx-cars] [--verbose] [--exit] [--max-procs=máx-procs]\n" +" [--max-args=máx-args] [--no-run-if-empty] [--version] [--help]\n" +" [comando [argumentos-iniciais]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "ups -- tipo de expresión no válida" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "ups -- tipo de expresión no válida" + +#~ msgid "Success" +#~ msgstr "Éxito" + +#~ msgid "No match" +#~ msgstr "O patrón non encaixa" + +#~ msgid "Invalid regular expression" +#~ msgstr "Expresión regular non válida" + +#~ msgid "Invalid collation character" +#~ msgstr "Carácter de ordenación non válido" + +#~ msgid "Invalid character class name" +#~ msgstr "Nome de clase de caracteres non válido" + +#~ msgid "Trailing backslash" +#~ msgstr "Barra invertida final" + +#~ msgid "Invalid back reference" +#~ msgstr "Referencia anterior non válida" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ ou [^ desemparellado" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( ou \\( desemparellado" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ desemparellado" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Contido de \\{\\} non válido" + +#~ msgid "Invalid range end" +#~ msgstr "Final de rango non válido" + +#~ msgid "Memory exhausted" +#~ msgstr "Memoria esgotada" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Expresión regular precedente non válida" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Fin prematura da expresión regular" + +#~ msgid "Regular expression too big" +#~ msgstr "Expresión regular longa de máis" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") ou \\) desemparellado" + +#~ msgid "No previous regular expression" +#~ msgstr "Non hai unha expresión regular anterior" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "accións: -exec COMANDO ; -fprint FICHEIRO -fprint0 FICHEIRO\n" +#~ " -fprint FICHEIRO FORMATO ; -ok COMANDO ; -print -print0\n" +#~ " -printf FORMATO -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Lista de Predicados:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Árbore de Evaluación:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Árbore de Evaluación Optimizado:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Árbore de Evaluación Optimizado:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "memoria virtual esgotada" + +#~ msgid "inserting %s\n" +#~ msgstr "inserindo %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tipo: %s %s " + +#~ msgid "left:\n" +#~ msgstr "esquerda:\n" + +#~ msgid "right:\n" +#~ msgstr "dereita:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Árbore de Evaluación Normalizado:\n" + +#~ msgid "cannot open current directory" +#~ msgstr "non se pode abri-lo directorio actual" + +#~ msgid "error in %s: %s" +#~ msgstr "erro en %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "opcións (sempre certas): -daystart -depth -follow --help\n" +#~ " -maxdepth NIVEIS -mindepth NIVEIS -mount -noleaf --version -xdev\n" +#~ "tests (N pode ser +N ou -N ou N): -amin N -anewer FICHEIRO -atime N -cmin " +#~ "N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [--version] [--help]\n" +#~ " [-e | --existing] pattern...\n" +#~ msgstr "" +#~ "Uso: %s [-d camiño | --database=camiño] [--version] [--help]\n" +#~ " [-e | --existing] patrón...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "comiña %s desemparellada" + +#~ msgid "command too long" +#~ msgstr "comando longo de máis" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "non se pode encaixar o argumento no límite de tamaño da lista de " +#~ "argumentos" + +#~ msgid "argument list too long" +#~ msgstr "lista de argumentos longa de máis" diff --git a/po/hr.gmo b/po/hr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..9accaaa7d76aea87074fe9817299e5194316777b GIT binary patch literal 3833 zcmb7`ONdX4eIl0Rdf5i1G+oFhn5Kbl3LQOi$HN)it|2 z2NI(P6ZK>~m=N_~h!+zRPfI))6Qfb_L_Byf@kSz?yqM_0|JRS1S#}{(N$qdC>Z_{n zRrT%ftCoJ~p;ge=qF=bf^Tz4-68u5iu+;M&2RDN2zcV*+lppWk}AOqh6*MnbxkAYXfC&26A)8MkZGj0T-l6Me%0DKjE2s{No0-ggO z2H(lYKhF6Th^@RIa{dC+K370m_bWI6UI&+he}iQI(tFUsK@daUdTh*?R$81zrN50xyGf&NYziTXHXa2(ASg_%cZQM<7Hz1(HA8Ao=Mda1siC50byj zPK4r1zI#3A_xFet+d$4dZD1d2k3k3DUYZK?Z&XlHb1rDb9a@wBNru z*R06=whbizkAdWegCN;=1|}1~TwZkmOh35Rxl_qu?Hp;*)?d z(fa^|i@i@k^2_I-5B>y_zECUm8=bihon**Av^S3M=$g=aYNRi%rA9haqkBd9M2+;L zhON^^e%pdhaiv_?j83tjM!xNDu(R@gZxc7S+E0nU#^^F)M{$$yS+|ku*LnlPP8s zo;b@!wr<_Ycuku`swfqbaV#RN(XB*k#eAQYf`M#CwRtQ^h3Pnt5l@`P2ymxFow^A1jy3 zgxzcp^Ikc8oJ~pJCSBe z5mki8h^lwy4R!c5{?48}?Va_CNft{bSfVwKL=M()a07|k5njNR(g`J6qxc<(gaytR zqzVfW_#n|{)(iQp^+N4xvG9ayOQRJf6Xj02FOCvvzKR(Uc&UbLnoG+0bhu;}84RXm z9I}?tfw0z-dGhyDPtE}cCpOQ3{+#4xZ)+QP_dSt>MH-eLu{yrpYm5o#? z+x^Nmzp{f3k5xx^Y^n@bDiHLKiMAy7_vA+W%BVjw!YU)x%IGHgTN!wb+r*zRT-lf- zv8wEVX+vjrST?K-*sdv+{@6Psnmn+i#BQunk>io@Cj@U+*|^bA2(QtuST}G9Iy{hd zz85*}X3A4$_rRfphxYgEA1+r0#^) zl?o+7-E!xl7sn$*CiFjCN=Vx>5LT>)pt4Rbi zck#}r=cX45K?vL0;u^$IY2kcg_<4E5`o2@LB5=!7@~0m%ndSV3-EuFS&E;;P(0pC` z{np_Qb+;YY#lpa3Z~me&Q@9iz)bwsBGOrbmzH##ZJ@y@n>B7f;-f;J^?~Wess$wNQ z_qM@VWW@OfrzgM8RWAsVS=W2>!+qJSkBdMDQ$@%szHD+lvLbX5zlvSjB9`az4-7*c zz$e1d)RAL0eZL#HTD>7oK9MXzF>nbErh3r8wUu=g1jRi{n8dh-^mIeVa*iQpIEhYZ zP|Bvo0Lst7hL(}+s%UUkcMON4AmkH}Yhy>z6!|=-`LHgo)@5ECpi%caHi1=-V+Z5pYSm8CHfcm&3++C*hFd;V+gd&00Fd z?yd>LaEUc@H9S-JMXOcl^Io+m7D1B)R;5~Ex-LRhc(+JT&mj{vqEW{)Rt!ouuVO4F S!l?!q6{C?r4_K5|jQ;@2>FwD7 literal 0 HcmV?d00001 diff --git a/po/hr.po b/po/hr.po new file mode 100644 index 0000000..c452b46 --- /dev/null +++ b/po/hr.po @@ -0,0 +1,1184 @@ +# Translation of GNU findutils. +# Copyright (C) 2002 Free Software Foundation, Inc. +# Hrvoje Niksic , 2002. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.7\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2002-04-22 02:04+02:00\n" +"Last-Translator: Hrvoje Niksic \n" +"Language-Team: Croatian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-2\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "neispravan argument %s za `%s'" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "dvosmislen argument %s za `%s'" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Valjani argumenti su:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Nepoznata sistemska gre~ka" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: opcija `%s' je dvosmislena\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: uz opciju `--%s' ne ide argument\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: uz opciju `%c%s' ne ide argument\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: opcija `%s' tra~i argument\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: nepoznata opcija `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: nepoznata opcija `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: nedopu~tena opcija -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: neispravna opcija -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opcija tra~i argument -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: opcija `-W %s' je dvosmislena\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: opcija `-W %s' ne dopu~ta argument\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "veli~ina bloka" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[dDyY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Uporaba: %s [staza...] [izraz]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Uporaba: %s [staza...] [izraz]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "upozorenje: nepoznati escape `\\%c'" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "ne mogu saznati trenutni direktorij" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "ne mogu saznati trenutni direktorij" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "nepoznat" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"podrazumijevana staza je trenutni direktorij; podrazumijevan izraz je -" +"print\n" +"izrazi se mogu sastojati od:\n" +"operatora (po opadajuæem prioritetu; -and je implicitan gdje drugi\n" +"nisu navedeni):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"podrazumijevana staza je trenutni direktorij; podrazumijevan izraz je -" +"print\n" +"izrazi se mogu sastojati od:\n" +"operatora (po opadajuæem prioritetu; -and je implicitan gdje drugi\n" +"nisu navedeni):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer SPIS -ctime N -empty -false -fstype TIP -gid N -group IME\n" +" -ilname UZORAK -iname UZORAK -inum N -ipath UZORAK -iregex UZORAK\n" +" -links N -lname UZORAK -mmin N -mtime N -name UZORAK -newer SPIS\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path UZORAK -perm [+-]MOD -regex UZORAK\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user IME\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "neispravan mod `%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "neispravan prazan argument -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "neispravan -size tip `%c'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "neispravan argument `%s' `%s'-u" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "neispravan argument %s za `%s'" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find verzija %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find verzija %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "upozorenje: nepoznati escape `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "upozorenje: nepoznata format direktiva `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "okoli¹ je prevelik za exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "ne mogu se forkati" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "gre¹ka pri èekanju na %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminiran signalom %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "neispravan izraz" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "neispravan izraz" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "neispravan izraz" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oops -- neispravan tip izraza!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oops -- neispravan tip izraza!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "staze moraju biti navedene prije izraza" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "neispravan predikat `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "neispravan predikat `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "neispravan argument `%s' `%s'-u" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "nedostaje argument `%s'-u" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "neispravan izraz" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "neispravan predikat `%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oops -- neispravno podrazumijevano ubacivanje and-a!" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "Uporaba: %s most_common_bigrams < lista > kodirana_lista\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Prijavljujte gre¹ke na adresu ." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find verzija %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dana" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "neispravan argument `%s' `%s'-u" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate verzija %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "linija s argumentima predugaèka" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "upozorenje: baza `%s' starija je od %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "okoli¹ je prevelik za exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs verzija %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dvostruki" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "jednostruki" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "linija s argumentima predugaèka" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "gre¹ka za vrijeme èekanja na djeèji proces" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: iza¹ao sa statusom 255; poni¹tavam" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: zaustavljen signalom %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: terminiran signalom %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: neispravan broj za opciju -%c\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: vrijednost opcije -%c mora biti >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: vrijednost opcije -%c mora biti < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Uporaba: %s [-0prtx] [-e[eof-niz]] [-i[zamjenski-niz]] [-l[maks-redaka]]\n" +" [-n maks-argumenata] [-s maks-znakova] [-P maks-procesa] [--null]\n" +" [--eof[=eof-niz]] [--replace[=zamjenski-niz]] [--max-lines[=maks-" +"redaka]]\n" +" [--interactive] [--max-chars=maks-znakova] [--verbose] [--exit]\n" +" [--max-procs=maks-procesa] [--max-args=maks-argumenata]\n" +" [--no-run-if-empty] [--version] [--help]\n" +" [naredba [poèetni-argumenti]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oops -- neispravan tip izraza!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oops -- neispravan tip izraza!" + +#~ msgid "Success" +#~ msgstr "Uspjeh" + +#~ msgid "No match" +#~ msgstr "Nema poklapanja" + +#~ msgid "Invalid regular expression" +#~ msgstr "Neispravan regularni izraz" + +#~ msgid "Invalid collation character" +#~ msgstr "Neispravan kolacijski znak" + +#~ msgid "Invalid character class name" +#~ msgstr "Neispravan naziv znakovne klase" + +#~ msgid "Trailing backslash" +#~ msgstr "Obrnuta kosa crta na kraju" + +#~ msgid "Invalid back reference" +#~ msgstr "Neispravna povratna referenca" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Nesparen [ ili [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Nesparena ( ili \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "Nesparena \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Neispravan sadr¾aj \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Neispravan kraj raspona" + +#~ msgid "Memory exhausted" +#~ msgstr "Memorija iscrpljena" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Neispravan prethodni regularni izraz" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Prerani kraj regularnog izraza" + +#~ msgid "Regular expression too big" +#~ msgstr "Regularni izraz prevelik" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Nesparena ) ili \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "Nedostaje prethodni regularni izraz" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "radnje: -exec NAREDBA ; -fprint SPIS -fprint0 SPIS -fprintf FOMAT SPISA\n" +#~ " -ok NAREDBA ; -print -print0 -printf FORMAT -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Popis Predikata:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Stablo Evaluacije:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Optimirano Stablo Evaluacije:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Optimirano Stablo Evaluacije:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "virtualna memorija iscrpljena" + +#~ msgid "inserting %s\n" +#~ msgstr "umeæem %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tip: %s %s " + +#~ msgid "left:\n" +#~ msgstr "lijevo:\n" + +#~ msgid "right:\n" +#~ msgstr "desno:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Normalizirano Stablo Evaluacije:\n" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s se promijenio dok se izvr¹avao %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. se promijenio dok se izvr¹avao %s" + +#~ msgid "error in %s: %s" +#~ msgstr "gre¹ka u %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "opcije (uvijek istinite): -daystart -depth -follow --help\n" +#~ " -maxdepth NIVOA -mindepth NIVOA -mount -noleaf --version -xdev\n" +#~ "testovi (N mo¾e biti +N ili -N ili N): -amin N -anewer SPIS -atime N -" +#~ "cmin N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Usage: %s [-d staza | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] uzorak...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "nesparen %s navodnik" + +#~ msgid "command too long" +#~ msgstr "naredba predugaèka" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "ne mo¾e stati u jedan argument unutar ogranièenja na duljinu liste " +#~ "argumenata" + +#~ msgid "argument list too long" +#~ msgstr "popis argumenata predugaèak" diff --git a/po/hu.gmo b/po/hu.gmo new file mode 100644 index 0000000000000000000000000000000000000000..b3db5ffe982dd824099eee658263623b5b9ba482 GIT binary patch literal 15237 zcmd6uZH!!3dB<-{fUrQqOQAp-dc4W9yY=3&*GWh+PE0n=nrv*Z7kllzIEj5`=FH6X z+_`s{duP`>Pzb7!pa?hC${-a9k9W5*PzI`ZBB+;h)4_nhZE@6Y(3-*&?nJU*K1=eTZvjpzLmxbQmu@VVzk z&)Wsw3*G^q2B*Q#f%D)WgP#Jw1-=I~Z}7YXdDdX^t>6+2c`W4=!4II3j71`ec<1L?*hLI-U8nICeQnMaCe4>L0Ml5`~~m} z;7@^n4!#Ba3sCm;P4I2te}X>)-uPy>&RfBEa(_4Y4saE`53GR|@Ir<++~j#x?i=7U z;MYJ|$B~;o?=CO|?*_jF{t5U`;D3O>!XlmpKl)bp-kVs&Y3^?WWgQ;}7r|cxh3+qb zLeKvKUkiqBci07GU+2N^fqhWUF<}x}|K~xPyf1^0*!wdOl6fzI((fDK4d8b`Ir3LP zq09F{{&}~udD+iC@Mpo}pq%qLP|oX(P;J3hE1@D@5_}Ad)xPOYpNc*=zx_F;p zvG;*r0fp`_gVOJIi17;eRq#{bMHbIdd;1ogE_wtMdi_3l5d25*A@CLs>0{to@U`H- zfO76HgR-x0gE#W!JK+7?f3M`u+Yn1>OUGB*U+Q!q49ZKLoyR(LH|*lyiF)6gj#AGL`pohVNifXMh?TlOC2I-Rxe0#~_E z8O29vsknqEKg4y2OZZ1Vk8?f3^=2-Sfwyo$K6}0&0B_{VKakt<4eV+^awf2lm1$`> z#U*kfye@nsyn7qhqg?st0lvJO>q)L7T=Eefm5;~(M_qhw=9}=f@c8Sv-ocfBgzw}d za=OH|&LzC`HZI|T{3CMdO}$|zQPns~br7k@Y=%K(RJEzQx|*79vY_apqnaA&HGHZz zgS4sArcuqH(NvWnRf$PUQ;do0YO@(so1+71NKMkwRU^|LH=Vefs!Fess5Dmh@x`wP zQLUE-Ve&vD>XqVdn1lGLy`!(_O=CVeP5we`gTIwVkir*?JvsEVC;PvF1)bNp;#w z)V{m!+OKql(`4H$tE_@BGz}=@=&5{P%~XYcJc%}R7}RnC)Z?!5XR2Ap@h&?DXDw%E zsx!%~s>LRWW>clZFy7>-l)wA1ZM(CEdzWarba`EU<5qR-Xl@ckd+ zh5n-))O9Z}>wVP~PFmb3L6bD@bat|1`5LTRR=o(Ri5pSSXJkPrp{k?K#OIa>?m1`J zGivPh6D8(!Pi zqGb*l*iX*QM7k21T3LA?Ts^5oiKq>fmx$gB=bblN&9dW37*~hozD@*u9wR`BUC{B^a zs^JJ{!uTiuit|6>E7GnGFfWbac0{AuZDib-nA-3i*CZ$d;c)n2NN`INn9pF7pua{t zM~!gAm??A(62ATTP-0ebIhFQg$vfg0qL%Ytf|QhHrIjtr!jyMZpAXu-whB$uz#yUA zt8u$6rec$~SsB1)^iWG%s+Y)65r$(Cw=u>whBbE)aLfj;pJ$iz&WdgX+R~)3qSEYlt(~RUR7W?A(y3~uX{Wqr zPog(;6zOIuv$cC5(1Hr;YAf!krryA0#B8a81+4PA1#9t4RFkPpo3p%@+4j~a8EGfT z)v#A%vzbJ%Ev-L{1aAc0I1=p*k9Px+=Y`CJu)?2UOS?imA$CPfut;~|e?Ts0r-iDr z|B_N`p%L}bHSL(a2(#>P8dSX-w`IRwb-P{1T-t;{0h`T+O_!#HZTx z=53WxnoOd#6Me$~&GWWrByK&b$nQ;7;k5Bu4t{y*% zDQTLp^VAeOlMjS!$4PodSUQf*U^BbAouJXhIq*aAnGPtYGW}daro2sW=moErcNMkm6K-Q6=Nb^*o)x)()Ew%Ma7uMVOH_zgtADRh?H65aA7Rt$rOkkOxZ4ZPoIufpW^S< z<4<{Kz1%%iKB~xINSwpDH^aI*bnN)irFG@kts~0)%8})w(YC26OZvRaUe_fXklloM zvUUF0(Y&IECh>7w(tND!OC3CR^yt#+Lu$XWN~E}lD7zKAEgJTZ4ij>08#&sP4<2pX zKjjq;RpECD^N3F{lXy8RC>u|taSYGk8y3wt{65@-sq}_C?p4u893ykI^6w3k?i5?E zrneHW7WX(1Z&dU+KKm}-rBxG+*J)#%eRbec_lz+j+U8>Raiv9yosI zY|&n9Ww_~lNb%^b_L?EI`s;^qEU>f5mTBtVWG{1GMK3?nW*R)^}=v?fO0Id-{LWmR84#s>O z_Z(8#MNV@wwfR@=MTa~NRC6^`?P5G+T~MHEYU1c2RAPihMYKC%P$k-RM}e7)(al|} z_f#X;FwuND6RAdM5=1(2E`1Bxh%o-`3|{!;$4v%STSofVH+giUu(ULL`iC zJ=ar(#qt@xp?o55UVDa9s-c(8;25C~qj*B|l$Yp86nM31FsAqiVn^!{F+{aFH;;y@ zz_eSc-ivIcuj;rqVvU^t=-E_&np;(9Cw8lLuZkDo+rO(qMa>S>svMcwga%GS|S_J|UXAmB^576SuSNwe!`EPd40;hfT6-3$B2P zx>(U%d+^A5B%mcbJy4q;?qOy3i(8q?wrz1@WaB6J4|U)|v0g+zB(ct^v(=DlZ^qi* zX6|d8jDqvl;gD4(cm&Q5uf>un$n#uDsFNm7@%G{#i7QDgx&F0y9?x-IoWQox5uzer zXIZSM@=fv@)(^lv-BLz^F;R`8qV3V)@>}MzltMvSf5Le_%xXOq6e0#rB2?kRS-&_Q z38P$kCp9&SaMn-Qkm%Z3rdkRKF~tW)9d8vrJ6;zCLr6DDqB^I?HGs5 z0S$>nqcAr=(>Cl>D;N$F>bgan?}3?k%E}h8?MH^KS)JbvM|d%B*b+o)N#9z8~22)jg8qf zPF=glk<0dnfi&x~LAJNnjnCl#`71U5l*{Bu7?CB1)t#k%rG0m28D#%xf|B$fB#-Q` z$7LJy7G3i^^3>X~b^jntAr{dmwL~PeZ|~l_{k`w^_ui`(?ed-u}OKTeKT zl1IaS(#c<3REu|%7w>faj_4%y*SqKlb`f{WY8icF)ZutTSBaO5+&$o8{gfcO)a)IY zIzoQ9M-=9-8{ICehkH>&V%V06*IUHhJ#CKoT3JG1GZyP zDQh6nPi)mP{VUIo&0`AKtKQlqNNqoek(vcLo>9&V+5#H!N*%Io+^cl{{>vJywm*Y7Jh9wl>nig)XV^ z38Pv;-JCOh*|k%>3u>e(G)6PmTE4=$Vw<*brE$|)UO>huyV35U_5#gDWa zSF+f?n4PWHwGzo7wt{eQk>gDQNZUUwk(fjB@;J9ssKOKlGL;0vS1`apA!9h?H>5$jw|XPIRwQv(_|3KiK$m!T@eML`qw+JnpJ!DV5& z!NqXPX~3i(hYe9ATBIXxjn-WlOK!0r44&U!ciH|V^WL^MJ7<5i)vj<_xGqoKqagdJ z@^LZJxE$zj@CBx-ooJPo6i)aLZb z2-}=HqIC`>y~N3*lMrCs!$@-BeX-NRo6i%5;+Ww)k|GI^K5;AXyRk#o@=kdN6F6B! zUv!Ejy0Khg4F;!vfVqhqIHF?MUGf(ZvK1tjZRDlAd&CJUJY;Fq&ga3s;wK6^6#MU5 zU{-7m;gp`bYSGBKO*zHL?*w6m<-MAp1<5A+PY8D5#`QJxtVw|gFQkhu#{&!SSgaE> zc%C0eTY>#9EP+7oq3mN|E@161?bPsc0w_$N*76<}4Y>^|&8x;Ka08C41R0srB_+W$#b` zw~OPQ%Aw(~zYajDJ3O{yc-ySFtZQt~(-wM>O&Mko@`9obk=ZAsiHgBn8VSm)n4T0}fK7Y8=c zgvDs{`n=>6tVq#m+S?ujT(kHz_{93jqoft{`qSVOj~uZDsO*9JffNa3K3OkHP_|c5 zgK~F85z5_OtqQfabbM*`;EB8lmE8&jT@fm8*inQk9ykpqB+Z-h!J}(a&JN;ZeBzgQrRfYWgHerSvsXF z_7B%qT*lHhX0)t=^UGwp*DzwZwhbJsvXPk230s7I;sk6PW7Cr@>x5_QN>m@&ga}^H zIaA?>8RIdxpV!|4>)?7nZ2w6IqVW&J!{`SsugNdX1{Wln62T#by(2eLAu%wxOacM6 z9y^R(BZJ2tjATJv#z47h-SA!4?(WKVS<*z!Rg=LBEs`U+GLnF{g}Xp={@b%SQea!a z|5E%!L0m487EWB(Hgr+Bnp1~Y4spJ_EZVA_G;rC99k?&Qff#a|)lyuK*fwQ7P%gv% z3$C*#`6)aac1U7KQaZ3wp7bfJIbzIO&>)P}D7jZJ*1hm0jU7ISybpYxx)Rio_~L&3yfwf1DsMI;S0y= zB7CQNF;yakIBqUN&Rr|(u~ObE z4!6zb?zyau2~oC3Qq{z4^2x$BGKzbRI%X7q!0WEc44xJn%ZGhFbc> ziLO*+OLns%wu7I$Ek_X)&{<*7dLrjYU|x*mUE(F=H9;Q=MeJJUJJ^qlWsrf@GnbvTRhB(!|7Bv!dgOnV+z)d=qjcqqY2En*=yJ1Y;<@S;~TQ zqZ~PX&7MWZPwc|rlGt!@J19&}7-z+SBONZIh|DBKT{Mq)&O&$c3c8k3n1$-r;eyW! zgJ(Hlhed>^=kmAN3|^8T2K;c<3Y!SAvt#^PRHRQD?2Gs%taaqvxn%W|u0g(+M&2p0 py$!;M%SP6USC?5wo8z&5K@^Y(9lSswZxUQa2@q|dFwE|F{{xdTbiDuo literal 0 HcmV?d00001 diff --git a/po/hu.po b/po/hu.po new file mode 100644 index 0000000..c1f7840 --- /dev/null +++ b/po/hu.po @@ -0,0 +1,1137 @@ +# Hungarian translation of findutils. +# Copyright (C) 2002 Free Software Foundation, Inc. +# Translated using gnu.twm +# Emese Kovács , 2002. +# Gabor Kelemen , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.27\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-09-11 13:14+0100\n" +"Last-Translator: Emese Kovacs \n" +"Language-Team: Hungarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.10.2\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "a(z) \"%s\" argumentum érvénytelen a következőhöz: %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "a(z) \"%s\" argumentum nem egyértelmű a következőhöz: \"%s\"" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Az érvényes argumentumok a következők:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Ismeretlen rendszerhiba" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: a(z) \"%s\" kapcsoló nem egyértelmű\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: a(z) \"--%s\" kapcsoló nem enged meg argumentumot\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: a(z) \"%c%s\" kapcsoló nem enged meg argumentumot\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: a(z) \"%s\" kapcsolóhoz argumentum szükséges\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: a(z) \"--%s\" kapcsoló ismeretlen\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: a(z) \"%c%s\" kapcsoló ismeretlen\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: illegális kapcsoló -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: érvénytelen kapcsoló -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: a kapcsoló egy argumentumot igényel -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: a \"-W %s\" kapcsoló nem egyértelmű\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: a \"-W %s\" kapcsoló nem enged meg argumentumot\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "blokkméret" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "\"" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "\"" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[iIyY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Használat: %s [-H] [-L] [-P][útvonal...] [kifejezés]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Használat: %s [útvonal...] [kifejezés]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "figyelmeztetés: ismeretlen escape: \"\\%c\"" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"A FIND_BLOCK_SIZE környezeti változó nem támogatott, egyedül a " +"POSIXLY_CORRECT környezeti változó befolyásolja a blokkméretet." + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "az aktuális könyvtár beolvasása sikertelen" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "az aktuális könyvtár beolvasása sikertelen" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Figyelmeztetés: a(z) \"%s\" fájlrendszer nemrég le lett választva." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Figyelmeztetés: a(z) %s fájlrendszer nemrég csatlakoztatva lett." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"A(z) %s%s megváltozott a(z) %s végrehajtása során (régi eszközszám: %ld, új " +"eszközszám: %ld, a fájlrendszer típusa: %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"A(z) %s%s megváltozott a(z) %s végrehajtása során (régi inode szám: %ld, új " +"inode szám: %ld, fájlrendszer típusa: %s) [ref %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"A(z) \"%s\" szimbolikus link egy hurok része a könyvtárhierarchiában; a " +"program már bejárta azt a pontot, ahová mutat." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"A rendszer fájlrendszerhurkot észlelt; a(z) \"%s\" azonos eszközszámmal és " +"inode-dal rendelkezik, mint egy könyvtár, amely a(z) %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "szinttel feljebb a fájlrendszer-hierarchiában" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "szinttel feljebb a fájlrendszer-hierarchiában" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "figyelmeztetés: a(z) %s szimbolikus linket a rendszer nem követi" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"FIGYELMEZTETÉS: A hard linkek szám hibás a következőhöz: %s; ez lehet egy " +"hiba a fájlrendszer illesztőprogramjában. A find -noleaf kapcsolója " +"automatikusan bekapcsolva. A korábbi próbálkozások meghiúsulhattak a " +"keresendő könyvtárak felvételére." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "ismeretlen" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"figyelmeztetés: a(z) %s kapcsolót a(z) %s nem kapcsoló argumentum után adtad " +"meg, de a kapcsolók nem helyzetérzékenyek (a(z) %s hatással van mind az " +"előtte, mind az utána található tesztekre). A kapcsolókat az egyéb " +"argumentumok előtt kell megadni.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"figyelmeztetés: a -d kapcsoló elavult; helyette a -depth kapcsoló " +"használandó, mivel az utóbbi felel meg a POSIX-nak." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"az alapértelmezett útvonal az aktuális könyvtár; az alapértelmezett " +"kifejezés -print, kifejezés lehet:\n" +"operátorok, kapcsolók, tesztek és tevékenységek:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operátorok (csökkenő precedencia; alapértelmezett -and, ha nincs más " +"megadva):\n" +" ( KIF ) ! KIF -not KIF KIF1 -a KIF2 KIF1 -and KIF2\n" +" KIF1 -o KIF2 KIF1 -or KIF2 KIF1 , KIF2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"helyzetérzékeny kapcsolók: (mindig igaz) -daystart -follow -regextype\n" +"\n" +"normál kapcsolók (mindig igaz, más kifejezések előtt adandó meg):\n" +" -depth --help -maxdepth SZINTEK -mindepth SZINTEK -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"Tesztek (Az N +N, -N vagy N lehet): -amin N -anewer FILE -atime N -cmin N\n" +"-cnewer FÁJL -ctime N -empty -false -fstype TÍPUS -gid N -group NÉV\n" +" -ilname MINTA -iname MINTA -inum N -ipath MINTA -iregex MINTA\n" +" -links N -lname MINTA -mmin N -mtime N -name MINTA -newer FÁJL" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path MINTA -perm [+-]MÓD -regex MINTA\n" +" -wholename MINTA -size N[bcwkMG] -true -type [bcdpflsD]\n" +" -uid N -used N -user NÉV -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"tevékenységek: -delete -print0 -printf FORMÁTUM -fprintf FÁJL FORMÁTUM -" +"print\n" +" -fprint0 FÁJL -fprint FÁJL -ls -fls FÁJL -prune -quit\n" +" -exec PARANCS; -exec PARANCS {} + -ok PARANCS ;\n" +" -execdir PARANCS ; -execdir PARANCS {} + -okdir PARANCS ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"A hibákat a findutils hibajelentő oldalán jelentheted be a\n" +"http://savannah.gnu.org/ címen, vagy e-mailben a " +"címen." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "az fnmatch() könyvtári függvény vizsgálata sikertelen." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"figyelmeztetés: a Unix fájlnevek általában nem tartalmaznak / jeleket (noha " +"az útvonalnevek igen). Ez azt jelenti, hogy a(z) \"%s %s\" értéke " +"valószínűleg mindig hamis lesz ezen a rendszeren. Lehet, hogy a \"-wholename" +"\" vagy a \"-samefile\" tesztet sokkal hasznosabbnak találnád. Ennek " +"alternatívájaként, ha a GNU grep-et használod, akkor használhatod a " +"következő parancsot: \"find ... -print0 | grep -FzZ %s\"." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"figyelmeztetés: a -ipath predikátum elavult; helyette használd a -iwholename " +"kapcsolót." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "A(z) \"%s\" bemeneti fájl nem nyitható meg" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "érvénytelen mód: \"%s\"" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"figyelmeztetés: a(z) %s módmintát adtad meg, amely azonos a 000-val. A -" +"perm /000 jelentése hamarosan módosulni fog, hogy összhangban legyen a -perm " +"-000-val, azaz pillanatnyilag nem illeszkedik egyetlen fájlra sem, de ez " +"módosulni fog, hogy az összes fájlra illeszkedjen." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "érvénytelen null argumentum a -size kapcsolónál" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "a -size típusa (\"%c\") érvénytelen" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "A(z) \"%s\" argumentum érvénytelen a következőhöz: %s" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "a(z) \"%s\" argumentum érvénytelen a következőhöz: %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find %s verzió\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils %s verzió\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Engedélyezett szolgáltatások: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "figyelmeztetés: ismeretlen escape: \"\\%c\"" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "figyelmeztetés: ismeretlen formátumelőírás: \"%%%c\"" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Az aktuális könyvtárat tartalmazza a PATH környezeti változó, amely nem " +"biztonságos kombináció a find %s műveletével. Távolítsd el az aktuális " +"könyvtárat a $PATH változóból (azaz a pontot vagy a kezdő/záró " +"pontosvesszőt)." + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Az aktuális könyvtárat tartalmazza a PATH környezeti változó, amely nem " +"biztonságos kombináció a find %s műveletével. Távolítsd el az aktuális " +"könyvtárat a $PATH változóból (azaz a pontot vagy a kezdő/záró " +"pontosvesszőt)." + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"A {} jel nem használható a -execdir és -okdir segédprogramjának nevében, " +"mivel ez egy lehetséges biztonsági probléma." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Csak egyetlen {} példány támogatott a -exec%s ... + esetén" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "a környezet túl nagy az exec-hez" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "A(z) \"%s\" bemeneti fájl nem nyitható meg" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "fork() rendszerhívás sikertelen" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "hiba a következőre várakozás közben: %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s leállítva %d szignállal" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "érvénytelen kifejezés" + +#: find/tree.c:101 +#, fuzzy, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"érvénytelen kifejezés; bináris operátort használtál úgy,\n" +"hogy semmi nem volt előtte." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "váratlan extra predikátum" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "érvénytelen kifejezés; túl sok ) karaktert tartalmaz" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"érvénytelen kifejezés; a program egy ) jelre számított, de nem találta meg." + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "érvénytelen kifejezés; túl sok ) karaktert tartalmaz" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" +"érvénytelen kifejezés; a program egy ) jelre számított, de nem találta meg." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "hoppá -- érvénytelen kifejezéstípus!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "hoppá -- érvénytelen kifejezéstípus (%d)!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "az útvonalaknak meg kell előzniük a kifejezést" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "érvénytelen predikátum: \"%s\"" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "érvénytelen predikátum: \"%s\"" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "A(z) \"%s\" argumentum érvénytelen a következőhöz: %s" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "A(z) \"%s\" argumentuma hiányzik" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "érvénytelen kifejezés; túl sok ) karaktert tartalmaz" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "váratlan extra predikátum" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "váratlan extra predikátum" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "hoppá -- az and alapértelmezett beszúrása érvénytelen!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Használat: %s [--version | --help]\n" +"vagy %s most_common_bigrams < fájllista > locate-adatbázis\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"A hibákat a címen jelentsd.\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils %s verzió\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "nap" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "A(z) \"%s\" argumentum érvénytelen a következőhöz: %s" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "a(z) \"%s\" locate adatbázis sérült vagy érvénytelen" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "A locate adatbázis mérete: %s bájt\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Fájlnevek: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Fájlnevek: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "összesített hossz: %s bájt" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tamelyből %s tartalmaz üreshely-, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s tartalmaz új sor karaktereket, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tés %s tartalmaz beállított magas bittel rendelkező karaktereket.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Tömörítési arány: %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Tömörítési arány: %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "a(z) \"%s\" locate adatbázis sérült vagy érvénytelen" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "A(z) %s adatbázis %s formátumú.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Használat: %s [-d útvonal | --database=útvonal] [-e | -E | --[non-]" +"existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TÍPUS]\n" +" [-version] [--help]\n" +" minta...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate %s verzió\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "a --limit argumentuma" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"figyelmeztetés: a locate adatbázis csak egyszer olvasható a szabvány " +"bemenetről." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "figyelmeztetés: a(z) \"%s\" adatbázis régebbi %d %s napnál" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" +"A(z) \"%s\" escape sorozat érvénytelen a bemenet elhatárolójának " +"meghatározásában." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"A(z) \"%s\" escape sorozat érvénytelen a bemenet elhatárolójának " +"meghatározásában; a karakterértékek nem léphetik túl a(z) %lx értéket." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"A(z) \"%s\" escape sorozat érvénytelen a bemenet elhatárolójának " +"meghatározásában; a karakterértékek nem léphetik túl a(z) %lo értéket." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"A(z) \"%s\" escape sorozat érvénytelen a bemenet elhatárolójának " +"meghatározásában ;a(z) %s záró karaktereket a program nem ismerte fel." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"A bemenet elhatárolójának \"%s\" meghatározása érvénytelen: az elhatároló " +"vagy egy karakter, vagy egy \\ kezdetű escape sorozat kell legyen." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "a környezet túl nagy az exec-hez" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs %s verzió\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "A(z) \"%s\" bemeneti fájl nem nyitható meg" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "A környezeti változói %ld bájtot foglalnak\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "A POSIX alsó és felső korlátai az argumentum hosszára: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "A POSIX alsó és felső korlátai az argumentum hosszára: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "A ténylegesen használható parancs maximális hossza: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "A ténylegesen használt parancspuffer hossza: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"pár nélküli %s idézőjel; alapértelmezésben az idézőjelek speciálisak az " +"xargs számára, hacsak nem használja a -0 kapcsolót" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "kettős" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "egyszeres" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "az argumentumsor túl hosszú" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "hiba a gyermekfolyamatra való várakozás közben" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: kilépési értéke 255; megszakítás" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: %d szignállal leállítva (stopped)" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: %d szignállal leállítva (terminated)" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: érvénytelen szám a -%c kapcsolóhoz\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: a -%c kapcsoló értéke >= %ld kell legyen\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: a -%c kapcsoló értéke < %ld kell legyen\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Használat: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=elhat]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-sor] [-l[max-sor]] [--max-lines[=max-sor]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-arg] [--max-args=max-arg]\n" +" [-s max-kar] [--max-chars=max-kar]\n" +" [-P max-proc] [--max-procs=max-proc]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fájl]\n" +" [--version] [--help] [parancs [induló-argumentumok]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "hoppá -- érvénytelen kifejezéstípus a mark_stat-ban!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "hoppá -- érvénytelen kifejezéstípusa mark_type-ban!" + +#~ msgid "old" +#~ msgstr "régi" + +#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n" +#~ msgstr "Az arg_max (%ld) csökkentése az arg_size (%ld) értékére\n" diff --git a/po/id.gmo b/po/id.gmo new file mode 100644 index 0000000000000000000000000000000000000000..8befcfab704452de2de9206606b57d0f8b44201d GIT binary patch literal 3939 zcmbW3ON82o0c=S7TgSO01ttWfC^j>zLNd^5Zr>_UxJT;*T4d} z^0st-1a$EGEXct(z>VO?;KSe*@KNv@_yoA(_LQ4Jn8e1x`@o~%YVZuW20RZw2)>rh zzn}3_5Te-E8NUNb&J~c(T?GfgYv4-o50Ly{eg__K5X2PQ2o8b{NP3ThWSU zL6Z9}Nb)`bDQ-W4+rZyJipMaVqV@gY2Ap z>@RR5xboigE|fvC7jCd2JQORkgU(W&Pz>oDT@$1z87uJVWZ%hF8g#G79~u-t8c>xC ziqlp+q?c-83m)=`2IV+E$Y&Z z7wQEw#NALDJ!H8Ef^eP-%|+zJ4XJG^rn4DamEodMQ(hd#=K9r0o{v=|v1ch6j&luhERzbtUp3#QLxeO3i7 zZ$@EV8pBjp{0>>hZL29cYI&$L-|=Re3dn|7HQiOY&_t0^d^-np90Z-Rrvr)P&NBA9 zD#<`1sG)Eg)^^miHH2Z)P))V%bLEVP1Guh@#HB_;!x>x-caSaK*|jNgXONKs1TaqX z$>v3*F;n3^6(vnwknd;6`TkpwuZC!+N6k^73bgw~6rMxEoN?DVl@?niDZSXL!0_$G zk>bvQDcQuk$eA#na-9RQXPjzS;kDRvs7RBYqn?h7VdM>*I9_!QMpBTM&LI?Qg_ldE zolfa#r?i`o?5b?vJzN?om9Wv7l5>i}-`!VsO52?B2rrc?9(i-jkhsuYb1AJ=ZErBQet?X{U0 zQfsm5D0eha#+srDWz)oU9&kc6IlWvKbjUhjl%4lf3P!DLe4IGbXi+QfH1H5H%U_QgL^22fZzDgeZe4wc7Z zKgR9g=qx_VWQ!)=P>8aVG?(5zW0f=*A8!H0jlg!L6~oH600H|Zrn$LU^>-X(M#ll-9(KBL>8^qI6fv9kT2Usx-?m&k@~xVIKh%vD9ry?Mt_U{( literal 0 HcmV?d00001 diff --git a/po/id.po b/po/id.po new file mode 100644 index 0000000..466b75d --- /dev/null +++ b/po/id.po @@ -0,0 +1,1179 @@ +# findutils 4.1.7 +# Copyright (C) 2001 Free Software Foundation, Inc. +# Tedi Heriyanto , 1999, 2002. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.7\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2002-03-21 00:24GMT+0700\n" +"Last-Translator: Tedi Heriyanto \n" +"Language-Team: Indonesian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 0.9.5\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "argumen %s tidak valid untuk %s" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumen %s ambigu untuk %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Valid argumen adalah:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Kesalahan sistem tidak dikenal" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: opsi `%s' ambigu\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: opsi `--%s' tidak membolehkan sebuah argumen\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: opsi `--%c%s' tidak membolehkan sebuah argumen\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: opsi `%s' membutuhkan sebuah argumen\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: opsi tidak dikenal `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: opsi tidak dikenal `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opsi ilegal -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: opsi tidak valid -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opsi membutuhkan sebuah argumen -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: opsi `-W %s' ambigu\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: opsi `-W %s' tidak membolehkan sebuah argumen\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "ukuran blok" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Pemakaian: %s [path...] [ekspresi]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Pemakaian: %s [path...] [ekspresi]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "PERINGATAN: escape `\\%c' tidak dikenal" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "tidak dapat mengetahui direktori saat ini" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "tidak dapat mengetahui direktori saat ini" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "Tidak dikenal" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"Path default adalah direktori saat ini; ekspresi default adalah -print\n" +"ekspresi boleh terdiri dari:\n" +"operator (urutan menurun; -and adalah implisit bila tidak ada yang lain):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"Path default adalah direktori saat ini; ekspresi default adalah -print\n" +"ekspresi boleh terdiri dari:\n" +"operator (urutan menurun; -and adalah implisit bila tidak ada yang lain):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -ipath PATTERN -iregex PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NAME\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "Mode `%s' tidak valid" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "Null argument tidak valid untuk -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "Type `%c' -size tidak valid" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "argumen `%s' tidak valid untuk `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "argumen %s tidak valid untuk %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versi %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find versi %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "PERINGATAN: escape `\\%c' tidak dikenal" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "PERINGATAN: format direktif `%%%c' tidak dikenal" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "environment terlalu besar untuk exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "tidak dapat mem-fork" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "Kesalahan waiting untuk %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s di-terminate oleh sinyal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "ekspresi tidak valid" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "ekspresi tidak valid" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "ekspresi tidak valid" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oops -- tipe ekspresi tidak valid!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oops -- tipe ekspresi tidak valid!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "path harus mendahului ekspresi" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "predikat `%s' tidak valid" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "predikat `%s' tidak valid" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "argumen `%s' tidak valid untuk `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "argumen hilang untuk `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "ekspresi tidak valid" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "predikat `%s' tidak valid" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oops -- penyisipan and baku tidak valid!" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "Pemakaian: %s most_common_bigrams < list > coded_list\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Laporkan bug ke ." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find versi %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "hari" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "argumen `%s' tidak valid untuk `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versi %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "argumen baris terlalu panjang" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "peringatan: database `%s' berumur lebih dari %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "environment terlalu besar untuk exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versi %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "ganda" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "tunggal" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "argumen baris terlalu panjang" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "kesalahan waiting untuk proses anak" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: keluar dengan status 255; batal" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: dihentikan oleh sinyal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: di-terminate oleh sinyal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: kesalahan bilangan untuk pilihan -%c\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: nilai untuk pilihan -%c harus >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: nilai untuk pilihan -%c harus < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Pemakaian: %s [-Oprtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n" +" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" +"str]]\n" +" [--replace[=replace-str]] [--max-lines[=max-lines]] [--" +"interactive]\n" +" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-" +"procs]\n" +" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" +" [command [initial-arguments]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oops -- tipe ekspresi tidak valid!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oops -- tipe ekspresi tidak valid!" + +#~ msgid "Success" +#~ msgstr "Sukses" + +#~ msgid "No match" +#~ msgstr "Tidak cocok" + +#~ msgid "Invalid regular expression" +#~ msgstr "ekspresi reguler tidak valid" + +#~ msgid "Invalid collation character" +#~ msgstr "Karakter kolasi tidak valid" + +#~ msgid "Invalid character class name" +#~ msgstr "Nama kelas karakter tidak valid" + +#~ msgid "Trailing backslash" +#~ msgstr "Trailing backslash" + +#~ msgid "Invalid back reference" +#~ msgstr "Referensi balik tidak valid" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ atau [^ tidak sesuai " + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( atau \\( tidak sesuai" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ tidak cocok" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Isi \\{\\} tidak valid" + +#~ msgid "Invalid range end" +#~ msgstr "Akhir jangkauan tidak valid" + +#~ msgid "Memory exhausted" +#~ msgstr "Memori habis" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Ekspresi reguler sebelumnya tidak valid" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Akhir ekspresi reguler prematur" + +#~ msgid "Regular expression too big" +#~ msgstr "Ekspresi reguler terlalu besar" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") atau \\) tidak cocok" + +#~ msgid "No previous regular expression" +#~ msgstr "Tidak ada ekspresi reguler sebelumnya" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "aksi: -exec PERINTAH ; -fprint FILE -fprint0 FILE -fprintf FORMAT FILE\n" +#~ " -ok PERINTAH ; -print -print0 -printf FORMAT -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Daftar Predikat:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Pohon Eval:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Pohon Eval Teroptimisasi:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Pohon Eval Teroptimisasi:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "Memori virtual habis" + +#~ msgid "inserting %s\n" +#~ msgstr "Menyisipkan %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " type: %s %s " + +#~ msgid "left:\n" +#~ msgstr "kiri:\n" + +#~ msgid "right:\n" +#~ msgstr "kanan:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Pohon Eval Ternormalisasi:\n" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s dirubah selama eksekusi %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. dirubah selama eksekusi %s" + +#~ msgid "error in %s: %s" +#~ msgstr "Kesalahan dalam %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "pilihan (selalu benar): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tes (N dapat +N atau -N atau N): -amin N -anewer FILE -atime N -cmin N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Pemakaian: %s [-d path] [--database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "quote %s tidak cocok" + +#~ msgid "command too long" +#~ msgstr "perintah terlalu panjang" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "tidak dapat memuat argumen dalam batasan daftar argumen" + +#~ msgid "argument list too long" +#~ msgstr "daftar argumen terlalu panjang" diff --git a/po/insert-header.sin b/po/insert-header.sin new file mode 100644 index 0000000..b26de01 --- /dev/null +++ b/po/insert-header.sin @@ -0,0 +1,23 @@ +# Sed script that inserts the file called HEADER before the header entry. +# +# At each occurrence of a line starting with "msgid ", we execute the following +# commands. At the first occurrence, insert the file. At the following +# occurrences, do nothing. The distinction between the first and the following +# occurrences is achieved by looking at the hold space. +/^msgid /{ +x +# Test if the hold space is empty. +s/m/m/ +ta +# Yes it was empty. First occurrence. Read the file. +r HEADER +# Output the file's contents by reading the next line. But don't lose the +# current line while doing this. +g +N +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/it.gmo b/po/it.gmo new file mode 100644 index 0000000000000000000000000000000000000000..d6ad15463908fbcac606bc79160121210be2a631 GIT binary patch literal 8124 zcmbW5S&SS<8OJMu5Lm8+n{d@8S=LLo*Sn4#?6Kn6&zP z?_oeZa0ns9@j!@B!~+5$9#9@YfOtT_3kV?)JRvTDM8HBq2#`1*;P+McT;8?W&~p1f zTUA~4-ADcECC~n(;<=CawY(>K3K+(f0DDwOS_!96b@b%z#Ksom};12K~ z-~u@NqDr1`1?BHHsKJkdw}DTAa{li?+5e9qs#4E=u~LtK*MXw%9(WY|87O+5N7xDY z7Vv3s9efl)oVmW%JH$o(fsZqP6~g#1_yj0?-UO2}e;AZ~3@Chk3|s=gRR8@8Q0V?w zJ$^Gv+{xc3Kn=bRd=vONQ0V^=DDwRScoTRnLJ_9`Zw5aILazEID0cHLkWbW) zLD}c`pve7d{^O^*0XzV%fWHJY@KfMXj8*9VEqDgJ8l#i%4Y&_{H`oBb3X0wQ85H^c z9hCF`14jGiBk_+}5LVTFpwRP<8go$i{17Pm`f`om07c*52IadyfZ~_`0Yy(YBV@t* zK-vGDpz!l?Q2gx+pxDn3L9y>Y);Nn0Ax%95?gBkH4}KQB2mC%Le7qRuh5uLbpV;>v zFbD4f9|gYxJ_5doL-v3j@F4gk_-pXzpvXb?7QOD{6*@4(_`pVtBbb%Cy&8)8ySM&5 zTcglKsE9HXdc|h$iU| z7x#{O7M+W~ptcwffN1Z6qHn@Ww2y`i@QBWa53a24;=M)&W*)QypBK7Wc7rawKERKp zD;{r_9+^*Rnb*`%RncxwO5gGrP9caL1)KY=px0b+Iw9+66XQ(5G_CZfX1U z_Rn;gZ*M+w^XN8CY`~Qh?$=z=)1fd$8T76_d-iM7M2N5rSq<&d)OL}KA4L9>M9;NE ze#~U6CUxzh06IR`$y}>mIK5=^$Mwj$xz=2m*KKb@HeYCyrhZMEOq;x0_H9;F+l&^o z6xo@6({)QdR8N6>)k(prP=C!De%8T)|Wu zy3BIh^4-i`;LDMqM5>i^ww#YbsOHgOY4x=7bm;jK3vXI|Kn!$SD-YgYEuB|<6ZF#3 zlE6WIhgSF9|Bx0p)T=fR;ze_)Za5fybJI-fTe#+?;dKlnOpP8h>#kq+b!xLNc8q_v ze7|ovY|Zjh*f6c4#IiPY8Em5>vJMnGWL=S))_Fb1eHX(C8uB`B9rItP;>fBqy67RI zVH}a+B#)7XRWk$Awb~TAR}_QB&Yi)mnk+NDr8?T|)IML-uA?`6se5J>@AZ(@gsK+D zEymzuv$kwy`^KeL3S8gQ_Qa959~L*s ze4#@*kceoBO~QlEkV4VpEdGaP)9Kh&K`dmhiOA0r2QS3EQGXkwPA(`#uzBMPWWW zi&N*OA22zIUP7S2!vKM&=eD69F?j}8jreIz3fuQg(6|SZ zg72oa83&db;#k`L7iBj3=FF+={?qErsf|ZZt8;1;hDOm!I1*2q3u;K8PF-eEsfQ6F z>S&nkl)z%&6>2Pa)xvbp8he}{{_fgBx5_*hZMO++t-|LUs%TRgF z5G(lKEBg+Dkj;qlA<^Csg2d<{Yi-*xWm@oeuq4T zp+XeX-meF##Xlv+vc?XG#mK0zhS1Yw&2Zb)6jWX@jaLCC!TkrRGuU^>QiSAoY5K$w zqdIW|Bl}+dV7J!uWCGJCh*hUgY&Mk&ZD<)vv2*Vbn;vmEwFEarptaXIBKNtuxvABo zkRIjPaY$Z7g!Jn~Y&ycLArxoHaHy_qScPE9qF!3*MVx=&1AgkI8r{K8qY!NafqHyU z(?T9x62t@fMEpnMxJUfsMb-JPSXk2ffl5Es>Q-VW&5R1$b&6zcflun_wL!3tc({6VI7+% zhqIQK^xn{WlcuAjojGBp*&uOgC$hpow$-V?8b%S~$5>h2s$A49$wWv%x)t2W>U7=) z8kP$P&|!PTDLh%9sfdQYpY(0BD$B-^YaP|C{8Bg>_yq6a09-M&5Y|% z@r}Bf|C_9;nc0${iK%UqLWLY!4&k(j)zanos>!L_KP8=vA5@}}UWc`2vMA@ES|S4+ zB%L3wl~xD0))%S4=z{#P7pZoVnK(YR*ZAwY?~!Fv2Ns-J#*W2HSyyj1xtu(Dv2J`! zb<`!ZxkJ5{=J1O9RNc?EkF7hJXS)8flx|7nq_puDLhcrZK5l}xoSYO!>?kklfWkeh zFN@6rtHiLy8nlhtB(QGQcH6J!wnXpNr9XTv_}#{b{`pe6-A{nJ!!~x^Jj=`bIn$dm#f;!gy_I2a3Y2l0GGjl)*HqLF$(2dy<)glaV?G zjRV+@I3%67P7ReV0jA}tS)(&7NQXtC8|UbjxOAD}+$xTlI!M_n5;8tY98%$g;4j-) zEo#pu;)FB7QR>$nmFE^AHdvHwgm~C0v-zsCx_q2fM@`*J342f>AvFr&(#A@B;iB%6 zjR_Qs1cWl9G=<&3e1gmDAM zEd#|HsX}ZT?qUNsHHaeW?#-i-Zt9?zB41LpuofFR>EWgl*QHXd47^HeBSB6`?_9hQ zbFrtJ-pGdNvC-URmns3O>RcHZlz-9OfFPa8Bt?GZ+D|AQR{B-LIK6pF0nRdw5#wX{ zI9VcN#Ndmu-Q$`@G!@Ocx&cttH|`mILnOqVC(Q-X3C|M^9^qdc8w!MCOT>}_gLSAT zQe8=J+!GE}u%(3jtnf~@!YYMBhoR(L5{cCs=?Ci&>G0WR&e05x+Qy4mNt$we)hN>Z zsIe4Hx9hm>a8z}2(_Pr$)i^DBt{C#zjY)QhbW@9nWs-sSbD^fWXX>&e9}-@9WmPImze?lQqx#S(^=44sPdBeCdG110(hs~s+myFiGDv^&Q zB;GWxyJBy-SRG)y++D_yxiq!&lr7a=#YC#6vZ(W3)lpvg^D*zE$V#;sh}YbkOB9=MPF9HID<4K% zb+x)k!WV^Bf4Vp?aXdDgVqTQ6vD+kzRz(2HEvfEFbC^!Nd?E5^rJN_6q;D2HI^ bFS+s)J&n((R<, 2001. +# Giovanni Bortolozzo , 1997-2000. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.10\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2004-12-23 12:44+0100\n" +"Last-Translator: Marco d'Itri \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "l'argomento %s non è valido per %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "l'argomento %s è ambiguo per %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Gli argomenti validi sono:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Errore di sistema sconosciuto" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: l'opzione `%s' è ambigua\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: l'opzione `--%s' non accetta un argomento\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: l'opzione `%c%s' non accetta un argomento\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: l'opzione `%s' richiede un argomento\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: l'opzione `--%s' è sconosciuta\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: l'opzione `%c%s' è sconosciuta\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opzione illecita -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: opzione non valida -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: l'opzione richiede un argomento -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: l'opzione `-W %s' è ambigua\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: l'opzione `-W %s' non accetta un argomento\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "dimensioni del blocco" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "\"" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "\"" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yYsS]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Uso: %s [-H] [-L] [-P] [percorso...] [espressione]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Uso: %s [percorso...] [espressione]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "attenzione: sequenza di escape `\\%c' non riconosciuta" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"La variabile di ambiente FIND_BLOCK_SIZE non è gestita, l'unica cosa che " +"influenza la dimensione dei blocchi è la variabile di ambiente " +"POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "impossibile ottenere la directory corrente" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "impossibile ottenere la directory corrente" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Attenzione: il file system %s è stato smontato di recente." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Attenzione: il file system %s è stato montato di recente." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s è cambiato durante l'esecuzione di %s (vecchio numero di dispositivo %" +"ld, nuovo numero di dispositivo %ld, il filesystem è di tipo %s) [rif. %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s è cambiato durante l'esecuzione di %s (vecchio numero di inode %ld, " +"nuovo numero di inode %ld, il filesystem è di tipo %s) [rif. %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Il link simbolico `%s' è parte di un loop nella gerarchia delle directory; " +"la directory a cui punta è già stata visitata." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Trovato un loop nel file system; `%s' ha gli stessi numeri di dispositivo e " +"di inode di una directory %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "livello più in alto nella gerarchia del file system" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "livelli più in alto nella gerarchia del file system" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "sconosciuto" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"attenzione: l'opzione %s è stata usata dopo l'argomento %s che non è un " +"opzione, ma le opzioni non sono posizionali (%s ha effetto sui test indicati " +"sia prima che dopo di essa). Usare le opzioni prima degli altri argomenti.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"attenzione: l'opzione -d è deprecata; per favore usare l'opzione -depth, che " +"segue POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"il percorso predefinito è la directory corrente; l'espressione predefinita " +"è\n" +"-print. L'espressione può essere formata da:\n" +"operatori (di precedenza decrescente; -and è implicito quando non ne sono\n" +" indicati altri):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"il percorso predefinito è la directory corrente; l'espressione predefinita " +"è\n" +"-print. L'espressione può essere formata da:\n" +"operatori (di precedenza decrescente; -and è implicito quando non ne sono\n" +" indicati altri):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" + +#: find/parser.c:1048 +#, fuzzy +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +" ESPR1 -o ESPR2 ESPR1 -or ESPR2 ESPR1 , ESPR2\n" +"opzioni posizionali (sempre vere): -daystart -follow\n" +"opzioni normali (sempre vere, indicate prima delle altre espressioni): -" +"depth\n" +" --help -maxdepth LIVELLI -mindepth LIVELLI -mount -noleaf --version -" +"xdev\n" +" --ignore_readdir_race -noignore_readdir_race\n" +"test (N può essere +N, -N o N): -amin N -anewer FILE -atime N -cmin N" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer FILE -ctime N -empty -false -fstype TIPO -gid N -group NOME\n" +" -ilname MODELLO -iname MODELLO -inum N -iwholename MODELLO -iregex " +"MODELLO\n" +" -links N -lname MODELLO -mmin N -mtime N -name MODELLO -newer FILE" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path MODELLO -perm [+-]MODO -regex MODELLO\n" +" -wholename MODELLO -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NOME -xtype [bcdpfls]" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"È possibile segnalare i bug (e seguire la loro correzione) tramite la " +"pagina\n" +"di segnalazione dei bug di findutils presso http://savannah.gnu.org/, o se " +"non\n" +"si ha accesso al web inviando un'email a ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "il controllo interno della funzione di libreria fnmatch() è fallito." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"attenzione: il predicato -ipath è deprecato; per favore usare -iwholename al " +"suo posto." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Impossibile aprire il file di input `%s'" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "il modo `%s' non è valido" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "-size non può avere un argomento nullo" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "il tipo di -size `%c' non è valido" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "l'argomento `%s' di `%s' non è valido" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "l'argomento %s non è valido per %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versione %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils versione %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "attenzione: sequenza di escape `\\%c' non riconosciuta" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "attenzione: direttiva di formattazione `%%%c' non riconosciuta" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "l'ambiente è troppo grande per fare exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Impossibile aprire il file di input `%s'" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "impossibile fare fork" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "errore aspettando %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminato dal segnale %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "espressione non valida" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "predicato aggiuntivo inatteso" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "espressione non valida" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "espressione non valida" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oops -- tipo di espressione non valido!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oops -- tipo di espressione non valido!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "i percorsi devono precedere l'espressione" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "il predicato `%s' non è valido" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "il predicato `%s' non è valido" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "l'argomento `%s' di `%s' non è valido" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "manca l'argomento di `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "espressione non valida" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "predicato aggiuntivo inatteso" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "predicato aggiuntivo inatteso" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oops -- inserimento predefinito di and non valido!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Uso: %s [--version | --help]\n" +" %s bigrammi_più_comuni < lista-di-file > database-di-locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Segnalare i bug a .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils versione %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "giorni" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "l'argomento `%s' di `%s' non è valido" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"attenzione: il percorso del database di locate `%s' inizia con `:', che non " +"sono un nome di database valido" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "il database di locate '%s' è danneggiato o non valido" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "il database di locate '%s' è danneggiato o non valido" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Uso: %s [-d percorso | --database=percorso] [-e | --existing]\n" +" [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n" +" [--version] [--help] modello...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versione %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argomento di --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "attenzione: il database `%s' ha più di %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "l'ambiente è troppo grande per fare exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versione %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Impossibile aprire il file di input `%s'" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Il tuo ambiente richiede fino a %ld byte\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" +"Limiti di POSIX massimo e minimo della lunghezza degli argomenti: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" +"Limiti di POSIX massimo e minimo della lunghezza degli argomenti: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Lunghezza massima di un comando effettivamente usabile: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Lunghezza del buffer del comando che effettivamente useremo: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"carattere %s non accoppiato; le virgolette hanno un significato speciale per " +"xargs, a meno che si usi l'opzione -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "doppie" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "singole" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "la riga dell'argomento è troppo lunga" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "errore aspettando il processo figlio" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: uscito con stato 255; termina" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: fermato dal segnale %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: terminato dal segnale %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: il numero per l'opzione -%c non è valido\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: il valore per l'opzione -%c dovrebbe essere >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: il valore per l'opzione -%c dovrebbe essere < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Uso: %s [-0prtx] [-e[eof-str]] [-i[cambia-str]] [-l[linee-max]]\n" +" [-n arg-max] [-s car-max] [-P proc-max] [--null] [--eof[=eof-str]]\n" +" [--replace[=cambia-str]] [--max-lines[=linee-max]] [--interactive]\n" +" [--max-chars=car-max] [--verbose] [--exit] [--max-procs=proc-max]\n" +" [--max-args=arg-max] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [comando [argomenti-iniziali]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oops -- tipo di espressione non valido!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oops -- tipo di espressione non valido!" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "arg_max (%ld) ridotto a arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Successo" + +#~ msgid "No match" +#~ msgstr "Nessuna corrispondenza" + +#~ msgid "Invalid regular expression" +#~ msgstr "Espressione regolare non valida" + +#~ msgid "Invalid collation character" +#~ msgstr "Carattere di collazione non valido" + +#~ msgid "Invalid character class name" +#~ msgstr "Nome della classe di caratteri non valido" + +#~ msgid "Trailing backslash" +#~ msgstr "Backlash finale" + +#~ msgid "Invalid back reference" +#~ msgstr "Riferimento all'indietro non valido" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ o [^ non accoppiata" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( o \\( non accoppiata" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ non accoppiata" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Contenuto di \\{\\} non valido" + +#~ msgid "Invalid range end" +#~ msgstr "Fine dell'intervallo non valida" + +#~ msgid "Memory exhausted" +#~ msgstr "Memoria esaurita" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "L'espressione regolare precedente non è valida" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Fine prematura dell'espressione regolare" + +#~ msgid "Regular expression too big" +#~ msgstr "L'espressione regolare è troppo grande" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") o \\) non accoppiata" + +#~ msgid "No previous regular expression" +#~ msgstr "Non c'è una espressione regolare precedente" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "azioni: -exec COMANDO ; -fprint FILE -fprint0 FILE -fprintf FILE FORMATO\n" +#~ " -fls FILE -ok COMANDO ; -print -print0 -printf FORMATO -prune -ls -" +#~ "delete\n" +#~ " -quit\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Lista dei predicati:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Albero di valutazione:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Albero di valutazione ottimizzato:\n" + +#~ msgid "Optimized command line:\n" +#~ msgstr "Riga di comando ottimizzata:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "la memoria virtuale è terminata" + +#~ msgid "inserting %s\n" +#~ msgstr "inserimento di %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tipo: %s %s " + +#~ msgid "left:\n" +#~ msgstr "sinistra:\n" + +#~ msgid "right:\n" +#~ msgstr "destra:\n" + +#~ msgid "[stat called here] " +#~ msgstr "[chiamata stat] " + +#, fuzzy +#~ msgid "[type needed here] " +#~ msgstr "[chiamata stat] " + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Albero di valutazione normalizzato:\n" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "attenzione: il percorso del database di locate `%s' finisce con `:', che " +#~ "non sono un nome di database valido" + +#~ msgid "command too long" +#~ msgstr "il comando è troppo lungo" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "un unico argomento eccede le dimensioni della lista di argomenti" + +#~ msgid "argument list too long" +#~ msgstr "la lista degli argomenti è troppo lunga" diff --git a/po/ja.gmo b/po/ja.gmo new file mode 100644 index 0000000000000000000000000000000000000000..dccd08e163f9a40e6674b40afb8673157ab28fb7 GIT binary patch literal 3807 zcmcJQd2AF_9LJxESH15G^;KC=an`LCl?4$6G^iXQ1vR2!cIR~&n0>R((ZfGXjK-Mg zzb2R%6XSb|QWQ^ETcuFamR5=}6}*BbDjucLh$hAu;`cW*-EL{|_`^wNKRfUJ-tYa6 z@4VS}=A@??t_<$UxSu_Wv3d0W82sS6ViIE)f>(l5!1>?>pbcIIKAJqg2wsinPVi!I z7)*gD9UG6=fd-x*06F*+I2GIoo(~R!7lFgzrQnIj#k>+kNNgc^I(R2|Hn zz{fz!_gU~v@Lli{a2H7X8~`c5V@^N~!O0*8Zv)AH0fY&YAl0)8q&htVHXz_0koK93 zU}>LvkoI2&ra&)wUI$LY^A?cozDni~CF4_&9GV-o=<|L$Cp8huM6bhAV_|H14&oMVzYX%7OVwVfG90% z0jb}QfK-piL3$Tn1u0&H6^&m7QhZc9(h2nxt{J^1kaU0RUI7a$QzQ{ja6dzr1 z9bHtnYj97+O}So;n_{JlYFm9>o;*qdwsNSTNbTUEpB5hGWsaAAR?>O%1 zxTy}L2}mT;CR!g|R5$7Y)xC11d>#m|XiGB?7SFYE-!4eg;VFxy{45tOHjOvi!D{XY zW)S-P+8HxuaWm(7fh`M>k?lC5fHiI@uwBUwgQxN}@r-OT9oynEEarsA8(ohZseEEM z)@1zRWMow;pYo@1%N4$y7I4#X+-7b{ZhD2VC}a@3sTjl5_PJTi*@e&z{qeJ&crdg* z0h=TFFpU4Op>a3=@770*aH8O<3+e}MsWefe{;r9k^hDk*Nc$nItQ3l>8dqn+`KSmr zcu8g>Kb}sf33K?(oZY^7Id8P3#hZlZQ^QlJG7UOz9x56)+=5Q|V@8+DwbE^t+;8;* zQRKq&T#v1Ylrqv)w8s-!_P~8|@%{L1z4v~$ij7Qi$CiQzu8S?9!5lVT3*kN_Sl*P< z4M=EfNB$Q?!1JN!K`Pur7 zZ)JfD9j79DS`c}zOvB!?qYgxliZ)gw+R8Q~JGgGiCrypSXNg8Lbdb9A1zu`2)NRDe zVb!w3Ek|RD(y3*%0SXw#{bbFiCoz)cV-zL)yh*vQq~s?yLBERTNPFxiDpZQBmwN6R zG|X6N87pG3Wh3c@f$jLbK3$i-p=OyV;Vd#1`32iDZVd~*(corzE-V-%(#UddL56A9 zE7UAq(qPQ1WM=ZZ8?*H@r)TOi85kPNM3YVBAGND9>gtTl z44%nk>t{^Q%!J)trXLs$o+*9Dgs!su_9YEV_#)FcrR&*zcEJtY;#^DQY*QkF^qSHf ztdWJ#EC{1Pn8hr=!z`In_=3+~W6pJKigQlQqJ@hVjHX8J+jKth=A@&|7sG$9z0Ki+Ans>WOA|4tBn+`t&P$FP49&52_wju0EaUY_FQ_ z-~OR0tD$&R@1FAh__(REXxsF)Qfl8=FQfDE(XV!I`eW;_>KE0keuQniI(WDr(!1LI z`3wE~DWVBy`x7s1JKJ{cozN;e@czYK@qz!(hJ01>X;5uPicF1*s=AtETGX$;S6!-m z$2aX?s?DgvX0wxbMny-Mm~dXFB~UHUcswpRLGM#n!? zjf5k)Fug$^&-w2$$OP){b{Js+-m%SpM-@&GBX_y*K&}P=I9?&r(X!@z2!; z^+Wt2h-Y@b|HihCO_6E*9Z_T6s&{@<15uSmeZBY5mIJW|dM&u>kLKI9Y*0JkJb8my zq>nDOl>`^<)X#5OJfEvyP@|9a%X&!nZrj&=2xi?QrnTc2^~K@ES*gxihBh9=!7_xr yKImkdKP~^9, 2001. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.7\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2001-11-05 00:45+0900\n" +"Last-Translator: GOTO Masanori \n" +"Language-Team: Japanese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=EUC-JP\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "`%2$s' ¤ËÂФ¹¤ë̵¸ú¤Ê°ú¿ô %1$s ¤Ç¤¹" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "`%2$s' ¤ËÂФ¹¤ëÉÔÌÀÎƤʰú¿ô %1$s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Í­¸ú¤Ê°ú¿ô¤Ï:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "̤ÃΤΥ·¥¹¥Æ¥à¥¨¥é¡¼" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: ¥ª¥×¥·¥ç¥ó`%s'¤ÏÛ£Ëæ¤Ç¤¹\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: ¥ª¥×¥·¥ç¥ó`--%s'¤Ï°ú¿ô¤ò¤È¤ê¤Þ¤»¤ó\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: ¥ª¥×¥·¥ç¥ó`%c%s'¤Ï°ú¿ô¤ò¤È¤ê¤Þ¤»¤ó\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: ¥ª¥×¥·¥ç¥ó`%s'¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó`--%s'¤Ç¤¹\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó`%c%s'¤Ç¤¹\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ÉÔÀµ¤Ê¥ª¥×¥·¥ç¥ó¤Ç¤¹ -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: ¥ª¥×¥·¥ç¥ó¤¬°ã¤¤¤Þ¤¹ -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: ¥ª¥×¥·¥ç¥ó¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹ -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤¬Û£Ëæ¤Ç¤¹\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: ¥ª¥×¥·¥ç¥ó`-W %s'¤Ï°ú¿ô¤ò¤È¤ê¤Þ¤»¤ó\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "¥Ö¥í¥Ã¥¯¥µ¥¤¥º" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "»ÈÍÑË¡: %s [¥Ñ¥¹...] [ɾ²Á¼°]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "»ÈÍÑË¡: %s [¥Ñ¥¹...] [ɾ²Á¼°]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "·Ù¹ð: ǧ¼±¤Ç¤­¤Ê¤¤¥¨¥¹¥±¡¼¥× `\\%c' ¤Ç¤¹" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤¬¼èÆÀ¤Ç¤­¤Þ¤»¤ó" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤¬¼èÆÀ¤Ç¤­¤Þ¤»¤ó" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "ÉÔÌÀ" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"¥Ç¥Õ¥©¥ë¥È¥Ñ¥¹¤Ï¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ê¤ê¤Þ¤¹; ¥Ç¥Õ¥©¥ë¥È¤Îɾ²Á¼°¤Ï -print " +"¤Ç¤¹\n" +"ɾ²Á¼°¤Ï°Ê²¼¤«¤éÀ®¤ë¤Ç¤·¤ç¤¦:\n" +"±é»»»Ò (Í¥Àè½ç°Ì; ¾¤Ë²¿¤âÍ¿¤¨¤é¤ì¤Æ¤¤¤Ê¤¤¤È¤­ -and ¤ò°ÕÌ£¤¹¤ë):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"¥Ç¥Õ¥©¥ë¥È¥Ñ¥¹¤Ï¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ê¤ê¤Þ¤¹; ¥Ç¥Õ¥©¥ë¥È¤Îɾ²Á¼°¤Ï -print " +"¤Ç¤¹\n" +"ɾ²Á¼°¤Ï°Ê²¼¤«¤éÀ®¤ë¤Ç¤·¤ç¤¦:\n" +"±é»»»Ò (Í¥Àè½ç°Ì; ¾¤Ë²¿¤âÍ¿¤¨¤é¤ì¤Æ¤¤¤Ê¤¤¤È¤­ -and ¤ò°ÕÌ£¤¹¤ë):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -ipath PATTERN -iregex PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NAME\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "ÉÔÀµ¤Ê¥â¡¼¥É `%s' ¤Ç¤¹" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "-size ¤ËÂФ¹¤ëÉÔÀµ¤Ê¶õ¤Î°ú¿ô¤Ç¤¹" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "ÉÔÀµ¤Ê -size ¥¿¥¤¥× `%c' ¤Ç¤¹" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "ÉÔÀµ¤Ê°ú¿ô `%s' ¤«¤é `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "`%2$s' ¤ËÂФ¹¤ë̵¸ú¤Ê°ú¿ô %1$s ¤Ç¤¹" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find version %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find version %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "·Ù¹ð: ǧ¼±¤Ç¤­¤Ê¤¤¥¨¥¹¥±¡¼¥× `\\%c' ¤Ç¤¹" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "·Ù¹ð: ǧ¼±¤Ç¤­¤Ê¤¤¥Õ¥©¡¼¥Þ¥Ã¥È¤Î»Ø¼¨ `%%%c' ¤Ç¤¹" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "¼Â¹Ô¤¹¤ë¤Ë¤Ï´Ä¶­¤¬Â礭¤¹¤®¤Þ¤¹" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "fork ¤Ç¤­¤Þ¤»¤ó" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "%s ¤Ø¤ÎÂÔ¤Á¤Ç¥¨¥é¡¼" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s ¤Ï¥·¥°¥Ê¥ë %d ¤Ç½ªÎ»" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "ÉÔÀµ¤Êɾ²Á¼°¤Ç¤¹" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "ÉÔÀµ¤Êɾ²Á¼°¤Ç¤¹" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "ÉÔÀµ¤Êɾ²Á¼°¤Ç¤¹" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "¤·¤Þ¤Ã¤¿ -- ÉÔÀµ¤Êɾ²Á¼°¥¿¥¤¥×¤À!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "¤·¤Þ¤Ã¤¿ -- ÉÔÀµ¤Êɾ²Á¼°¥¿¥¤¥×¤À!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "¥Ñ¥¹¤Ïɾ²Á¼°¤ÎÁ°¤Ë¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "ÉÔÀµ¤Ê½Ò¸ì `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "ÉÔÀµ¤Ê½Ò¸ì `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "ÉÔÀµ¤Ê°ú¿ô `%s' ¤«¤é `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "`%s' ¤Ë°ú¿ô¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "ÉÔÀµ¤Êɾ²Á¼°¤Ç¤¹" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "ÉÔÀµ¤Ê½Ò¸ì `%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "¤·¤Þ¤Ã¤¿ -- ÉÔÀµ¤Ë AND ¤ò¥Ç¥Õ¥©¥ë¥ÈÁÞÆþ¤·¤Æ¤·¤Þ¤Ã¤¿!" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "»ÈÍÑË¡: %s most_common_bigrams < list > coded_list\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"¥Ð¥°¤Ï¤Þ¤ÇÊó¹ð¤·¤Æ¤¯¤À¤µ¤¤." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find version %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "Æü" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "ÉÔÀµ¤Ê°ú¿ô `%s' ¤«¤é `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate version %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "°ú¿ô¹Ô¤¬Ä¹¤¹¤®¤Þ¤¹" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "·Ù¹ð: ¥Ç¡¼¥¿¥Ù¡¼¥¹`%s'¤Ï %d %s°Ê¾å¸Å¤¤" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "¼Â¹Ô¤¹¤ë¤Ë¤Ï´Ä¶­¤¬Â礭¤¹¤®¤Þ¤¹" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs version %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "¥À¥Ö¥ë" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "¥·¥ó¥°¥ë" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "°ú¿ô¹Ô¤¬Ä¹¤¹¤®¤Þ¤¹" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "»Ò¥×¥í¥»¥¹¤Ø¤ÎÂÔ¤Á¤Ç¥¨¥é¡¼" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: ¥¹¥Æ¡¼¥¿¥¹255¤Ç½ªÎ»; ÃæÃÇ" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: ¥·¥°¥Ê¥ë %d ¤Ë¤è¤Ã¤ÆÄä»ß¤·¤Þ¤·¤¿" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: ¥·¥°¥Ê¥ë %d ¤Ë¤è¤Ã¤Æ½ªÎ»¤·¤Þ¤·¤¿" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: -%c ¥ª¥×¥·¥ç¥ó¤ËÂФ¹¤ëÉÔÀµ¤ÊÈÖ¹æ\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: -%c ¥ª¥×¥·¥ç¥ó¤ËÂФ¹¤ëÃÍ¤Ï >= %ld ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: -%c ¥ª¥×¥·¥ç¥ó¤ËÂФ¹¤ëÃÍ¤Ï < %ld ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"»ÈÍÑË¡: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n" +" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" +"str]]\n" +" [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n" +" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n" +" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" +" [command [initial-arguments]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "¤·¤Þ¤Ã¤¿ -- ÉÔÀµ¤Êɾ²Á¼°¥¿¥¤¥×¤À!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "¤·¤Þ¤Ã¤¿ -- ÉÔÀµ¤Êɾ²Á¼°¥¿¥¤¥×¤À!" + +#~ msgid "Success" +#~ msgstr "À®¸ù¤Ç¤¹" + +#~ msgid "No match" +#~ msgstr "°ìÃפ·¤Þ¤»¤ó" + +#~ msgid "Invalid regular expression" +#~ msgstr "̵¸ú¤ÊÀµµ¬É½¸½¤Ç¤¹" + +#~ msgid "Invalid collation character" +#~ msgstr "̵¸ú¤Ê¾È¹çʸ»ú¤Ç¤¹" + +#~ msgid "Invalid character class name" +#~ msgstr "̵¸ú¤Ê¥­¥ã¥é¥¯¥¿¥¯¥é¥¹Ì¾¤Ç¤¹" + +#~ msgid "Trailing backslash" +#~ msgstr "¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬»Ä¤Ã¤Æ¤¤¤Þ¤¹" + +#~ msgid "Invalid back reference" +#~ msgstr "̵¸ú¤Ê¸åÊý»²¾È¤Ç¤¹" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ ¤â¤·¤¯¤Ï [^ ¤¬°ìÃפ·¤Þ¤»¤ó" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( ¤â¤·¤¯¤Ï \\( ¤¬°ìÃפ·¤Þ¤»¤ó" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ ¤¬°ìÃפ·¤Þ¤»¤ó" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "̵¸ú¤Ê \\{\\} ¤ÎÆâÍƤǤ¹" + +#~ msgid "Invalid range end" +#~ msgstr "̵¸ú¤Ê½ªÃ¼ÈϰϤǤ¹" + +#~ msgid "Memory exhausted" +#~ msgstr "¥á¥â¥ê¤ò»È¤¤¿Ô¤·¤Þ¤·¤¿" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "̵¸ú¤ÊÁ°½Ò¤ÎÀµµ¬É½¸½¤Ç¤¹" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Àµµ¬É½¸½¤Î½ªÃ¼¤¬Á᤹¤®¤Þ¤¹" + +#~ msgid "Regular expression too big" +#~ msgstr "Àµµ¬É½¸½¤¬Ä¹¤¹¤®¤Þ¤¹" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") ¤â¤·¤¯¤Ï \\) ¤¬°ìÃפ·¤Þ¤»¤ó" + +#~ msgid "No previous regular expression" +#~ msgstr "°ÊÁ°¤ËÀµµ¬É½¸½¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "¥¢¥¯¥·¥ç¥ó: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE " +#~ "FORMAT\n" +#~ " -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "½Ò¸ì¥ê¥¹¥È:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "ɾ²ÁÌÚ:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "ºÇŬ²½É¾²ÁÌÚ:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "ºÇŬ²½É¾²ÁÌÚ:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "¥á¥â¥ê¤ò»È¤¤²Ì¤¿¤·¤Þ¤·¤¿" + +#~ msgid "inserting %s\n" +#~ msgstr "%s ¤òÁÞÆþ\n" + +#~ msgid " type: %s %s " +#~ msgstr " ¥¿¥¤¥×: %s %s " + +#~ msgid "left:\n" +#~ msgstr "º¸:\n" + +#~ msgid "right:\n" +#~ msgstr "±¦:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Àµµ¬²½É¾²ÁÌÚ:\n" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s ¤Ï %s ¤Î¼Â¹ÔÃæ¤ËÊѹ¹¤µ¤ì¤Þ¤·¤¿" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. ¤Ï %s ¤Î¼Â¹ÔÃæ¤ËÊѹ¹¤µ¤ì¤Þ¤·¤¿" + +#~ msgid "error in %s: %s" +#~ msgstr "%s Ãæ¤Ç¥¨¥é¡¼: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "¥ª¥×¥·¥ç¥ó (¤¤¤Ä¤â¿¿): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "ȽÊ̼° (N ¤Ï +N ¤Þ¤¿¤Ï -N ¤Þ¤¿¤Ï N ¤È¤Ç¤­¤ë): -amin N -anewer FILE -atime " +#~ "N -cmin N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "»ÈÍÑË¡: %s [-d ¥Ñ¥¹ | --database=¥Ñ¥¹] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "%s¥¯¥ª¡¼¥Æ¡¼¥·¥ç¥ó¤¬°ìÃפ·¤Þ¤»¤ó" + +#~ msgid "command too long" +#~ msgstr "¥³¥Þ¥ó¥É¤¬Ä¹¤¹¤®¤Þ¤¹" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "°ú¿ô¥ê¥¹¥È¤Î¥µ¥¤¥ºÀ©¸ÂÆâ¤Çñ°ì°ú¿ô¤È¤·¤Æ¼ý¤Þ¤ê¤Þ¤»¤ó" + +#~ msgid "argument list too long" +#~ msgstr "°ú¿ô¥ê¥¹¥È¤¬Ä¹¤¹¤®¤Þ¤¹" diff --git a/po/ko.gmo b/po/ko.gmo new file mode 100644 index 0000000000000000000000000000000000000000..a116cfb532751df4464bb548c812f104f7ae845f GIT binary patch literal 2034 zcmaKrYiv|S6vr=$3hN8;g-=d_1(D3UTX}Us(ol$2tdgb>jehX%-sy7Tc4l)Q+hXD; z<2S#liGHjS6Jvtg&|2E=ws*13g<9Ka8egzE>;@kI zzX0zCzg}4X1m24EUtk@$?B=TfdQipN2`UXQgR8+T_&E3$xEcHiBya*$_soO0fxm<6 zzzWE~waYc_RcLPkmF`b(sp=jDH)4GmdD(zix zJ@^5r>Qn$Xfis}WcNxUo39bQEej7oh=Q;2(FbAr8-UB1xhhP*u0d4}vLCDtb!i2=| zE+F((R72HQX+o;n3QScmr5Q&xlr<(sBo;8h5Los6#Hd zJ4~Uw+@REPa?Fg-Es7f0N)qofmA%t+kC5Z)uIEtwwr#sePf6P~MJ9AIMNYR&gM`2}7s z#tMVi!G%kfDLA=O;wS_g(o0!f<05C;QiKjBYM{1pf`{sP7f);4wvkAuZmK*(bJSVF zm_A}!24!uT=8mH+mV!Cv8wh$l%jxxKdQ;8LyRtU?kWkGeJj zqruyC&vLPLI7*L-$ad0&QFnvq)fl0GI?X`>NZAv|gzOYrr)~>alH>`Sr)5S!szKaI z>q_lwO77Awc-RizCBwuq*UYKZqRRWAEsw&&nhkci`dZ2G?L61C9NHR7L|SR7n61-a`2@#)?{;C<;eEot&>zAkMCgd?JV9viJi%< z4O`-gcpQ$bmFG-V%mu$hL&J8Kh_m<(s;^Hbp578~fZq$cGYMy*I701qgjE)@XCO-(ir_yl$kA34|Uk&{>c1CriKScTNQaL}ru(^v$ zbG_$->Cj0v;!>AT@yN|kDlULR$yR9=X3{Z2K0twjgQ ze&zc9yv9~-&YH=eER-p@;7`!0@qy2%=W_2$Nh2r4<_|*zg z?bM)B?bDjMP%e&Y;oiTic50H8_*&sKe?avp+7O{m4V6xecK1&%7I`W^O+&x>)4^QP zSHkNSyswEtLB*f0?)IMdr?la(2*nxx!!K(2OZoXE;uS}OZ>vV6>rWI1N6+~aL202? Tm-GrMs6we+{L-IYY|?)K+KaA! literal 0 HcmV?d00001 diff --git a/po/ko.po b/po/ko.po new file mode 100644 index 0000000..0629bf2 --- /dev/null +++ b/po/ko.po @@ -0,0 +1,1153 @@ +# findutilsÀÇ Çѱ¹¾î ¸Þ½ÃÁö +# Copyright (C) 1996 Free Software Foundation, Inc. +# Bang Jun-Young , 1996. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 1996-10-07 22:13+0900\n" +"Last-Translator: Bang Jun-Young \n" +"Language-Team: Korean \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=EUC-KR\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "" + +#: gnulib/lib/argmatch.c:154 +#, fuzzy, c-format +msgid "Valid arguments are:" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, fuzzy, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, fuzzy, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, fuzzy, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: -%c ¿É¼Ç¿¡ ºÎÀûÀýÇÑ ¼ýÀÚ°¡ ÁÖ¾îÁü\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "»ç¿ë¹ý: %s [°æ·Î...] [¼ö½Ä]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "»ç¿ë¹ý: %s [°æ·Î...] [¼ö½Ä]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +#, fuzzy +msgid "cannot get current directory" +msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "¾Ë ¼ö ¾øÀ½" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"±âº» °æ·Î´Â ÇöÀç µð·ºÅ丮ÀÔ´Ï´Ù; ±âº» ¼ö½ÄÀº -printÀÔ´Ï´Ù\n" +"¼ö½ÄÀº ´ÙÀ½°ú °°ÀÌ ÀÌ·ç¾îÁú ¼ö ÀÖ½À´Ï´Ù:\n" +"¿¬»êÀÚ(°¨¼ÒÇÏ´Â ¿ì¼±¼øÀ§; ´Ù¸¥ °ÍÀÌ ÁÖ¾îÁöÁö ¾ÊÀ¸¸é -and°¡ ¹¬½ÃÀûÀ¸·Î »ç¿ë" +"µÊ)\n" +" ( EXPR ) | EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"±âº» °æ·Î´Â ÇöÀç µð·ºÅ丮ÀÔ´Ï´Ù; ±âº» ¼ö½ÄÀº -printÀÔ´Ï´Ù\n" +"¼ö½ÄÀº ´ÙÀ½°ú °°ÀÌ ÀÌ·ç¾îÁú ¼ö ÀÖ½À´Ï´Ù:\n" +"¿¬»êÀÚ(°¨¼ÒÇÏ´Â ¿ì¼±¼øÀ§; ´Ù¸¥ °ÍÀÌ ÁÖ¾îÁöÁö ¾ÊÀ¸¸é -and°¡ ¹¬½ÃÀûÀ¸·Î »ç¿ë" +"µÊ)\n" +" ( EXPR ) | EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "ºÎÀûÀýÇÑ -size Çü `%c'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find ¹öÀü %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find ¹öÀü %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â Çü½Ä Áö½ÃÀÚ `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "ȯ°æÀÌ ½ÇÇà(exec)Çϱ⿡ ³Ê¹« Å®´Ï´Ù" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "" + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "%s¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s°¡ ½ÅÈ£ %d¿¡ ÀÇÇØ Á¾·áµÊ" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "À¹ -- ºÎÀûÀýÇÑ ¼ö½Ä ÇüÀÔ´Ï´Ù!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "À¹ -- ºÎÀûÀýÇÑ ¼ö½Ä ÇüÀÔ´Ï´Ù!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'" + +#: find/tree.c:1259 +#, fuzzy, c-format +msgid "invalid predicate `%s'" +msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'" + +#: find/tree.c:1264 +#, fuzzy, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: find/tree.c:1271 +#, fuzzy, c-format +msgid "missing argument to `%s'" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "À¹ -- and¸¦ ³»Á¤Ä¡·Î ºÎÀûÀýÇÏ°Ô »ðÀÔÇß½À´Ï´Ù!" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "»ç¿ë¹ý: %s most_common_bigrams < list > coded_list\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find ¹öÀü %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "°æ°í: µ¥ÀÌÅͺ£À̽º `%s'´Â %s ÀÌ»ó ¿À·¡µÇ¾ú½À´Ï´Ù" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "°æ°í: µ¥ÀÌÅͺ£À̽º `%s'´Â %s ÀÌ»ó ¿À·¡µÇ¾ú½À´Ï´Ù" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate ¹öÀü %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "Àμö ÇàÀÌ ³Ê¹« ±é´Ï´Ù" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "°æ°í: µ¥ÀÌÅͺ£À̽º `%s'´Â %s ÀÌ»ó ¿À·¡µÇ¾ú½À´Ï´Ù" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "ȯ°æÀÌ ½ÇÇà(exec)Çϱ⿡ ³Ê¹« Å®´Ï´Ù" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs ¹öÀü %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "µÎ¹è" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "´ÜÀÏ" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "Àμö ÇàÀÌ ³Ê¹« ±é´Ï´Ù" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "ÀÚ½Ä ÇÁ·Î¼¼½º¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: »óÅ 255À» °¡Áö°í Á¾·áµÊ; Áß´ÜÇÔ" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: ½ÅÈ£ %d¿¡ ÀÇÇØ ÁßÁöµÊ" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: ½ÅÈ£ %d¿¡ ÀÇÇØ Á¾·áµÊ" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: -%c ¿É¼Ç¿¡ ºÎÀûÀýÇÑ ¼ýÀÚ°¡ ÁÖ¾îÁü\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: -%c ¿É¼ÇÀÇ °ªÀº %ldº¸´Ù Å©°Å³ª °°¾Æ¾ß ÇÕ´Ï´Ù\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: -%c ¿É¼ÇÀÇ °ªÀº %ldº¸´Ù ÀÛ¾Æ¾ß ÇÕ´Ï´Ù\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"»ç¿ë¹ý: %s [-0prtx] [-e[ÆÄÀϳ¡-¹®ÀÚ¿­]] [-i[´ëü-¹®ÀÚ¿­]] [-l[ÃÖ´ë-Çà]]\n" +" [-n ÃÖ´ë-Àμö] [-s ÃÖ´ë-¹®ÀÚ] [-P ÃÖ´ë-ÇÁ·Î¼¼½º] [--null] [--eof[=ÆÄÀÏ" +"³¡-¹®ÀÚ¿­]]\n" +" [--replace[=´ëü-¹®ÀÚ¿­]] [--max-lines[=ÃÖ´ë-Çà]] [--interactive]\n" +" [--max-chars=ÃÖ´ë-¹®ÀÚ] [--verbose] [--exit] [--max-procs=ÃÖ´ë-ÇÁ·Î¼¼" +"½º]\n" +" [--max-args=ÃÖ´ë-Àμö] [--no-run-if-empty] [--version] [--help]\n" +" [¸í·É [Ãʱâ-Àμö]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "À¹ -- ºÎÀûÀýÇÑ ¼ö½Ä ÇüÀÔ´Ï´Ù!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "À¹ -- ºÎÀûÀýÇÑ ¼ö½Ä ÇüÀÔ´Ï´Ù!" + +#, fuzzy +#~ msgid "Invalid regular expression" +#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#, fuzzy +#~ msgid "Invalid back reference" +#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#, fuzzy +#~ msgid "Unmatched [ or [^" +#~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥" + +#, fuzzy +#~ msgid "Unmatched ( or \\(" +#~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥" + +#, fuzzy +#~ msgid "Unmatched \\{" +#~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥" + +#, fuzzy +#~ msgid "Invalid range end" +#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#, fuzzy +#~ msgid "Memory exhausted" +#~ msgstr "°¡»ó ¸Þ¸ð¸®°¡ ¹Ù´Ú³µÀ½" + +#, fuzzy +#~ msgid "Invalid preceding regular expression" +#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#, fuzzy +#~ msgid "Premature end of regular expression" +#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#, fuzzy +#~ msgid "Regular expression too big" +#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#, fuzzy +#~ msgid "Unmatched ) or \\)" +#~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥" + +#, fuzzy +#~ msgid "No previous regular expression" +#~ msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "Çൿ: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n" + +#, fuzzy +#~ msgid "Eval Tree:\n" +#~ msgstr "Á¤±ÔÈ­µÈ Æò°¡ Æ®¸®:\n" + +#, fuzzy +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Á¤±ÔÈ­µÈ Æò°¡ Æ®¸®:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "°¡»ó ¸Þ¸ð¸®°¡ ¹Ù´Ú³µÀ½" + +#~ msgid "inserting %s\n" +#~ msgstr "%s¸¦ »ðÀÔÇÔ\n" + +#~ msgid " type: %s %s " +#~ msgstr " Çü: %s %s " + +#~ msgid "left:\n" +#~ msgstr "¿ÞÂÊ:\n" + +#~ msgid "right:\n" +#~ msgstr "¿À¸¥ÂÊ:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Á¤±ÔÈ­µÈ Æò°¡ Æ®¸®:\n" + +#~ msgid "error in %s: %s" +#~ msgstr "%s¿¡ ¿À·ù: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "¿É¼Ç (Ç×»ó Âü): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "½ÃÇè (NÀº +N, -N, NÀÌ µÉ ¼ö ÀÖÀ½): -amin N -answer FILE -atime N -cmin N\n" + +#~ msgid "wait got pid %d, expected pid %d" +#~ msgstr "±â´Ù¸®´Ù pid %d¸¦ ¹Þ¾ÒÀ¸³ª pid %d°¡ ¿ä±¸µÊ" + +#~ msgid "%s stopped by signal %d" +#~ msgstr "%s°¡ ½ÅÈ£ %d¿¡ ÀÇÇØ ÁßÁöµÊ" + +#~ msgid "command too long" +#~ msgstr "¸í·ÉÀÌ ³Ê¹« ±é´Ï´Ù" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "Àμö ¸í´Ü ±æÀÌ Á¦ÇÑ¿¡ ´ÜÀÏ Àμö¸¦ ¸ÂÃâ ¼ö ¾ø½À´Ï´Ù" + +#~ msgid "argument list too long" +#~ msgstr "Àμö ¸í´ÜÀÌ ³Ê¹« ±é´Ï´Ù" + +#~ msgid "" +#~ "Usage: %s [-d path] [--database=path] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "»ç¿ë¹ý: %s [-d °æ·Î] [--database=°æ·Î] [--version] [--help] ÆÐÅÏ...\n" diff --git a/po/lg.gmo b/po/lg.gmo new file mode 100644 index 0000000000000000000000000000000000000000..e4f256db8007cbd99ae209322e285df12d5291da GIT binary patch literal 4399 zcmb7`ON<;x8GtL0@K`VeC%hjiJ07ncZ;xkJHcmENJv45140}?L`V^bT#z^uaY@7hI3R?$M7bcr1%a?Qap3#A=dmxxxV63C zcGX{1|FiymYybT}R6I+(pW%J&KBdmV)9>aN&lm4k>Qit99)ex?N%&oO5dM7p{RUj% z`)&AHxbFd_8t@pD@#kO!zX>&b4IYNSgP(x6;iuug_bBxUJUZqIL?xBL2Vn{yhTni6 zgFk>Dg})e&|9Z?nLbgqF#iEst!B= zZ$UZ#Whi>S0zVFa1I15&fnxt{xF7C+pHiQL4JhZGhhpyw@F*;yhChXJ&g+n+>J2FV z{XG=F{R@5z10H#Q?blaO`YFcWgd+C<${&MApyNflzX~NkQmEm#p{#!uN<4l$<{u#D zs6Ro8`=6oc{ck9Kd+_d@SjlhmpSp*0D&`|s@ zKHU0zgb(q*wA~JqlSAax7DFV>HGb? z0`*Qo3@*1FAG>74%BiEotF?FboUfcPN0FSyKHY3K1!wdZw7PiZx?WFQS8v$7kbpPv zvJ7UvLl*5C-Xv1Rw$bY@b$;MBk2uAZ+lWfE1wliOwW;tTG|4So;5dPA+L zX;i1d7o{Yt8iksy)LG)JF1<$|610t0DOo+Ts$-nY8Dpx<0fstE}5da_=P5B(bV}Im%YY+D+S0mHK*M5-Es@HoFHqHGfqEN}W zG9uATm&3l*B>Mbxd}__iz{!&7)S4t-=~-CJ7TV1|$t`i2?&U(3%{<0}>d@&l^4+A0 zT(wazVKs(KkC~j{eZP=goaoWD>n3D)#TAyzfJE@?6jk?t+9^5Hsj~Edk^}H=|*QmTtusWS+_$RNp@GFPsc7aeICzU{nBc5F1JR^jLwtg%X+ER zIu*4(AGMy)i;pj#c;Z-VvDHE_x@I>L@&8QjMAYJEN#stRx_EhY?pafm(Q0m7kr^^> zSzl_NO>)y77=1eRz5Xzi=IJyUC8ck!=hlX_+3~$ItaEWNv5i)(=`HJLLyW)gvgY#2 znu~oSbh|e7N*a_&&A<$0J1(pa#-t|Y1P;TQO_^HQj(X@^nu z?wppg)9Jh|jlu9cZc?|U|M$$babvny`8%t*OT)_LQy*91-V*D(1e-LsX=-yzQ`##n z_H=g7xS?dxE)ULpGZT5I)@6tDs+NWgS$QDMA$kJU6ZX!?Fke~dvlcZ6Tyr2~5G&z-GwQq-k zaT`IkgQF7p#+B`m`P3*1EvpO7rYJd4iUJ&(HR*vzj*@jrZ1Aa7&i1M}px=6sx-0pQ zg3P9{W)<5TSXKT|ZS!jg%q#9J??*|smWxIfpvCQ}HNG7_rP6A|h53$p*Drc#XAvJ?A{`v-rm(*W5>Qq_*CcuM=P MmQ#UMNmk4M2QOo|>Hq)$ literal 0 HcmV?d00001 diff --git a/po/lg.po b/po/lg.po new file mode 100644 index 0000000..0cdddaa --- /dev/null +++ b/po/lg.po @@ -0,0 +1,1207 @@ +# translation of findutils-4.1.20.po to Luganda +# This file is distributed under the same license as the PACKAGE package. +# Copyright (C) 2004 Free Software Foundation, Inc. +# K.Birabwa , 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.20\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2004-04-02 18:57GMT\n" +"Last-Translator: K.Birabwa \n" +"Language-Team: Luganda \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=EUC-KR\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.0.1\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "agumenti %s tekozesebwa ku %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "agumenti %s ku %s ebuzabuza" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Augumenti z'oyinza okukozesa ziri:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Kiremya atategeerese mu sisitemu" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: akawayiro '%s' kabuzabuza\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: akawayiro '--%s' tekateekebwa ko agumenti\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: akawayiro `%c%s' tekateekebwa ko agumenti\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: akawayiro `%s' k'etaaga agumenti\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: akawayiro `--%s' tekamanyidwa\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: akawayiro `%c%s' tekamanyidwa\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: akawayiro --%c tekakkirizibwa\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: akawayiro --%c tekakola\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: akawayiro k'etaaga agumenti --%c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: akawayiro `-W %s' kabuzabuza\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: akawayiro `-W %s' tekateekebwa ko agumenti\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "bunene obwa buloka" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Nkozesa eri: %s [kubo...] [mboozi]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Nkozesa eri: %s [kubo...] [mboozi]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "" +"kulabula: akabonero akufuula enneyisa ya bunnaako, `\\%c', tekategeerekese" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "tekimanyidwa" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"ekkubo erya bulijjo litandikira mu tterekero ekiragiro mwe kiweeredwa; " +"emboozi eya\n" +"bulijjo eri -print\n" +"emboozi esobola okubeera mu:\n" +"ebifuula (ebikulembera bye bisooka okukolebwa ko; singa tekuba ebifuula " +"ebirala\n" +"pulogulamu ekibala nti ekifuula \"-and\" kyo wekiri):\n" +" ( EMBOZ ) ! EMBOZ -not EMBOZ EMBOZ1 -a EMBOZ2 EMBOZ1 -and EMBOZ2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"ekkubo erya bulijjo litandikira mu tterekero ekiragiro mwe kiweeredwa; " +"emboozi eya\n" +"bulijjo eri -print\n" +"emboozi esobola okubeera mu:\n" +"ebifuula (ebikulembera bye bisooka okukolebwa ko; singa tekuba ebifuula " +"ebirala\n" +"pulogulamu ekibala nti ekifuula \"-and\" kyo wekiri):\n" +" ( EMBOZ ) ! EMBOZ -not EMBOZ EMBOZ1 -a EMBOZ2 EMBOZ1 -and EMBOZ2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer FAYIRO -ctime N -empty -false -fstype KIKA -gid N\n" +" -group LINNYA -ilname KIGAMBO -iname KIGAMBO -inum N\n" +" -ipath KIGAMBO -iregex KIGAMBO -links N -lname KIGAMBO\n" +" -mmin N -mtime N -name KIGAMBO -newer FAYIRO\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path KIGAMBO -perm [+-]NKOLA -regex KIGAMBO\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user LINNYA\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "enkola `%s' tekola wano" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "towadde agumenti eyetaagibwa ku kawayiro -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr " -size eweereddwa ekika, `%c', ekitakola wano " + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "agumenti `%s' tekozesebwa ku` %s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "agumenti %s tekozesebwa ku %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find ey'omutindo %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find ey'omutindo %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "" +"kulabula: akabonero akufuula enneyisa ya bunnaako, `\\%c', tekategeerekese" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "kulabula: ekiragiro ekifuga entereeza, `%%%c', tekitegeerekese" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "exec esanze nga enviromenti esukkiridde obunene" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "ekilagiro ekya sisitemu ekya`fork()' kigaanye" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "wazzewo kiremya nga nnindirira %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "omulimu %s guyimirizidwa ekiragiro %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "emboozi tekola wano" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "emboozi tekola wano" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "emboozi tekola wano" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oops -- ekika eky'emboozi ekyo tekikola wano!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oops -- ekika eky'emboozi ekyo tekikola wano!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "sooka okuteekawo amakubo olyoke ozeeko emboozi" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "puledikato `%s' tekola wano" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "puledikato `%s' tekola wano" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "agumenti `%s' tekozesebwa ku` %s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "`%s' ebulako agumenti" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "emboozi tekola wano" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "puledikato `%s' tekola wano" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "" +"oops -- esonsesewo and! etakolerawo. Enkola eya bulijjo kwe kusonsekawo " +"\"and!\"" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Nkozesa eri: %s bigulamu_ezisinga_okusangibwa < lukalala > " +"lukalala_olutegeke\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Wereza embuulire ku biwuka by'osanze mu pulogulamu eri ba ." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find ey'omutindo %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "ennaku" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "agumenti `%s' tekozesebwa ku` %s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate ey'omutindo %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "agumenti eyitiridde obuwanvu" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "kulabula: olukalala `%s' emaze %d %s nga tezzibwanga buggya" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "exec esanze nga enviromenti esukkiridde obunene" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs ey'omutindo %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "nakabirye" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "sekinnomu" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "agumenti eyitiridde obuwanvu" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "wazzewo kiremya nga nnindirira omulimu oguzaalukusiddwa mu gunnaagwo" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: omulimu gumaliddwa nga gulina embeera eya 255, mbivuddeko" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: omulimu guyimiriziddwa ekiragiro %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: omulimu gukomekkerezedwa ekiragiro %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: omuwendo guno tegukola ku kawayiro -%c\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: akawayiro -%c kateekwa okubeera nga >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: akawayiro -%c kateekwa okubeera nga < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Enkozesa eri: %s [-0prtx] [-e[kigambo-kya-eof]] [-i[kigambo-ekinaddawo]]\n" +" [-l[max-mboozi]] [-n max-agumenti] [-s max-nukuta]\n" +" [-P max-mirimu] [--null] [--eof[=kigambo-kya-eof]]\n" +" [--replace[=kigambo-ekinaddawo]] [--max-mboozi[=max-mboozi]]\n" +" [--interactive] [--max-chars=max-nukuta] [--verbose] [--exit]\n" +" [--max-procs=max-mirimu] [--max-args=max-agumenti]\n" +" [--no-run-if-empty] [--version] [--help]\n" +" [orden [agumenti-ezisooka]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oops -- ekika eky'emboozi ekyo tekikola wano!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oops -- ekika eky'emboozi ekyo tekikola wano!" + +#~ msgid "Success" +#~ msgstr "Omulimu gumalirizidwa bulungi" + +#~ msgid "No match" +#~ msgstr "Tewali kifaanagana" + +#~ msgid "Invalid regular expression" +#~ msgstr "Emboozi enoonya ebifaanagana etakola" + +#~ msgid "Invalid collation character" +#~ msgstr "Nsanze ennukuta etasobola okweyambisibwa mu kusengeka nkalala" + +#~ msgid "Invalid character class name" +#~ msgstr "Linnya lya kika eky'ennukuta telikola" + +#~ msgid "Trailing backslash" +#~ msgstr "Waliwo akasazze akaddanyuma nga ke kakomekkerezza" + +#~ msgid "Invalid back reference" +#~ msgstr "" +#~ "Waliwo ekilagiro ekinoonya ebifaanagana n'ennukuta ezikikulembedde " +#~ "ekitakola wano" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Waliwo [ oba [^ ebula ko ginne wa yo" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Waliwo ( oba \\( ebulako ginne wa yo" + +#~ msgid "Unmatched \\{" +#~ msgstr "Waliwo \\{ ebulako ginne wa yo" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Ebiri wakati wa \\{\\} tebikola wano" + +#~ msgid "Invalid range end" +#~ msgstr "Rango gy'ekomekkerezedwa tewakkirizibwa" + +#~ msgid "Memory exhausted" +#~ msgstr "Ggwanika lijjudde" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Emboozi enoonya ebifaanagana ekulembedde tekola wano" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Emboozi enoonya ebifaanagana ekomekkerezedwa bubi" + +#~ msgid "Regular expression too big" +#~ msgstr "Emboozi enoonya ebifaanagana eyitiridde obunene" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Waliwo ) oba \\) ebulako ginne wa yo" + +#~ msgid "No previous regular expression" +#~ msgstr "Emabega tewali yo mboozi enoonya ebifaanagana" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "ebikolwa biri: -exec KIRAGIRO ; -fprint FAYIRO -fprint0 FAYIRO\n" +#~ " -fprintf NTEREEZA YA FAYIRO -ok KIRAGIRO ; -print -print0\n" +#~ " -printf NTEREEZA -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Olukalala lwa puledikato:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Emitendera egiyunguluddwaamu amakulu:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Emitendera egiyunguluddwaamu amakulu nga gituukanisidwa:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Emitendera egiyunguluddwaamu amakulu nga gituukanisidwa:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "ggwanika elizibizi lijjudde" + +#~ msgid "inserting %s\n" +#~ msgstr "nsonsekawo %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " ekika: %s %s " + +#~ msgid "left:\n" +#~ msgstr "kkono:\n" + +#~ msgid "right:\n" +#~ msgstr "ddyo:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Emitendera egiyunguluddwaamu amakulu nga ginoromawaziddwa:\n" + +#~ msgid "memory exhausted" +#~ msgstr "ggwanika lijjudde" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s ekyuukidde ku muku gwa %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. ekyuukidde ku muku gwa %s" + +#~ msgid "error in %s: %s" +#~ msgstr "kiremya mu %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "obuwayiro (bulijjo obubeera butuufu) buli: -daystart -depth -follow --" +#~ "help\n" +#~ " -maxdepth MITENDERA -mindepth MITENDERA\n" +#~ " -mount -noleaf --version -xdev\n" +#~ "ebigezo biri : -amin N -anewer FAYIRO -atime N\n" +#~ " -cmin N (N esobola okubeera +N, -N " +#~ "o N)\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Enkozesa eri: %s [-d kubo | --database=kubo]\n" +#~ " [-e | --existing] [-i | --ignore-case] [--version] [--help] " +#~ "kigambo...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "akoogeza %s kabulako kannewaako" + +#~ msgid "command too long" +#~ msgstr "ekiragiro kiyitiridde obuwanvu" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "agumenti eya sekinnomu tejja mu nkomo eziteekeddwa ku nkalala eza agumenti" + +#~ msgid "argument list too long" +#~ msgstr "olukalala olwa agumenti luyitiridde obuwanvu" diff --git a/po/ms.gmo b/po/ms.gmo new file mode 100644 index 0000000000000000000000000000000000000000..1ff62b8bf6f2529070e3bdb88f25374535ced362 GIT binary patch literal 2850 zcmbW2&yN&E6vsc@BIB&mHg;@Fq9`epAo?3`#tUtwIpc z1m6NLfiHkd;2!WM_!{_i&D$VC5PyPCgLlB);6LDV;I2oi=eKK~0P!d0YJLdv`|}{% zcfbZX1mQw_3O)*c2D0BIb|GE`XTUeW>mbjsf(OBGLAL(`K+fM59QIj|K!h$1)jS6B`=>zG{S1g##5~BlEP@C{IFNN%0SUYXa^AlK zIo{hK?{f!aJsOV*@f5fdWdA%^H{P2EYsY?{#Pt#`j+OP`-0;|mi*WHCqrrYTCO*d# z^(1S8Ez7-miZw%tm4kI)t)IcgF+Pq9;cOVJ84o@?pO4F%<7N#w|6(GvNw1iw6IwR0 zMW94Se7^WtW>UT_9xFX!Y>h&ju@ftRp`H=DfHk8-t!L2uqa9nWf z)e6xK22i^*q+n7DMJJL{#;ASYSjCyRZ>_LicU@}DDpuEoVpS`3#;%tlG{mGhhVxOg z*<>826C~chc$F56O=wB`z}cLD$~>97E&|vvebr{xEn5o15Otrl_s)xJWx_}KLn6Fx zi;q9D7jNJ`{NRR|7o$bWjnx#LgL9Np2U}z~`KlI)8U~TLqLXV;x}{}hxZY^Nd4x1( zvfDFxLIdx*Is{?r!jtTd;&7k|r8c=XzZSwg=Qld6hDp&kA@C+^tD^;;MJPpeU~$>I zMcs|^d?K$^GPO(5ifHm6r<+sF!;LF?fKNouhSVhTRFMWb=i1aMQpxg`mM2qNG@VZy zmoLr9(_Sn7eB>F(+@=Gq)?wK?BwI&lYNkDXWM6Bl)qKpb$Tqi%$k*xL)CMx*>(Nnc-5wb zO0}HRs^6wrm8&7_YG1r@#DeUHleq~oG=nRAS0gQ{Zdx6WH)hYzp1mu}RI}AM?QF!i zEa#AhHbuP>_YZPq>{06Wln*+-SHuN5bJvbHThLyfwOyA$`ZmpUOx+7IofpbeqHT(! zR6U9NkusUGf_v7$^ zVyL5i5BcQ;kjpiGDK>Pk#0(1jaBQ+VlB~{_8mNezWyo1h1C+7h4|lDb{RivKdt2Gk zs_w=ejkvW{b9Hm$S)TMrT*N8LwpIs*kfQ1pMx5hxQ&~7%GKQ0UZ-+x=;Oi>WihB3C z$_pIEE}~pSP-d0T>oS4jHv;0JkP}sJiV7=inif>pSY(K1{5<+xD1YTtCKk2DW~JLI pRt~G|c2xj%s9cL>U1oZKRG0sYOrvcgs!, 2003. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils-4.1.7\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2003-01-19 14:42+0800\n" +"Last-Translator: Nik Ramadhan Nik Idris \n" +"Language-Team: Malay \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "hujah %s tidak sah untuk `%s'" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "hujah %s adalah kabur untuk `%s'" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Hujah yang sah ialah:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "ralat sistem tidak diketahui" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: pilihan `%s' adalah kabur\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: pilihan `--%s' tidak mengizinkan sebarang hujah\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: pilihan `%c%s' tidak mengizinkan sebarang hujah\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: pilihan `%s' memerlukan hujah\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: pilihan tidak dapat dikenal pasti `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: pilihan tidak dapat dikenal pasti `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: pilihan tidak dibenarkan -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: pilihan yang tidak sah -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: pilihan memerlukan hujah -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: pilihan `-W %s' adalah kabur\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: pilihan `-W %s' tidak mengizinkan sebarang hujah\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "saiz blok" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "" + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "" + +#: find/find.c:211 +msgid "cannot stat current directory" +msgstr "" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "tidak diketahui" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "mod yang salah `%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "jenis saiz tidak sah `%c'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "hujah yang salah `%s' kepada `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "hujah %s tidak sah untuk `%s'" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "versi find GNU %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "versi find GNU %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "ralat menunggu untuk %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "" + +#: find/tree.c:1239 +#, c-format +msgid "unknown predicate `%s'" +msgstr "" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "hujah yang salah `%s' kepada `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "kehilangan hujah kepada `%s'" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Laporkan pepijat kepada ." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "versi find GNU %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "hari" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "hujah yang salah `%s' kepada `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "versi locate GNU %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "baris hujah terlalu panjang" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "berganda" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "tunggal" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "baris hujah terlalu panjang" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "ralat menunggu untuk proses anak" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: keluar dengan status; abaikan" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: di berhentikan oleh signal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: diputuskan oleh signal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: nilai untuk pilihan -%c mesti >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s:nilai untuk pilihan -%c mesti < %ld\n" + +#: xargs/xargs.c:1306 +#, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" + +#~ msgid "Success" +#~ msgstr "Berjaya" + +#~ msgid "No match" +#~ msgstr "tidak padan" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Tidak padan [ atau [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( atau \\( tidak sesuai" + +#~ msgid "Unmatched \\{" +#~ msgstr " \\{ Tidak sesuai" + +#~ msgid "Memory exhausted" +#~ msgstr "memori kehabisan" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") atau \\) tidak sesuai" + +#~ msgid "virtual memory exhausted" +#~ msgstr "kehabisan memori maya" + +#~ msgid " type: %s %s " +#~ msgstr " jenis: %s %s " + +#~ msgid "left:\n" +#~ msgstr "kiri:\n" + +#~ msgid "right:\n" +#~ msgstr "kanan:\n" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. perubahan semasa perlaksanaan %s" + +#~ msgid "error in %s: %s" +#~ msgstr "ralat dalam %s: %s" + +#~ msgid "command too long" +#~ msgstr "arahan terlalu panjang" + +#~ msgid "argument list too long" +#~ msgstr "senarai hujag terlalu panjang" diff --git a/po/nl.gmo b/po/nl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..5dfa51e38351554d151f9e07e4b655f10933fbef GIT binary patch literal 17489 zcmcJWdyHIHea9~lpe%uq040zDCux>hW8bwM^4v|F*xt2cVtb9f&I4ndJ2Q7?uJ_Kp zleu?xy>3tuZ4pIjQK6|Qh_tAv6>2F|2o+UTp-R;XXe06HLq+W$eNa$U^?|BVseknI zJ?B1VcE^rG+L7;mXU;wMJbvf*{$2m=byq#<@!8<|F|KdD$n$;;eB!12;dA|r=iLat z9()_P2;Kyy;12M^;0M6p2mcyee!1tp0W?>8UIs3LkAa^BZw7CC1!IASK#lWg@%yL1 zUHtw8_(t%n;4JvvqWzVx^gN&6i=Y7`@Gam6!Rx`_0dD}m3ceZqPJu7E#;x-$;9F@w z0lonI3Gh|mdqC~)=RpI04!jQhI`|s!A3&}5zrh~`U(G|W1>Xw(ICvj;H`oT7;3o^b z>RQih@w*GY7yKHieH~?Rt?xW|8~8!+4)Duh7yJQuEBNTEJ@0qHC&635V=U%g@V(%} z;FrPgfv;yVbKr|u+%JH;KyG<|0GTR3w?SCJ`wpmn{{dbFUITNy1bhuB zy59h5z4w5k%gLgB2=3(fFM=%1`!dKs@2~hHI({F7RNl25`U&u6@OE$nCg5*@;?EnH zT=$p3H-WzdYQ0|oMYlf%)$cz+w&cB;!S(x2Q2f^f4fp}@8SvAf)_sA&UIsxv25R0< zv3Tw4+u#n`{|?l8ucov1)c_?@hrx%y74XOlJnuI^?epIe2A#tjVXA%LhrpxYGoa+; z282iFvk$xvjKO~dKLhg5`v{8_Uw#pMALBj)LUQjN9KOzZ4P+|sSHSmxe+d2@crQfw zCirI{Tk}52=HCx~349-T2%*uuUjenB{{l7Nbu3!H?*K)wlc2_b9Mt`%iuR{L9`XLA zXulpIXKCI&AV=i2K%L7^7Qde=@b^F-@%{qjpZ7u*!M42JAR^}N1ttFnK+!h>wVs~^ z#fP5)b)H`YMVGIG;=8(;l~veW2tg z0`CMr4hG=2K)QOjbMw1k2h{x)gjf9W0q`B*m%zUPujNoguYUza?`v;$>-;E~@cXwx z?f;D^3GL$usPUSh#``!p1it}lJvCg^SNOGSpkV5!f zzW0OQ2Y(&pXuXf!ja)#7uYmjc{r50|_BV^r?WTPv_*#CSx!3LQG4MzD{RH?J_#}9c zelNYxZq0juLBu~l1HK#lH}E*Pa=_``r$EWaAA|SnKKM28E;f4;_~IqE-#L(By^~z} ztaA0a#4{|($}lALuH|ZTMO=nUbG?g8G9rE!O<`^O5r1gUu#)|VPu|I8&&4%a9Rtbj z2iEj3b9O(F)t*ai?>HICrv zxy}{8PlFwvMwZ zbzHCKx{WL2LJfOsT>3o1^=A9c^H3+=16<-geIDXE!1X5m-~;=5XSuH9dYDVHS$>Z2 zrNt$FyOFEOrH}Me`GJkA529gh;+diaRR95BHk+ANn&d&0m?YeYqa-w~UN8(=c{t2= z8F~as+l=+9@0yJ$@0q+8nqJiHnP!xmEX?O;cqZ+bjb7C1jXy|39%h4}6>8X%;UFF6 zra9_nCQr@XeDOO`(jMheoZZ(=M)T>gyHA6)!%i@Yb2A8-EuuFQwnoEYnB=A%4Z~KR z4mTG~*)6;<7=~FErHMNGgJG29Gh>bYU{gEJqAWLQXThX{a2PNIn@tBfkMV_d=74q% zA=I`o;~D$$lXR4YLj!h)>1egcOf(y}cZs2(;>>Ilf zj%haAVa^OgMvL2LuYArZN!#0}+}?TxGcK?z__OVpI?IE6l$l#@yKT_~O&FDJv#bRZ z#c|k$GLBV@@0;0{=*OL8J%}NEL4ZyQkIc4;j+0%sKU}mtI@_Af8m66wS<=W&5Xb2T zTxfz}chra9-7r;Wx-h)7Kyp2>RY2o7(C=58_Q z74_VAkL%j-cqTLR^Yemz=3e711;}}jg=&C0XkMu_elTr6kOE!q5Ax0G)TJNQ!(S?P zH18b>;ZGeb3IavaUNGL_xBslL7PMsCxa2{I*g+}QZ_W%AZ$gQi1}IS z{PTHuv9?#no?d49BXoO`=7@AFWTCTh`u{)0h37d%J`5tvZ@1o#)S}%+!P3yYp5w9v zBYE#BPaoQ5{E8;NvAqU8i=-a8S8l4r-%2rhJQMSaXf zVGN>vKWs@%(BBdNb6BxkF#=+)QoST zozrV(5OhNm^(x%`-ouR(g+9Zu} zUw7D@j<3Ivff!;rdndt}+cCebW4Tdt=*aPQ%k(k0~ z42Q#X=$+2sd8=8@_;&^h4J9*3?$G8iucnjKPM%VCg*UJhCx5Wj7z}%STVr9 zLW=!TXU$BEeg9c=#y_e*C-i5iKYz$e$q;Le@(?4}}yLp@#WZ zM_>_pKg-|EN6vbWdS!TJd`wk{GvWfaJq32mp_P-z_OBYhV*@#UA33^QHQF{) zMmny`9@nLKp!g9J2@)I?zXrn*w!}xX=jF4ak2$znnGgAGAxH}D0s~Q%^ z9}`)(JUQM}K0Mw=eWmi+Yc~%r(OF?dOO`S=9+#~`h`V(&X3B?qaizRkro0wPA9i4j zweov6%(v?kuN`b=UOOFeu->!k1kcJF<}s3~DOb3?vDJ(4kzp5^6ptfE?9rccDe8#a z8NUWm#HD&P!+b;1p+1&d8#@|a8C$sk*anR_^>uqiubPDABh{@(H6Vl&Rs+^co6@vs zj<9WfY`Yh$(F*qZkm6A=;6hac?mqaRaOt_&T zo|j92;J@AIZS7f~p38B}&9-+uYcD#K$tW|23rU{Ht_upZ!nUF*G?Uy#>FfR=j#{ML z90%giL0}?32pO7gv>qlq778sjXODGSeEZePma#!(~ClgSFW5piEl!1)5H%K$|N~&a&bLPk<1@Q(73KwP+?pVMu z@Iyfe8r(XGMN&;#U}lE6RDSlfXLprBCY)Jtoh8xO60(X$n4bahh;tu|-w!UhhNH_5 zE+0Kb1KyhLQ8mbVi;Os3ozfgsj)>3W>&7RG2D6`2z7O?(4ksV8lcZCcXS^&(WN%x& z5FZKuQ0`GDAs^7{&F#PtG-2ya(-|c;A!$0e=~5RijPq>9(##z<7y))`b{>}(=-a=? zMa6&}7}9_NNjU_^no%GBl=LF4Eqk}zMr*te)44uQcln(l#%J(5nN`E9kDORGepd-c zz$QeMV=PCC;>iRi>R~*e84(}p!DvdZlf2cG)F}pWEz=`g2JRQz>zAvYoT%QAhv_eE zQ+Q!QEneo9Rb@FxnzWmQHAxlgB@o$CcD z_Y~~wZIrI#=_I;fT~zHN!@+X_aXXc&FVpo|9AwxKLo|?%$iGY2T>o~ugUDi4K|((a z61m!Z#iFv_27V&yR&E{P%ccpHGf@^uro|pDmdG-nr6elOx`)p9W>o8VqEhiQlxz~0 zHvH=Nu&|`gacxmT?5{J5$*Kc=^P@(mM$V8NZ;%?Q&gvXt2L>hit5^n zUu6x^u}D0cS2^)TGjJik<}Y-GauEpjxE~#wILH;=^KjsT8zNR|Y9$vsE@?NmI?Y%l z;mYX43a|~LkYXtgW23(;C$ht@XyI5)EV#Cgeq<{Vms$6im=%j38>~w0DRWw6fgXLA zysT=zi7uFNq@bw4aD+HkvlG2tDwX_=^%?ytT4#aQqs7`1J-ee;uVP8{bd_^aBnw%W z2nHJ$aldn80{o}MFPn-?IlVX-+_KU#h^@p7V+LoAk*e@i6`$<}1N({txDm=hkr<^M zf4v$vf0Rqwwxoc{X(tR%>0e}|c&$?u;GFkI@QmnJr^Hy7O_zBU1tuJ^6T|d8&b5D} z?LX*py$eDu?*GhAE3zQuciw&YgFZs$|Bp$iIr9VAgm@k>@UIY z3+9$Rd+zY}-0ttW%j~^#;nur$?%BI%4;}rJRC$zLuKV5Y@7?R~xzp^uYhmvm*Y9YM z<^Jjr&BNBx;et635}BA&t=@=DQXcA3?^Dx#NfhP;?}RB~GM~izW{y&58WGw1t6|Vz zFiRuMpShbZIk9%qy>EROozGgmVbsZOfpF&7kz>m>8TQWanK?*`2>04w#X(T9;6lE8 z5L4fDiDD|0_nclmDf_dOT&?LjTcYg2Q z`CC=t>!k!Q+}v^pMNE25SDJRw8@5{74KEh;(v2V(lC#r; zFvf5c_0?r;)RTcrbD~>1>4>T1`f5BBxpEr)zyv&hi8AU8{kvgvsMYF0ie?o_-E-B? zZ4_1s_I@T(;g*~~lf_E@pg*}b?R{0XTZJiUEp0x;D z+clM7-N-h3^;}A@J_{W$!0taby#O0@bV8|4sGVXnZ3!0Fp{&6|@@}{hoxd1$(Sy-> z;sJsi4hG__r$nI%IZ4YwbLog!Y(SJ51UVj7A3~vEsmDg)hNCrCl}Dg3*@ zL0yKubxchuC(h83*-^DTf-U#P>b1qeZ#g;~P)KZxwdP`UK5^q*uCFWC7M-WmY!4HR z5L0K(z&edK0=If}HuDu4$~d7Z_m@X6Q7m@iFWFO%!?5e^*LxHweYAT&g)yV^YduBw z+v>M+bEcMW>l=mR$f0ELW!ZhKcu&D!Sz+EyI#cu|?f5!6ywy@RfIXn5N=bEyyvQ-yIVN zTZEZb-gQrCa(I-a!&(z9t;(3{y?CP-l^O2o=0x!X*p!e-&V4V^!Sr%UaYtO(=G zT&j9o?Za9Z>bBUGE{cTRG;^|Cl2$E!Mr#epT~WYIMCwa;gYz@TFo|~4Ka@i_!4UF5 zbhcKPm4t*@%42rbVI4Mg;3fOI-Xz(^*mnz^8O6GX-cn^1{Ov{HhPcZbOtKfX?M*vG zZDy?I>wep^@4QAFb6yQB1vAL&a?WwuN83xex#B04DLH`m)GZ~-V$H~3s!X8gSN=q;T^nY zQwtiXdWf@uP+EzWk1W@S67EW|d@U6sqC^RN?e@wduPC~Gk6SCe8|kpki!^dqQUqm) zt{<_Rnf<&3XT@ULAX`hi&G6~ZChKt;G8B8KUbSWyl#|J*ZByZRDz-uHtTZmT@@ddX9#aRyh#8cT9oWue$mkerzAjK8(u>-1nz z@jYDllBJ6W6=a)K_2qp8;#;Meh_l_=N_Seba}=)ps}t*nYkIdWw#DBoevr7fdTgZ+ zXNU!5hBFE~*l|kA*mV@AydkGk$vQX07!6nRZ4_435g5VcfVm6*>S;~~wZXu!l*F27 zeNcs$R%W*IjNTf?u1UOI&O#!=_VF-gJX-{APu76Lu@dn4x1Z(J=>0CRD@(lQ!1Ae8 zRbk79J=3E#VJcB#4cQJIeqe&CTTdfMp-^=I)~~K zWsd6Tx>8|VA5-h5j6ReJsus=u!fs7SOG8`ut&gBG`#SEzAMFtwlxCW|6TWpXdipnQ z$u|m%PUJ-{+iQ&am9W)k7`mEoO&Duu(C=->StMH&L|FlAs2t1x`b)PwROh*Dm8_`# zUbfSXc(jg)Fzp;#H0W5>idGigNK)dCq;Xd&yL|tIiYp&_)bzItl0qm7#OQJPMbOL& zy(}i@Rai;-6&29`n;P*CQz34vW~H~GlmoU~B~>7=MpwmZl(|Spc_)f;u^b>9UfXi9 zvSCKiBZbbfdT~`So~Rffw-w|1@f3p)#MKbHFrv85C4ttT{`}LQx35i!Z1r*qvK6Hu zq)e}!F?m%uK7QoE<^7}{$4bXzO}2PEQ9Z7G6Vih!9#5|xU$T4*6I{fM7Y;%3nxu=s zxK$OB{nF90b!3~L{ON%$Pn(P;~ z<23<=vTC%(CYRSch zP-hBmW!vBmm6MeenciC32$#*WVfR34MHU`r@7W56%ctAuyl|LsN`$;+?rBe>QpI}FaGI~_ zqNL*8P9H}(DwBeU4a0`p2oZ;%nU@L##mfg}6QwyhMq$azh# zaEzY4o?Mbpc`hxtcJzy4G7TX?q+EJg2F`OVbRv{QZMU~j-zsfo(;9x8n!Js)lp`Gm zc;w2(b%aV9T#liM)pqWm^}?R8!J6R=%gDSP=Wl;)%@G zbi`yWd6U`l;H7tBE6`W6o4OKBo@J7xbtbq@Sv86}^f>A3e(3;}y;kHaiyHKJPmK=^ zW|0pY1edbmvhihryl6YPgDAb1Ejuk9R8G{oq@|I-mr}e`mZ3wx@+#yN78a#2SG6No zR-$pR7M$NS9x7ktZFo{uSbiBpmM;z-&mu}qBQA%Pq$, 1996. +# Ivo Timmermans , 2000. +# Taco Witte , 2004. +# Benno Schulenberg , 2005, 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.1\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-11-08 19:10+0100\n" +"Last-Translator: Benno Schulenberg \n" +"Language-Team: Dutch \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "ongeldig argument %s van %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argument %s van %s is niet eenduidig" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Geldige argumenten zijn:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Onbekende systeemfout" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: optie '%s' is niet eenduidig\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: optie '--%s' staat geen argument toe\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: optie '%c%s' staat geen argument toe\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: optie '%s' vereist een argument\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: onbekende optie '--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: onbekende optie '%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ongeldige optie -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: ongeldige optie -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: optie vereist een argument -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: optie '-W %s' is niet eenduidig\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: optie '-W %s' staat geen argument toe\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "blokgrootte" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "'" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[jJ]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Gebruik: %s [-H] [-L] [-P] [-Oniveau] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [pad...] [expressie]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Onbekende debuggingvlag '%s'; genegeerd." + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "Argument van optie '-D' is leeg" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "Direct na optie '-O' dient een decimaal getal te staan" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "Geef een decimaal getal op direct na optie '-O'" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "Ongeldig optimalisatieniveau %s" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"Optimalisatieniveau %lu is te hoog. Als u bestanden heel vlug wilt vinden, " +"gebruik dan 'locate'." + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"De omgevingsvariabele FIND_BLOCK_SIZE wordt niet ondersteund.\n" +"Alleen de omgevingsvariabele POSIXLY_CORRECT beïnvloedt de blokgrootte." + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "kan huidige map niet opvragen" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "kan huidige map niet opvragen" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Waarschuwing: bestandssysteem %s is recent ontkoppeld." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Waarschuwing: bestandssysteem %s is recent aangekoppeld." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s is gewijzigd tijdens het uitvoeren van %s (oud apparaatnummer %ld, " +"nieuw apparaatnummer %ld, bestandssysteemsoort %s) [regel %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s is gewijzigd tijdens het uitvoeren van %s (oud inode-nummer %ld, nieuw " +"inode-nummer %ld, bestandssysteemsoort %s) [regel %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Symbolische koppeling '%s' is deel van een oneindige lus in de " +"mappenhiërarchie: de map waarnaar de koppeling wijst is al bezocht." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Oneindige lus in bestandssysteem: '%s' heeft hetzelfde apparaatnummer en " +"inode-nummer als een map %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "niveau hoger in de mappenhiërarchie" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "niveaus hoger in de mappenhiërarchie" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "waarschuwing: symbolische koppeling %s wordt niet gevolgd" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"WAARSCHUWING: het aantal harde koppelingen voor %s is verkeerd. Dit zou een " +"fout in het bestandssysteem-stuurprogramma kunnen zijn. De optie '-noleaf' " +"wordt nu automatisch aangezet. In de tot nu toe gegeven resultaten kunnen " +"mappen ontbreken die doorzocht hadden moeten worden." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "onbekend" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"Waarschuwing: optie '%s' werd gegeven na het non-optie-argument '%s', maar " +"opties zijn niet positioneel: '%s' beïnvloedt zowel voorgaande als nakomende " +"testen. Geef opties op vóór andere argumenten.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"Waarschuwing: de optie '-d' wordt afgeraden; gebruik liever '-depth', omdat " +"dat een POSIX-mogelijkheid is." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"Het standaardpad is de huidige map; de standaardexpressie is '-print';\n" +"de expressie mag bestaan uit: operatoren, opties, testen, en acties:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"Operatoren (in afnemende voorrangsvolgorde;\n" +" de operator '-and' is impliciet als er geen andere gegeven is):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"Positionele opties (altijd waar): -daystart -follow -regextype\n" +"\n" +"Normale opties (ook altijd waar, maar gegeven vóór andere expressies):\n" +" -depth --help -maxdepth NIVEAUS -mindepth NIVEAUS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"Testen (N kan ook +N of -N zijn): -amin N -anewer BESTAND -atime N -cmin N\n" +" -cnewer BESTAND -ctime N -empty -false -fstype SOORT -gid N -group NAAM\n" +" -ilname PATROON -iname PATROON -inum N -iwholename PATROON -iregex " +"PATROON\n" +" -links N -lname PATROON -mmin N -mtime N -name PATROON -newer BESTAND" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATROON -perm [+-]MODUS -regex PATROON\n" +" -readable -writable -executable\n" +" -wholename PATROON -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAAM -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"Acties: -fprint BESTAND -fprint0 BESTAND -fprintf BESTAND OPMAAK\n" +" -exec COMMANDO ; -exec COMMANDO {} + -ok COMMANDO ;\n" +" -execdir COMMANDO ; -execdir COMMANDO {} + -okdir COMMANDO ; -ls\n" +" -fls BESTAND -print -print0 -printf OPMAAK -delete -prune -quit\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Rapporteer fouten in findutils via de foutenrapportagepagina op\n" +"http://savannah.gnu.org/. Als u geen webtoegang hebt, stuur dan\n" +"een e-mail naar .\n" +"Meld gebreken in de vertaling aan ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "de zinnigheidscontrole van de fnmatch()-systeemfunctie is mislukt" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"Waarschuwing: bestandsnamen bevatten gewoonlijk geen schuine strepen " +"(padnamen wel); dit betekent dat '%s %s' op dit systeem waarschijnlijk " +"altijd onwaar zal zijn. De test '-wholename' is vermoedelijk zinvoller, of " +"misschien '-samefile'. Of anders, als u GNU grep hebt, kunt u 'find ... -" +"print0 | grep -FzZ %s' gebruiken." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"Waarschuwing: de optie '-ipath' wordt afgeraden; gebruik liever '-" +"iwholename'." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Kan invoerbestand '%s' niet openen" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "ongeldige modus '%s'" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"Waarschuwing: het opgegeven moduspatroon %s is gelijkwaardig aan 000. Om " +"consistent te blijven met '-perm -000' zal de betekenis van '-perm /000' " +"binnenkort veranderen. Op dit moment komt dit laatste patroon met geen " +"enkel bestand overeen, maar zal binnenkort overeenkomen met alle bestanden." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "ongeldig leeg argument van '-size'" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "ongeldige aanduiding '%c' bij optie '-size'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "ongeldig argument '%s' van '%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" +"De optie '-show-control-chars' vereist als argument ofwel 'literal' ofwel " +"'safe'." + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "ongeldig argument %s van %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versie %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils versie %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Aangezette mogelijkheden: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "waarschuwing: onbekende stuurcode '\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "waarschuwing: onbekende opmaakcode '%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"De huidige map komt voor in de omgevingsvariabele PATH; dit is onveilig in " +"combinatie met de actie %s van find. Verwijder de huidige map uit uw PATH-" +"variabele (oftewel: verwijder \".\" of dubbele punten aan begin en eind)." + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"De huidige map komt voor in de omgevingsvariabele PATH; dit is onveilig in " +"combinatie met de actie %s van find. Verwijder de huidige map uit uw PATH-" +"variabele (oftewel: verwijder \".\" of dubbele punten aan begin en eind)." + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Om veiligheidsredenen mag {} bij '-execdir' en '-okdir' niet gebruikt worden " +"binnen de naam van het hulpprogramma." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Bij '-exec%s ... +' mag {} slechts één keer voorkomen." + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "Omgeving is te groot voor exec()." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Kan invoerbestand '%s' niet openen" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "kan geen nieuw proces starten" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "fout tijdens wachten op %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s afgebroken door signaal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "ongeldige expressie" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"ongeldige expressie: binaire operator '%s' is gebruikt met niets ervoor" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "expressie werd verwacht tussen '%s' en ')'" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "expressie werd verwacht na '%s'" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "ongeldige expressie: er zijn te veel ')'" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "ongeldige expressie: ontbrekend ')' -- of er ontbreekt iets na '%s'" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "ongeldige expressie: lege haakjes zijn niet toegestaan" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "ongeldige expressie: ontbrekend ')'" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oeps -- ongeldig expressietype!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oeps -- ongeldig expressietype (%d)!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "padnamen moeten voorafgaan aan expressies (%s)" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "ongeldige optie '%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "ongeldige optie '%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "ongeldig argument '%s' van '%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "ontbrekend argument van '%s'" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "ongeldige expressie: er zijn te veel ')'" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "onverwacht extra ding '%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "onverwacht extra ding" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oeps -- ongeldige standaardtussenvoeging van '-and'!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Gebruik: %s meest_gebruikte_bigrams locate-gegevensbank\n" +" of: %s [ --version | --help ]\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Rapporteer fouten in het programma aan \n" +"en gebreken in de vertaling aan .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils versie %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dagen" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "ongeldig argument '%s' van '%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "locate-gegevensbank '%s' is beschadigd of ongeldig" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Grootte van locate-gegevensbank: %s bytes\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Bestandsnamen: %s" + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Bestandsnamen: %s" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "met een totale lengte van %s bytes" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\twaarvan %s witruimte bevatten, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s LF-tekens bevatten, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\ten %s tekens bevatten met het hoogste bit gezet.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Compressieverhouding %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Compressieverhouding %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "locate-gegevensbank '%s' is beschadigd of ongeldig" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Gegevensbank %s is in de %s-indeling.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Gebruik: %s [-d PAD | --database=PAD] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null]\n" +" [-c | --count] [-P | -H | --nofollow] [-L | --follow]\n" +" [-m | --mmap] [-s | --stdio] [-A | --all] [-p | --print]\n" +" [-r | --regex] [--regextype=SOORT] [--version] [--help]\n" +" PATROON...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versie %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argument van --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"waarschuwing: de locate-gegevensbank kan slechts één keer van " +"standaardinvoer gelezen worden" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "waarschuwing: gegevensbank '%s' is meer dan %d %s oud" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "Ongeldige stuurcode '%s' in specificatie van scheidingsteken." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Ongeldige stuurcode '%s' in specificatie van scheidingsteken; tekenwaardes " +"mogen niet groter zijn dan %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Ongeldige stuurcode '%s' in specificatie van scheidingsteken; tekenwaardes " +"mogen niet groter zijn dan %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Ongeldige stuurcode '%s' in specificatie van scheidingsteken; onbegrepen " +"nakomende tekens '%s'." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Ongeldige specificatie '%s' van scheidingsteken; het scheidingsteken dient " +"een enkel teken te zijn of een stuurcode beginnend met \\." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "Omgeving is te groot voor exec()." + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" +"waarschuwing: waarde %ld voor optie '-s' is te groot; %ld wordt gebruikt" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versie %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Kan invoerbestand '%s' niet openen" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "De omgevingsvariabelen nemen %lu bytes in beslag\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "POSIX minimum en maximum grenzen aan argumentlengte: %lu, %lu\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "POSIX minimum en maximum grenzen aan argumentlengte: %lu, %lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Maximum lengte van een verwerkbaar commando: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Grootte van het werkelijk gebruikte commandobuffer: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"Ongepaard %s aanhalingsteken; aanhalingstekens worden door xargs speciaal " +"behandeld tenzij u optie '-0' gebruikt." + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dubbel" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "enkel" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "argumentregel is te lang" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "fout tijdens wachten op kindproces" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: eindigde met afsluitwaarde 255 -- gestopt" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: gestopt door signaal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: afgebroken door signaal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: ongeldig nummer bij optie '-%c'\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: waarde bij optie '-%c' moet >= %ld zijn\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: waarde bij optie '-%c' moet < %ld zijn\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Gebruik: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E EOF_reeks] [-e[EOF_reeks]] [--eof[=EOF_reeks]]\n" +" [-I te_vervangen_tekenreeks] [-i[te_vervangen_tekenreeks]]\n" +" [--replace[=te_vervangen_reeks]] [--max-lines[=maxtal_regels]]\n" +" [-L max_aantal_regels] [-l[max_aantal_regels]]\n" +" [-n max_aantal_argumenten] [--max-args=max_aantal_argumenten]\n" +" [-P max_aantal_processen] [--max-procs=max_aantal_processen]\n" +" [-s max_aantal_tekens] [--max-chars=max_aantal_tekens]\n" +" [--exit] [--verbose] [--no-run-if-empty] [--arg-file=bestand]\n" +" [--version] [--help] [COMMANDO [eerste_argumenten]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oeps -- ongeldig expressietype in mark_stat()!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oeps -- ongeldig expressietype in mark_type()!" + +#~ msgid "old" +#~ msgstr "oud" diff --git a/po/pl.gmo b/po/pl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..92725ad3356e74004cc1f150ca4424fef700c508 GIT binary patch literal 27327 zcmd^{d5|2}ecxLLb*ycX)@@S9(*f;5#4MMjD3J?-B#tGy6tKGjmI4V7B6?OriHX-Tm(Od%t_|z2`sk;{l(qa=nb}XRiu^zX1RH1b_H^ z_<2F_D)1xV&EO{ZYVe2PSHOv@gJ3uKb?{N}``~xM^=pFQUU2RwgJ1#tdGJl(pMaC# zi=H0@*Mj@N415551pE)+Yr#8S5ClI3)*36QA-zXUS0;LG5R;O~GM z*I$Eb?*%Uog4cjIfExEPQ0=!st>4dq2K*X$2lxk|=704|T)EeSYX3g)Gb0Tz+VOrffW{0=!TRqlHb$#vXc1XJ#>rqB)GyFu;u*Fde`cfp&%AE)z2z`MXN zgTDrfuHFWbuw=o9z^lN|d;AJW^TDry{|o$ekf{e>rE%@szXu`J;QOG~?|*{(z{>TU zA+Q1d7W{YQJO3jP^L6TwH=-1mXs2LBj*3xhcdR_E)OroUr-5GtuK~XV!cv0Y0$JkV zk3dK(xcZRm=MGSGwBqkS?C*aQd=1b46nq)@tU2}yd<`gi+yF&~zX)pI|1~JS@kihb zz?<)Oba)S_eK`%j5Ih4yYQYCVNHF*&sCoYgRJ+&S7r}3V zQ{caXD68O~g6{_BjyS&jEl_mwx1joY%L23qz8}>3)))B>eiXb5ymrZ*x09gg;hkU$ z{5UxEbmZn++&b(z76ku-4SWE6Des?sKjpbM;M=*s^{sB4zYeP3^B%7|?(UbspXT}d zz~4~)2i!cq35pKRgI9r1hq#{&J_n@v;2QAhe0e_jTJB$T!qNFGsC`=oIWj>EvZTT1 z!Jh#C8r1&(EokdO1lMyv3qAu}0iOe|`{x;W9rvFEUl0BksC7OMvIN1^4>@`ZK|OyL z_&V?l;3W7RkADM-u3mA{{ws#_x}gfxp`TQ@ltLE)cLE{UH$iiTF0+~>i03Q34RBBCFS=yw1MprDQVYHYLRvwv=Fa^xsP%alcpLaH!5@GZz;A&6F?Rd$fpy1c zzu<8bq+2U9H17{{>BBbKemDlfKjqR`ZGYgea-HVNKRQ2J%V%@#=Q_kS`l)cEwbVSX z;@Zn4T4c(0tX~1O$NI1x!6)rEH{VzB{T_d>bEMDHxgh`G$GINm`X#Pca=n6!ZMS;N z$G|BrjzREGxO!aqNA#}G7aRod0Dsbd&p~VXA+CG5SUSsdI$)RUnOygCJ;HT{>kVA` zNWSPJ`Vx))ly3NF|31R?39bWNLoV1!(C1p_Vk<2V{bleUa{U4qWMn^vzbCk^vv=;# z&j9b{`g#BCdEgPQk8YwHCkNuZ~ z1Fj$AdIr~;qz6l=WsQ+-ovHOeO!CEKEQQ1*BX~THLlOvZ;sdK>p`xc<@z+&d%0R%ySYwr z>GM{ujO(4c;qwo;ChWKJ&$Z=OtAkDJe&V^iGE+;FZWt#fiTceriA-%R?1Z&$)XDZ3 zN`y(>jFc+hntt3}Gu^ewti`KqrW$um7Imj5sFSXk{#smH8?DHLZj`mdTBK&@HlkXu z8>fk(>_*sG&1kOKw1bJ0USyKAzsIO=nze7boq_45rW1vFmYFzd_qw)3r@n?T6lRg>4%+--8c|ZOq$`z`xEYy7 zG|0N0v=M1ON27My>6&VfQBwbQzECQuGl6Dy*J{$6PCKi2sAN4_346`1X@@KgBT%!o zUZ)c!T~m)cQLUSH2766jEZS&yqAb%gP`J|W#7TEz#|O>CT&NZkS5rf zw5`?S3yazXv{dYxp3P1K#(pYE+RLJj0arU|uT2jc*V6vw<+-B^+(n(1IeC5M)RDzQ zbEeXXR-=vl?SyYa>m62EkxIW4cip$hZl1p9rTS}WGfKi%lvg*EEFMN?;bgVeZydSj zl&N$(>}tg>HV^CVm1cH`$Gy027V>5oEq6TBs2BDhVNe@mHBL+>Np^=_H0@5x^jn!N0j*xXx#eCbQMc@~C}Oe_P5KSY>xoqL%B~?3VSdpD+pb!6 z?=)P_WGhaXbKO)2CW}{-Q1jxI4(M8#tn#MLq^acg$R99XPo+)XMQ7p~o%C8&7I;^) zzDJYV>9Gz$#u12G?tC!)UD)r z%5gU82@lVgzT^mZ8riH(QRduVg<9oXZ?mc@5 zD;eKBldYvaD7+e(+eM&HsN@~{T+zvZI+>ZCo)+9;?li%EWYOK60i8z(hsVKwzrj`p zI7a3>%_V4>GzXmV2#(X`tOf^qF|weS={(-EaKAxPG~=o{gJ{*k+yylp3=m zK+#D(>>%GH+wym5)r#k8+>yAA;j!=sE2MU1MHvK|mx#riv{eWfghrf-4toir2O-b; z9Lm`ybK?yPfcOtLENm;39G`2o;hs57O7f{hY3;Rc6fC?+#gDE0G=VDkbE|tCe1pMXh(zHas^zLygslsu5>jhlUM; z57%c+pxyEutC>=|9(7^V5nP`+t%Xh&XA)84T+r$mmPb)0EXUwA7?x(26rkxqJ1D6? zwtx9Us|sv;<0aJShO2_pcSfJio0=np71%_F9cGo*;47@T7P7-mYRQZnqNJV#6SNS_ zuO_Kw_{FJ_46R4#C}yP@u4ZB7EZPX$bW>+))`|o1o@7P7R!^sfS7*V!aJ59rLPPU=!!e@_!8*!`GqM>9Jjt8^z%Dw3`M$6?lMej z%vQZnWGAMbN=Tr`L#NE%Y68Jx&a&e~+!rFHzqh|r6-rIgsv8w)R5T?iaec73!<3u7 zydN1vXp!?Ph2^16E%Ok2&crAN2Dx8rGzWW}ieG0dN>SnFFdZx{9-Du_WN=ifd2Pcg z;V7t7uxChWWpT9qs!dVBIChxr))Mt5d|OwlXpJXVv#96{C3jGf2+)#a@?MXMTdk-b z!Pa7AajvKV-yX-fPRg03~BGq1|r(Rf$l4Yq!_v#HL+p(WA6rqW}~5h?PNnrOq4 z3})O~x7(h*;f5?c1G5a*roH8L1N6E_cAw0=wGbhcq|izgd#FZt$Q+bqj5{?IwK!VZ zj7u4D!72Pt@E!zi{Z` z1BVw6zWL!}^C#xCN|HkbbHo9`=&j}p=U^Cilp$xPhLc9`s_?P~GKOQN?s;OF+TjNu zKDc=F=-k2O9aos4iw8RsRK}L=78Y_Q#+(ds=U8`;<*BxpG4(jK$8kEiKWSi`kFZCm z-Ky@K+*rGbbyRTt|BcM$cN*Y@eE7mG$9uE6utOOEjg)!&rBn z5O2Wkw%|-o1KWmwaB|<+n{o_^9Rn0-hhTM2-PjK8)3PXw%y2F5D28Y6Y+?7jEWKn) zLn1X=)+(s7y|u;t3!YofWJPB-GB<5@6*J8CBu9h&lB5;(7$@ELyjfz8x}Si}sc2+)Jf}aElS!IXPUTLde3U0Ev3-m0DD6a*8h$g?>)VHg7f+9>_K_TGl4_@n zUuTxjuH3!_y>FTYl|5$5${{0{m6rcxWyU_sX}M7*ckRc>(;Sp%f|NGr>H$@qHS-iKUKFKd+Yq0x_7Qlc^3CAKe#kkHnPnU zGWaMd@A-iJ?)ZRnkFxH_s05vGB6zEHEfw1 zRWQ=vC~%XhEbKcr3Rg)~aNjPZD|VnX4==%0hNoGtnhX3ml6q%#HmMzmxKPTIgpm~; zR^9YW6!SUiAbj@sx+xYu7ME0L?C9J#DP}r}A3DLA8?JbfN`<+w(?qS{>}NQ)btt`p zvr<^_abhKBVLmf1CkecZq|}G9Na~5~m*b)B+45TJ;%D^o~zg zKfY@kUY@)1kpKz$rIbqv1Itl6y>@rZk6-lXZEbl7C`mNSp0vO9jc8atN zudK)gA$PZRA&aW4#R8#V%hgRKZSWOcII4xJYe@zolgnyO-wR;*lf!7Y>=dZf}cw2;q9|aPeU8Xf=_*mYSoF^2(#n z_D%$a%eu5Jp-;!Hf}G2Vqd`lU*65q7MV&O@{?xyu{5R^)1kbBnBP9y)miZ^YW z!kxdA7~A13t!6x_S70KQvApYmR@D5DO-Fta|8 zM4nE&#~6eXi*r%H?O0ppoXPp?avF9kT~Jq!HWU*t0Y^k> z;RXq8K}7KrD7nR92~}~JYH7!65=b0Blwb!3BhHvc1~){`u<+YL)7mndAEA&jQ?u&O zxX8mG&AkfaL50Hj^&AUT!du?~PFEXT8eKKJI=F@qD3yG~IP6?rf}9oj)NoJ8g_P7^ z6>Ke85`+u@Bu>^yd=39<|Y=oO{B^esK>D&%Jf-@G%~s z)7uio18JbSj-NM@8#v@!5FIlWXC6K*zaawVVcfT(v24jxS&MM@i5-Nrnf_ocYSTdEkS&2BMM3&{F}#W2?| z$j?==e;2gKArmyDjD#dIzzMAORl&HyBg@m8eVfm+Hd=r5N#&Z2uFORhq4pw-^6MfLn?Z5kzc*8o*G&zFQnG5dJQ;E1dxSln`4B2ULgQh+5 z&2&Uv`Fgq=dtq7L(N+{D96)_V%rV|c3=PDJ3>y5l0~0AOXf;Mes@-t~N<^}Dfnki+ ztZ*hAty+@{(b07RSOq65#jc`RC@RyEXk&iFs!7c17#mU_#=?4GTF4YRGpTZjvmm*zCDsNP`&qGq+cB~` z%c10!nTQ54YS)O3A??A^kIb_gx9(t4Dou$JFObV;%8ezB4t@^ zO{K^up*h$d;z#D<-aOS$W5$jX!&JNv?lx)=leb~rIT}mooYcfGB(CIgSaB%_Ba5vb zx2ghSQ`Q;Ix{7-m>&2I^O3!g;j1QO*dfluNi=fr@rN%wNO#I+S8Y`mz%Bk^z+tUw8 zSuPfHtjHy-hqAPdpDVO#O+I{X-pFTwg}JlGQ?5$+A(agjI$|lzLgz7IqB;p8j42;_ zLfgjJrB4M}Ag&v5s&J^6Sz*zeb|1;&5*GE&dRFl4BN8x6a0J`bH!8C1K4DTVSrydP zs!(gM;|vO+&@WCNv=B%F(wDvqi$f*1e24#eukR=KGxtR4wZSLTvhswm*Bxs^n0vGt{u}kb0rH&UFavZu;N|QkgKjOO7*KEjl+Qc2GW{0NHz1SJJ-0r+~ zTF<%{+6c8^;`pFJZJe}mi9(M;xFXa{C)7aR@7m&;st2{ezYQsSnV2qE| zC?1<$r^mr=#XM}|kj9G|hkMO>^jMR*P-0!8my=7D!0>FHR+&tVn6tVjxx15Q!waSl z_Cp46-mU_pc)W&5jG@-kbPjA@ATaLB4p%qBY)E%WXu>+m{w0$HlG$|Vw`z%e^;QmT!-p5ZY9z8L4&~r_tc`qM*@IapC?ce4Ktz?zWD|v!x z-bLe2L7Ml8onwo&BT(Crc45J($XOH% z*~m+N(ItOhs^#OGXKTY$W-gm}!RCJ3krX7Hgv0(>b1tkWi~(-Ji}kZLzOUkU7--PL zP-IIZSpEZ&zBkFr&eOh!Ogo7;?HCzaZ76wAoI#dAp(TznaRI`Pq!{V240V;$_J$qsxJtnzB8u*hPLtN=!7;bJKz}WL0df(dhEHlkecs7kT21Al{vFYGL z@c?NBam4z~ieCDgAtx1@&^CnfjpRw;Rd@iKj8kG*h1Qy`NUY3omqqLgY^&%V;E|M> zK^LMH{>0Jw!i{yY@0!SqQqZz3O0P%tB!x5AxV9A{2PPhGX{?CL2!BFd`V8+UQ}#+D z+&;L`-eeBgpCOEonH+}5<_@;5<`!V@p z=qTq$lfkcC_%iw6#}R{Bx4|asxFRx;AQ$`AS6?KCV-iC=E;HPXVUWw$^ElI*jg-x= zCubow^xq4?iE6JdafJwD#Z2$qpceN=62(b!K^%6n^_W995iB?gV`9Uw)kw}FDZK9l z!M>V$$r+B6>oMjAj7m(Q$G|&cUBpQx{b+KeWZLZ`MOiQR&Iw`HEai@8?Teep=Ol?6 zNKl)o#-MUKNgEx6GTdn*I55Jl;XJlP--Rk9)JdZz4G|qM0Dj zAr_Bl^?Eb$y9;%=BlE2j=z&>kIXSs!F=#g%?0okuKZe4m=!j7K%FeS_4>yT2O14^# zc|I4?y)Cc%nD3iOY}JZh4ZWe)?u31a@bSR2a-_LqCMg_+%yU$p&H&EXzR+!=ad@7| zbRCh{1oRdP0+tH?fbD!ZHkR>4o0u;7sGOBNl5}nfLF{~@NJMu!^p+RiAl>rR|H4kh z!*+HCZvX5>$}N0QT@svf14z$CnV!TM^FLueq}9GHSY@Og}ONSMs>3#$z8 zvrn1`UFi(RNT#0^^=ph>k; z%cR0!u~3V11F4WZNC-sOS@dIV6H$LFb;i@$m#iYabz#VwD7&sR@M*K3o>SDOX7t-m zXs|nGqDtTWQCVT@@#MJ~W z0zsMkJ19&9S2idle#x|VXn)TH@(NMc4(rHtLM{BQa{@24h35G2A-)Ggu#Dk6RD&Ol z-qjFei!ao2-I*=Ipkh#vOn*e>2uqy<_2CdQ{;XB-*-V!oKg9Nj`&b&S4KE;-nH9n~ zW=Zova2)5N^)>%DV~8CeN&Cj(f>7LxEnXwk7L zf5bd3!31(z;%GXJ#1E4kvNqCXc>Pl zfa?8TgI@?X;@!dLi($K=T6PJ~g4V<>t!d0r&-30-NEw9iMrIolL>$j~7r(T`RXQE4 zCkk0avn)!#y$KO<+$Hs#1Zk#?9v++2PijjKTQcB-W$A`4O;erKLudhOvKjZKW8!o` zweeQ_PRhKMuu{fG)GbdEie_>+Ym&jPM0N8lDWtYD*l=)6ZYQ`9g)WiuE`oC(N+41Z zHu!|e-4ySReD3=IQ%kno5T+?)AVbs=SUe<-?b+$|mMr*N$>k zC3e002ey$SA>NK5e^a)hgm~IUz7>7)T?z62X<1acw>)GcS>mF!O@w#F{hP9elH#c$ zp|m|IzIee@pR%NQ?f=N;%DO}aXWSSe!WnB+`3p`LsM9KL*lah zCfzEyBT4fxdK74hZ4N^-!ZS=Mg3jnU-YZ3zB{+Rnc z(RW?Wyo_6!|4!Or$~c48C(KKI3#ZL-MB!teJ0fss4_}^DfyCQ=%%t!?$iMG&rrc*_ zMK!CH4SNlgB!0!z4_6(3_OTQj8o{rv|7$?X15DYf(xwv*<;#9jArf4WaVCk}XktGT z^pYmjK_`ks)Ggn)M(&*9&U!=7-ANE3L-HE^!D^GRjD%tra{$k%7=wfizL4CfBJG#J z>`Y$C%RnzeDC?|AsWEk&Fi6vopIgaIAyv$e?TVGs`bedPVkTCbJ#VwYdUuoO*1Nk)<<>7P9-ccmw=h3fWY?EZ@)UWJLW)9O#1=oY z7nH`UF|FbS(%<+_eKikb-!hilR;4G^;a|p0xJcmDaHnOi(tOYh(6eWv3G@E+P(G$Kc_!!(WQ!7Wty5=nVwY< z70Y&>oUZj9u{^F|ebB*Xmigdva-6f$C-XbE3prxq$U2s+unQMt!%ge-C)CHLuo{dt zC;l|4e8t?bIBCUQE%iI!9KmI8-;!^rY%b{6wpz=cynkkphf0-g> zGCyujT-nM-5Z90SuM4|TcQgeDP0r>mtfJsaHaI7i-0c-cQsk&lnd1+-G=B2<^_7p! z9+1YbM_$sphxjzdOF_8fPxiPXI*p{32N( z5s7Y^4hOZtI>&4Z1s%5r^O4IX?q4~T-?f0^*x1~mIxE9DgLPX~opVHNdVnsMj{?1} zSSX*Hx-FT1Y4ODT;*keOviZv=PkB0j;cL>W*duOzP$cjx>j*A^j}}E&meBf0qQA&b zIz>tZP7#;spbXapl26L=cZ|zrc#Q@Oqn%0w%6EbW7u>leGqQ`RqMrcBBgJn31Uvl* zz$to{{}F&IbHyJ4Z2JuW$x6BA=YIrHq(ZqL0gT*k`w>9-&ix3$-{%dY+>QPSpeVib zj{u6-?neNckl3?lBnq43NQCsPbEP1+NM#CDV8;?pU7#594}Hde8I?FzzVe)~O_*6@ zOx#tzCsQL5PS;A+^9+h1=}la|lAu%~su^PLJLR+d0;S+$$`iD!lNn49OP6( zu9qU$KOZe>6AZ8 znkbE~yWyYrKL8M0=BdngENrJ|uPUO6wQarg(|I?eGjne2auH=LV4td?c=9OyZ%g|{3SrqCQ~T_?u6R3<$31Az_=d* zlq+47WSK8xeH7#MSyoE(*HQI{(yLQ>fCZ9uXO?1lO|M~k=U<^PK5ogu<`KJpb>pJRD?xykX(Yc+xKL({3SC}IGVv@B9tXO(KNv+BSO$>X>TO=;!$#!S6mY`mh zQi2j3NnahWgB_0OA2dsiM`ZbAG%U6D7I literal 0 HcmV?d00001 diff --git a/po/pl.po b/po/pl.po new file mode 100644 index 0000000..3960376 --- /dev/null +++ b/po/pl.po @@ -0,0 +1,1143 @@ +# Polish translation for GNU findutils. +# Copyright (C) 1996, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# Pawe³ Krawczyk , 1996. +# Jakub Bogusz , 2003-2007. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.6\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2007-05-30 20:30+0200\n" +"Last-Translator: Jakub Bogusz \n" +"Language-Team: Polish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "b³êdny argument %s opcji %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "niejednoznaczny argument %s opcji %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Prawid³owe argumenty to:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Nieznany b³±d systemowy" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: opcja `%s' jest niejednoznaczna\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: opcja `--%s' nie mo¿e mieæ argumentów\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: opcja `%c%s' nie mo¿e mieæ argumentów\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: opcja `%s' musi mieæ argument\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: nieznana opcja `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: nieznana opcja `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: niew³a¶ciwa opcja -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: b³êdna opcja -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opcja musi mieæ argument -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: opcja `-W %s' jest niejednoznaczna\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: opcja `-W %s' nie mo¿e mieæ argumentów\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "rozmiar bloku" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yYtT]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Sk³adnia: %s [-H] [-L] [-P] [-Opoziom] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [¶cie¿ka...] [wyra¿enie]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "Uwaga: wygl±da na to, ¿e plik %s ma uprawnienia 0000" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Zignorowano nierozpoznan± flagê diagnostyczn± %s" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "Pusty argument dla opcji -D." + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "Bezpo¶rednio po opcji -O musi wyst±piæ liczba dziesiêtna" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "Proszê podaæ liczbê dziesiêtn± bezpo¶rednio po -O" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "B³êdny poziom optymalizacji %s" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"Poziom optymalizacji %lu jest zbyt du¿y. Aby odnale¼æ pliki bardzo szybko, " +"mo¿na u¿yæ GNU locate." + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Zmienna ¶rodowiskowa FIND_BLOCK_SIZE nie jest obs³ugiwana; jedyne, co wp³ywa " +"na rozmiar bloku, to zmienna ¶rodowiskowa POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "nie mo¿na uzyskaæ bie¿±cego katalogu" + +#: find/find.c:211 +msgid "cannot stat current directory" +msgstr "nie mo¿na wykonaæ stat na bie¿±cym katalogu" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Uwaga: system plików %s zosta³ niedawno odmontowany." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Uwaga: system plików %s zosta³ niedawno zamontowany." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s zmieni³ siê podczas wykonywania %s (stary numer urz±dzenia %ld, nowy " +"numer urz±dzenia %ld, typ systemu plików to %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s zmieni³ siê podczas wykonywania %s (stary numer i-wêz³a %ld, nowy numer " +"i-wêz³a %ld, typ systemu plików %s) [ref %ld]" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Dowi±zanie symboliczne %s jest czê¶ci± pêtli w hierarchii katalogów; katalog " +"wskazywany przez to dowi±zanie by³ ju¿ odwiedzony." + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Wykryto pêtlê w systemie plików; %s ma ten sam numer urz±dzenia i i-wêze³ co " +"katalog %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "poziom wy¿ej w hierarchii systemu plików" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "poziomów wy¿ej w hierarchii systemu plików" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "uwaga: nie pod±¿anie za dowi±zaniem symbolicznym %s" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"UWAGA: z³a liczba twardych dowi±zañ dla %s (widziano tylko st_nlink=%d, ale " +"ju¿ znaleziono %d podkatalogów): to mo¿e byæ b³±d w sterowniku systemu " +"plików. Automatyczne w³±czenie opcji -noleaf finda. Wcze¶niejsze wyniki " +"mog³y nie zawieraæ katalogów, które powinny byæ przeszukane." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "nieznany" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"uwaga: podano opcjê %s po argumencie %s nie bêd±cym opcj±, ale opcje nie s± " +"pozycyjne (%s wp³ywa na testy podane przed ni± jak i po niej). Proszê " +"podawaæ opcje przed innymi argumentami.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"uwaga: opcja -d jest przestarza³a; proszê zamiast niej u¿ywaæ -depth, " +"poniewa¿ ta jest zgodna z POSIX." + +#: find/parser.c:1002 +#, fuzzy, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" +"%s nie jest nazw± ¿adnej istniej±cej grupy i nie wygl±da na liczbowy " +"identyfikator grupy, poniewa¿ ma nieznany przyrostek %s" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "%s nie jest nazw± ¿adnej istniej±cej grupy" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "argument opcji -group jest pusty, a powinien byæ nazw± grupy" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"domy¶lna ¶cie¿ka to aktualny katalog; domy¶lne wyra¿enie to -print\n" +"wyra¿enie mo¿e sk³adaæ siê z: operatorów, opcji, testów i akcji:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operatory (malej±cy priorytet; je¶li nie ma ¿adnego, przyjmuje siê -and):\n" +" ( WYR ) ! WYR -not WYR WYR1 -a WYR2 WYR1 -and WYR2\n" +" WYR1 -o WYR2 WYR1 -or WYR2 WYR1 , WYR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"opcje pozycyjne (zawsze prawdziwe): -daystart -follow -regextype\n" +"\n" +"opcje zwyk³e (zawsze prawdziwe, podawane przed innymi wyra¿eniami):\n" +" -depth --help -maxdepth POZIOMY -mindepth POZIOMY -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"testy (N jest postaci +N lub -N lub N): -amin N -anewer PLIK -atime N -cmin " +"N\n" +" -cnewer PLIK -ctime N -empty -false -fstype TYP -gid N -group NAZWA\n" +" -ilname WZORZEC -iname WZORZEC -inum N -iwholename WZORZEC -iregex " +"WZORZEC\n" +" -links N -lname WZORZEC -mmin N -mtime N -name WZORZEC -newer PLIK" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path WZORZEC -perm [+-]TRYB -regex WZORZEC\n" +" -readable -writable -executable\n" +" -wholename WZORZEC -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAZWA -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"akcje: -delete -print0 -printf FORMAT -fprintf PLIK FORMAT -print \n" +" -fprint0 PLIK -fprint PLIK -ls -fls PLIK -prune -quit\n" +" -exec POLECENIE ; -exec POLECENIE {} + -ok POLECENIE ;\n" +" -execdir POLECENIE ; -execdir POLECENIE {} + -okdir POLECENIE ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Proszê zg³aszaæ b³êdy (i ¶ledziæ proces ich naprawiania) poprzez stronê\n" +"zg³aszania b³êdów w findutils pod adresem http://savannah.gnu.org/ lub,\n" +"w przypadku braku dostêpu do WWW, wysy³aj±c pocztê elektroniczn± pod\n" +"adres ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" +"sprawdzenie poprawno¶ci funkcji bibliotecznej fnmatch() nie powiod³o siê." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"uwaga: uniksowe nazwy plików zwykle nie zawieraj± uko¶ników (ale ¶cie¿ki " +"tak). Oznacza to, ¿e '%s %s' bêdzie prawdopodobnie zawsze fa³szywe na tym " +"systemie. Przydatny mo¿e byæ test '-wholename' albo '-samefile'. " +"Ewentualnie, maj±c GNU grepa, mo¿na u¿yæ 'find ... -print0 | grep -FzZ %s'." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"uwaga: wyra¿enie -ipath jest przestarza³e; proszê zamiast niego u¿ywaæ -" +"iwholename." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" +"Dla opcji %s oczekiwano argumentu bêd±cego dodatni± liczb± ca³kowit±, a " +"otrzymano %s" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "Ten system nie daje mo¿liwo¶ci sprawdzenia czasu narodzin pliku." + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "Nie wiem jak zinterpretowaæ %s jako datê lub czas" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Nie mo¿na uzyskaæ czasu narodzin pliku %s" + +#: find/parser.c:1760 +#, c-format +msgid "invalid mode %s" +msgstr "niew³a¶ciwe uprawnienia %s" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"uwaga: podano wzorzec uprawnieñ %s (który jest równowa¿ny /000). Znaczenie -" +"perm /000 zmieni³o siê tak, by by³o spójne z -perm -000; oznacza to, ¿e " +"wcze¶niej nie pasowa³o do ¿adnych plików, ale teraz pasuje do wszystkich " +"plików." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "b³êdny zerowy argument opcji -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "b³êdny typ -size `%c'" + +#: find/parser.c:2027 +#, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "B³êdny argument `%s%c' opcji -size" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" +"Opcja -show-control-chars przyjmuje jeden argument o warto¶ci 'literal' lub " +"'safe'" + +#: find/parser.c:2313 +#, c-format +msgid "Invalid argument %s to -used" +msgstr "B³êdny argument %s opcji -used" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find wersja %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "Zbudowano przy u¿yciu GNU gnuliba w wersji %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "W³±czone w³a¶ciwo¶ci: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "Argumenty dla -type powinny zawieraæ tylko jedn± literê" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "Nieznany argument opcji -type: %c" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "uwaga: nierozpoznany znak steruj±cy `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "b³±d: %s na koñcu ³añcucha formatuj±cego" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "uwaga: nierozpoznana dyrektywa formatuj±ca `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"b³±d: dyrektywa formatuj±ca `%%%c' jest zarezerwowana do przysz³ego " +"wykorzystania" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Bie¿±cy katalog jest obecny w zmiennej ¶rodowiskowej PATH, co jest " +"niebezpieczne w po³±czeniu z akcj± %s polecenia find. Proszê usun±æ bie¿±cy " +"katalog ze zmiennej $PATH (tzn. usun±æ \".\" albo wiod±ce lub koñcowe " +"dwukropki)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"W zmiennej ¶rodowiskowej PATH jest obecna ¶cie¿ka wzglêdna %s, co jest " +"niebezpieczne w po³±czeniu z akcj± %s polecenia find. Proszê usun±æ ten wpis " +"ze zmiennej $PATH" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Nie mo¿na u¿ywaæ {} wewn±trz nazwy narzêdzia dla opcji -execdir i -okdir, " +"poniewa¿ jest to potencjalny problem z bezpieczeñstwem." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Obs³ugiwane jest tylko jedno wyst±pienie {} przy -exec%s ... +" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "¦rodowisko jest zbyt du¿e, aby wykonaæ exec()." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" +"przepe³nienie arytmetyczne przy próbie obliczenia koñca dnia dzisiejszego" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "standardowe wyj¶cie diagnostyczne" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "standardowe wyj¶cie" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Uwaga: nie mo¿na okre¶liæ czasu narodzin pliku %s" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "Nie mo¿na zamkn±æ standardowego wej¶cia" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "Nie uda³o siê zmieniæ katalogu" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "nie mo¿na wykonaæ fork" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "b³±d podczas czekania na %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s zakoñczony sygna³em %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "b³êdne wyra¿enie" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "b³êdne wyra¿enie; podano operator binarny '%s' bez niczego przed nim." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "oczekiwano wyra¿enia pomiêdzy '%s' i ')'" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "oczekiwano wyra¿enia po '%s'" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "b³êdne wyra¿enie; za du¿o ')'" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"b³êdne wyra¿enie; oczekiwano gdzie¶ ')', ale nie znaleziono. Byæ mo¿e " +"potrzebne jest dodatkowe wyra¿enie po '%s'" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "b³êdne wyra¿enie; puste nawiasy nie s± dozwolone." + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "b³êdne wyra¿enie; oczekiwano gdzie¶ ')', ale nie znaleziono." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "ojej -- b³êdny typ wyra¿enia!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "ojej -- b³êdny typ wyra¿enia (%d)!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "¶cie¿ki musz± poprzedzaæ wyra¿enie: %s" + +#: find/tree.c:1239 +#, c-format +msgid "unknown predicate `%s'" +msgstr "nieznane wyra¿enie `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "b³êdne wyra¿enie `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "b³êdny argument `%s' dla `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "brak argumentu dla `%s'" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "za du¿o ')'" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "nieoczekiwane dodatkowe wyra¿enie '%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "nie obs³ugiwane dodatkowe wyra¿enie" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "ojej -- b³êdne domy¶lne wstawienie and!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Sk³adnia: %s [--version | --help]\n" +"lub %s najpopularniejsze_bigramy < lista-plików > baza-danych-locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"B³êdy proszê zg³aszaæ na adres .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "b³±d zapisu" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils wersja %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dni" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "Argument opcji --max-database-age nie mo¿e byæ pusty" + +#: locate/locate.c:219 locate/locate.c:226 +#, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "B³êdny argument %s opcji --max-database-age" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "Baza danych locate %s jest uszkodzona lub niepoprawna" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Rozmiar bazy danych locate: %s bajtów\n" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "Pasuj±ce nazwy plików: %s " + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "Wszystkie nazwy plików: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "o ³±cznej d³ugo¶ci %s bajtów" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tz których %s zawiera odstêpy, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s zawiera znaki nowej linii, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\ta %s zawiera znaki z ustawionym najstarszym bitem.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" +"Niektóre nazwy plików mog³y zostaæ odfiltrowane, wiêc nie mo¿na obliczyæ " +"wspó³czynnika kompresji.\n" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Wspó³czynnik kompresji %4.2f%%\n" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "Wspó³czynnik kompresji jest nieokre¶lony\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" +"Baza danych locate %s wygl±da na bazê danych slocate, ale o poziomie " +"bezpieczeñstwa %c, którego GNU findutils aktualnie nie obs³uguje" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" +"%s to baza danych slocate. Jej obs³uga jest nowa, mo¿na siê jeszcze " +"spodziewaæ problemów." + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" +"%s to baza danych slocate o nieobs³ugiwanym poziomie bezpieczeñstwa %d; " +"pominiêto." + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" +"Podano opcjê -E, ale ta opcja nie mo¿e byæ u¿yta z bazami danych w formacie " +"slocate o niezerowym poziomie bezpieczeñstwa. Dla tej bazy danych nie " +"zostan± wygenerowane ¿adne wyniki.\n" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "%s to baza danych slocate. W³±czono opcjê '-e'." + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" +"Baza danych locale %s w starym formacie jest zbyt krótka aby by³a poprawna" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Baza danych %s jest w formacie %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Sk³adnia: %s [-d ¶cie¿ka | --database=¶cie¿ka] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholepath] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=RODZAJ]\n" +" [--max-database-age D] [--version] [--help]\n" +" wzorzec...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "nie uda³o siê porzuciæ uprawnieñ grupy" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "nie uda³o siê porzuciæ uprawnieñ setuid" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "Nie uda³o siê w pe³ni porzuciæ uprawnieñ" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "nie uda³o siê porzuciæ uprawnieñ setgid" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate wersja %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argument dla --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"uwaga: baza danych locate mo¿e byæ odczytana ze standardowego wej¶cia tylko " +"raz." + +#: locate/locate.c:1863 +#, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "uwaga: baza danych %s ma ju¿ ponad %d %s (jej wiek to %.1f %s)" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" +"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; " +"warto¶ci znaków nie mog± przekraczaæ %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; " +"warto¶ci znaków nie mog± przekraczaæ %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; " +"koñcowe znaki %s nie zosta³y rozpoznane." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Nieprawid³owe okre¶lenie ogranicznika wej¶cia %s: ogranicznik musi byæ " +"pojedynczym znakiem lub sekwencj± steruj±c± zaczynaj±c± siê od \\." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "¶rodowisko jest zbyt du¿e, aby wykonaæ exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "uwaga: warto¶æ %ld dla opcji -s jest zbyt du¿a, u¿yto %ld" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs wersja %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "Nie mo¿na otworzyæ pliku wej¶ciowego %s" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Zmienne ¶rodowiskowe zajmuj± %lu bajtów\n" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "POSIX-owy górny limit na d³ugo¶æ argumentów (na tym systemie): %lu\n" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" +"POSIX-owy najmniejszy dopuszczalny górny limit na d³ugo¶æ argumentów: %lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Maksymalna d³ugo¶æ polecenia, które mo¿na u¿yæ: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Rozmiar u¿ywanego bufora polecenia: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" +"\n" +"Wykonywanie xargs bêdzie kontynuowane, i bêdziê próbowaæ czytaæ wej¶cie i " +"uruchamiaæ polecenia; je¶li nie jest to porz±dane zachowanie, proszê " +"wprowadziæ znak koñca pliku.\n" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" +"Uwaga: %s bêdzie uruchomione przynajmniej raz. Je¶li nie jest to porz±dane " +"zachowanie, proszê nacisn±æ klawisz przerwania.\n" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"niedopasowany %s znak cytowania; domy¶lnie znaki cytowania s± specjalnymi " +"dla xargs o ile nie u¿yto opcji -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "podwójny" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "pojedynczy" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" +"uwaga: na wej¶ciu wyst±pi³ znak NUL. Nie mo¿e byæ przekazany poprzez listê " +"argumentów. Czy mia³a byæ u¿ywa opcjia --null?" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "za d³uga linia argumentów" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "b³±d podczas oczekiwania na proces potomny" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: wyszed³ ze stanem 255; zaniechanie" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: zatrzymany sygna³em %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: zakoñczony sygna³em %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: b³êdna liczba dla opcji -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: warto¶æ dla opcji -%c powinna byæ >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: warto¶æ dla opcji -%c powinna byæ < %ld\n" + +#: xargs/xargs.c:1306 +#, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Sk³adnia: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=ogranicznik]\n" +" [-E ³añc-eof] [-e[³añc-eof]] [--eof[=³añc-eof]]\n" +" [-L maks-linii] [-l[maks-linii]] [--max-lines[=maks-linii]]\n" +" [-I ³añc-zmienn] [-i[³añc-zmienn]] [--replace[=³añc-zmienn]]\n" +" [-n maks-arg] [--max-args=maks-arg]\n" +" [-s maks-znaków] [--max-chars=maks-znaków]\n" +" [-P maks-proc] [--max-procs=maks-proc] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=plik]\n" +" [--version] [--help] [polecenie [pocz±tkowe-argumenty]]\n" diff --git a/po/pt.gmo b/po/pt.gmo new file mode 100644 index 0000000000000000000000000000000000000000..6134765cadd017fd87ed2a38122d0f6bece9a2ef GIT binary patch literal 18953 zcmc(mYm6jUb;rxWfIT)~8;E&xZ5Vn6Z;jWBZS2`)z3bgsJn`<#WOw|+EbE%?nx102 ztJ+oFGdl)Ci1Pu$D@Nq4Br-&C445w_fDnR2BPB#Appc*h1bLw-LJ25RB195|^824# zRo(MiFM%knt@(FX-MWu+&-p6!2M z2kznb4ERzo2gku*F7JO54Eg;n(1BMzCkS2z?gL){-Uq%I%)ys~?B-vyr!KK)Ai1YZmu z0B-}Az_*t8cVLs>w=>w!gTD`IosH-Eac97*`5l8dfo}s}3qA?9!G8g71Wz%EPl4|Q z_ko8P{2s6XZv(#w-V0vFpyqcYX!}&&PfC0@cpcB5D4%}~bo~BLkR=B%g4j$Y z*awR4C-|d%KMO8^KL_3nei=-`XS~ew%>dN%-v#*>{2PC?j^{85(e+iJ_-h`7RKa@r z`vai(_p_h_{}KEW_%wcKJzoJYy(kF&1Jt-b);{qPr!cypULJ+F24i9I>A*e z>KEyE0u*07!Q#XRUj;SJr3jJmCh&t`1b!X-9;o^L1rL7}{8#Y3;KK;D`oEIF#Vkr1wz{3a$ZuudqMHtaZvM*K)v@CQ1to$ zcq8}+;5_(EZ~%q~k?_Od8u&tl_5I)@p!&ZCqME(~)o%_;p5FsbgP#X~0sJpe`}sBo z`5gFJ@D}hbHw8f#`~-MAcr8qH8jQg&fE%Fp={>Jyj^L+3(fdwbF2EH~^!Wy;@h`j8 zk2?;&j^7V}?*M-X{50s86iW-f2CAR2{a)@HC5E8r`x@{vzT5;NO2Od+e!XWv(d}XI z3h+0-S2_gzb_v{w}L+e=fHQ->D}PpfSUL9cX)nT1oiyA;P=6AfDZgB zi@XZ_9!R$V+ZOyB*JWG_T>6Z0z1_a~F(bY^t`3*hs?U{N8dtpa2CfIV7{d1M5>R`8 zl1raOt~kfQsj{A|G5}=6W8;&?&V_Z>(2qciJ$d3WPh=}pmjc*_*NeFZT(@ww zxb#6p0@&8{kA6!p>2sFr3j5}Hto&;Fw)!rFb?tMIzkAB>;@vY`Pvbhw^>nW1a6OxA zh3hR`_8Gf$yl~Ad?MF%K(s-?tq_JzRM0wQg$9b{G1!I>+Y0HhY8a{PvNq@!lS7Nu4 zv{&3x(sxDNpBm$xY}u`?B+Zr47rD`oi(b@>)$Pf+m*su8G-wyDpSc5k373C%h90IcfE+w5?V80bCBn8+IOuakDL80U*GSlX7RaR9v4NDrD`1Z z@+9q#joj=;>soP<6n&R1PrIxa=Mi17*sRy*HNG&%G`W10!i<_GD+~E^U>fEL`PLBm_FWcQs(x^}4rFB;%?KJAR@fMG?_bXA_=1FS+HQUb5 zRTO5Qc|4JIcowfF&Df=b?h*rycUpVIP&?gTPC9Y1Ui9Oxvx%@xi_O zVI?Tb`+le$*cnZr@Ee?RU`|@bvoG^Tv;Hh)8YTJXfq_12}vsb_c|u7u53L>wMEjz&nMT znwkC=zk*r&5EwoXRX=4W|It_))fJY-#LsZ0S%oCKgv>-p2 zX*ZJ2o$2=a>oucDrK&}Ev?Rh*a4d$U#S4s!?rBZC;PrENIq6)timsP9kHbUNO;g0% zo^-M%I%3=Hb8u*}>F#Vh%}iO;6qg=q#prpr+=<$Z70i|*6Bo@06;{Blaf%MnBGKMy zZ-9o6J4qM8%w5roo5^y*_)K-`$9Z}G(8M|0@WOQmn1eLyqXn8V6CLkl|Mx?j`!R>; z=TU;iZV#6uO=`<1r2v`_$2c!Rc@fEiWrhSdn!xliW*+)SScSBW)v7%JhmJ$DY~4PT zrzuRYO5Zq~fD~6ZDQp8>Cti)QFhy|Ovs9~MaTz(2iluez@K|sn>Ni)k$}KW;B086J z2VFW!+gM;sQ8VjyWwY0qqe(2rdw>#McNjmql<3Z<{LJujl9YLh+j#LUZmS!NErp46=-9S#lB12ct2C{3f4 zsnR36o;}~=62H!sXcg<5LGLB}q$b1dG3OypTk0zA!k*`I?t)YDXGS(|X|TM^irBv> z=Nj%F-D&>@W5KBmhe$Lv?djyr*)*2oSS#&75o!KGe~&9PGuLGP$ThryI*D!V`d;~n zrft!mi_(_!mC2}Bf0WwGnanYr;~x#T1@96UFZb_bDAq!`(|OhjB_`0{d`j1k&c>MG zN`xwdUV6#ZaE*>MUDRnvvKmFS95<}vZSJl&0?p2##e7O@fD3vD%6&D-vsBIksx42X z>i3kRnBgdJGodZ-K!qiFd{X?iCl9}Sk5}6w9)YV%mdxXB#(qmjY@g3^o^{3hxqGF} zW1_zT6D2T2`P#Kp*J@F4w|GNehuSOa;9*bNN=N5k%2o$rd6O)GoS2;2*05TrJ2pFa z^vvzY=a1ZZ=G5#PW<(|JeJ$8{_RKz$3h0|ku~|kiU9*oM^K1z@Jj*V@ml~cs3-hOD z?>&CsnIrQjPtF`!+>ye;UFq30TT5N(*2a0B<-uJAvSga<{xGae>|1ehR^m?Y^cW=2 z2a0#IqJKupD@)Jd%jHqGz|#i;XE$uGxoJCz>c9ySbleih_U0yTCCvv^4&jb?`qH(giK-aG&5 zH8L`nLAru4Rc-O_=(ZiFiY)0{%d-_!9infTYrZ2d!FA{gM`Ve}iN~>sRk;FWr&(6DJPO9d-MinbP_(Evt;JH@Uz6=r8385mOM>FAmqX!>#>p7RnOh z7%@cO$_tAe%fch*#%uVp=y`<}iq>TwV%davYR3*^i>rF*%@l=F#HK>+HH*%r9IJ^B zr?$VGfhVE4fqnwzunO+0QL(Raz7q8ca~)F!AGU>qTVk(g@eI%7S?|Fn0jbn2lVD5dq9$f4I_gfQqZPP~sztS&uiIwr!pF z^pzvTw=32Eh~-&HP?LFcWj(Nl*rBIxNfcq8^XMFGtSp0&WMwKMRars2{TK(=r>t<3 zuL-uc9PXaaN==NnCZDnu4XX5^o4`{ivuE>y0?oLkU>4;kuUzJ<+v_AvlBAvk@tYwq zfj5N2SR|`)Iyqe`!U;EX@4`tpiF{s9Q^aeV%-}`7)-C!hr-B z%w-x>T3~F9w1C2yo!-S|_c1;)P;#A-Xk-dSO(QH^kFd{sQ!eaA=lqT1Gk4D%KgA84 zS8GwhLSA2WA$d=j{fsiSSeP@!QdqV$+u`@9JACR?mF=gcboRKT1IoU4a501UU!AdQ3n?)TrNxvFW$E>2{BqE?1-`=GJUGCI+^;aM(hhdV3!-r#{E1TYNv%Ojw%RLa?}$7l(ufr)nSF#3K>b=kj5y}0McK>LOVGsUan$=DgZ4`;AN$>)oXc)hYMwtW;1E7>pK9i#HOI@Lq4}v`!R>ZCo^_4~8<;cf+1n|<-%Hb^goaxByG@=g@>gd1( z*kVegSc=10FkJKrbnz>iI2M~GJhYBsVrNI^nfHj8m6IRotj??|*Ig#z9(bd?ta`jn zO)%p~L3w7z7UEcqZ))w6-=xXREe-4B1rs!<8EZ>2!Ed!%l~WoHS34I&JuZU5#%0ju z-54K8RkzBs4O;mit+EVaD>1`}!I_|^I$GBm-FAb4eZ>J>i{+q5j54-=I2%8H(wDSt z$+T6&ZZbTTe^C&znNt+u|91!QjOaJaJTfnf)PkA!KjbnFc$vRzT=iE^T<*Q(OHELz>#@MB;Ook;wR7OV8aree!JmIJl zZ-5D@{~2<0WYx(L6_^0r{PP@sXUr5sxsuVcm2Z4Fa~qGNsCw)dtf*apI-F5fE|OYE z!RX*9X+>)7RqoiPCiptak=rRa@pjCHnIqf63?PPCZ{x9zKh!rF2WX^ZtiSct2jNFg zZah5Cs3QmA{H%Nfds;ag(w6@C`$7-G%g!x9_hTJ|&p*XMcndnl9Wp&QK*NJ@_MKpb zXPks%ARr5b*TFrkEk~TNo*~_X> zAcd}OIrUmW?%)^pbBD9?-KNEs!4F&J)v)t%#rnHUscP`Qn$5H;qKzluJP8ZTBVzeu zbbpW@<$+F`jKi24p&Eze$|^)1f38{)h6rxsQ4Z9_`N&8#e5E>Z-_l3fKJwiR+c*57 zdTOGfDhIX=C$>`U+4lChT#~Zx(#8|0v>l)8@LG9<^LFG9*DrkF^2Gc{e&IZm_4M6+ zwxX>_yoJ^4L-rk?RfHdAs@NH=X`O>B0^rM`?6APj#l#`EIsMXSfLcK$4V$sx3xWE0{$`LDW(--TYbvVM8^I~WC zKiO4W(5M{i|D;D9StyKIdKp`GEGwphnG4+xxNEqPsAG0&bl30>Bz|Z&M&5W-#ei5s z!XlWKaB_fIQnki5_Q2_YU(o&>Cp%95=Qf_uDSs=Lcil}M8nRo(MOm;Ik+8(U;jPW0 z*6{q@u)KG95K;@TJ88!)GQw6v6ZFe&x*LyD7ho0?nI`v!BxcBUIT6B_2>%w_hHUpZ zMW)V%)hLwN_)x{{95SF&IX1+J)oNtRwv+=PFIA6Q*2bv~FLyZ&$sC6;<{`RMlD8s$ zGZKRrD3QoVta={x&-)=~-3WsZrOL2jD-IA-#TT;YrPEWkduzjj1z}KU- z6@H9%u|s{qh-u&WOhvcK5NXo&pd-Zv1Bwe6G|w9JzB!hV&xUnNQi==Ak7KKKzP|CO z7i23p6r;KZNx?fB1PjDHu~;4%vQ8BTN$l7Qoi6xqP{=|EGi>sWEhj`$i9pe_aak%L zS8vOdXkEn2*-8rg)Jo$udz8!$DDg>Ton);-epN!>j$b0 zuQdTR!OqAmoj@g%EuAurCeaubcaA1B=!MD)#P$aWb8*TkwXPzHgQj)Kkdd~>!3n+6rNUtQ znCB}rI9#T2u*#+1PI3nSV>&oY{sG}rC{-28x@l zW}gsLD@DNEb)+v|px|f$GioGaI(C27XPx;6ucy9!J5*^6Q)Xtqh{15@g30BIq@3WDHU{ zrzACZd7nY?`f<8Z2^Qy;k)uVR%K33PjGCFUdXr&5?QKFtVZ;deRgxh^XhX{ij12D< zqmJ}$ib3G4AAbXCOX>QO2sF4q3mo0q9jLG$$4>lG3Qgg+b%%!h*8wwl7Tw^qnYPST z9^q|-aYaF2I5fB@c&U#PZw>cmB@-Zq$&wt_ggaa+4qqmsb`~ z_*#tfwG1js!-W$NipaeVDygO@%o`|cDCA-if^IxP5e0b_d38pDl(+)UkOIQ2)dd3o ze?=6fC6t0tKEf}{H0e+#rOsG9q$bahwTM{)fa^VnwwygVg$x3Drd0t;%9<4DbA;>n!Ae<@P^6 zJYzCrm0pNAN*YjLQQu!mmO2Ti`%P}wl^C!(=j~HLnZO8GwHE%PlwKUUgF1|=P+^zS z3$=NQ(u>&zT$jzI7o0;>ZbV&rQ66#-J6Y*P{SzkNT6$4E+wpj1Tj@pFdbiSx@^Mvq zapaB>)#bG<{~O8lcWYFu`A4Q8N1n@OmI>c1Kw^ifA5-@h@^d=Ee-&t97Dkl~K^Cb! z|AvIa6p&|K$%pAIPG&64sesJ-Q&?^J56t?AtGzdfeE8wZj>;4ZwtE-=S?NYOCx1A& z6y?anl$#|{LDa(kCZn~F^;ji>OC@290pPDmD*s1SK$VNhs*p#g&G`3v zCDMNjP^@UrHx*)-GTZnJW{9AAKs0FvaJLGKDqX~S>5AiMd1@Bu_%xBP!?3Wz?p{C* zMoFrgqNF9%X(wryn}-A~Z9GXSMkMW3H?LFNDnn5AAX_476!*)0wIr452I@i#lwvVh zV%B&@CcB&CEIP51OSxw%pBkpjmCAvu^FH!AX8Op)UlQF?ot_Y^kl}X zGgbcgS(OOH=cv0=BCIOFENeA3t&gZyd^@_nk%EnFi>zi@rqUZK)$q(aOuJ`QBLW4o z3Y;%XL3{VM+=PZzZESs!NT7%%$QOJd-E0Iiy&e0p H&7=Gup, 2005-2007. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.2\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2007-05-19 02:47+0100\n" +"Last-Translator: Helder Correia \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argumento inválido %s para %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumento %s ambíguo para %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Argumentos válidos são:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Erro de sistema desconhecido" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: a opção '%s' é ambígua\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: a opção '--%s' não permite um argumento\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: a opção '%c%s' não permite um argumento\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: a opção '%s' requere um argumento\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: opção '--%s' desconhecida\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: opção '%c%s' não reconhecida\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opção -- %c ilegal\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: opção -- %c inválida\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: a opção -- %c requere um argumento\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: a opção '-W %s' é ambígua\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: a opção '-W %s' não permite um argumento\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "tamanho do bloco" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "\"" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "\"" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Utilização: %s [-H] [-L] [-P] [-Olevel] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [caminho...] [expressão]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "A ignorar opção de depuração %s não reconhecida" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "Parâmetro vazio para o opção -D." + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "A opção -O deve ser imediatamente seguida por um inteiro decimal" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "Por favor especifique um number decimal imediatamente após -O" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "Nível deoptimização %s inválido" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"O nível de optimização %lu é muito elevado. Se deseja encontrar ficheiros " +"rapidamente, considere a utilização do GNU locate." + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"A variável de ambiente FIND_BLOCK_SIZE não é suportada, a única coisa que " +"afecta o tamanho de bloco é a variável de ambiente POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "não é possível obter a pasta corrente" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "não é possível obter a pasta corrente" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Aviso: o sistema de ficheiros %s foi desmontado recentemente." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Aviso: o sistema de ficheiros %s foi montado recentemente." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s alterado durante a execution de %s (número do disposito antigo %ld, " +"novo número do disposito %ld, tipo do sistema de ficheiros é %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s alterado durante a execução de %s (número 'inode' antigo %ld, novo " +"número 'inode' %ld, tipo do sistema de ficheiros é %s) [ref %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"A ligação simbólica `%s' é parte de um ciclo na hierarquia de pastas; a " +"pasta para a qual aponta já foi visitada." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Detectado um ciclo no sistema de ficheiros; '%s' tem o mesmo número de " +"dispositivo e 'inode' que uma directoria que é %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "nível mais alto na hierarquia do sistema de ficheiros" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "níveis mais alto na hierarquia do sistema de ficheiros" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "aviso: a não seguir a ligação simbólica %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"AVISO: a contagem de ligações persistentes é errada para %s: isto pode ser " +"uma falha no 'driver' do seu sistema de ficheiros. A activar automaticamente " +"a opção '-noleaf'. Resultados anteriores podem ter falhado a inclusão de " +"pastas que deveriam ter sido pesquisadas." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "desconhecido" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"aviso: especificou a opção %s após um argumento não opção %s, mas as opções " +"não são posicionais (%s afecta os testes especificados antes, assim como os " +"especificados após). Por favor, especifique as opções antes dos outros " +"argumentos.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"aviso: a opção -d está obsoleta; por favor, use -depth em substituição, uma " +"vez que esta é uma funcionalidade em conformidade POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"o caminho padrão é a pasta corrente; a expressão predefinida é -print\n" +"a expressão deve consistir em: operadores, opções, testes e acções:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operadores (precedência decrescente; -and é implícito onde mais nenhum é " +"dado):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"opções posicionais (sempre verdadeiras): -daystart -follow -regextype:\n" +"\n" +"opções normais (sempre verdadeiras, especificadas antes de outras " +"expressões):\n" +" -depth --help -maxdepth NÍVEIS -mindepth NÍVEIS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"testes (N can be +N or -N or N): -amin N -anewer FICH -atime N -cmin N\n" +" -cnewer FICH -ctime N -empty -false -fstype TIPO -gid N -group NOME\n" +" -ilname PADRÃO -iname PADRÃO -inum N -iwholename PADRÃO -iregex " +"PADRÃO\n" +" -links N -lname PADRÃO -mmin N -mtime N -name PADRÃO -newer FICH" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PADRÃO -perm [+-]MODO -regex PADRÃO\n" +" -readable -writable -executable\n" +" -wholename PADRÃO -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NOME -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"acções: -delete -print0 -printf FORMATO -fprintf FICHEIRO FORMATO -print \n" +" -fprint0 FICHEIRO -fprint FICHEIRO -ls -fls FICHEIRO -prune -quit\n" +" -exec COMANDO ; -exec COMANDO {} + -ok COMANDO ;\n" +" -execdir COMANDO ; -execdir COMANDO {} + -okdir COMANDO ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Relate erros (e acompanhe o progresso de solução) via página situada em\n" +"http://savannah.gnu.org/ ou, caso não tenha acesso, enviando um\n" +"correio electrónico para ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "a verificação de sanidade da função de biblioteca fnmatch() falhou." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"aviso: normalmente, os ficheiros Unix não contêm barras. Isso significa que " +"'%s %s' será sempre avaliado como falso neste sistema. Poderá achar o teste " +"'-wholename' mais útil, ou talvez '-samefile'. Alternativamente, se estiver " +"a usar o GNU grep, pode usar 'find ... -print0 | grep -FzZ %s'." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"aviso: o predicate -ipath está obsoleto: por favor, use -iwholename em " +"substituição" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Não é possível abrir o ficheiro de entrada '%s'" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "modo '%s0 inválido" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"aviso: especificou um padrão de modo %s que é equivalente a 000. O " +"significado de -perm /000 seá mudado em breve para ser consistente com -perm " +"-000; isto é, por agora não combina com qualquer ficheiro mas em breve será " +"alterado para combinar com todos." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "argumento vazio para -size inválido" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "Tipo -size '%c' inválido" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "argumento '%s' inválido para '%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" +"A opção -show-control-chars requere um único parâmetro que deve ser " +"'literal' ou 'seguro'" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "argumento inválido %s para %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versão %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils versão %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Funcionalidades activadas: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "aviso: escape '\\%c' não reconhecido" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "erro: %s no fim de expressão de formato" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "aviso: directiva de formatação '%%%c' não reconhecida" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"A pasta corrente está incluída na variável de ambiente 'PATH', o que é " +"inseguro quando combinado com a acção %s do 'find'. Por favor, remova a " +"pasta corrente do seu '$PATH' (isto é, remova \".\")" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"A pasta corrente está incluída na variável de ambiente 'PATH', o que é " +"inseguro quando combinado com a acção %s do 'find'. Por favor, remova a " +"pasta corrente do seu '$PATH' (isto é, remova \".\")" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Pode não usar {} no nome do utilitário para '-execdir' e '-okdir', uma vez " +"que se trata de um potencial problema de segurança." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Apenas uma instância de {} é suportada com -exec%s ... +" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "O ambiente é demasiado grande para exec()." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "não é possível bifurcar (fork)" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "erro ao aguardar por %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminado pelo sinal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "expressão inválida" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "expressão inválida: utilizou um operador binário '%s' sem nada atrás." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "esperava-se uma expressão entre '%s' e ')'" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "esperada uma expressão após '%s'" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "expressão inválida; tem demasiados ')'" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"expressão inválida; esperava-se ')' mas não foi encontrado. Talvez necessite " +"de um predicado extra após '%s'" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "expressão inválida; parêntesis vazios não são permitidos.'" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "expressão inválida; ')' esperado algures mas não encontrado." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "ops -- tipo de expressão inválido" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "tipo de expressão inválido (%d)!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "caminhos devem preceder a expressão: %s" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "predicado inválido '%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "predicado inválido '%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "argumento '%s' inválido para '%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "argumento em falta para '%s'" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "tem demasiados ')'" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "predicado extra '%s' inesperado" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "predicado extra inesperado" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "ops -- inserção por omissão de and inválida!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Utilização: %s [--version | --help]\n" +"ou %s bigramas_mais_comuns < lista-ficheiros > base-de-dados-" +"locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Envie erros para .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils versão %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dias" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "argumento inválido %s para %s" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "a base de dados do locate '%s' está corrompida ou é inválida" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Tamanho da base de dados 'locate': %s bytes\n" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "Ficheiros Resultantes: %s" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "Todos os Ficheiros: %s" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "com um tamanho acumulado de %s B" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tdos quais %s contêm espaços em branco, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s contêm caracteres de nova linha, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\te %s contêm caracteres com o bit alto activado.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" +"Alguns ficheiros podem ter sido deixados de fora, pelo que não é possível " +"calcular a taxa de compressão.\n" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Taxa de compressão %4.2f%%\n" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "Taxa de compressão indefinida\n" + +#: locate/locate.c:1002 +#, fuzzy, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" +"a base de dados locate '%s' parece uma base de dados slocate mas aparenta " +"ter nível de segurança %c, o qual não é actualmente suportado" + +#: locate/locate.c:1119 +#, fuzzy, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" +"'%s' é uma base de dados slocate. Suporte para este tipo é recente, espere " +"problemas por enquanto (está, de qualquer modo, a usar código CVS)." + +#: locate/locate.c:1133 +#, fuzzy, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "'%s' é uma base de dados slocate. A activar a opção '-e'." + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" +"Especificou a opção -E, mas a mesma não pode ser usada com bases de dados " +"slocate-format com nível de segurança não zero. Não serão gerados resultados " +"para esta base de dados.\n" + +#: locate/locate.c:1161 +#, fuzzy, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "'%s' é uma base de dados slocate. A activar a opção '-e'." + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "a base de dados do locate '%s' está corrompida ou é inválida" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "A base de dados %s está no formato %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Utilização: %s [-d caminho | --database=caminho] [-e | -E | --[non-]" +"existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --" +"count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TIPO]\n" +" [-version] [--help]\n" +" padrão...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "erro ao descartar privilégios de grupo" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "erro ao descartar privileges setuid" + +#: locate/locate.c:1510 +#, fuzzy +msgid "Failed to fully drop privileges" +msgstr "Erro aos descartar privilégios" + +#: locate/locate.c:1528 +#, fuzzy +msgid "failed to drop setgid privileges" +msgstr "erro ao descartar privileges setuid" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versão %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argumento para --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"aviso: a base de dados locate pode ser lida da entrada padrão apenas uma vez." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "aviso: a base de dados '%s' tem mais de %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" +"Sequência de escape %s inválida na especificação de delimitador de entrada." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Sequência de escape %s inválida na especificação de delimitador de entrada; " +"os caracteres não devem exceder %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Sequência de escape %s inválida na especificação de delimitador de entrada; " +"os caracteres não devem exceder %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Sequência de escape %s inválida na especificação de delimitador de entrada; " +"caracteres finais %s não reconhecidos." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Especificação de delimitador de entrada %s inválida: o delimitador deve ser " +"um carácter simples ou uma sequência de escape iniciada por \\." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "o ambiente é demasiado grande para o exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" +"aviso: o valor %ld para a opção -s é demasiado grande, a usar %ld ao invés" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versão %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Não é possível abrir o ficheiro de entrada '%s'" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "As suas variáveis de ambiente ocupam %lu bytes\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Limites inferior e superior POSIX de tamanho de argumentos: %lu, %lu\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Limites inferior e superior POSIX de tamanho de argumentos: %lu, %lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "tamanho máximo do comando possível de usar: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Tamanho da memória de comandos actualmente em uso: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"citação %s não correspondida; por omissão, as citações são especiais para lo " +"xargs, a não ser que use a opção -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "duplo" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "simples" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "linha de argumentos demasiado longa" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "erro ao esperar pelo processo filho" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: saída com estado 255; a abortar" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: parado pelo sinal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: terminado pelo sinal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: número inválido para a opção -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: valor para a opção -%c deveria ser >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: vaor para a opção -%c deveria ser < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Util.: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E exp-fdf] [-e[exp-fdf]] [--eof[=exp-fdf]]\n" +" [-L máx-linhas] [-l[máx-linhas]] [--max-lines[=máx-linhas]]\n" +" [-I exp-subst] [-i[exp-subst]] [--replace[=exp-subst]]\n" +" [-n máx-args] [--max-args=máx-args]\n" +" [-s máx-cars] [--max-chars=máx-cars]\n" +" [-P máx-procs] [--max-procs=máx-procs] [[--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=ficheiro]\n" +" [--version] [--help] [comando [argumentos-iniciais]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "tipo de expressão inválido em mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "tipo de expressão inválido em mark_type!" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo new file mode 100644 index 0000000000000000000000000000000000000000..0aa8992acab4ccf2200dcb9303200f0e97e9e352 GIT binary patch literal 4073 zcmb7`ON~3%pTm?qpUEoRZ0r1`8`z!E4eE$I62QI&g zu?n~zr17V~0DKAL;3;r5_%(PZcpkh5Tz)lUE5Ol$lORlD3cLwC0p1F}2;L692HpmK zP>g?4@H7aO?B{~Nf~4m>NPhkf()wGjVQdIo2VMtm0%?8+2v^v%AVgURj)2dBwEwFh z+4&B52lzQiarzD<|IdTN;PADK-49kk+HW^V{vH8G!4%}++aT@pDTt-)E0E&*4M=f2 z2cCojE0*Q^dLGt$kxC*@c z`uzJ*kn(X9q;+!z-vTL)pMjK*FTh*C(;(&H3`p_00FvI}<+*(uK+4D7f>R*rIS7*6 zA&`R>B)zYLYr*#lehpGSeg{dtRKTR@8cv4SrY<8OkLkB>ngSCHa% z4y65;-I(vU8YI2@K+1yy;R<^Jtb(tAW8g<1*-vw8@IHvQf|u6P{*+^w$gaSP)cFUg zV;hS9sa7cebneJ6ddP2jV3L0*p0pRmfog;Hr<~A3wbcJm?&#roDc|I4|8p}wC~o9) z4KMjjc_SZJSYwh@8O?)$SHhuuMt4N4 zBCfM`Lt5T6mIsxv5L_&>ba63qyb@O28Xg(x^qQ25I5x9fXfA9kYfGKxYD!^A+|pSqpU;$)khz$SAh?7LgQxkWOJCH&LB{n5)TJg#1|{m>l9*{LL(|e~0V~Tu zQB?Ej44n5t7{Vdh3jcVuS|x1bk8-y6$wR!Ubi_N-I!bs2QKrGzgs7q=!*j@#TQqt| zpU`Gjb2sl&+2+z(W7%O}Dc!6hJyzD)vq$uk$MARlnPcoYE3;ZApNyiasyNnN$z!D@ zPmO^+D9{G1I)SQQkSr8ho0Q~FbpLP3l!uwMs3RVsD#Fy*c@~Lz$0Cz8V#%cLC~GuT z8Won;i>;*JR?f+gdGqV#F|h#$5e4L0tnszm8RL18&caTzRv zRJKJobE-oztdR76Yo0?cgUKj3oEK@`mu!}**zt|kvFdnj=zvUci3L-xrJ`VG)^fqL zsq;qG3aGlh==PS*s>Zg4_V1exc3CON&0sgGyw1mKwTFY+LqTmbADgIe+`PUvR;xiU zI3PQU;@^|o7}Umt+62kfYWN>=PY9O=(^hB~3)Ebl?}+6bf@dXv%-}xdk>pcS%LVE9 zR?$TH$%XAW-~GCD=A2h%9YI(oxgx*>^$(pz{qBdn9@Ba;XB1rrmS zHV0!pVRED?ZLmj&Ci1DA2pY=Y&E5VI8J@`4;3)R>7bjH4;n33Nf>;-eF#O;-}%gQ(XO8j9v zOO53hM19E&UEJt!7hRqAl>fC+(NQi%cA#AYOzMw7Bpu4RBL?QBXeR^bx>4>6-dW^O z&&W_kMPy2up5KdP{;RDZAp^Qf-)OI?6oY%vMCi~sMLk8}U)QzCupPy31%p21tHp8m zlj*e=chI+&t`znz5?z!P+6%hMjPRw}y%?daohjUo)Mo@sMO)|@*kCyI9K$GqFabZP zFqkDV?pVvAFz*0{ucbz`c68JWHjUzmaqgFn#1E+k;tx^kNa=4@8IE6GB4&{i=u1## zd@IB;_4fpIp^OUsY++Cf$1y_dqL4_3%BI5v^}bII7%fd|s(8k*R3&}qirP|sxbn79 zx=&GBeERyj@FE3hQ~q?)8Dd2WJun^1X, 2002, 2004. +# based on the previous translation to pt_BR (v4.1.5) by +# Rodrigo Parra Novo , 1999, 2000. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.20\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2004-02-08 18:00-0200\n" +"Last-Translator: Alexandre Folle de Menezes \n" +"Language-Team: Brazilian Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +# c-format +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argumento %s inválido para %s" + +# c-format +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumento %s ambíguo para %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Argumentos válidos são:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Erro de sistema desconhecido" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: opção `%s' é ambígua\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: opção `--%s' não permite um argumento\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: opção `%c%s' não permite um argumento\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: opção `%s' requer um argumento\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: a opção `--%s' não é conhecida\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: a opção `%c%s' não é conhecida\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opção ilegal -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: opção inválida -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opção requer um argumento -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: opção `-W %s' é ambígua\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: opção `-W %s' não permite um argumento\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "tamanho do bloco" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[sS]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Uso: %s [caminho...] [expressão]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Uso: %s [caminho...] [expressão]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "aviso: controle (escape) não reconhecido `\\%c'" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "não foi possível obter o diretório atual" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "não foi possível obter o diretório atual" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "desconhecido" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"o caminho padrão é o diretório atual; a expressão padrão é -print\n" +"expressões poden consistir de:\n" +"operadores (precedência decrescente; -and é implícito onde nenhum outro é " +"explícitado):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"o caminho padrão é o diretório atual; a expressão padrão é -print\n" +"expressões poden consistir de:\n" +"operadores (precedência decrescente; -and é implícito onde nenhum outro é " +"explícitado):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer ARQUIVO -ctime N -empty -false -fstype TIPO -gid N -group " +"NOME\n" +" -ilname PADRÃO -iname PADRÃO -inum N -ipath PADRÃO -iregex PADRÃO\n" +" -links N -lname PADRÃO -mmin N -mtime N -name PADRÃO -newer ARQUIVO\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PADRÃO -perm [+-]MODO -regex PADRÃO\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOME\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "modo inválido `%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "argumento nulo inválido para -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "tipo inválido `%c' para -size" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "argumento inválido `%s' para `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +# c-format +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "argumento %s inválido para %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versão %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find versão %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "aviso: controle (escape) não reconhecido `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "aviso: diretiva de formatação desconhecida `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "ambiente de execução é muito grande" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "não consigo duplicar o processo (fork())" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "erro esperando por %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminado pelo sinal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "expressão inválida" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "expressão inválida" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "expressão inválida" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "oops -- tipo inválido de expressão!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "oops -- tipo inválido de expressão!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "os caminhos devem preceder a expressão" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "predicado inválido `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "predicado inválido `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "argumento inválido `%s' para `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "faltando argumento para `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "expressão inválida" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "predicado inválido `%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "oops -- inserção padrão de and! inválida" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "Uso: %s bigrams_mais_comuns < lista > lista_codificada\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Reporte erros para ." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find versão %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dias" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "argumento inválido `%s' para `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versão %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "linha com argumentos muito longa" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "aviso: banco de dados `%s' é mais antigo que %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "ambiente de execução é muito grande" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versão %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "duplo" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "simples" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "linha com argumentos muito longa" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "erro esperando por processo filho" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: saiu com status 255; abortando" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: desativado pelo sinal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: terminado pelo sinal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: número inválido para opção -%c\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: valor para opção -%c deve ser >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: valor para opção -%c deve ser < que %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Uso: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-linhas]]\n" +" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" +"str]]\n" +" [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n" +" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n" +" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" +" [command [argumentos iniciais]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "oops -- tipo inválido de expressão!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "oops -- tipo inválido de expressão!" + +#~ msgid "Success" +#~ msgstr "Sucesso" + +#~ msgid "No match" +#~ msgstr "Não há associações" + +#~ msgid "Invalid regular expression" +#~ msgstr "expressão regularinválida" + +#~ msgid "Invalid collation character" +#~ msgstr "Caractere de colagem inválido" + +#~ msgid "Invalid character class name" +#~ msgstr "Nome da classe de caractere inválida" + +#~ msgid "Trailing backslash" +#~ msgstr "Contrabarra precedente" + +#~ msgid "Invalid back reference" +#~ msgstr "Referência reversa inválida" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ ou ^[ não correspondido" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( ou \\( não correspondido" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ não correspondido" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Conteúdo de \\{\\} inválido" + +#~ msgid "Invalid range end" +#~ msgstr "Fim do comprimento inválido" + +#~ msgid "Memory exhausted" +#~ msgstr "memória exaurida" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Expressão regular precedente inválida" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Fim prematuro de expressão regular" + +#~ msgid "Regular expression too big" +#~ msgstr "Expressão regular muito comprida" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") ou \\) não correspondido" + +#~ msgid "No previous regular expression" +#~ msgstr "Não há uma expressão regular prévia" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "ações: -exec COMANDO ; -fprint ARQUIVO -fprint0 ARQUIVO -fprintf ARQUIVO " +#~ "FORMATO\n" +#~ " -ok COMANDO ; -print -print0 -printf FORMATO -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Lista dos predicados:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Árvore de avaliação:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Árvore de avaliação otimizada:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Árvore de avaliação otimizada:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "memória virtual exaurida" + +#~ msgid "inserting %s\n" +#~ msgstr "inserindo %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tipo: %s %s " + +#~ msgid "left:\n" +#~ msgstr "esquerda:\n" + +#~ msgid "right:\n" +#~ msgstr "direita:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Árvore de avaliação normalizada:\n" + +#~ msgid "memory exhausted" +#~ msgstr "memória exaurida" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s alterado durante a execução de %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. alterado durante a execução de %s" + +#~ msgid "error in %s: %s" +#~ msgstr "erro em %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "opções (sempre verdadeiras): -daystart -depth -follow --help\n" +#~ " -maxdepth NIVEIS -mindepth NIVEIS -mount -noleaf --version --xdev\n" +#~ "testes (N pode ser +N ou -N ou N): -amin N -anewer ARQUIVO -atime N -cmin " +#~ "N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Uso: %s [-d caminho] [--database=caminho] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] padrão...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "citação %s não encontrada" + +#~ msgid "command too long" +#~ msgstr "comando muito longo" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "não foi possível incluir argumento simples devido ao limite de tamanho da " +#~ "lista de argumentos" + +#~ msgid "argument list too long" +#~ msgstr "lista de argumentos muito longa" diff --git a/po/quot.sed b/po/quot.sed new file mode 100644 index 0000000..0122c46 --- /dev/null +++ b/po/quot.sed @@ -0,0 +1,6 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin new file mode 100644 index 0000000..2436c49 --- /dev/null +++ b/po/remove-potcdate.sin @@ -0,0 +1,19 @@ +# Sed script that remove the POT-Creation-Date line in the header entry +# from a POT file. +# +# The distinction between the first and the following occurrences of the +# pattern is achieved by looking at the hold space. +/^"POT-Creation-Date: .*"$/{ +x +# Test if the hold space is empty. +s/P/P/ +ta +# Yes it was empty. First occurrence. Remove the line. +g +d +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/ro.gmo b/po/ro.gmo new file mode 100644 index 0000000000000000000000000000000000000000..9602f0f16908444812be43fec428842b02757e26 GIT binary patch literal 13543 zcmd6tZHy$xS;srZc6?(e7@LHbywx4v>~3y*Zg1_2&$D-D-^-qFlfAvmdCzZW=dPxw zXQsKH?s32D8+K5F6ih%UMhW>ygo20=k|hwqv4lV%UDo?E}@@Oy^q{aio3#c_TW{HNRa!|!|V zbez55KZ5szZ-V>419v#iEO-HY5quu}Mew#gj+254d=C5qcprFs&2fGK+z(3orQ*2@ z&hh*i@B`q>;1u|`Mfrb%F3;*tE^rn6Fc^bB5B@IrKJaDmL*Tax{C7~scjsM>^AYe6 z_zv(2csJMtWnL+G5BNp!XTh(6GS0sM-wS>hd=K~rDE;61F8TuR10MvR2LBxV9q@if-;_?bcV_~Pl8W?SHNZ7zXI;(`4%cY2iC!3;FrM_@cW?X z*&NE@g6F`01z!L~A3cQh2lVqIDD~=0>Hzo&P@X?sJbwlJEuOy(@<~S{w3onb@Ylh+ zllK31->-qv|L+y=Ujb#G{5^OQ zd=oqdK8&!w4}J>#0r*Ke{XF<6lN3Gs9@qo_3zYsnCU+Fv1|J4r0e=Jh5qKN;873$A zA}HhiZJ8`Lp9e+nUP6gPjxU2U?r(x@9p`lrm2>_BMD)(>3|92}!=UuHAC&bw2ugbm zGF0bzP{#H9p!ENBP~`YskS*o>54a58$zm`>=OTzGofkk<)A=%Z5d0c=KllSs`hP!* z#;x-pDD^#1`u{BW58zk84>GS!luzXOrMlJc*T4nJUk9cBd*y>r4on!PDPNr?^B$@?$y7I>^0}Km0^bM}MLZhq%shiR{H*i>`=#n6~*HipXh+>*SpHX z+McOYd2y8KAX1UP5eAX3ysl2Pm-$ILr<~dz9ktX*t>Ig>5oBGJb$!(hI$hNaGL`yS zy+)h3tv0%W*Bxz0LFT7@?fKH}1-~CBnQG>pRAsR`!j0PwqE?;-VfsiX%Ik5`IVPR8 z{I<@+O!YNi3#iQpy*x?$C{wK<@x3fgwiZ=c&EM=NewqexB$eHM5=2>Tq_C&AWX5Tb zW-4wsRNVIyO&3fy?q@XPhH++q%p5^TS)=A417y+*BAxjy)!b5P(1~=Yrdqrb0d;lM z;Y};&lO5%6`W};E7zl&cGjYf}e?9Pg73ICApQx#@H78P^RNM|iKix_*zo)XTzAtl` zN@vxj#HY8g_3X`mGl=5W?oaM6y@@Y2m=%lIvMZlvI?GeFaOlvY(oI&AX)~;b3c}Fu zAQ>x9<+^Ih6Z!EbTGwIFDh1Gv6Xi~MMaA(dyBilJSEjtFbXv7yKaHj{rNc1ZV5yW& zI(ZMJu-#OZsfz4$uNidmI8S%KP5kF_)QCFQ>%(>5#s}ReSg4yGUQzqHBb+q2QGupe z-0$yJ$Hom*wW0EeT@!brV4IeephT)xIuqX;A=vkCI*Xshu)Wga-r8C{ssV@ac2lFKRo(DeL(_&>#`>3C+n;+?B=(ifmd35!n z5+kD4Fm-nMo+~_yQHm5Bn~3m4*iA9bvg(yz zLR{8V{5 zMF{Yo9R?EOFJ{e5Cyig7US2(Q`NYb(lOMnQ*z(g$GWjURb(YJG`$0&tC`Q(m9?i#f zyN#!_-mi($Ud8=v8@C{}&!2m2`N@^1E}uMi;lk3%wTXgrE=E_Qcq3AUTk(@5PMnJ= z%Ww4flIxb+=6Os^*AM&8)|i?65M(b-v&*8=ada75n&@82P8X-)hT=<)DZ7>2a);EM z$BnHo?J{eT_zmX?okYy4VVV|0q5G~*5w6EdGw-JFM|?1k(Ej?(x5%Ta%~L3=czTg6 zyG^!~Xhor1VhVzcx4Ku@G1*)M6UODc@l|e7Y~Rz;mS)BVY1NN21{mPljN(ZbY&(>) zS9d;nDO!D&zgtf|>s)clutB*kKlCv$HV~OFu&qv?yKwgSnsVDFK;e0LWvMDOWvXUG zUsjp7Rf-11Lr8?v=8tL3Cvq%_i#yB8wlXhu^4!_8$5&6OMP-ag^^8#VD`s02ERHr4 zaqMV0T2wY3EnBQPm7}fvabdIpr&I-H;>;|L(HUZfs+d5~MVop-<_vY*@vuiMBZmKK zdEfD~-7%ok(p#z1igOmk8Qpp;pZONwvCAz|ag6?}4IN0_V!Rn6++FB(1Kb+REY{8` z0~purJ`0jkBJ9NLZaJnRd!2OQEo$}xLU@*?5?U#*IPRnKE}yZH zWEuA3KYb!l8*bwj_c}Xk4kc_O>Y1t5>|55NLYW_^nU?P*I1d>Y67c+%kHcnDi4ztR z(d&nSM;2t40yi0Bn-gRAR3}*XquEBW!DiIbljkp}S$6ndd#jWyYi5d-frE5xZWgE| zxj);$V)2k^k~6m* zo8X#Yq2q6gve#;ngkO`}&Z!jj4BCOjqdwY?`iTHUZHtsFtt5b5>=PzgKcn29-n0cP zOOG$DJVpWD+SI5D#2tu`aJuc%PE{VurTMyY$;kNZWmc($UAjzQgguPn3B@%h)sYx* zuj}JXi4Vk&wj*LouRAk~g=(U-TdJK$CIeJ${JVG~S$^z`NfFh|s=_)kTeW{xq5#+Y zT@@*6W}sGO$@~puU@bK92_A=1&%7bebGDA(>oY#LtwWrU+fI$OS$pdIl5#t2 zaeC<_ao$&}$ImX6Jq4lhX+$k+OBbj?NJM8Nk3^_aywOFDJKmX9F6)*ZVyUmD(qu=+ zy<&R3a zfeq2~h&(wp!KwAth-$u2ZD*s5H7-WMrU^J?lqnH`jl)~9WRNBQk%l_$@|I{X&LK2} zaIp1T@hp+!ngoG8Uq@^ext(UPV#+tjcTF5Xc)F#0$&MtYV2F0<2>Fe28A)NFOgv#D zA9^*B3I-7eCz*?A;j~*V4~_yZf>?;n#QfTM2u+bFY*JTa2&dhY35l(prmN#21ck)F znB%P~W+&>RsTeKEgvb&4b4FY?ClR4dn=eaZQAR1xn|jJUz5TRIu|AZf^~7Qpq(>QT zy47pO7(Q|8SE)U$D{tK@!^A?eqp_R9pDe1rjl<>pg)NX2h>bfMc=;;S8Iuz8s%@0( z5`$uAHO8QAGr*D2$rp=^t_(xX1~t(%yHpH=jqcNo$Q}3S;U6nCk>-_lvP(+J>3ZWH z*+#|SM>-qJqW#pO6Z&{LIW2m`j;p5xpILpFSg4rCX^tln@m_WMC5o25vz z>`PKyORbIjh0?jFWb-Cx(*$+BoF$j(4-;v|Ws+>?d=mdM0g$`gav!%DzN8TaX{a8k zFVq(vD40d}Y>JU|Prxs_YjMNmyj9hbU#y)!x8|NiDa0eXP!4253-j|2y7M1(=O0oB z4>uloX#f1d`FSe37vS!MR2bGf$!#0zFvM={e3&OXbWh{`q4A==c}$Nk$Uc@gM`t3n z_ozBJOA1hu%GcOno~4pQmNSR~A77jg46FQVAc~9W9jS#%db#k(d8pnXLNR=@;d*L& zWVh0pQTL)1T=KObfB^*v70PWyaf_C4^WCHK}e;SdcoW}<d^`y%=G#tMXH17@UCdteT^PwVfC?Fy;X8T2OOV@~A^?4M(sY^agA>S{WPXN816) zZmn{x`njA{$uxCe$eNHuvmm)wb9iADV`K1h$$$+fT=z9Bq#@>ve4szYdb8Z@bP`fid`lG@ z$e?f>*JZ;~ozK-;+8c0)rJ%#j>akU&5l4*#;C_aUPhhdGz0TJyCw>E0cWa69#)2v5L^nk z9Ne1weT{vy@WDdikIiEz8IDZH)d5n$Xbt^^xrcc+L4X!A+}GRUWJ^_MNzq^9!TgjZ zo+Pz#n%r4RWXFqCt^32QRA$FHZB!V_S^|}c-c3rEftDL8VmFcPs1 zINVN+OFd?`94U_w<#6ZbSgGb5F9LNLHz%Zw2)d);9A`skK`JL8jmk&MfJ+a}m*oj^ zo+OcTd}DK2dsMIfwpzD15ZT#&m9=DBqvCcm35_lqrCSN>f%o(!Ua)Msrih2a>Y5!a z)G#}?ak92cjp-0t{Tj6Tz@*X8>Bck^96M6l&92+P>E_vW%eJ3h{-fok z3q_VYfnT?8EhP_QV;_ecd)Zj*=0uhqlKpQ+S$6YW66Hds+X^MOQXV=~FRbAcv6V$- z>IT9w29hwl6g~D}R zEz9C2A^U_#+1Vz-a$2zOxnqn}sAfi3_}RirNr)CQ{&Ktp7jHJAel>&h6RSC#jBoeo zu2+_km!s8w5IO{pmZPqsIYY}=aw=oIF*)seYXY<4({k@v<`T)s);eQ{@sC7?b ziq0S<)yLNfEst}|v8L;Kj#wZu{-P%}g3OKU6MHi51O@_ki{*rwfs?OBX-N5UBIWuS zUcTfk%3+!a(}{!!!fyxcSxKhYxrT}FlB`S&_iYPYOxeW0i8j^n!k~`;My1z{`$W;g z)x*t;p&e#Wr98!W8MeNxD+{?(>dI2}H>xt^=>s(*B$JTy*R+g3^#(1X#e%0d-lZIe z@{iQF|q+WTtejVOz=malVS8jW@h`1hr^ zr0vU|EPa2SUMd3L9POYq63_6F5GJEsl%ZID@(ez{k<$hV2#A7UNC~2|oCt;06xv=Q z9@MKDG{XQ7gWnm_`}m$$VQDR$pC^vZ$!AuFSv-Wk_;(n6fytDf2gxLF+G{ z-^uD<{Qt}9%Z!}L=nx26dMBPplD2`W(<91zyGJs<%fRE4QvOR_zCF^6a6 z$yrsE%4Rnfd_O+SCg&!bnUi+9P0TOr>*;NR5lT#CXaf}@mMSxM=N-cIVH8D^xXFLv z!Niyd#wbY{PSK4yE5I6*EEE5k(3PBm^FL$6%}nIG1E>-$T<7s3oOuH~r+X18%%D0P zSjTw=<)HvWG-m>w4P+&YgOeZ}B7CzZS-O+thOkQ;Ut#DXCOCE|AQsxrlOMMLq2 zO$n~AdnO=GNcMmUYx%_RG+;c&yNT0)F?k{?ax#A#!nQNuKeEKR*b{*P3qCIU;iAa@ z02)VQ46=!N2a9UG%tESB7FLFJF~Pm0EOVtYj6{->mq=zvE+{HP8Yw9z3)Vt(=D%a= z<0F}n_YU`di)ch~k}LEJD^22692ZDVKiJVzxexeIabmD*X4S+D?NBbj=qcRj{C4zT z936}@9>qDr*fQ8$EkJ^nXV^)R*u#XeCc>2#>^&BLxML)z$opf=Q*owX2rO3B1~i3J zVXrb{>pVvt72OQ;G-F_8SKA}vQ4b>`CQxB-kSs_VHCD-t#1CbkRXJ+aNwv=jJuv~s iVM%wmEdG=!6>JNcFaK;}xeU_a;*i0tF2l5Bhx5M?O, 2003,2004,2005 +# +# +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.24\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2005-08-01 12:00-0500\n" +"Last-Translator: Laurentiu Buzdugan \n" +"Language-Team: Romanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argument invalid %s pentru %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argument ambiguu %s pentru %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Argumente valide sunt:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Eroare de sistem necunoscutã" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: opþiunea `%s' este ambiguã\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: opþiunea `--%s' nu permite un argument\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: opþiunea `%c%s' nu permite un argument\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: opþiunea `%s' necesitã un argument\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: opþiune nerecunoscutã `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: opþiune nerecunoscutã `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: opþiune ilegalã -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: opþiune ilegalã -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: opþiunea necesitã un argument -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: opþiunea `-W %s' este ambiguã\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: opþiunea `-W %s' nu permite un argument\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "dimensiune bloc" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Folosire : %s [-H] [-L] [-P] [cale...] [expresie]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Folosire : %s [cale...] [expresie]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "avertisment: escape nerecunoscut `\\%c'" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Variabila de mediu FIND_BLOCK_SIZE nu este suportatã, singurul lucru care " +"afecteazã dimensiunea blocului esre variabila de mediu POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "nu pot obþine directorul curent" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "nu pot obþine directorul curent" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Avertisment: sistemul de fiºiere %s de fost demontat de curând." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Avertisment: sistemul de fiºiere %s de fost montat de curând." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s s-a schimbat în timpul execuþiei lui %s (vechiul nr. dispozitiv %ld, " +"noul nr. dispozitiv %ld, tipul sistemului de fiºiere este %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s s-a schimbat în timpul execuþiei lui %s (vechiul nr. inode %ld, noul " +"nr. inode %ld, tipul sistemului de fiºiere este %s) [ref %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Legãtura simbolicã `%s' este parte a unei bucle în ierarhia de directoare; " +"am vizitat deja directorul cãtre care þinteºte." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Am detectat o buclã în sistemul de fiºiere; `%s' are acelaºi numãr de " +"unitate ºi inode ca ºi un director care este %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "nivel mai înalt în ierarhia sistemului de fiºiere" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "nivele mai înalte în ierarhia sistemului de fiºiere" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "avertisment: nu urmez legãtura simbolicã %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"AVERTISMENT: Numãrul de legãturi hard este greºit pentru %s: acesta ar putea " +"fi un bug în driverul dvs. pentru sistemul de fiºiere. Pornesc automat " +"opþiunea -noleaf a lui find. Rezultatele precedente ar fi putut eºua sã " +"includã directoare care ar fi trebuit cãutate." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "necunoscut" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"avertisment: aþi specificat opþiunea %s dupã un argument non-opþiune %s, dar " +"opþiunile nu sunt poziþionale (%s afecteazã testele specificate înainte de " +"el ca ºi cele specificate dupã el). Vã rugãm specificaþi opþiunile înainte " +"de alte argumente.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"avertisment: opþiunea -d nu mai este validã; vã rugãm folosiþi -depth în " +"locul lui, pentru cã aceasta din urmã respectã standardul POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"calea implicitã este directorul curent; expresia implicitã este -print\n" +"expresia poate fi compusã din: operatori opþiuni, teste ºi acþiuni:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operatori (precedenþa în scãdere; -and este implicit când alþii nu sunt " +"precizaþi):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"opþiuni poziþionale (întotdeauna adevãrat): -daystart -follow -regextype\n" +"\n" +"opþiuni normale (întotdeauna adevãrat, specificate înaintea altor " +"expresii):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"teste (N poate fi +N sau -N sau N): -amin N -anewer FIªIER -atime N -cmin N\n" +" -cnewer FIªIER -ctime N -empty -false -fstype TIP -gid N -group NUME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FIªIER" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATTERN -perm [+-]MOD -regex PATTERN\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NUME -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"acþiuni: -delete -print0 -printf FORMAT -fprintf FORMAT FIªIER -print \n" +" -fprint0 FIªIER -fprint FIªIER -ls -fls FIªIER -prune -quit\n" +" -exec COMANDà ; -exec COMANDà {} + -ok COMANDà ;\n" +" -execdir COMANDà ; -execdir COMANDà {} + -okdir COMANDà ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Raportaþi (ºi urmãriþi progresul reparãrii) bug-urilor folosind pagina de\n" +"raportare a bug-urilor din findutils de la http://savannah.gnu.org/ sau,\n" +"dacã nu aveþi acces la internet, trimiþând email la ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "verificarea corectitudinii funcþie de bibliotecã fnmatch() a eºuat." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"avertisment: de obicei, numele de fiºiere în Unix nu conþin shash-uri (dar " +"numele de cãi da). Aceasta înseamnã cã '%s %s' va fi evaluat ca fals tot " +"timpul pe acest sistem. Aþi putea gãsi testul '-wholename' mai folositor, " +"sau probabil '-samefile'. Alternativ, dacã folosiþi GNU grep, puteþi folosi " +"'find ... -print0 | grep -FzZ %s'." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"avertisment: predicatul -ipath nu mai este valid; vã rugã sã folosiþi -" +"iwholename în locul lui." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Nu pot deschide fiºierul de intrare `%s'" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "mod invalid `%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "argument null invalid pentru -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "tip -size invalid `%c'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "argument invalid `%s' pentru `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "argument invalid %s pentru %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find versiunea %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils versiunea %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Capabilitãþi activate: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "avertisment: escape nerecunoscut `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "avertisment: directivã format nerecunoscutã `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Directorul curent este inclus în variabila de mediu PATH, ceea ce este " +"periculos (insecure) în combinaþie cu acþiune %s a lui find. Vã rugãm " +"îndepãrtaþi directorul curent din $PATH (adicã îndepãrtaþi \".\" sau primul " +"sau ultimul \":\")" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Directorul curent este inclus în variabila de mediu PATH, ceea ce este " +"periculos (insecure) în combinaþie cu acþiune %s a lui find. Vã rugãm " +"îndepãrtaþi directorul curent din $PATH (adicã îndepãrtaþi \".\" sau primul " +"sau ultimul \":\")" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Nu puteþi folosi {} în cadrul numelui utilitarului pentru -execdir ºi -" +"okdir, pentru cã aceasta este o potenþialã problemã de securitate." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Numai o singurã instanþã de {} este suportatã cu -exec%s ... +" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "mediul (environment) este prea larg pentru exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Nu pot deschide fiºierul de intrare `%s'" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "nu pot executa fork" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "eroare aºteptând pentru %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminat de semnal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "expresie invalidã" + +#: find/tree.c:101 +#, fuzzy, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "expresie invalidã; aþi folosit un operator binar cu nimic înaintea sa." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "predicat adiþional neaºteptat" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "expresie invalidã; aveþi prea multe ')'" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"expresie invalidã; aºteptam sã gãsesc o ')' pe undeva, dar nu am gãsit-o." + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "expresie invalidã; aveþi prea multe ')'" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" +"expresie invalidã; aºteptam sã gãsesc o ')' pe undeva, dar nu am gãsit-o." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "hopa -- tip expresie invalid!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "hopa -- tip expresie invalid (%d)!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "cãile trebuie specificate înaintea expresiei" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "predicat invalid `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "predicat invalid `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "argument invalid `%s' pentru `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "argument lipsã pentru `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "expresie invalidã; aveþi prea multe ')'" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "predicat adiþional neaºteptat" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "predicat adiþional neaºteptat" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "hopa -- inserare implicitã invalidã de and!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Folosire: %s [--version | --help]\n" +"sau %s cele_mai_comune_bigrame < listã-fisiere > baza-de-date-locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Raportaþi bug-uri la .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils versiunea %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "zile" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "argument invalid `%s' pentru `%s'" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"avertisment: calea bazei de date locate `%s' conþine în faþa un caracter " +"`:', care nu este un nume de bazã de date valid" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "baza de date locate `%s' este coruptã sau invalidã" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Dimensiune baza de date locate: %s octeþi\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Nume fiºiere: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Nume fiºiere: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "cu o lungime cumulativã de %s octeþi" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tdin care %s conþin spaþii albe, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s conþin caractele linie-nouã, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tºi %s conþin caractere cu bitul înalt setat.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Raport de compresie %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Raport de compresie %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "baza de date locate `%s' este coruptã sau invalidã" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Baza de date %s este în formatul %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Folosire: %s [-d cale | --database=cale] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholepath] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--version] [--help]\n" +" pattern...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate versiunea %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argument pentru --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"avertisment: baza de date locate poate fi doar cititã de la stdin o datã." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "avertisment: baza de date `%s' este mai veche de %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "mediul (environment) este prea larg pentru exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs versiunea %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Nu pot deschide fiºierul de intrare `%s'" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Variabile dvs. de mediu ocupã %ld octeþi\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "limitele POSIX min ºi max pentru lungimea unui argument: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "limitele POSIX min ºi max pentru lungimea unui argument: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Lungimea mazimã a unei comenzi pe care o putem în fapt folosi: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Dimensiune unui bufer pe care o folosim de fapt: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"ghilimele %s fãrã pereche; în mod implicit ghilimelele sunt speciale pentru " +"xargs, în afarã de cazul în care folosiþi opþiunea -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dublu" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "singur" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "linie argumente prea lungã" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "eroare aºteptând pentru procese copil" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: a terminat cu starea 255; renunþ" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: oprit de semnalul %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: terminat de semnalul %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: numãr invalid pentru opþiunea -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: valoarea pentru opþiunea -%c ar trebui sã fie >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: valoarea pentru opþiunea -%c ar trebui sã fie < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Folosire: %s [-0prtx] [-e[ºir-eof]] [-i[ºir-înlocuire]] [-l[max-linii]]\n" +" [-n arg-max] [-s max-caractere] [-P max-procese] [--null] [--eof[=ºir-" +"eof]]\n" +" [--replace[=ºir-înlocuire]] [--max-lines[=linii-max]] [--interactive]\n" +" [--max-chars=max-caractere] [--verbose] [--exit] [--max-procs=max-" +"proc]\n" +" [--max-args=max-arg] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [argumente-iniþiale]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "hopa -- tip expresie invalid în mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "hopa -- tip expresie invalid în mark_type!" + +#~ msgid "old" +#~ msgstr "vechi" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "Reducem arg_max (%ld) la arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Succes" + +#~ msgid "No match" +#~ msgstr "Nici o potrivire" + +#~ msgid "Invalid regular expression" +#~ msgstr "Expresiei regularã invalidã" + +#~ msgid "Invalid collation character" +#~ msgstr "Caracter colatare invalid" + +#~ msgid "Invalid character class name" +#~ msgstr "Nume clasã caractere invalid" + +#~ msgid "Trailing backslash" +#~ msgstr "Trailing backslash" + +#~ msgid "Invalid back reference" +#~ msgstr "Referinþã înapoi invalidã" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "[ sau [^ fãrã pereche" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "( sau \\( fãrã pereche" + +#~ msgid "Unmatched \\{" +#~ msgstr "\\{ fãrã pereche" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Conþinut invalid pentru \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Capãt interval invalid" + +#~ msgid "Memory exhausted" +#~ msgstr "Memorie epuizatã" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Invalid precedând expresie regularã" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Sfârºit prematur al expresiei regulare" + +#~ msgid "Regular expression too big" +#~ msgstr "Expresie regularã prea mare" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr ") sau \\) fãrã pereche" + +#~ msgid "No previous regular expression" +#~ msgstr "Nici o expresie regularã anterioarã" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "acþiuni: -exec COMANDà ; -fprint FIªIER -fprint0 FIªIER\n" +#~ " -fprintf FIªIER FORMAT -fls FILE -ok COMANDà ; -print -print0\n" +#~ " -printf FORMAT -prune -ls -delete -quit\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Listã Directive:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Arbore Eval:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Arbore Eval Optimizat:\n" + +#~ msgid "Optimized command line:\n" +#~ msgstr "Linie de comandã optimizatã:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "memorie virtualã epuizatã" + +#~ msgid "inserting %s\n" +#~ msgstr "inserez %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tip: %s %s " + +#~ msgid "left:\n" +#~ msgstr "stânga:\n" + +#~ msgid "right:\n" +#~ msgstr "dreapta:\n" + +#~ msgid "[stat called here] " +#~ msgstr "[stat apelat aici] " + +#~ msgid "[type needed here] " +#~ msgstr "[tip necesar aici] " + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Arbore Eval Normalizat:\n" + +#~ msgid "error in %s: %s" +#~ msgstr "eroare în %s: %s" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "avertisment: calea bazei de date locate `%s' conþine în coadã un caracter " +#~ "`:', care nu este un nume de bazã de date valid" + +#~ msgid "command too long" +#~ msgstr "comandã prea lungã" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "nu pot potrivi un singur argument în limita dimensiunii listei de " +#~ "argumente" + +#~ msgid "argument list too long" +#~ msgstr "listã argumente prea lungã" diff --git a/po/ru.gmo b/po/ru.gmo new file mode 100644 index 0000000000000000000000000000000000000000..a5ab6e75648c05603faf1514187c555dc9ab756b GIT binary patch literal 3879 zcmb7`ON<=F8OJNw5E$};kPrfd+Q4{iOb@dLV|y^h*h{RHyIAslkxzyS_Oh-1P9Ar!CkAQURWJu$2k!>|3)23#ejgPa0nx;^ zfg_*<(z+)=@=pQp2j2o|zaN12f`12p1-3w1=Sz_Gx8+X65PS&a;BP>hzY4;H=^({( z8l*VA57yxDJV@hr!`bcNagh9+0m-j-LF)e;+zEyt#qob2`FTG!N9}t+%1;F(|K0&P z_z6h!wL!}B_3Zo3AEfPh5N@zTAjN+i{3&=Eq`0df#pRD6&GRmJ5BMoa`?{2I0i<~% zkb_+i|Jc{~p*U{&VcPy6Nb%nf()bs^QE&pJ_?`zTPH%y<&%c5c|4Ui_zd-WiE0E%U z&yP~O?chFqkAoDKH^IBW4?%31eU$Zo2JXf84UqgLA8Gx^Q6EF4wP}8eIhJ5_Opv0a z(0o$%H^q_)oh#Z86^b7fOq~>p-;=1@P)Q3hKr}Ia#7%miZ(mTbn zkabX=D291diV+pc6-V8PI)X}?f>aW1QXHuK81*(((#fFYEp7|5rs}dS6keX=mRi+i zjpr4Xw@O^hs?VSf^Y91h8T?2i`;1;PRTJZDFapXO7luJCDLT9oiSqD+mNQGtrq zHP0eb)=jOa^>ey0qjPJ{vPF#x(=<%>QlgZ8R*@c4l-TR9=*M5f@7&9;u`{gS$u(6M z+%^m>2@RI9@Hq(g4Z$k1t{XN9?Ogxws<3&*F-=H?D@c6BHq1Gu$a5A`45zFKCiH35 zG;|UZX(yQ%ONm6UVpddG;vt`rRnmOYoVPY;tejOfh1X4^A}ouknfN90jN5Z{!J*~R zLHl4gXGlP{fnIC1SIpKSQi|_jfbMA8K=w2snR(C+dqqt$kW5rlF&f?umg%ox7$)XysF6@(3Wq}(VQVc{eM+`7!e{{m&`I;jW@J-GONrm4C}CA(+WV`t z`HfAGubSLXk2+0(%9Hg;)A$1tCQT^POR3mOiS!&>)hzyWVXUwxcS_W87fHvgs;Wqb zoT?>F8YNzKsuGDbu{>DSoq}Ojb0<$sN{3A$(=MfPh_%Fb6^nbM;xkflA0OLWdV1f^ z;#jc=L+O;5Rw?|ecDtnFm{i=8*gbXR*yPUQGr8Z&mMu-1vTkWIgjM3>LWhP<3KL?0 zNcSsq^@H{7t57j&2QWmhI&xJ=lR~bQ_$dc@!d_mAz%v&i!6G zB6MM<&K^A^mxacQg?$D5PXq_N-SIj-H{k7%NB(@^HoN_oVA<_?ooimeBXq@X+>OFk z`WDcbrJj2sTEq+`9(awg-Hl?uwRD*;G%u_S-(P`;S%T2xD}K}rd82uShwV$gPtQVn z8Ko8*3{9rW9s@sWht0+1t`|pF_(gA-yPf%N%L`&Rog}lxu?oDf5roTuyW$0F`{Isw z5mO8X5BH~Uz;|0Gdjf9BcoV;EI{w6Nud-|-e=zqf=~C-2Mu0TL8Cy8r+H literal 0 HcmV?d00001 diff --git a/po/ru.po b/po/ru.po new file mode 100644 index 0000000..6bad172 --- /dev/null +++ b/po/ru.po @@ -0,0 +1,1182 @@ +# ìÏËÁÌÉÚÁÃÉÑ findutils 4.1.5 +# Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +# Denis Perchine , 1997, 1998, 1999, 2000. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.7\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2002-01-07 18:43GMT+06\n" +"Last-Translator: Denis Perchine \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=KOI8-R\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 0.9.5\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "ÎÅ×ÅÒÎÙÊ ÁÒÇÕÍÅÎÔ %s Õ `%s'" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "ÎÅ×ÅÒÎÙÊ ÁÒÇÕÍÅÎÔ %s Õ `%s'" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "÷ÅÒÎÙÅ ÁÒÇÕÍÅÎÔÙ:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÓÉÓÔÅÍÎÁÑ ÏÛÉÂËÁ" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: ËÌÀÞ `%s' ÎÅÏÄÎÏÚÎÁÞÅÎ\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: ËÌÀÞ `--%s' ÉÓÐÏÌØÚÕÅÔÓÑ ÂÅÚ ÁÒÇÕÍÅÎÔÁ\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: ËÌÀÞ `%c%s' ÉÓÐÏÌØÚÕÅÔÓÑ ÂÅÚ ÁÒÇÕÍÅÎÔÁ\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: ËÌÀÞ `%s' ÔÒÅÂÕÅÔ ÁÒÇÕÍÅÎÔ\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: ÎÅÉÚ×ÅÓÔÎÙÊ ËÌÀÞ `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: ÎÅÉÚ×ÅÓÔÎÙÊ ËÌÀÞ `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÙÊ ËÌÀÞ -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: ÎÅ×ÅÒÎÙÊ ËÌÀÞ -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: ËÌÀÞ ÔÒÅÂÕÅÔ ÁÒÇÕÍÅÎÔ -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: ËÌÀÞ `-W %s' ÎÅÏÄÎÏÚÎÁÞÅÎ\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: ËÌÀÞ `-W %s' ÉÓÐÏÌØÚÕÅÔÓÑ ÂÅÚ ÁÒÇÕÍÅÎÔÁ\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "ÒÁÚÍÅÒ ÂÌÏËÁ" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yYÄä]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nNÎî]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [ÐÕÔØ...] [×ÙÒÁÖÅÎÉÅ]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [ÐÕÔØ...] [×ÙÒÁÖÅÎÉÅ]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ: ÎÅÒÁÓÐÏÚÎÁ×ÁÅÍÁÑ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ '\\%c'" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "ÎÅ ÍÏÇÕ ÐÏÌÕÞÉÔØ ÔÅËÕÝÉÊ ËÁÔÁÌÏÇ" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "ÎÅ ÍÏÇÕ ÐÏÌÕÞÉÔØ ÔÅËÕÝÉÊ ËÁÔÁÌÏÇ" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "ÎÅÉÚ×ÅÓÔÎÙÊ" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"ÐÕÔØ ÐÏ ÕÍÏÌÞÁÎÉÀ: ÔÅËÕÝÉÊ ÐÏÄËÁÔÁÌÏÇ; ×ÙÒÁÖÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ: -print\n" +"×ÙÒÁÖÅÎÉÑ ÍÏÇÕÔ ÓÏÓÔÏÑÔØ ÉÚ:\n" +"ÏÐÅÒÁÔÏÒÏ× (× ÎÉÓÈÏÄÑÝÅÍ ÐÏÒÑÄËÅ; -and ÂÅÒÅÔÓÑ ÐÏ ÕÍÏÌÞÁÎÉÀ, ÅÓÌÉ ÎÅ ÄÁÎÏ " +"ÄÒÕÇÉÈ):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"ÐÕÔØ ÐÏ ÕÍÏÌÞÁÎÉÀ: ÔÅËÕÝÉÊ ÐÏÄËÁÔÁÌÏÇ; ×ÙÒÁÖÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ: -print\n" +"×ÙÒÁÖÅÎÉÑ ÍÏÇÕÔ ÓÏÓÔÏÑÔØ ÉÚ:\n" +"ÏÐÅÒÁÔÏÒÏ× (× ÎÉÓÈÏÄÑÝÅÍ ÐÏÒÑÄËÅ; -and ÂÅÒÅÔÓÑ ÐÏ ÕÍÏÌÞÁÎÉÀ, ÅÓÌÉ ÎÅ ÄÁÎÏ " +"ÄÒÕÇÉÈ):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -ipath PATTERN -iregex PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NAME\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "ÎÅ×ÅÒÎÙÊ ÒÅÖÉÍ '%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "ÏÔÓÕÔÓÔ×ÕÅÔ ÁÒÇÕÍÅÎÔ Õ -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "ÎÅ×ÅÒÎÙÊ ÔÉÐ '%c' ÄÌÑ -size" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "ÎÅ×ÅÒÎÙÊ ÁÒÇÕÍÅÎÔ `%s' Õ `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "ÎÅ×ÅÒÎÙÊ ÁÒÇÕÍÅÎÔ %s Õ `%s'" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find ×ÅÒÓÉÉ %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find ×ÅÒÓÉÉ %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ: ÎÅÒÁÓÐÏÚÎÁ×ÁÅÍÁÑ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ '\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "ÐÒÅÄyÐÒÅÖÄÅÎÉÅ: ÎÅÒÁÓÐÏÚÎÁ×ÁÅÍÙÊ ÆÏÒÍÁÔ ÄÉÒÅËÔÉ×Ù '%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "ÏËÒÕÖÅÎÉÅ ÓÌÉÛËÏÍ ×ÅÌÉËÏ ÄÌÑ ÉÓÐÏÌÎÅÎÉÑ" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "ÎÅ ÍÏÇÕ ÓÏÚÄÁÔØ ÐÒÏÃÅÓÓ" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "ÏÛÉÂËÁ ÏÖÉÄÁÎÉÑ %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s ÐÒÅÒ×ÁÎ ÐÏ ÓÉÇÎÁÌÕ %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "ÎÅ×ÅÒÎÏÅ ×ÙÒÁÖÅÎÉÅ" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "ÎÅ×ÅÒÎÏÅ ×ÙÒÁÖÅÎÉÅ" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "ÎÅ×ÅÒÎÏÅ ×ÙÒÁÖÅÎÉÅ" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "ÏÏÐÓ -- ÎÅ×ÅÒÎÙÊ ÔÉÐ ×ÙÒÁÖÅÎÉÑ!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "ÏÏÐÓ -- ÎÅ×ÅÒÎÙÊ ÔÉÐ ×ÙÒÁÖÅÎÉÑ!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "ÐÕÔÉ ÄÏÌÖÎÙ ÂÙÔØ ÐÅÒÅÄ ×ÙÒÁÖÅÎÉÅÍ" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "ÎÅ×ÅÒÎÙÊ ÐÒÅÄÉËÁÔ `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "ÎÅ×ÅÒÎÙÊ ÐÒÅÄÉËÁÔ `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "ÎÅ×ÅÒÎÙÊ ÁÒÇÕÍÅÎÔ `%s' Õ `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "ÏÔÓÕÔÓÔ×ÕÅÔ ÁÒÇÕÍÅÎÔ Õ `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "ÎÅ×ÅÒÎÏÅ ×ÙÒÁÖÅÎÉÅ" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "ÎÅ×ÅÒÎÙÊ ÐÒÅÄÉËÁÔ `%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "ÏÏÐÓ -- ÎÅ×ÅÒÎÁÑ ×ÓÔÁ×ËÁ ÐÏ ÕÍÏÌÞÁÎÉÀ ÏÐÅÒÁÔÏÒÁ 'é' (and)" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"éÓÐÏÌØÚÏ×ÁÎÉÅ: %s most_common_bigrams < ÓÐÉÓÏË > ÚÁÛÉÆÒÏ×ÁÎÎÙÊ_ÓÐÉÓÏË\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"ðÏÓÙÌÁÊÔÅ ÏÔÞÅÔÙ Ï ÏÛÉÂËÁÈ ÎÁ ." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find ×ÅÒÓÉÉ %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "ÄÎÅÊ" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "ÎÅ×ÅÒÎÙÊ ÁÒÇÕÍÅÎÔ `%s' Õ `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate ×ÅÒÓÉÉ %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "ÓÔÒÏËÁ ÁÒÇÕÍÅÎÔÏ× ÓÌÉÛËÏÍ ×ÅÌÉËÁ" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ: ÂÁÚÁ ÄÁÎÎÙÈ '%s' ÕÓÔÁÒÅÌÁ ÂÏÌÅÅ ÞÅÍ ÎÁ %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "ÏËÒÕÖÅÎÉÅ ÓÌÉÛËÏÍ ×ÅÌÉËÏ ÄÌÑ ÉÓÐÏÌÎÅÎÉÑ" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs ×ÅÒÓÉÉ %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "Ä×ÏÊÎÁÑ" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "ÏÄÉÎÁÒÎÁÑ" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "ÓÔÒÏËÁ ÁÒÇÕÍÅÎÔÏ× ÓÌÉÛËÏÍ ×ÅÌÉËÁ" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "ÏÛÉÂËÁ ÏÖÉÄÁÎÉÑ ÄÏÞÅÒÎÅÇÏ ÐÒÏÃÅÓÓÁ" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: ÚÁ×ÅÒÛÅÎ ÓÏ ÓÔÁÔÕÓÏÍ 255; ÐÒÅÒÙ×ÁÀÓØ" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: ÏÓÔÁÎÏ×ÌÅÎ ÐÏ ÓÉÇÎÁÌÕ %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: ÚÁ×ÅÒÛÅÎ ÐÏ ÓÉÇÎÁÌÕ %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: ÎÅ×ÅÒÎÏÅ ÞÉÓÌÏ ÄÌÑ ÏÐÃÉÉ -%c\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: ÚÎÁÞÅÎÉÅ ÄÌÑ ÏÐÃÉÉ -%c ÄÏÌÖÎÏ ÂÙÔØ >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: ÚÎÁÞÅÎÉÅ ÄÌÑ ÏÐÃÉÉ -%c ÄÏÌÖÎÏ ÂÙÔØ < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n" +" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" +"str]]\n" +" [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n" +" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n" +" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" +" [ËÏÍÁÎÄÁ [ÎÁÞÁÌØÎÙÅ-ÁÒÇÕÍÅÎÔÙ]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "ÏÏÐÓ -- ÎÅ×ÅÒÎÙÊ ÔÉÐ ×ÙÒÁÖÅÎÉÑ!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "ÏÏÐÓ -- ÎÅ×ÅÒÎÙÊ ÔÉÐ ×ÙÒÁÖÅÎÉÑ!" + +#~ msgid "Success" +#~ msgstr "õÓÐÅÈ" + +#~ msgid "No match" +#~ msgstr "îÅÔ ÓÏ×ÐÁÄÅÎÉÊ" + +#~ msgid "Invalid regular expression" +#~ msgstr "îÅ×ÅÒÎÏÅ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ" + +#~ msgid "Invalid collation character" +#~ msgstr "îÅ×ÅÒÎÙÊ ÚÎÁË ÓÏÐÏÓÔÁ×ÌÅÎÉÑ" + +#~ msgid "Invalid character class name" +#~ msgstr "îÅ×ÅÒÎÏÅ ÉÍÑ ËÌÁÓÓÁ ÚÎÁËÏ×" + +#~ msgid "Trailing backslash" +#~ msgstr "úÁ×ÅÒÛÁÀÝÉÊ ÏÂÒÁÔÎÙÊ ÓÌÜÛ" + +#~ msgid "Invalid back reference" +#~ msgstr "îÅ×ÅÒÎÁÑ ÏÂÒÁÔÎÁÑ ÓÓÙÌËÁ" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "îÅÓÂÁÌÁÎÓÉÒÏ×ÁÎÎÁÑ [ ÉÌÉ [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "îÅÓÂÁÌÁÎÓÉÒÏ×ÁÎÎÁÑ ( ÉÌÉ \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "îÅÓÂÁÌÁÎÓÉÒÏ×ÁÎÎÁÑ \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "îÅ×ÅÒÎÏÅ ÓÏÄÅÒÖÉÍÏÅ \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "îÅ×ÅÒÎÙÊ ËÏÎÅà ÐÒÏÍÅÖÕÔËÁ" + +#~ msgid "Memory exhausted" +#~ msgstr "îÅ È×ÁÔÁÅÔ ÐÁÍÑÔÉ" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "îÅ×ÅÒÎÏÅ ÐÒÅÄÛÅÓÔ×ÕÀÝÅÅ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ" + +#~ msgid "Premature end of regular expression" +#~ msgstr "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÒÅÇÕÌÑÒÎÏÇÏ ×ÙÒÁÖÅÎÉÑ" + +#~ msgid "Regular expression too big" +#~ msgstr "òÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ ÓÌÉÛËÏÍ ÂÏÌØÛÏÅ" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "îÅÓÂÁÌÁÎÓÉÒÏ×ÁÎÎÁÑ ) ÉÌÉ \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "îÅÔ ÐÒÅÄÙÄÕÝÅÇÏ ÒÅÇÕÌÑÒÎÏÇÏ ×ÙÒÁÖÅÎÉÑ" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "ÄÅÊÓÔ×ÉÑ: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE " +#~ "FORMAT\n" +#~ " -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "óÐÉÓÏË ÐÒÅÄÉËÁÔÏ×:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "äÅÒÅ×Ï ×ÙÞÉÓÌÅÎÉÊ:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "ïÐÔÉÍÉÚÉÒÏ×ÁÎÎÏÅ ÄÅÒÅ×Ï ×ÙÞÉÓÌÅÎÉÊ:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "ïÐÔÉÍÉÚÉÒÏ×ÁÎÎÏÅ ÄÅÒÅ×Ï ×ÙÞÉÓÌÅÎÉÊ:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "ÎÅ È×ÁÔÁÅÔ ×ÉÒÔÕÁÌØÎÏÊ ÐÁÍÑÔÉ" + +#~ msgid "inserting %s\n" +#~ msgstr "×ÓÔÁ×ÌÑÀ %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " ÔÉÐ: %s %s " + +#~ msgid "left:\n" +#~ msgstr "ÓÌÅ×Á:\n" + +#~ msgid "right:\n" +#~ msgstr "ÓÐÒÁ×Á:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "îÏÒÍÁÌÉÚÏ×ÁÎÎÏÅ äÅÒÅ×Ï:\n" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s ÉÚÍÅÎÅÎ ×Ï ×ÒÅÍÑ ÉÓÐÏÌÎÅÎÉÑ %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. ÉÚÍÅÎÅÎ ×Ï ×ÒÅÍÑ ÉÓÐÏÌÎÅÎÉÑ %s" + +#~ msgid "error in %s: %s" +#~ msgstr "ÏÛÉÂËÁ × %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "ËÌÀÞÉ (×ÓÅÇÄÁ true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N ÍÏÖÅÔ ÂÙÔØ +N ÉÌÉ -N ÉÌÉ N): -amin N -anewer FILE -atime N -cmin " +#~ "N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [-d ÐÕÔØ] [--database=ÐÕÔØ] [-e | --existing] \n" +#~ " [-i | --ignore-case] [--version] [--help] ÍÁÓËÁ...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "îÅÓÂÁÌÁÎÓÉÒÏ×ÁÎÎÁÑ %s ËÁ×ÙÞËÁ" + +#~ msgid "command too long" +#~ msgstr "ËÏÍÁÎÄÁ ÓÌÉÛËÏÍ ×ÅÌÉËÁ" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "ÁÒÇÕÍÅÎÔ ÐÏ ÒÁÚÍÅÒÕ ×ÙÈÏÄÉÔ ÚÁ ÐÒÅÄÅÌÙ ÓÐÉÓËÁ ÁÒÇÕÍÅÎÔÏ×" + +#~ msgid "argument list too long" +#~ msgstr "ÓÐÉÓÏË ÁÒÇÕÍÅÎÔÏ× ÓÌÉÛËÏÍ ×ÅÌÉË" diff --git a/po/rw.gmo b/po/rw.gmo new file mode 100644 index 0000000000000000000000000000000000000000..e67af73e1e77c1ff898521659dff6340c0eee497 GIT binary patch literal 525 zcmYL`%}yIJ5XZNaQfZGp_uv}`G+PG+2-|?7ra_9@RT16x#Kr7R7MIO>ySjcA-AIB+`AuGG0bcDjy_mNxmsANBilBpVYZ(g zrWe>b&rpQM*6<-V0ZNyvtJuJQ<)opQIp3t`UrLyIG%S_iqhZX|zSc*e4?!QR!6+Xd z@9BZoB7_UPvwg>n?f~>qh8pPnK-Nd1`)mS3=?#U}u=Bb4%6NyQ3R_(pY*i6`cfD5Q zW%P>)0z21+ta8g!$)qNl2BAc=%+)7LYvWgjYNN*dT(IxX5(dATv^H?af{VVwh1>-* zLOxB4c`@6(%^=h1)Da`esn(rbkMW-0b*-`VUdfSsKtB0ap229N>zggm!;C6dTWWGO Ty0V, 2005. +# Steve performed initial rough translation from compendium built from translations provided by the following translators: +# Philibert Ndandali , 2005. +# Viateur MUGENZI , 2005. +# Noëlla Mupole , 2005. +# Carole Karema , 2005. +# JEAN BAPTISTE NGENDAHAYO , 2005. +# Augustin KIBERWA , 2005. +# Donatien NSENGIYUMVA , 2005. +# Antoine Bigirimana , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.6\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2005-04-04 10:55-0700\n" +"Last-Translator: Steven Michael Murphy \n" +"Language-Team: Kinyarwanda \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "Sibyo kugirango" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "kugirango" + +#: gnulib/lib/argmatch.c:154 +#, fuzzy, c-format +msgid "Valid arguments are:" +msgstr "ingingo" + +#: gnulib/lib/error.c:125 +#, fuzzy +msgid "Unknown system error" +msgstr "Sisitemu Ikosa" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, fuzzy, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s:Ihitamo ni" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, fuzzy, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s:Ihitamo Kwemerera" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, fuzzy, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s:Ihitamo Kwemerera" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, fuzzy, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s:Ihitamo" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, fuzzy, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s:Ihitamo" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, fuzzy, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s:Ihitamo" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, fuzzy, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s:Ihitamo" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, fuzzy, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s:Sibyo Ihitamo" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, fuzzy, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s:Ihitamo" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, fuzzy, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s:Ihitamo ni" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, fuzzy, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s:Ihitamo Kwemerera" + +#: gnulib/lib/human.c:477 +#, fuzzy +msgid "block size" +msgstr "Funga Ingano" + +# basctl/source\basicide\basidesh.src:RID_IMGBTN_REMOVEWATCH.text +#. 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. +#: gnulib/lib/quotearg.c:229 +#, fuzzy +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "H Inzira imvugo" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Inzira imvugo" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Iburira" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +#, fuzzy +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "IMPINDURAGACIRO ni OYA i i Funga Ingano ni i IMPINDURAGACIRO" + +#: find/find.c:207 +#, fuzzy +msgid "cannot get current directory" +msgstr "Kubona KIGEZWEHO bushyinguro" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "Kubona KIGEZWEHO bushyinguro" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, fuzzy, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%sByahinduwe Bya ki/ bishaje APAREYE Umubare Gishya APAREYE Umubare Ubwoko " +"ni indango" + +#: find/find.c:534 +#, fuzzy, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%sByahinduwe Bya ki/ bishaje Umubare Gishya Umubare Ubwoko ni indango" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "itazwi" + +#: find/parser.c:469 +#, fuzzy, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"Iburira i Ihitamo Nyuma a Ihitamo Amahitamo OYA Mbere Nka Nka Nyuma " +"Amahitamo Mbere Ikindi ingingo" + +#: find/parser.c:754 +#, fuzzy +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "Iburira i D Ihitamo ni Bitemewe. Gukoresha Ubujyakuzimu i ni a" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"Mburabuzi Inzira ni i KIGEZWEHO bushyinguro Mburabuzi imvugo ni Gicurasi Bya " +"Mukoresha Na ni Oya Ibindi OYA a Na" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"Mburabuzi Inzira ni i KIGEZWEHO bushyinguro Mburabuzi imvugo ni Gicurasi Bya " +"Mukoresha Na ni Oya Ibindi OYA a Na" + +#: find/parser.c:1048 +#, fuzzy +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"o Cyangwa Amahitamo Buri gihe NIBYO Amahitamo Buri gihe NIBYO Mbere Ikindi " +"Ifashayobora Verisiyo Cyangwa Cyangwa" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "-ubusa SIBYO Itsinda amahuza Izina:" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "-Inzira Ingano NIBYO Ubwoko UID Ukoresha:" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +#, fuzzy +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "org." + +#: find/parser.c:1123 +#, fuzzy +msgid "sanity check of the fnmatch() library function failed." +msgstr "Kugenzura... Bya i Isomero Umumaro Byanze" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +#, fuzzy +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "Iburira i ni Bitemewe. Gukoresha" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "Sibyo Ubwoko" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +#, fuzzy +msgid "invalid null argument to -size" +msgstr "Sibyo NTAGIHARI Kuri Ingano" + +#: find/parser.c:2022 +#, fuzzy, c-format +msgid "invalid -size type `%c'" +msgstr "Sibyo Ingano Ubwoko" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "Sibyo Kuri" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "Sibyo kugirango" + +#: find/parser.c:2366 +#, fuzzy, c-format +msgid "GNU find version %s\n" +msgstr "Gushaka Verisiyo" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "Verisiyo" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, fuzzy, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "Iburira" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, fuzzy, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "Iburira Imiterere" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "ni Binini kugirango" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, fuzzy, c-format +msgid "< %s ... %s > ? " +msgstr "<%s...%s>CYOSE" + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "" + +#: find/pred.c:1935 +#, fuzzy, c-format +msgid "error waiting for %s" +msgstr "Ikosa Tegereza kugirango" + +#: find/pred.c:1944 +#, fuzzy, c-format +msgid "%s terminated by signal %d" +msgstr "%sku" + +# sc/source\ui\src\namedlg.src:RID_SCDLG_NAMES.STR_INVALIDSYMBOL.text +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +#, fuzzy +msgid "invalid expression" +msgstr "Imvugo itariyo" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "Birenga" + +# sc/source\ui\src\namedlg.src:RID_SCDLG_NAMES.STR_INVALIDSYMBOL.text +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "Imvugo itariyo" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +# sc/source\ui\src\namedlg.src:RID_SCDLG_NAMES.STR_INVALIDSYMBOL.text +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "Imvugo itariyo" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +#, fuzzy +msgid "oops -- invalid expression type!" +msgstr "Sibyo imvugo Ubwoko" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "Sibyo imvugo Ubwoko" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "Inzira imvugo" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "Sibyo" + +#: find/tree.c:1259 +#, fuzzy, c-format +msgid "invalid predicate `%s'" +msgstr "Sibyo" + +#: find/tree.c:1264 +#, fuzzy, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "Sibyo Kuri" + +#: find/tree.c:1271 +#, fuzzy, c-format +msgid "missing argument to `%s'" +msgstr "Ibuze Kuri" + +# sc/source\ui\src\namedlg.src:RID_SCDLG_NAMES.STR_INVALIDSYMBOL.text +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "Imvugo itariyo" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "Birenga" + +#: find/tree.c:1353 +#, fuzzy +msgid "unexpected extra predicate" +msgstr "Birenga" + +#: find/tree.c:1469 +#, fuzzy +msgid "oops -- invalid default insertion of and!" +msgstr "Sibyo Mburabuzi Iyinjizamo Bya Na" + +#: locate/code.c:132 +#, fuzzy, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "Verisiyo Ifashayobora Cyangwa IDOSIYE Urutonde" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "org." + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "Verisiyo" + +#: locate/locate.c:156 +msgid "days" +msgstr "iminsi" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "Sibyo Kuri" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"Iburira Ububikoshingiro Inzira Kirimo a Nyobora ni OYA a Byemewe " +"Ububikoshingiro Izina:" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "Ububikoshingiro ni Cyangwa Sibyo" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "Ububikoshingiro ni Cyangwa Sibyo" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"D Inzira Ububikoshingiro Inzira E i Kwirengagiza L Verisiyo Ifashayobora " +"Ishusho" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, fuzzy, c-format +msgid "GNU locate version %s\n" +msgstr "Verisiyo" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "Kuri" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "Iburira Ububikoshingiro ni Birenzeho ki/ bishaje" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +#, fuzzy +msgid "environment is too large for exec" +msgstr "ni Binini kugirango" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, fuzzy, c-format +msgid "GNU xargs version %s\n" +msgstr "Verisiyo" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Ibihinduka Hejuru" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Ntoya Na Nkuru Imbibi ku Uburebure" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Ntoya Na Nkuru Imbibi ku Uburebure" + +#: xargs/xargs.c:697 +#, fuzzy, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Uburebure Bya Komandi: Twebwe Gukoresha" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Bya Komandi: Twebwe ikoresha" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, fuzzy, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"Gushyiraho akugarizo ku Mburabuzi Bidasanzwe Kuri Gukoresha i 0 Ihitamo" + +# #-#-#-#-# officecfg.pot (PACKAGE VERSION) #-#-#-#-# +# officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.UnderLine..2.text +# #-#-#-#-# officecfg.pot (PACKAGE VERSION) #-#-#-#-# +# officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.Strikeout..2.text +#: xargs/xargs.c:842 xargs/xargs.c:935 +#, fuzzy +msgid "double" +msgstr "MAHARAKUBIRI" + +# #-#-#-#-# officecfg.pot (PACKAGE VERSION) #-#-#-#-# +# officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.UnderLine..1.text +# #-#-#-#-# officecfg.pot (PACKAGE VERSION) #-#-#-#-# +# officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.Strikeout..1.text +#: xargs/xargs.c:842 xargs/xargs.c:935 +#, fuzzy +msgid "single" +msgstr "UMWE" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +#, fuzzy +msgid "argument line too long" +msgstr "Umurongo" + +#: xargs/xargs.c:1194 +#, fuzzy +msgid "error waiting for child process" +msgstr "Ikosa Tegereza kugirango" + +#: xargs/xargs.c:1210 +#, fuzzy, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s:Na: Imimerere" + +#: xargs/xargs.c:1212 +#, fuzzy, c-format +msgid "%s: stopped by signal %d" +msgstr "%s:Kyahagariswe ku" + +#: xargs/xargs.c:1214 +#, fuzzy, c-format +msgid "%s: terminated by signal %d" +msgstr "%s:ku" + +#: xargs/xargs.c:1267 +#, fuzzy, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s:Sibyo Umubare kugirango" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s:Agaciro kugirango Ihitamo" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s:Agaciro kugirango Ihitamo" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"E i Gusimbura L KININI Imirongo N KININI S KININI KININI NTAGIHARI Gusimbura " +"Gusimbura KININI Imirongo KININI Imirongo Biganira KININI KININI Gusohoka " +"KININI KININI KININI KININI Oya Gukoresha NIBA ubusa Verisiyo Ifashayobora " +"Komandi: ingingo" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "Sibyo imvugo Ubwoko" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "Sibyo imvugo Ubwoko" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "Kuri" + +#~ msgid "Success" +#~ msgstr "Ibyatunganye" + +#, fuzzy +#~ msgid "No match" +#~ msgstr "BIHUYE" + +#, fuzzy +#~ msgid "Invalid regular expression" +#~ msgstr "Ibisanzwe imvugo" + +#, fuzzy +#~ msgid "Invalid collation character" +#~ msgstr "Inyuguti" + +#, fuzzy +#~ msgid "Invalid character class name" +#~ msgstr "Inyuguti ishuri Izina:" + +#, fuzzy +#~ msgid "Invalid back reference" +#~ msgstr "Inyuma Indango" + +#, fuzzy +#~ msgid "Unmatched [ or [^" +#~ msgstr "Cyangwa" + +#, fuzzy +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Cyangwa" + +#, fuzzy +#~ msgid "Unmatched \\{" +#~ msgstr "Cyangwa" + +#, fuzzy +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Ibikubiyemo Bya" + +#, fuzzy +#~ msgid "Invalid range end" +#~ msgstr "Urutonde Impera" + +#, fuzzy +#~ msgid "Memory exhausted" +#~ msgstr "Kitaboneka Ububiko" + +#, fuzzy +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Ibisanzwe imvugo" + +#, fuzzy +#~ msgid "Premature end of regular expression" +#~ msgstr "Impera Bya Ibisanzwe imvugo" + +#, fuzzy +#~ msgid "Regular expression too big" +#~ msgstr "imvugo" + +#, fuzzy +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Cyangwa" + +#, fuzzy +#~ msgid "No previous regular expression" +#~ msgstr "Ibanjirije Ibisanzwe imvugo" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "YEGO Gucapa LS" + +# #-#-#-#-# dbaccess.pot (PACKAGE VERSION) #-#-#-#-# +# #-#-#-#-# dbaccess.pot (PACKAGE VERSION) #-#-#-#-# +#, fuzzy +#~ msgid " type: %s %s " +#~ msgstr "Ubwoko" + +#, fuzzy +#~ msgid "left:\n" +#~ msgstr "Ibumoso:" + +#, fuzzy +#~ msgid "right:\n" +#~ msgstr "Iburyo:" + +#, fuzzy +#~ msgid "error in %s: %s" +#~ msgstr "Ikosa in" + +#, fuzzy +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "Iburira Ububikoshingiro Inzira Kirimo a ni OYA a Byemewe Ububikoshingiro " +#~ "Izina:" + +#, fuzzy +#~ msgid "command too long" +#~ msgstr "Komandi:" + +#, fuzzy +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "OYA UMWE muri Urutonde Ingano" + +#, fuzzy +#~ msgid "argument list too long" +#~ msgstr "Urutonde" diff --git a/po/sk.gmo b/po/sk.gmo new file mode 100644 index 0000000000000000000000000000000000000000..a930f5fd276657bcf17f83d96d0d0d5d2ccbb706 GIT binary patch literal 13759 zcmcJVeT*FEUB{;-X_8Ia(zJy4=5dJeU464YyUyEP;>NMhjT`&yp3hEVC)l$)v$x}& zm(9HFd6%}3B7{X`3RT-bS|Rn6R$vLM2#Np;n~L@EPYZv5DnLc>2a2i|QK>?pO05K+ z-}B7O?%k~&M}n2+zBAAJ^ZWgt-`jKla{nElwfMcn^K(2udb?%)3i!`=@`v9)-epuX!2;6nIWle)i;6?Cb;Lm_}-eXxQsK8gi&wvku@2FYUPlG!_>Az5Xx4{{{ zKMDRk_!V$F_%}uQe}XpO>Rujj5&T6k27e0t9Qd=~SHK6suNV05pserS`z-4N;3MGM zz;ob_gAGvjm4f$!p9S9s{yr${yaql1{sZ_E;P*fo|BiPu7Wgpu7PoODEs^-DEs*?_>*9b!GwPgfx?HU zK&q@W;Bhblg`R&2z90M!DC@YJ!KT0mL8*Th6uu2D}7*1^jjJ zDP{IO1ch$@0m^>wWl*NFc7sBfqu?)qtDwyPg`)gx;0O8sE+}&SekPax3!wDx6!;sU z;`{XiZ-8~a-vD=k?_=<{fd@fE$vOlo@Oe=9bOD5A)~7&7XT1)JT>k|KE3Cf*WxQ{L z9|0d=k$XW0bQ$<_U=92si~AJi@7Q6^$>+d`?>_`(o(B-#N`qhoyu6gmAW$Wp9tfOml32k!>|8x(o?A5iwU zlMiWk5R`8p6#je?+y;IT6gvGCDDv|6AYCmrWBBkKDE$&p=@PQVF#) zetdtAWeq@ukh}zb0bBxq08(W=$Kr&}p8&rN{y8Y?SVKuMj6UPff=}}ZJ*7^5A`5TV zZ-$O+NB=&;U*W?u=2M?dma1vRl-7x&{4P+=gYa5@AL5boE5FBiw(*EO%TLa2`4e8r zPh?xxEi`$NM`$TO;Q^wgf2u&?!}#yre6T(17?03i^tH&wVIJX?{GQ@j&~N6C&5!k(M6BRNAX(*#lMzw0y&)O<$d#dfPv{l2; zRO)5*8hzrHT5bEy_IO7MGB52qO;3hh^15-7sYbq%sw`Gd@?y9A$jvi9NS|Jb@_L-C z?32Mc z*>UQpnTlI;D(-rT!w_sX?q+o3g>`0t>>NT!*<8(n2GAt*BPa7*)#$6#Ux}PRZFi{> z0=1oJg&H?!$`$2Z@S1FfWk3w7r{aJ*uje;C73E>WOVswjoe`=}DsK6Km-f@l3su(d zda{@8>9jhNc#IafFW>&0eiXY~r`%e48#B(aE12jS&Zn7^<*C~9$RqR0X~0dk&9df{ z9|YbClri*Fwym}|g?`jTJty$pk^rqZQTFy`(Qspvt(}XKbK9HS(;doL5)7@qGla+ zF8E;{s=$j@P*fcHW*mm1LRQgNnl|W?9C7WdJe96Oq+=1EF-q5uI8G6|fsViYaoKX3 zcSS{(r_C0H!gNBUomQbfr)2yLZQW7bBwi84$7s;t0%vjBXxEt9;c zy3UHHoJ_T|tUI@BSL*bfD015MLI>|saWbR)mg>j3YCAntNz9fSXvQYf&1g;NMXn6x zg^nNGN}XHFla#k%a5KnVHd}D|`2OW*;cU-O;z&-l>N$xoe4Z&Rix!F$9h(U8gxC#H z&BFD{E2fMwN6;*F*#f~6WZk4afep~+iN<~mu^}IIjS3HEYQcaX~B~r zICcnSShs%ZOtknifBP@KY@M@8w?Wyi7kDTbYrer6WO$P7M1Rg5EOBTb>7StA*@n&>0g zh~n>*?<-!m)d#d(r=MDGoWl@n{OG|xJs0yBb_-Q3E&poO@x^b^){GTyEo`=Z%o=PK zZD*AZjIB?f_RR1{c2wonRuE}1kPKONsjAM2f527+tJ;x=I-zJ@9cH0ex(i*DfYu4I z)@RC5JEnK2G!DJhwudHcdQb?%P0?m5d(!Svfrv2 z58L&%-PC&syq*{6AONSfIAUYoWZTEXPMYn$r5keA2^Zd^W$5F=!y?ZJHn$v6*m%@a+ui9mZAF7JK2TGx*Gw=TvMwml^jr^v&7l$_ zEGi=G27Z$$$gl!48KavMt@qT5-}9pBx#ECLsf8DgFR5ux_%`#Zlr22d#Y)3&2G%co zXeH%Rz)bSGrx>RwjyJbM@^rJR=Sc%MoA4}k3JU=26Cs^g=V8U{5dJc`nN9GWm z*{xVR*EkC+-USi%S}hXyYjWQil_H*g%NKvtL;4XvA%KW&5t5}91<;FK+$3XXlpQ)3 zOu>*R0fu zM1eQk9>x^^K4esp(KhQP}uVr~*i59p-3^w+OhbqOZZRohEPII|zTMme(?xfOX z)4*Y|y|7&E#=%A#vam^7Z6Os1QGyjMwFgz&BLOwpX@S~&CCAFni(6TqZCzrHk(Myz z4|QN%^gJR?PPKDtY&E2sEkxT|Eq#rXk$*uu9J0z3kHGlhZY&XGng2)wCv8)Uw-@Im zG$i3*+Pm>Ip5wAOfuZL_92I%p!D2;~uM+QSKLGc%uRMv4B&1-8hIP37TDUZ&P*B>R zFrE*iYEK1)h=G&HMWk?tU9ks4K`sJch{MGGT6sX4B2nn1wu2(vVW(_JbnOm?+8>ah z5FZ$I+^>9gye_(m(vnDs7@<3($z@^^A=(Z-vji5Um+~>)PT7YBr)7)v5haZ!7PTNF z%4*Yo*oaYlV$?gd9<`NPyNWQ;keq1rrsPlNRoD38GJl~9Bn0B%jyqnS3Y?5hiF$R6 zmuusLqGuhHLCZvdW2=)Hi-@jtL-hgG-ZZCF6oc{Z(+tlY^Vq~bR$?OEE9vBvlqsj1 zt$XYk6^kDmY(o_7rA>z{&bgPwS*YgQ(8L6`MM?`6;va0^(7H0&BQ+}vMhc4<-f0P` z9E^WtmqkTVgjUcM=b%*jA{D~RF?%q@NL8328L+MT9OH%?vg(Ogq&Fh%W!Kn*#ST5Ti1=6fb2iex~BtDM=WFL0zQzpWfFrr8r zs=f6+^*wuw%%XiXMM>JvkYBWy<2fDkR!z(NV(s{`W%~d^Ar{dl_J4-`*iQJte6-MnIv1cE*XZNVtN9G=RbmuHRYe$?kvzHTe1iOfn zIdv4z2j^(n3p$Q^GSpvBXYy4~JNsxKt>i>t_Oj=MbLvD8_neM;GVR#@?#H92C9+EE z9IX6;ZhrLe(S_00ch_fY2T0x$li15xXUY0p$aZxDvbpm*jY~fEsguix?8is#WNj@k zu@|CdEWzuXdfX;;D_L8Sq(M69F3`EV3*x7*20E?7&OX*0a48<7Vkj>2KU zzZqT&c|YIludl7I4X=cf6OKcj5gw=x^cY?{qWy3WDonRTldQsXLUJi3P z;+?>8^P7x+6XMG@N*6C0t|{Vy%u$fa>16qEEx?7=D`dv`$`^zrsyDorI0I=}WTT6M zaQM~r>nNOfKxoa@o%JuPfk{XY*C1Bhn^8S9tJfeUz+`ccv+Z=6{_u)PN9XY8#w8)U z&PB5Z(iUYpdcf{=RX4tIiNo6K(^_VU$OpmcDe>`!m(`6+!z)k+S_q##U90obaqkwj z_#!GDUM1@*&Dya}Drn-eO`WKYU5r7MsD7)f@$GyNu+FV38LxRut03<=MlV*3$U-lj zzD6RFe0>eU4=u@4M`Xt!J@i|H1vjoES;QP=7Mog5cQi&G`kQvSP?ne^m&t&PFUnPeL41pI@v7O8+nLZKPL0SwIm*JoFZq8Z-&Mt zOC~iK%WSt}h|8(o$WQS_33?omosXrrZ>Ra2<+z7y1AQJLSr3nq@QTAPX9#_Byb!|6 zs)uiyMd%5CQ<{6APxFK<_jrZ4M1f9nkC#?C?y~TdcjI~|PT8Y&o>*BQwb8zTKoyF^ zB)n0`aj(dDi{f*Xd*kZ*bqpLT{7T0eU@Ww@zp9LmBLoQxZ5)uH>WUBzuZY4c(%?tP z_aWH)MK`9MekKV!k>S`S2aZkDI?kl8&|M}6egHE8W3(29V#0TFx}rs=92CCinh!jj zj3`NNBV#uu09n5%1NzQ1!-p|$FscC46LtEvatzUe&GztGLrX&CH;5IwX_|ba{h6sj z@kY!gVh6c2JQeEbwRF_#>MD-B8{;NKVkk)xb}~}k*e>rp>snva>B++8)oyY<`u}h9 zto>VzoA3qIFGgkk%Mg#Vf~i3<@dl|SxWiQ^eLsV3iB;r#(xc%Gx}NAPWEsCglJ%H) z-^Y6plg2pkwGcL8PF>;brI1F*r1`Uc5hic7wQ9iC!1|h=zFbI|wa2PS0LM%-N=)te zNRq)r z@Kt>ufQ&Umd#+I5GVEGsl+ng@7)fd?Qe_D(?i!&+=BF{Jz<}!11NwrRVma zuI>fO?=rQo%7QKT0#${wN$QxZld`PrEwn7lxER>zxj?Vd&k;EgdrRg(JW#G9_%@Yt z4JTwrZwCJQnsNhlvNh@{-O3AtO{a+Y3fp5mUoi_9*Unh^fZ$4mW2;WFT;$r4qwi-j zVX4=&CaYGXXGEW26tr`V+VU)kT|}UKl%LZPxx zO6VZ5uckU=K=pF9+{KBXImM*}XJ-_#UNgRkF~fkT3=A_ht2++Z%zU8)oL>(?V867CN-6=Gz@?l1;HzfIUuw{*@YU1DPLBvyI+5=0xF2KUscRvg6*w;ubeFslkHq1EWBW2-ZG8`m8h z2rR}O_+NRRqU1UA#Mc*5@9ZBJ$q~WQ(LjCU)Rlj(#{BaQRF%BZ@CxEcJVJU)Nn&yk zk4dODS3QYR^G$<`nly&ExER^Ew`=UpgdJjMt38n#9J_7YG^9@01j8$wrs9ZohgTw} ziPJ>j)+w$_Hc)qCj;BbM5cxE53Gg_Hq9w7w-JHHV+0a$=eSnKFI!fX};e-{=rVlHN z0PPywz=bhKj_fo_v3S?, 2002, 2003, 2004, 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.24\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2005-08-02 05:56+0200\n" +"Last-Translator: Marcel Telka \n" +"Language-Team: Slovak \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "neplatný parameter %s pre %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "nejednoznačný parameter %s pre %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Platné parametre sú:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Neznáma systémova chyba" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: voľba `%s' je nejednoznačná\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: voľba `--%s' neumožňuje parameter\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: voľba `%c%s' neumožňuje parameter\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: voľba `%s' vyžaduje parameter\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: nerozpoznaná voľba `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: nerozpoznaná voľba `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: nepovolená voľba -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: neplatná voľba -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: voľba vyžaduje parameter -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: voľba `-W %s' je nejednoznačná\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: voľba `-W %s' neumožňuje použiÅ¥ parameter\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "veľkosÅ¥ bloku" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yYaAáÁ]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Použitie: %s [-H] [-L] [-P] [cesta...] [výraz]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Použitie: %s [cesta...] [výraz]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "upozornenie: nerozlíšený prepínací znak `\\%c'" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Premenná prostredia FIND_BLOCK_SIZE je nepodporovaná, jediná vec, ktorá " +"ovplyvňuje veľkosÅ¥ bloku je premenná prostredia POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "nemôžem zistiÅ¥ aktuálny adresár" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "nemôžem zistiÅ¥ aktuálny adresár" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Upozornenie: súborový systém %s bol nedávno odpojený." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Upozornenie: súborový systém %s bol nedávno pripojený." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s zmenený počas vykonávania %s (staré číslo zariadenia %ld, nové číslo " +"zariadenia %ld, typ súborového systému je %s) [odk %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s zmenený počas vykonávania %s (staré číslo i-uzla %ld, nové číslo i-uzla " +"%ld, typ súborového systému je %s) [odk %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Symbolický odkaz `%s' je časÅ¥ou slučky v hierarchii adresárov; už sme " +"navÅ¡tívili adresár, na ktorý ukazuje." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Zdetekovaná slučka na súborovom systéme; `%s' má rovnaké číslo zariadenia a " +"i-uzil ako adresár %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "vyÅ¡Å¡ia úroveň v hierarchii súborového systému" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "úrovne nad hierarchiou súborového systému" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "upozornenie: nenasledujem symbolický odkaz %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"UPOZORNENIE: Počet hardvérových odkazov je zlý pre %s: to môže byÅ¥ chybou vo " +"vaÅ¡om ovládači súborového systému. Automaticky zappnúť voľbu -noleaf pre " +"find. Predchádzajúce výsledky mohli zlyhaÅ¥ pri vkladaní adresárov, ktoré " +"mali byÅ¥ prehľadané." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "neznámy" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"upozornenie: zadali ste voľbu %s po parametri %s, ktorý nemá voľby, ale " +"voľby nie sú pozičné (%s postihuje testy zadané predtým a tiež tie, ktoré sú " +"zadané potom). Prosím, zadajte voľby pred ostatnými parametrami.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"upozornenie: voľby -d je neodporúčaná; prosím použite namiesto nej -depth, " +"pretože táto spĺňa požiadavky POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"implicitná cesta je aktuálny adresár; implicitný výraz je -print\n" +"výraz môže pozostávaÅ¥ z: operátorov, volieb, testov a akcií:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operátory (klesajúca priorita; -and je implicitný, ak nie je zadaný iný):\n" +" ( VÝRAZ ) ! VÝRAZ -not VÝRAZ VÝRAZ1 -a VÝRAZ2 VÝRAZ1 -and VÝRAZ2\n" +" VÝRAZ1 -o VÝRAZ2 VÝRAZ1 - or VÝRAZ2 VÝRAZ1 , VÝRAZ2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"pozičné voľby (vždy pravda): -daystart -follow -regextype\n" +"\n" +"obyčajné voľby (vždy pravda, zadané pred ostatnými výrazmi):\n" +" -depth --help -maxdepth ÚROVNE -mindepth ÚROVNE -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"testy (N môže byt +N alebo -N alebo N): -amin N -anewer SÚBOR -atime N -cmin " +"N\n" +" -cnewer SÚBOR -ctime N -empty -false -fstype TYP -gid N -group NÁZOV\n" +" -ilname VZOR -iname VZOR -inum N -iwholename VZOR -iregex VZOR\n" +" -links N -lname VZOR -mmin N -mtime N -name VZOR -newer SÚBOR" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path VZOR -perm [+-]MÓD -regex VZOR\n" +" -wholename VZOR -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user MENO -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"akcie: -delete -print0 -printf FORMÁT -fprintf SÚBOR FORMÁT -print \n" +" -fprint0 SÚBOR -fprint SÚBOR -ls -fls SÚBOR -prune -quit\n" +" -exec PRÍKAZ ; -exec PRÍKAZ {} + -ok PRÍKAZ ;\n" +" -execdir PRÍKAZ ; - execdir PRÍKAZ {} + -okdir PRÍKAZ ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Chyby môžete oznamovaÅ¥ (a sledovaÅ¥ postup ich odstraňovania) pomocou " +"stránky\n" +"oznamovania chýb pre findutils na http://savannah.gnu.org/ (iba anglicky),\n" +"alebo, ak nemáte prístup k www, odoslaním elektronickej poÅ¡ty na adresu\n" +" (iba anglicky).\n" +"Komentáre k slovenskému prekladu zasielajte na adresu ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "kontrola správnosti knižničnej funkcie fnmatch() zlyhala." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"upozornenie: Unixové názvy súborov väčšinou neobsahujú lomky (hoci názvy " +"ciest áno). To znamená, že '%s %s' bude pravdepodobne stále vyhodnotené ako " +"zlyhanie v tomto systéme. Viac použiteľným testom môže byÅ¥ '-wholename', " +"alebo možno '-samefile'. Alebo, ak používate GNU grep, môžete použiÅ¥ " +"'find ... -print0 | grep -FzZ %s'." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"upozornenie: predikát -ipath neodporúčaný; použite namiesto neho -iwholename." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Nepodarilo sa otvoriÅ¥ vstupný súbor `%s'" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "neplatný mód `%s'" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "neplatný prázdny parameter pre -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "neplatný typ -size `%c'" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "neplatný parameter `%s' pre `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "neplatný parameter %s pre %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find verzia %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils verzia %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Povolené vlastnosti: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "upozornenie: nerozlíšený prepínací znak `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "upozornenie: nerozpoznaná formátovacia direktíva '%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Aktuálny adresár je súčasÅ¥ou premennej prostredia PATH, čo nie je bezpečné v " +"kombinácii s akciou %s vyhľadania. Prosím, odstráňte aktuálny adresár z " +"vaÅ¡ej premennej $PATH (to znamená, že odstráňte \".\" alebo začiatočné alebo " +"koncové dvojbodky)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Aktuálny adresár je súčasÅ¥ou premennej prostredia PATH, čo nie je bezpečné v " +"kombinácii s akciou %s vyhľadania. Prosím, odstráňte aktuálny adresár z " +"vaÅ¡ej premennej $PATH (to znamená, že odstráňte \".\" alebo začiatočné alebo " +"koncové dvojbodky)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Nemôžete použiÅ¥ {} vo vnútri názvu nástroja pre -execdir a -okdir, pretože " +"toto je potenciálny bezpečnostný problém." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Len jeden výskyt {} je podporovaný s -exec%s ... +" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "prostredie je príliÅ¡ veľké na vykonanie" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Nepodarilo sa otvoriÅ¥ vstupný súbor `%s'" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "nemôžem vykonaÅ¥ fork" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "chyba pri čakaní na %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s ukončený signálom %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "neplatný výraz" + +#: find/tree.c:101 +#, fuzzy, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "neplatný výraz; použili ste binárny operátor bez operandu pred ním." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "neočakávaný predikát navyÅ¡e" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "neplatný výraz; máte príliÅ¡ veľa ')'" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "neplatný výraz; očakával som, že niekde nájdem ')', ale nenaÅ¡iel som." + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "neplatný výraz; máte príliÅ¡ veľa ')'" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "neplatný výraz; očakával som, že niekde nájdem ')', ale nenaÅ¡iel som." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "ach -- neplatný typ výrazu!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "ach -- neplatný typ výrazu (%d)!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "cesty musia byÅ¥ pred výrazom" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "neplatný predikát `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "neplatný predikát `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "neplatný parameter `%s' pre `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "chýbajúci parameter pre `%s'" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "neplatný výraz; máte príliÅ¡ veľa ')'" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "neočakávaný predikát navyÅ¡e" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "neočakávaný predikát navyÅ¡e" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "chyba -- neplatné implicitné vloženie logického súčinu (and)!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Použitie: %s [--version | --help]\n" +"alebo %s most_common_bigrams < zoznam-súborov > databáza-umiestnení\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Správy o chybách zasielajte na adresu (iba " +"anglicky).\n" +"Komentáre k slovenskému prekladu zasielajte na adresu .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils verzia %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dní" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "neplatný parameter `%s' pre `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "databáza pre locate `%s' je poÅ¡kodená alebo neplatná" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "VeľkosÅ¥ databázy vyhľadávania: %s bajtov\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Názvy súborov: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Názvy súborov: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "s celkovou dĺžkou %s bajtov" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tz ktorých %s obsahuje medzery, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s obsahuje znak konca riadku, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\ta %s obsahujú znaky s nastaveným najvyšším bitom.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Kompresný pomer %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Kompresný pomer %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "databáza pre locate `%s' je poÅ¡kodená alebo neplatná" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Databáza %s je vo formáte %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Použitie: %s [-d cesta | --database=cesta] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYP]\n" +" [--version] [--help]\n" +" vzor...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locale verzia %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "parameter pre --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"upozornenie: databáza umiestnení môže byÅ¥ načítaná len raz zo Å¡tandardného " +"vstupu." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "upozornenie: databáza `%s' je starÅ¡ia ako %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "prostredie je príliÅ¡ veľké na vykonanie" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs verzia %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Nepodarilo sa otvoriÅ¥ vstupný súbor `%s'" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "VaÅ¡e premenné prostredia zaberajú %ld byjtov\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Dolné a horné POSIX limity pre dĺžku parametrov: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Dolné a horné POSIX limity pre dĺžku parametrov: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Maximálna dĺžka príkazu, ktorú môžeme momentálne používaÅ¥: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "VeľkosÅ¥ vyrovnávacej pamäte príkazov, ktorú práve používame: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"nezodpovedajúce úvodzovky %s; Å¡tandardne sú úvodzovky Å¡peciálne pre xargs, " +"pokiaľ nepoužijete voľbu -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dvojitý" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "jednoduchý" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "riadok s parametrom je príliÅ¡ dlhý" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "chyba pri zápise do procesu potomka" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: ukončený so stavom 255; preruÅ¡ujem" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: zastavený signálom %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: ukončený signálom %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: neplatné číslo pre voľbu -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: hodnota pre voľbu -%c by mala byÅ¥ >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: hodnota pre voľbu -%c by mala byÅ¥ < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Použitie: %s [-0prtx] [-e[eof-reÅ¥]] [-i[nahr-reÅ¥]] [-l[max-riadkov]]\n" +" [-n max-param] [-s max-znakov] [-P max-proc] [--null] [--eof[=eof-" +"reÅ¥]]\n" +" [--replace[=nahr-reÅ¥]] [--max-lines[=max-riadkov]] [--interactive]\n" +" [--max-chars=max-znakov] [--verbose] [--exit] [--max-procs=max-proc]\n" +" [--max-args=max-param] [--no-run-if-empty] [--arg-file=súbor]\n" +" [--version] [--help] [príkaz [počiatočné-parametre]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "ach -- neplatný typ výrazu v mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "ach -- neplatný typ výrazu v mark_type!" + +#~ msgid "old" +#~ msgstr "staré" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "ZmenÅ¡enie arg_max (%ld) na arg_size (%ld)\n" + +#, fuzzy +#~ msgid "Invalid regular expression" +#~ msgstr "neplatný výraz" + +#, fuzzy +#~ msgid "Invalid range end" +#~ msgstr "neplatný výraz" + +#, fuzzy +#~ msgid "Invalid preceding regular expression" +#~ msgstr "neplatný výraz" + +#, fuzzy +#~ msgid "Premature end of regular expression" +#~ msgstr "neplatný výraz" + +#, fuzzy +#~ msgid "Regular expression too big" +#~ msgstr "neplatný výraz" + +#, fuzzy +#~ msgid "No previous regular expression" +#~ msgstr "neplatný výraz" diff --git a/po/sl.gmo b/po/sl.gmo new file mode 100644 index 0000000000000000000000000000000000000000..bd14d850d1f7c56a3c1244a3b6fda0b04ae6e1f6 GIT binary patch literal 14341 zcmchddyHJyUB_=}+BDloXww&ul#|D@yY=45+DV#p)^Xz4>t+*scd^$_W7l=g%-or| zGk5Np-p8zWC~8F2@=R$FRaGGn0VoVGCX-S5n~=lMIo_s@U#wi`a{@zFd#%5&#yJ@4b-;_Lat=l(Z%-fiIf z!Mni=;O*cqfeYXtfIka<4g6s+xXJTU@G0;k;J3g#!S;;j{Sf#Ipp5@Q@%vA~MSg!B zycN9pjh;6P`k=I*0e$c(P=UV>{y6xT;Jd;90DlC$`AwepW8i@T9|L87eek{DXTjHi zFMvM?UIFD?Uj^R=ej9u{_=Y#TeclSbli&A&?*P}p!(a<+fX@_o!&^MB$?p#M6!>SL z?BnFko_8-8f%k#G34Rg$Tksp;FSCiyfFFIUTlXz&;sU?#0A(K^0}q0~0t(%~3<^EJ z1HKN7ZgH4^a<0qZe}Q9A?lEN&+5e|On!MiuA+h%y2+6!JgVOJ>z#G7Cf^y~G0);OB z4f4;smBY(<4uS6iPlIyLJy7oJ6Chjiehb_H{|FSi-^k+c0S|(*j}89JgB?)be;Sng z`%>}ytDxNb|9}d-gT=lA9tUsYfVa^3ef+)^CX#(_f(x`?0A)X);LnZVZ-9@3zYDJN zUYO$m@F<5B`i;ON;J<(;!8r~g{Fs40_&M;Oz^kC}?Xw)>=a}auQ06(WkOlCQ;3D_} zco_Uwa16fpHph=&06)p^KLLLRe1t`0zL!9z_Pz}YAK!9^yN5a`^FI#C`;UYC^PVZ% zuY$7Pzkv#T50lBh9|Spy*8pYQ$3T|!eyzYi24&uV0A>7}A@UD^bx`Es0T5DoYapce zLQwAIDNyG7e9`_zkgN5+0-gZ>5$uBpIE3Kmz!v!0InVofunV%J_wV4n;Jdl}2f;P) zpTSRoUjs)l!;|0{gjCl3L-51kUx2coMK-?-9s}#($G`;q68JjM=TJ9-cY|`SW$@eJ z5fIk!?%`5}f7d{fgBV0ay`Kh!Z$AUFMen!4*Mffzz8-uD6#D)(DD!*=lzwloIeH&1 z@Ci`PIRb^AzY4On_j@2m@cyQFf5Tml&I_RQKVD!6%Kd!`6#jk|!)`Y}tNp;O`k8;geM!j&46}!RiY6v0_`CoszF_;rSqsocXOhh`Hq(;Q{&F zBYdmsK<>z6(D4ydyKf!Z? zNBBoRPw)tB-^_zpSiTS*KFsqV&l`BkkLVKNd)Ui<&hnS5wz^Up&hfm9M|fTC<&8YT zACL2tpNIG&Jo+J?lRWYf9+S@lJonpg?$6DD@b!&6!sqYcDL=5P{T$)%QJzhn8J@TC zh%P8U!q?u+O|z+LnmE&8tm0rR3gbXEyE@U$EJ)HtMGqaf)Kss@TeTHtU6pkM)eSpc z)d(|{23c)}F{Z7yx?!_BJ&=YhNQb%^$h4<}p-D2;$UCXZj5^F0za7S{JPV`rp-!CF zOwu_bleL1j&ZA5XHLHd6X2E8jBte|1R+t3M%p}{(s_YhA9wtGWh9;KI{xAvSY-Xx) zptt43X_#ipwClFA?BROnDpKHzG`>$d_|8Xwry0=&KzUB`1 z+uSrk)65Kqd)cx6GOSuxd5qMUP8^OISrJO8>Zr5tdrJiOo;%C~we#{++BG>G-U!rT zVbJU9dE^1tbgJ#$cnVW6YyzgP~@*53SEPQ@4h~i zm{nX(rG2R8opcP*D)}!(O6s!H#x`bQ#yh1ihl6~eq9E>IkWlVTGZ=`e*kUy+1K5ll zwY07BRECN$tjGK`7}qdnMd2F;{^U;yYp3~8Okt^2eK8y?C&F;RE6n7)%nt>deKkx> zM+_XZ!Rwbf<$|-KqflF#R8~}){lwZ?dd&=VCr~<5-7Fi{@4741BOS-OTPtksT@Ywd zg>AKMa@Ex%Oorh|4J=@jFMBQokF`soIP{?76VYkdt4_mr>fhb#a5WUt5b;E z!(j0-BfkuJ-Jdf+BP*~NndtZa$Sl6#g7P2w#^?qnk8~HiI3Zom1E^x z>e%|JQ%Bd1t7T=CNc9_{98jFLYFM5gCgj*Pa=NJ;Jl(cD<5dn-<#!45h)*z^dL=6; z8&71$z%%%URWlC14>w^dy$O$dP4p4h$Q=Fhdnd^Dimlhu+o{(wITzwhiyqf!*J2%a z-9i=5^1s^Bq4=le4)-=TyCLoi*DTu3D;-teN}u(>@jK_L_Ub5;LzhFUS5Jx`$WaBW zfs;sNpQdHC%0}^MF5^Df?K0dtG+NCq%&F82f-THjfNGcE2S-{oN+4<^sO>vprOkyh zn5k`hF5=kY^?zU$;BI|^O zuh4T45~^`6712t188d|EeU@<%LmA#-KLZT53#+h-w|TpJPAKdmr}^2|!YlToLm3CE z`Bu8aKtnZP+HKX&V;kwKHm;3WBj-PQ zHWi@e*A&``)2ah&;syBj@0w6ia{{#{R~BqR1E-0)9_k0S5DIdmx#%xe&V4@^Hvu+ z?s{i$x$Ij`h^FqRGGy1pgW`CDa<@Atn;gi)CRw!wSHMIGRdGFI$I0cA4T4I6u5) zBvVl4xzb3dUEbpDnViIxB$izNmRZ1a+!QBp5a<|Dk*{-XR#f>Gc@66a;GS-)K!Pz* zjiRFM)#376=CYJRL0Nyoc|Oc)Jrxup22LVW;leq;x*iM#IVXG}go*RD^N4g*qR>fQ zjUt@$Qw}7$c8;lzMueE+1EY?&E1w;&i=m>lB;qAT7%p0JxtK(VHfL9sz@qe0K5F|Z z|HSyb9I-Z`q_f1L7Gy@*ZMr>Z7!;ov^*+5PedVoRWfIVkNHls=@?^_u==^Y5zt9B| z0wK85j#r=}ok`rxVC}qIA0HGwt5F7R7wJ#!PF5@;_tFiu0&2Z!q*N4x^X}6O&mHsF z#6DJRBEu{0L`urk;OrzYExEh)mwCqE?4LbcwGE-rylq%OHaZ0qcf-j&HN zk_d>4Y#1&qay7awq|zAw*e{!kT`@6Zpc<3 z-hoJg;r1rGaqEYf2ul%WxtD~vE`_?&E|kVSC2M12HjPs^$hmSk{v?oQUpC10HWJgr z0rFQ{{yCS)kuai24y$`=hiZrJD>BIbsT3vYKTICk-!yd_^HyEUJo3!O`lf#jrVxwh zlUgDYI<&NOpTG1zf9d_|;QjS`-hW`};L;Ku{nO-VC3!UIC!PF5_p5_<+kT9kIjPgk z-%QXEoWdk^wULAabM<+(K@gB2A?h&B{lJWC!=mA#MrhjMxHf3l@;LOPUM&reFi+gc ziOl@XKo9EbOhm96!}RJf8q`iMJ3(9qei}U_0a#i~30RwAcRN8X4zeRNr&dp`ObB(b zwls5$ls*xRzlklET;S#Gu3*{{;`DEW+ zY+@tBQ5rPzUZBRY?(rjhulKngNEc4eA$|o`xo=Acr%;lNBm|1}P`1+3Ba&|X;$I2{U#^O zsKTC(d)n0x#=0N%@)w^b>P6^m`G5pOSwKL>SS{tOvXw|E~N#{oO@~t-_16pn!sfHY-8%p z^={*^XG;a+u4xIGY?T2r**XKn>4(sBU~H#2Xu*TRQ`(VUOUzJK8)Au9U=BR=f?`J4 z*4`1J&Yo`j&0#xhb>%s!I$U{{at)OSSyCjSRBYO1yC;36C+}M$lMmv3-;Q;cJJi(_ zyJnDV`}MA7YY4Bl^EGz2dt1}wB;kXvi5#&V{r(E2F)?KsFI}am2DE9z`%5cCKb!oIF~-Q3Ht~I0Yl;n(SR5gnHF%JC$0CI{WQnc!CpJUs!Vm@Z2UD!tz{sW{+FRk*+xhX@ zT-%<@T~z%LgTrkL{clDXDC|HOoNM-r~)rvl11s7d%4HPS!OAuC;7dA6> zZyoDok}yIDDo2So)=d)i%H=kwdEszae*%8&M`kFVNA1;)HLc0e(-gTyqQ>}fiSAi1 zRD4rwUBpqV7y%)$S$)aFBS@}z!Q~~CrqC>6mcp)7&%`Ljd}X9mEO3Xpt;$W30>)Y_ z1&rgZM|&5&E6=_98piRXo9mk^j~(4v$0##NuF|ojs$OL&W71HTGbSz9Drua3?CANb zo?(BK^$6u&m8+J8o#_EWsvTph1_~I~H$zlQA5JbA8k5&>5sm2C@?9v`FAB><9qpB^ z(!DHW?34g+gu%tV6Uw`*(Ox01a;GlTfZ@xxByKtejg1%MwPK!;=>euMu5GclX{4pq zSA9vt*y4th8BvdDIiv>-DgwzVuJH!0puj;N(Zsj}UR?MUkRl6*t^iQC{w}`J)XVDB z6`l5biBl(jE0l5Hrf0AL)SiaAR3&XjW?VlChRDH{=N7I!TierF!ZY?e)e|Dy zzSCW?CSzz@?O3Se3L8^fmg~eL%F2ymfkbhKSD%68qiH4J>Ka{~DvwS~{0g0>&Qoon zUoL~rfNNB_5zGL)lZX_1;QVU|_Aurh6tVT+j-FhV>VyoNj4N)-l2ogr#PM={CIt?B z!+C7pP~&il(y)weJ=x{LQi^WZ>?~#rs+Hs&n3kl!hyYuaM6*wUqDt}4tJU+T5mQ&? zaNmnENBP5|Ep*s#Qt7CgNQU~ZwUFiVjd6XZJChRKJ;7qpGUK7aDa-Uyd?6Qxt9h(3 z=fEqKqr}%y_2556;5A=sJVCZI@J<_8+DN9tUPDMVpsMA%ng%x}<@Kqu$LXWz)>fyg z9_8=pqDM8!_fYk4`G@)IE?Z1AG2S~DOd+5sU3dseIPUWw{rW~qk8x&sMfKxeNEBk} zD%F!dq@OOVASXFaa#W*4YqeRmC1G#fCyR1mZBZ&IV$Z+ZQp#lCuTV}|-Pl!4A!kDf{kUM=9UBGD>+EbQzK+`ka&wDI}y( zyx~$~@mgFb$$-F*Bt+=dQ;j4TBh-nmQdqdS$Z**~9KE8JLMAR~#5l(2Nfe2=$0HZL zOB$_AkF29~DxYW-U$9Ie^-+&fXc0>z;=&?K;F5zq6blY?fSPQIn!%IC+wO&3a>bkS zj(J#^WD)A5VXRifT1obT|Gk9o>pU)*n$RWb5e5XJkF6XV7j^QVItDkDy&6QSv;YofpzosaN|4#Wtu8|b)n2aUI7Q)$xh;-IeSE8{Z6=mxxoFBh`go%I~xZc9& zOZ$-!U-FEpE15tvs$N(Uu^@0z5qb^CbyDm6tc2#@hUlkpl|<}GgN z#AOjAoj|}?#)CViDjBn^q`2LZAR8FVjFWwc@gRgHZA{QOsjBRlZ7KveYELu_-KnkM znoQAa#|T$mfhlp;#Js^PxFS?o@N}of6kN_75IYDX2Q3>5aV7SZB&kd5Eje1sD)VB1SrJ-H}7SArLOABXw?, 2000, 2001, 2005, 2006. +# $Id: sl.po,v 1.57 2007/06/09 18:14:30 jay Exp $ +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.27\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-09-28 13:49+0200\n" +"Last-Translator: Primož Peterlin \n" +"Language-Team: Slovenian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "neveljaven argument %s za %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "dvoumen argument %s za %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Veljavni argumenti so:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Neznana sistemska napaka" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: izbira »%s« je dvoumna\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: izbira »--%s« ne dovoljuje argumenta\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: izbira »%c%s« ne dovoljuje argumenta\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: izbira »%s« zahteva argument\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: neprepoznana izbira »--%s«\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: neprepoznana izbira »%c%s«\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: nedovoljena izbira -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: neveljavna izbira -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: izbira zahteva argument -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: izbira »-W %s« je dvoumna\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: izbira »-W %s« ne dovoljuje argumenta\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "velikost bloka" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "»" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "«" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[DdJj]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[Nn]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Uporaba: %s [-H] [-L] [-P] [POT...] [IZRAZ]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Uporaba: %s [POT]... [IZRAZ]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "opozorilo: neprepoznano ubežno zaporedje »\\%c«" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Spremenljivka FIND_BLOCK_SIZE ni podprta; na velikost bloka vpliva " +"spremenljivka POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "trenutnega imenika ni mogoče ugotoviti" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "trenutnega imenika ni mogoče ugotoviti" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Opozorilo: datotečni sistem %s je bil nedavno odklopljen." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Opozorilo: datotečni sistem %s je bil nedavno priklopljen." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s se je spremenila med izvajanjem %s (stara Å¡tevilka enote %ld, nova " +"Å¡tevilka enote %ld, vrsta datotečnega sistema %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s se je spremenila med izvajanjem %s (stara Å¡tevilka inoda %ld, nova " +"Å¡tevilka inoda %ld, vrsta datotečnega sistema %s) [ref %ld]<" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Simbolna povezava »%s« je del zanke v drevesu imenikov; imenik, na katerega " +"kaže, smo že obiskali." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Odkrita zanka v datotečnem sistemu: »%s« ima isto Å¡tevilko enote in inoda " +"kot imenik %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "raven viÅ¡je v datotečni hierarhiji" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "ravni viÅ¡je v datotečni hierarhiji" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "opozorilo: simbolni povezavi %s ne sledimo" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"OPOZORILO: Å tevilo trdih povezav za %s je napačno: lahko gre za napako v " +"gonilniku za vaÅ¡ datotečni sistem. Samodejno vklapljamo izbiro -noleaf. " +"PrejÅ¡nji rezultati so lahko bili napačni, ker v iskanje niso bili vključeni " +"vsi potrebni imeniki." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "neznano" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"opozorilo: izbiro %s ste navedli za neizbirnim argumentom %s, vendar izbire " +"niso pozicijske (%s vpliva na teste, navadene pred njo in za njo). Prosimo, " +"navedite izbire pred drugimi argumenti.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"opozorilo: raba izbire -d je odsvetovana; zaradi skladnosti s POSIX namesto " +"nje priporočamo -depth." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"privzeta pot je trenutni imenik; privzeti izraz je -print\n" +"izraz lahko sestavljajo: operatorji, izbire, testi in dejanja:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operatorji (po padajoči prednosti; če ni podano nič drugega, se privzame -" +"and):\n" +" ( IZRAZ ) ! IZRAZ -not IZRAZ IZRAZ1 -a IZRAZ2 IZRAZ1 -and -" +"IZRAZ2\n" +" IZRAZ1 -o IZRAZ2 IZRAZ1 -or IZRAZ2 IZRAZ1 , IZRAZ2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"pozicijske izbire (vedno resnične): -daystart -follow -regextype\n" +"\n" +"navadne izbire (vedno resnične, navedene pred drugimi izrazi): \n" +" -depth --help -maxdepth RAVNI -mindepth RAVNI -mount -noleaf \n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +"testi (N can be +N or -N or N): -amin N -anewer DATOTEKA -atime N -cmin N\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"testi (N je lakko +N, -N ali N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer DATOTEKA -ctime N -empty -false -fstype TIP -gid N -group IME\n" +" -ilname VZOREC -iname VZOREC -inum N -iwholename VZOREC -iregex " +"VZOREC\n" +" -links N -lname VZOREC -mmin N -mtime N -name VZOREC -newer DATOTEKA" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path VZOREC -perm [+-]ZAŠČITA -regex VZOREC\n" +" -wholename VZOREC -size N[bckw] -true -type [bcdpfls] -uid N \n" +" -used N -user IME -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"actions: -delete -print0 -printf FORMAT -fprintf DATOTEKA FORMAT -print\n" +" -fprint0 DATOTEKA -fprint DATOTEKA -ls -fls DATOTEKA -prune -quit\n" +" -exec UKAZ ; -exec UKAZ {} + -ok UKAZ ;\n" +" -execdir UKAZ ; -execdir UKAZ {} + -okdir UKAZ ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Napake lahko sporočate (in sledite napredek pri popravljanju) na spletni " +"strani\n" +"za prijavljanje napak findutils, http://savannah.gnu.org/, ali, če nimate\n" +"dostopa do spleta, po elektronski poÅ¡ti na naslov ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "preizkus koherentnosti knjižnične funkcije fnmatch() ni uspel." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"opozorilo: Imena datotek v Unixu navadno ne vsebujejo poÅ¡evnic (poti pa " +"jih). To pomeni, da se bo »%s %s« na tem sistemu najverjetneje vedno " +"ovrednotilo kot neresnično. Testa »-wholename« ali »-samefile« bosta morda " +"uporabnejÅ¡a. Če uporabljate GNU grep, lahko uporabite tudi »find ... -print0 " +"| grep -FzZ %s«." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"opozorilo: predikat -ipath odsvetujemo; priporočamo zamenjavo z -iwholename." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Vhodne datoteke »%s« ni mogoče odpreti" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "neveljave način »%s«" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"opozorilo: določili ste vzorec %s, ki je enakovreden 000. Pomen -perm /000 " +"se bo v prihodnjem spremenil, da bo skladen z -perm -000, zategadelj se za " +"zdaj ne ujema z nobeno datoteke, v prihodnje pa se bo z vsemi." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "neveljaven prazni argument pri -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "neveljaven tip -size: »%c«" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "neveljaven argument »%s« za »%s«" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "neveljaven argument %s za %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find, različica %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils, različica %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Omogočene možnosti: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "opozorilo: neprepoznano ubežno zaporedje »\\%c«" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "opozorilo: neprepoznano formatno določilo »%%%c»" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Trenutni imenik je naveden v spremenljivki PATH, kar je nevarno v " +"kombinaciji z dejanjem %s programa find. Prosim, odstranite trenutni imenik " +"iz spremenljivke $PATH - odstranite ».« ter uvodna ali zaključna dvopičja." + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Trenutni imenik je naveden v spremenljivki PATH, kar je nevarno v " +"kombinaciji z dejanjem %s programa find. Prosim, odstranite trenutni imenik " +"iz spremenljivke $PATH - odstranite ».« ter uvodna ali zaključna dvopičja." + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Raba {} znotraj imena pomožnega programa za -execdir in -okdir zaradi " +"mogočih varnostnih problemov ni dovoljena." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Podprta je le enkratna navedba {} v kombinaciji z -exec%s ... +" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "okolje je preobsežno za klic exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Vhodne datoteke »%s« ni mogoče odpreti" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +#, fuzzy +msgid "Failed to change directory" +msgstr "vrnitev v začetni imenik ni možna" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "vejitev ni mogoča" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "napaka pri čakanju na %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s zaključen s signalom %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "neveljaven izraz" + +#: find/tree.c:101 +#, fuzzy, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"neveljaven izraz: uporabili ste binarni operator, pred katerim ni argumenta" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "nepričakovan dodatni predikat" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "neveljaven izraz; preveč zaklepajev »)«" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "neveljaven izraz: manjkajoč zaklepaj »)«." + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "neveljaven izraz; preveč zaklepajev »)«" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "neveljaven izraz: manjkajoč zaklepaj »)«." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "opla -- neveljaven tip izraza!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "opla -- neveljaven tip izraza (%d)!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "poti morajo biti navedene pred izrazom" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "neveljaven predikat »%s«" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "neveljaven predikat »%s«" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "neveljaven argument »%s« za »%s«" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "manjkajoč argument k »%s«" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "neveljaven izraz; preveč zaklepajev »)«" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "nepričakovan dodatni predikat" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "nepričakovan dodatni predikat" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "opla - neveljavno privzeto vstavljanje logičnega ALI!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Uporaba: %s [--version | --help]\n" +"ali %s najpogostejÅ¡i_bigrami < seznam > kodiran_seznam\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Morebitne napake javite na naslov .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils, različica %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dni" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "neveljaven argument »%s« za »%s«" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "datoteka locate »%s« je poÅ¡kodovana ali neveljavna" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Velikost datoteke locate: %s bajtov\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Imena datotek: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Imena datotek: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "s skupno dolžino %s bajtov" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +" med katerimi %s vsebuje presledke, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +" %s vsebuje znake za novo vrstico, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +" in %s vsebuje znake s postavljenim osmim bitom.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Razmerje stisnjenja %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Razmerje stisnjenja %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "datoteka locate »%s« je poÅ¡kodovana ali neveljavna" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Zbirka %s je v %s obliki.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Uporaba: %s [-d path | --database=pot] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TIP]\n" +" [--version] [--help] \n" +" vzorec...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate, izdaja %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argument za --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"opozorilo: datoteko locate lahko preberemo s standardnega vhoda le enkrat." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "opozorilo: zbirka »%s« je starejÅ¡a od %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; " +"vrednost znaka ne sme presegati %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; " +"vrednost znaka ne sme presegati %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; " +"neprepoznan sledilni znak %s." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Neveljavno specifikacija vhodnega razmejilnika %s: razmejilnim mora biti " +"bodisi en sam znak, bodisi ubežno zaporedje, ki se začenja z \\." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "okolje je preobsežno za klic exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs, izdaja %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Vhodne datoteke »%s« ni mogoče odpreti" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Spremenljivke okolja zasedajo %ld bajtov\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Zgornja in spodnja meja POSIX za dolžino argumenta: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Zgornja in spodnja meja POSIX za dolžino argumenta: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Največja dolžina ukaza, ki ga lahko uporabimo: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Velikost ukaznega medpomnilnika, ki ga dejansko uporabljamo: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"%s narekovaj brez para; privzeto so narekovaji za xargs posebni, razen če " +"vključite izbiro -O" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dvojni" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "enojni" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "vrstica z argumenti je predolga" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "napaka pri čakanju na proces naslednik" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: izhod s statusom 255; prekinjamo" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: ustavljeno s signalom %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: zaključeno s signalom %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: neveljavno Å¡tevilo za izbiro -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: vrednost za izbiro -%c mora biti >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: vrednost za izbiro -%c mora biti < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Uporaba: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=razmejilnik]\n" +" [-E eof-str] [-e[niz-eof]] [--eof[=niz-eof]]\n" +" [-L največ-vrstic] [-l[največ-vrstic]] [--max-lines[=največ-vrstic]]\n" +" [-I nadomestni-niz] [-i[nadomestni-niz]] [--replace[=nadomestni-" +"niz]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s največ-znakov] [--max-chars=največ-znakov]\n" +" [-P največ-procesov] [--max-procs=največ-procesov]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=datoteka]\n" +" [--version] [--help] [ukaz [začetni-argumenti]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "opla -- neveljaven tip izraza v mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "opla -- neveljaven tip izraza v mark_type!" + +#~ msgid "old" +#~ msgstr "stari" + +#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n" +#~ msgstr "ZmanjÅ¡ujemo arg_max (%ld) na vrednost arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "UspeÅ¡no" + +#~ msgid "No match" +#~ msgstr "Brez zadetkov" + +#~ msgid "Invalid regular expression" +#~ msgstr "Neveljavni regularni izraz" + +#~ msgid "Invalid collation character" +#~ msgstr "Neveljavni znak za primerjavo" + +#~ msgid "Invalid character class name" +#~ msgstr "Neveljavno ime razreda znakov" + +#~ msgid "Trailing backslash" +#~ msgstr "Zaključna nagibnica" + +#~ msgid "Invalid back reference" +#~ msgstr "Neveljavni povratni sklic" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Nezaključen [ ali [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Nezaključen ( ali \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "Nezaključen \\[" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Neveljavna vsebina \\[\\]" + +#~ msgid "Invalid range end" +#~ msgstr "Neveljavni konec obsega" + +#~ msgid "Memory exhausted" +#~ msgstr "Pomnilnik porabljen" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Neveljavni predhodni regularni izraz" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Prezgodnji konec regularnega izraza" + +#~ msgid "Regular expression too big" +#~ msgstr "Regularni izraz je prevelik" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Odvečni ) ali \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "PrejÅ¡nji regularni izraz manjka" + +#~ msgid "Predicate List:\n" +#~ msgstr "Seznam predikatov:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Drevo ovrednotenj:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Optimizirano drevo ovrednotenj:\n" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s spremenjen med izvajanjem %s" + +#~ msgid "virtual memory exhausted" +#~ msgstr "virtualni pomnilnik porabljen" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. spremenjen med izvajanjem %s" + +#~ msgid "error in %s: %s" +#~ msgstr "napaka v %s: %s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " IZRAZ1 -o IZRAZ2 IZRAZ1 -or IZRAZ2 IZRAZ1 , IZRAZ2\n" +#~ "izbire (vedno vklapljamo): -daystart -depth -follow --help\n" +#~ " -maxdepth RAVNI -mindepth RAVNI -mount -noleaf --version -xdev\n" +#~ "testi (N can be +N or -N or N): -amin N -anewer DATOTEKA -atime N -cmin " +#~ "N\n" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n" +#~ msgstr "" +#~ "dejanja: -exec UKAZ ; -fprint DATOTEKA -fprint0 DATOTEKA -fprintf " +#~ "DATOTEKA FORMAT\n" +#~ " -ok UKAZ ; -print -print0 -printf FORMAT -prune -ls\n" + +#~ msgid "inserting %s\n" +#~ msgstr "vrivamo %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " tip: %s %s " + +#~ msgid "left:\n" +#~ msgstr "levo:\n" + +#~ msgid "right:\n" +#~ msgstr "desno:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Normalizirano drevo ovrednotenj:\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Uporaba: %s [-d path | --database=pot] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] vzorec...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "%s narekovaj brez para" + +#~ msgid "command too long" +#~ msgstr "ukaz je predolg" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "posameznega argumenta ni možno umestiti v obseg seznama argumentov" + +#~ msgid "argument list too long" +#~ msgstr "seznam argumentov je predolg" + +#~ msgid "cannot open current directory" +#~ msgstr "trenutnega imenika ni možno odpreti" diff --git a/po/sr.gmo b/po/sr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..d9dbe5ca076bde1c7599558d08658e005bd77de2 GIT binary patch literal 9117 zcmcJTe~cXGS;r@B`E?B~q(BP+`WkxJrZ?w1W4q4UaUA~$vf{*%b4eSFYtQY@-A%JQ zvzeK-@2Vo%ags&?3DKmL+mfIv;;#y{j(zdPvCpdbhl(Q2N(i+oLJ$cF{y_X!B!ntH z-)Clb@2BHJS>4`u=bd++_xbUCp7(j@AMg9Xmpwj*`Ti>3UGMX}XTakh;2)pvPk7#T z@Cx`V;P=4{`~mnJ__?3-yib7t0RA#~&rf;YZ-DoMx;_Aofu8|?4SW$C1>dN~zYY3a z{{VF0Cw|)VehWMbehh4a_k%Bj9|ylt;kQ8P_0QmMgCG1E)&}>0KL_pwe*ruON{`Qi zzXZ;MzX<*@xEuU)@H+T?@K3;3M#|?#Kj?XC`{1=M=iLHX@%Q1bsC z{0R8(Afmi`?nO87UQqKs2FkU&L0sn5z%Agzpw_8_vU48%D0mr^-@Bmv_c!2u;J<;t z4*oZ&b?^V#(qB8l?OZsd&&6Fi9X{s_##Pl6&R)bYkZ#d!~? z^$vl1z(>Fd@DD)A|4WcR?>qeaP4Hhq`Qcuag38`WQ1Lwl%6~Dad4BuRm{u6li9&~^#faMxs94Az!6D7rRUi$Pu@VziM@AC6WX5rOThioScrL1k zF7C9Z!_!aCL*GR%F-kQ6h*-Xy6Aa+4I+i8VyUWyq^W-7i5TGP>N zC+TGC@225%ohS{NvzZLv{}C4SKTV+STD@xarW$UfoLk}0EKl0)^>nP=fvPpviPNy2 z%*N5@d2-+=dA0P;hWE`0<$Yq<3Ek@8xoj@!!0_qN?H57sYUY6l%c)yEp2^(!__*MJ zd&qge`}k8%Y3R;{X{Ib1C3O8k%guFnnn|71TsJ%qF|t*oj|KBltJ8ALFrJ0S&Uq%aQPfA z>emqs`>9nLW{tFi+0X^Ko6GZdZO4u*I2XimFgIRRn;kAm$6Pey7Ltye3(k?f393z_ zRh{L=toVd+L!!b~5H;^qxV$M83FC87n#4*EcP>byV7eK)M~*#y453K6Ct; zGlx%{JbCo+)P@UtPsPv1$@$n-^({=(B=w%ka0;%@+$rDh2mK3heJ*UaPmfS3^x<|Z z$?`J_SQ4Khsnej9K{-_~zZqpY^eKtpH-bEv4zh5>d)kUlzd(@bX;||-SrAA00y}gF zT}gK_btY~Fd3|o%c7i&c2I+#E>BM!DJ3~r^jd4$U5t2@fKte^a4Cl#woLX7HEn_lh z!kB^op6euexKByiSJ_64b}mCw#NLRNWnt>XZ1kC>I<>}B^CzmR?41wN7$qp@XzUM) zHN0Ag8PS)%Jrjs`?zyYl<_HVE)15fFTo#qp1 z@;UhCA8Ytem%CqW#a6OweCPO{s%`Zj%Vwj7e~9MQpGs=B%?vi3e)Br=#EB{Ya7u)+ z%|8NXYHsJm#Haj;J^sW4ZgOvJ*8`uNn4FkkqJNSORoOh8x67ZL^mp!Zle=n@d&+so zgDm%_(jd;@RFc-*5fZGKxF>1*Vz|D~Y9(&}mV~-sjT0A*EF>*MGb84kOMGLH+W7v17b@cClV6;~Nr?7dvv(8aByd*|lA zSZ3mKajW-5WZZJSi^WoLRgV?#Fnn`x4qy$$Efv>`n@Im!vB>1&wpK4k-|SsrO{vlC zeXVy%oZZ&Dh(_IV&J|#}ciHtWnR;Jh9Ie%Zj7iI7>FxyeU z{yg$981=i(w6l|hNq<3dtHZ>PP4O?H;xgj@-<7U8yo@K!qf5oItjEOCnezP2@^pgJ zuHa4^XZBZl=BB6f2>x7z4Hqpw3W-?2?AyJUO0u|jFT6T9y{wxp9t@sjH9<1sRQ;QRiy!k{Aa;pRZP3E5&4# zQO0ilK$aMFUFyJV{@>|QS=f8gs04ZMa#fuh{_ncmIqAnJ=12F!dlyLuPE5&QY8@22R~#Wiz(^ z?rW@dnXFyxeO(^EMv}e7EK6S{O=<5Hm3(%G-eue*rVI+ovU!YWRFApPB(?&pMcRgz zs?+5L`_nend2Jl3;MJDJk~XBw?G`uKByh>FeyOx+Q`x>|bGr>2wFBI=;wX_=fXY^~ zY;VFy71B#1gZ5!4f`w$eY~J+5icj7tme`>*89P;2*?_cawfo6rym#Blo2tiSBPjlk z6gJI@MZdUh#@NQC)i!$>=b5+Ibb0U=HZLL4(%}X>fdZs`x4Z6ui&E+Uq!4*@4L7`H zj_8irwunp1z*=yS*t<{#6NZoYjJ&(`y@U-?)sY$$=-WxtX4%wiw{+DjUu#orDu9p zt~R9UKy`Gu-Mff{SKYd`=8( zspxL;EW$dYEXr|~6xFJ%XEwpH7Z867>XuFR;)-`MR)Lgebn|6?lm&N@G*K!&g1Smi7e;MDE?b5Oh$qyD>b#Pi)IcV$h zAhl>8NIfJj*N9=Hc}ZaNmRoL$>0P)r6LJ>vZd zixOkkv6$l4V;{A4a(H^-m63F^Whz3c3PM>^TnAJoAVg3dzb+GJrdW>w(bzymK~i5x>-@UlwH>4vJWl_0+$L!MSOFT0c83+CLiC(=!cE(;K^ zw(cNXl(R~%ZPVJRl`PQqCt4CZF?3C(U;#}~TrZdOs~Vtzh=S&aSv=im4LragqYNvn zXmbJQ%Q~WW9du2I>)K1Qb$yYQeW@(_`#GRY)3(5X#o74Q4_Q|=N-2q!Y6#iJ)Dd1S jx_Ws=M^t)1E?sT@P@JCRre4J?^, 2003. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.6\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2004-11-24 14:16+0100\n" +"Last-Translator: Danilo Segan \n" +"Language-Team: Serbian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "неисправан аргумент %s за %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "неједнозначан аргумент %s за %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Допуштени аргументи су:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Непозната системска грешка" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: опција „%s“ је неједнозначна\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: опција „--%s“ не дозвољава аргумент\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: опција „%c%s“ не дозвољава аргумент\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: опција „%s“ захтева аргумент\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: непозната опција „--%s“\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: непозната опција „%c%s“\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: неисправна опција — %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: недозвољена опција — %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: опција захтева аргумент — %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: опција „-W %s“ је неједнозначна\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: опција „-W %s“ не дозвољава аргумент\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "величина блока" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "„" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "“" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yYдДdD]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nNнН]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Употреба: %s [-H] [-L] [-P] [путања...] [израз]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Употреба: %s [путања...] [израз]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "упозорење: непознато истицање „\\%c“" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Променљива окружења FIND_BLOCK_SIZE није подржана, једина ствар која утиче " +"на величину блока је променљива окружења POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "не могу да сазнам текући директоријум" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "не могу да сазнам текући директоријум" + +#: find/find.c:391 +#, fuzzy, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Систем датотека %s је недавно искључен." + +#: find/find.c:401 +#, fuzzy, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Систем датотека %s је недавно прикључен." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s је измењен при извршавању %s (стари број уређаја %ld, нови број %ld, " +"врста система датотека је %s) [реф %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s је измењен при извршавању %s (стари број чвора %ld, нови број %ld, " +"врста система датотека је %s) [реф %ld]" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "непознато" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"упозорење: навели сте опцију %s након аргумента %s који није опција, а " +"опције не зависе од положаја (%s утиче на провере наведене пре њега као и " +"после њега). Наведите опције пре осталих аргумената.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"упозорење: опција -d је застарела; уместо ње користите -depth, пошто је ова " +"друга у сагласности са POSIX-ом." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"подразумевана путања је текући директоријум; подразумевани израз је -print\n" +"израз се може састојати од:\n" +"оператора (према опадајућем првенству; -and је имплицитно када није дат неки " +"други):\n" +" ( ИЗРАЗ ) ! ИЗРАЗ -not ИЗРАЗ ИЗРАЗ1 -a ИЗРАЗ2 ИЗРАЗ1 -and ИЗРАЗ2" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"подразумевана путања је текући директоријум; подразумевани израз је -print\n" +"израз се може састојати од:\n" +"оператора (према опадајућем првенству; -and је имплицитно када није дат неки " +"други):\n" +" ( ИЗРАЗ ) ! ИЗРАЗ -not ИЗРАЗ ИЗРАЗ1 -a ИЗРАЗ2 ИЗРАЗ1 -and ИЗРАЗ2" + +#: find/parser.c:1048 +#, fuzzy +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +" ИЗРАЗ1 -o ИЗРАЗ2 ИЗРАЗ1 -or ИЗРАЗ2 ИЗРАЗ1 , ИЗРАЗ2\n" +"опције (увек тачне): -daystart -depth -follow --help\n" +" -maxdepth НИВОА -mindepth НИВОА -mount -noleaf --version -xdev\n" +"провере (N може бити +N, -N или N): -amin N -anewer ДАТОТЕКА -atime N -cmin N" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer ДАТОТЕКА -ctime N -empty -false -fstype ВРСТА -gid N -group " +"ИМЕ\n" +" -ilname ШАБЛОН -iname ШАБЛОН -inum N -iwholename ШАБЛОН -iregex " +"ШАБЛОН\n" +" -links N -lname ШАБЛОН -mmin N -mtime N -name ШАБЛОН -newer ДАТОТЕКА" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path ШАБЛОН -perm [+-]МОД -regex ШАБЛОН\n" +" -wholename ШАБЛОН -size N[bckwMG] -true -type [bcdpfls] -uid N\n" +" -used N -user ИМЕ -xtype [bcdpfls]" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Пријавите (и пратите напредак у исправљању) грешке путем стране за пријаву\n" +"findutils грешака на http://savannah.gnu.org/ или, ако немате приступ вебу,\n" +"слањем е-писма на ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "провера разумности функције fnmatch() библиотеке неуспешна." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"упозорење: предикат -ipath је застарео; уместо њега користите -iwholename." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "неисправан режим „%s“" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "неисправан нула-аргумент за -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "неисправна врста „%c“ за -size" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "неисправан аргумент „%s“ за „%s“" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "неисправан аргумент %s за %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "ГНУ find издање %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "ГНУ findutils издање %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "упозорење: непознато истицање „\\%c“" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "упозорење: непозната директива форматирања „%%%c“" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "окружење је превелико за извршење" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "не могу да расцепим" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "грешка при чекању %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s окончан сигналом %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "неисправан израз" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "неочекивани допунски предикат" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "неисправан израз" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "неисправан израз" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "упс — неисправна врста израза!" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "упс — неисправна врста израза!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "путање морају претходити изразу" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "неисправан предикат „%s“" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "неисправан предикат „%s“" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "неисправан аргумент „%s“ за „%s“" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "недостаје аргумент за „%s“" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "неисправан израз" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "неочекивани допунски предикат" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "неочекивани допунски предикат" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "упс — неисправно подразумевано уметање „и“!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Употреба: %s [--version | --help]\n" +"или %s најчешћи_биграми < списак-датотека > locate-база\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Пријавите грешке на .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "ГНУ findutils издање %s\n" + +# bug: plural-forms +#: locate/locate.c:156 +msgid "days" +msgstr "дана" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "неисправан аргумент „%s“ за „%s“" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"упозорење: путања locate базе „%s“ садржи водећу двотачку, што није исправно " +"име базе" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "locate база „%s“ је покварена или неисправна" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "locate база „%s“ је покварена или неисправна" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Употреба: %s [-d путања | --database=путања] [-e | --existing]\n" +" [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n" +" [--version] [--help] шаблон...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "ГНУ locate издање %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "аргумент за --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +# bug: plural-forms +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "упозорење: база „%s“ је стара више од %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "окружење је превелико за извршење" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "ГНУ xargs издање %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +# bug: plural-forms +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Ваше променљиве окружења заузимају %ld бајтова\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Горње и доње POSIX границе за дужину аргумента: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Горње и доње POSIX границе за дужину аргумента: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Највећа дужина наредбе коју заправо можемо користити: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Величина бафера наредби који заправо користимо: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"неупарен наводник %s; уобичајено су наводници нарочити за xargs осим ако " +"користите опцију -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "двоструки" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "једноструки" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "ред аргумената предугачак" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "грешка при чекању на подређени процес" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: завршио са стањем 255; обустављам" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: заустављен сигналом %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: окончан сигналом %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: неисправан број за опцију -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: вредност за опцију -%c мора бити >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: вредност за опцију -%c мора бити < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Употреба: %s [-0prtx] [-e[ниска-краја]] [-i[ниска-замене]] [-l[макс-" +"редова]]\n" +" [-n макс-арг] [-s макс-знакова] [-P макс-проц] [--null] \n" +" [--eof[=ниска-краја]] [--replace[=ниска-замене]] \n" +" [--max-lines[=макс-редова]] [--interactive] [--max-chars=макс-" +"знакова] \n" +" [--verbose] [--exit] [--max-procs=макс-проц] [--max-args=макс-арг] \n" +" [--no-run-if-empty] [--version] [--help] [command [почетни-" +"аргументи]]\n" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "упс — неисправна врста израза!" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "упс — неисправна врста израза!" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "Умањујем arg_max (%ld) на arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Успех" + +#~ msgid "No match" +#~ msgstr "Нема поклапања" + +#~ msgid "Invalid regular expression" +#~ msgstr "Неисправан регуларни израз" + +#~ msgid "Invalid collation character" +#~ msgstr "Неисправни знак за ређање" + +#~ msgid "Invalid character class name" +#~ msgstr "Неисправно име класе знака" + +#~ msgid "Trailing backslash" +#~ msgstr "Пратећа обрнута коса црта" + +#~ msgid "Invalid back reference" +#~ msgstr "Неисправно позивање" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Неупарени [ или [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Неупарени ( или \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "Неупарени \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Неисправан садржај \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Неисправан крај опсега" + +# исцрпљена? ;-) +#~ msgid "Memory exhausted" +#~ msgstr "Меморија истрошена" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Неисправан претходни регуларни израз" + +#~ msgid "Premature end of regular expression" +#~ msgstr "Превремен крај регуларног израза" + +#~ msgid "Regular expression too big" +#~ msgstr "Регуларни израз превелик" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Неупарени ) или \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "Нема претходног регуларног израза" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "акције: -exec НАРЕДБА ; -fprint ДАТОТЕКА -fprint0 ДАТОТЕКА \n" +#~ " -fprintf ДАТОТЕКА ФОРМАТ -ok НАРЕДБА ; -print -print0 -printf " +#~ "ФОРМАТ \n" +#~ " -prune -ls -delete -quit\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "Списак предиката:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Стабло вредновања:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Оптимизовано стабло вредновања:\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "Оптимизовано стабло вредновања:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "виртуелна меморија истрошена" + +#~ msgid "inserting %s\n" +#~ msgstr "умећем %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " врста: %s %s " + +#~ msgid "left:\n" +#~ msgstr "лево:\n" + +#~ msgid "right:\n" +#~ msgstr "десно:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Нормализовано стабло вредновања:\n" + +#~ msgid "error in %s: %s" +#~ msgstr "грешка у %s: %s" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "упозорење: путања locate базе „%s“ садржи завршну двотачку, што није " +#~ "исправно име базе" + +#~ msgid "command too long" +#~ msgstr "наредба предугачка" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "не могу да углавим један аргумент у ограничење величине списка аргумената" + +#~ msgid "argument list too long" +#~ msgstr "списак аргумената предугачак" + +#~ msgid "memory exhausted" +#~ msgstr "меморија истрошена" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s измењен приликом извршавања %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. измењен приликом извршавања %s" + +#~ msgid "unmatched %s quote" +#~ msgstr "неупарени %s наводник" diff --git a/po/stamp-po b/po/stamp-po new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/po/stamp-po @@ -0,0 +1 @@ +timestamp diff --git a/po/sv.gmo b/po/sv.gmo new file mode 100644 index 0000000000000000000000000000000000000000..b5651cf9c86233bb76c79cdb6f21caffff400c96 GIT binary patch literal 14202 zcmcJVTZ|;vS;s4hbMcVG#JO>a;p{k*naNJIch`2jp4n_X*&Qcq@6Il}v%YPdb#-@j zce$&pI#ty@GbRvAC?W_VLLdqc2yqdY2+0p1g$Q_v5Q!ooK_G|+h)_s&r0@a~GOH*7 ziQoU6s_LH0dN*>?nwo#tsZ;0jo$vnjzukG;XFNUu*E_i0`6|!*1#sy#{Nr={b)I(! zd=R`ByaLXGzX~pbe+qsA{5tp(V0gRd<>2$+N5B`scY>W6&--!kmqES%2j%@&z$Na# z3ElKL@PEL!fUkRlTjyQi+qi!Kd@HyPo&eim6a3v0Z+oNXwYcws&x3yp zY8_|q@VxuM7<>TyJ@C)Le*ymk{4|UBHSnWva`V2CMO@+jZcyv^7&x4}-Ynl9~z@wnnae;peU>DT$Pk}nW zzbNm&2I}1Z4>aK2O!jx+Y4CP7_+~o4hx@x=BCT@+T%`R9sP%lDf3F392Yej-WAF^m z#TmZU1Nrm1{NpIR&w`roufTr* zzYad7y_qu(ofn1fp9;}1Cc>P#T}M4_W|%3t~YZ%#iftVQ1sI0JePR* zly3O2Wc#^||ChK}f_H|Ct=bP$Ti(@;)~HY5z@FU`e3wkViA!hoVXjwl>2tdSEBh?n zdz1^-vuA%Fc#*66ysi8KDJ{*H!4Gm>DccW$>s;ce>hpfS7%tK9XSg2bdKH&GPjWrN z^#(5SfcRpC>jc;PxGWwHt2g~34Mms_gI1_vFNVW3D@=3L%}tS-6MXSIQPLh2QJg>2O-7A0>z>qL?XVM! z;=&9AW{c>}gsoAQg-K!BQ5Lp}G}~S=Rkv_!n1y*BrHMNG!z@aQnW@G>u&o{EQC^s| zvux5~m<0^MX47H8YkXmy1)!Zn2(>NGc+dcv45B0`!nSE{n>^|!L2TyQJQ9I=LDJ<( zd&HDo6K;hqHp4O?29Fogm}lWQYK0~l4VqzQ=Hm8}sD4m$CyK*-J1@e4DYl29_A-|* znk!kzXmR`LTc0yZ()Ru-_qX1{jLYnbLu|W~&x@cK<>uJ^_pg|s$!W4}mbGl6I1al| z#?jOGzL{%@emqIWK^(O!0(8>M_;anY-gC zcQk-0+%R=#xLZnuQ-3!AA7C(HOq}eN5;-&OzPs^2**fT;V~Bn^?k`_tFs@-VDtNG3YJz zJo#SNb>8Eh+%y^u!AbKz}V#X*hiQXLNT{T+GvhPWpwvgw2&0BC&zN__2$+}_Q3XsPft_c%lS?fd9B*PKv zD2$^40+N}07`CEL#MmsO;k}HPS0?({SiBdvW%%E$K@V&=}60?fS zsk9F@yt9rW+7d(@7W(d!?CN(D+cW)i=W|?aIJ0 z8oa*6E*G5@9Y=wsNo_^d>}S@_(racIbVCyqrdJfh<$LbQgK>}~L9bET+It|-l8HKI zI~|!`Fveu0Y^jL_Y%$%EwRmCD)==SqvwSJD?QI-nq@5tQ;!&H;mJ)qob>o9b@HooS zMA{o3&mzh5Qt3fh;m@(9nTRK1H)Vn)-L?M#xtyIARkiLUvWDSHvK>~k7S zCrby~Z)VKA&F^Zl>x045*4jzs3a+)ZoK8*aFHUH{;;ryjDPn>=7>Z$V= zFRq>1IFNAO<)ojan~5pihcL_1%)6X({FaZe_GZ{pBpOaM^o2$P#w7Y+o&x!tlKyhqx_H znteCJFk!+`0{1s={f$vlzw;!_DvwT-McO1%;);^Fr1GPJr@^4KR}wCqM(f)7X`in! zcGwE^F0WZz6PRIIu)qix#xkCUK0Gy&D$$#nx*F+qu_HM;wSZEqWZEor`(g zaf>RR<$tpoMDkCo74C0r^&;FCj#=8ys~lC|N}u(>@jK`1_IfLmO;@kfkDieq$X12* zi<3y?fTk65hK1tMY~eoG$-4{o}$iB{1oO^5Kj&onM#sKPt!XNbXeVHH;Kkhizzgu*UzT9|7u-n17TsyNUr zw8K`0@zA=UKr3v^(L<0;Rorg~Z z8pNAO4km0AE-s_7xRLjRYDsMng|pBNx5Vr-Gl|^ngWp}Myj!ezGelfrKM_D|TZZ0w zO#$@c5I4!$8RHLvE!S{%?Xk79muSFR+a7g;%z=o6(d|@vsMX|MMcr6=i7wLgZ#9&jmc&KXL>_Nvp z&+I8zeX9Y{)cstq>=}4aZf{VncK2YD4SCoktG3_@m?*=FR@#F{)*}He+3A7W{KyC^ zyCS!;l5N}K#K^`^@E_{Hg<_+Gd`NDcQ)jCo)sd35z0JzkxST{=*5S}9b36j)hqqH@ z3aUI;9tU}kr+9nmh{Tl=ORj%AUBq+TkP|ovg9K60*LfBzRlZ4H!}X0Wm)|m%r4$Ov`V-FcVN~m>pb#-|icrOc^L~9i7z%Pu_(BL1`|FHi(ovZ~C-njp z;k=)-A?ezAhFXmYG35iJj<;){9j}X5rL+|B5+e+kEV*1vBBIUPnH5-6Udl&pKjT0A z+*8_OV?s%1iKP}aqE?%451J{8Pe#2@?@3=h_3KOm8WM>{Zz@l=VusES*Zid}PzZ$J zPCH(qiGxCMGcO0u%k}X=(X#={pyML_snu!5GIFonP%EI;n?_2d7@T*X7kKWN#}@Xn zW)r<$b0<<#r510r?kO=U7e6)Fu53veUOw|7ISciCySlgpMwz-QEccKQ*QHQ*+l9)w=VWbc%ogC(4MrTfwm%7^S(gp6y$f0TEDn%= zrtLrGGC2w(%H*)QuW_t#?13_a?4Qd~lK%V2Bl{cavWjz;Uh9PSZUUzXx7?ZtsX(ICP?~U@* zKYslF2mPay&RS?E%>1>al`4{5HpfZVD^m~6qa+D?JLGILlWb=}8|iHI!^9^4Qf#=vAC=8cOz(O(Q0kwrIU;Pc|H0UdqnIJYvs14&p-rFByS4xjxU>g`q66WG)Z!ae z0cNy{e47+o(ii6scg%H#u-A%0Atv*Kl!+8Ki_#i*ite?H(|6T^ zV4TOJB4~$*+jwua;9Am#)I1tlb|F&fvnA25-Hy5kJnd)KI4%=%5;qt_`SM$s$`%0V=Qe(mb(NiOxU>USHBCZWEI5cCcb(84 zUgcE!Fik~ON5YceyB^pLy9Z-Q0XAo6`jAZC50u>tb`=O-x@T1&n7wg$D__v$|ppo@gfoD2!_M=mAWGFn)jpl z*&r(|D(Xm!qfGGf-d{l#NpV~1BSJgkCLC0&D-oT*6$*a%lTa#nxs!x)aXQzb66(?J z3j&FdoV4Y~U^2(eD9dY>!5z^VX0U_CcC3hd=`4sOnX@Van6xx;md!U)(j?-v*- zN|Br+_N%NPtnrojfW^21f;B0m=JMito1865bx+-3VqF(xnM6vHO$=r*UbJQxf~HwJW9d-mr3DDMi3Cp!n^0j-L=%oz~q^^nh}kp_I^+Q{iUBRX`s^ zEvOy(_@=1!mv8_Y=2Ab4#xv9F)Pg9%gt62LGY_sm8)F_CGnd@3H}@B6ccI~(hOnh~ z5LE5~O;RgKU-b&~2r@iCY_GclMHnXvp+C6fT%E!)W`3O zY>i?A&q+Um*yEQFxa=gv2T4_xAh0a*9XyS)KUE2$J_2G+3F&ZrTH07O^i`Tz^v>;G z?cREXV;yOTB|JItR-39BlpOA$H~So*&CSXqg|{6w_7Y%sIl?=SLEv2N&lWfRk$)J`|-mMtD6es}HXDAkR41S9_qiYn_6iHo_dkGWCc_>A@|=8U<<( z@^BfR%~0Mz!vsa%xTWsFc;$D z;NC82e12durYNV0-GL-zk481U^Jv{q}st>bX?QecR<%gSBA4o#E z$^^+Q5<-*OgS_K|OAn8_(!=?>_E0xe^#fD4?5jRZo=j*}w^i?pfOR7Uh{`#eIAAgl zqW9dS03q{l#aQhzy2z`%HK%WORUt}F_oRL8*^)y^g2`=X2MO#V-FxJfdPFzKy!HqM z7Z;wDk$O@MYFA}z5sGxi}a_MH8)}6sv41&eg&C9`LMH&t!%2kd~_fc z_CK4oKB+XVzIkD&x6(A)a;9@`aT@v8^z-;`v%X=!5p%wu0#yEs*v zs2hIJrHLvq$@^HNj3SJfrx`Wlh}3vLuO1^ylY)gRW--YMG#j=nO#0F}b(KQ8%f?uT z*OyeKaMtw(g$jxmRaXB-bqXpNRhJu;DfU+>)~ljIS*1Al&+C^cQ&d%osoQ;3ipeuq zr6}*K0rylX>fQ%eDeA{{mBLG{BE#94R47m$o((BHYI*@#=vH5r8)Jg_q@`O`kSxNw zOSvhhq(^mcj>kp_&>Ch$k-3URzJsO@YLD1C3P^F4W$=%9oRo8pRJY*gud2Ps_Du3| zwhE^bFPhfcq&x{p(2-s5n*~x3q_$a=&2XVbyG)KFp}g#Aw$N1if*IMA)FWG(MHEmW z&IMBVp{Gvf)CtD3wG11{Fc2!fu3tE(C+`!D!F{}E^Ii-*DPq{9iQ6aEt5_hF`=r09u{ipCO@F8U?^Z926Oqzsoqi} z((d+jImew?DLQ`JYQ5OHdXX2`2n@A5#i-&6J2tKYn#MWRp?uiF)iI{lv*(91SV*Rm z+fDcrU&~eaPmGP2Yy?mtZGL6MBcIL!No_-KWh#5zHcPv(Br@FWm(FX}x#XQue eW6DZY=ARUjA~&&(GO-EV(Vm3vEJmdY@BabJYcCoA literal 0 HcmV?d00001 diff --git a/po/sv.po b/po/sv.po new file mode 100644 index 0000000..a4fd76e --- /dev/null +++ b/po/sv.po @@ -0,0 +1,1300 @@ +# Swedish messages for findutils. +# Copyright (C) 1996, 2001, 2004, 2006 Free Software Foundation, Inc. +# Johan Linde , 1996. +# Christian Rose , 2001, 2004. +# Daniel Nylander , 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.27\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2006-05-23 22:33+0100\n" +"Last-Translator: Daniel Nylander \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "ogiltigt argument %s för %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "tvetydigt argument %s för %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Giltiga argument är:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Okänt systemfel" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: flaggan \"%s\" är tvetydig\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: flaggan \"--%s\" tar inget argument\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: flaggan \"%c%s\" tar inget argument\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: flaggan \"%s\" kräver ett argument\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: okänd flagga \"--%s\"\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: okänd flagga \"%c%s\"\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: otillåten flagga -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: ogiltig flagga -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: flaggan kräver ett argument -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: flaggan \"-W %s\" är tvetydig\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: flaggan \"-W %s\" tillåter inget argument\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "blockstorlek" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "\"" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "\"" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[jJyY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Användning: %s [-H] [-L] [-P] [sökväg...] [uttryck]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Användning: %s [sökväg...] [uttryck]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "varning: okänd kontrollsekvens \"\\%c\"" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Miljövariabeln FIND_BLOCK_SIZE stöds inte, det enda som påverkar " +"blockstorleken är miljövariabeln POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "kan inte få tag i aktuell katalog" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "kan inte få tag i aktuell katalog" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Varning: filsystemet %s har nyligen avmonterats." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Varning: filsystemet %s har nyligen monterats." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s ändrades under exekvering av %s (gammalt enhetsnummer %ld, nytt " +"enhetsnummer %ld, filsystemstypen är %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s ändrades under exekvering av %s (gammalt inodsnummer %ld, nytt " +"inodsnummer %ld, filsystemstypen är %s) [ref %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Symboliska länken \"%s\" är en del av en loop i kataloghierarkin; vi har " +"redan besökt katalogen till vilken den pekar." + +# Osäker på %d %s +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Filsystemsloop hittades; \"%s\" har samma enhetsnummer och inod som en " +"katalog vilken är %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "nivå högre i filsystemshierarkin" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "nivåer högre i filsystemshierarkin" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "varning: följer inte den symboliska länken %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"VARNING: Antalet hårda länkar är fel för %s: detta kan vara ett fel i din " +"filsystemdrivrutin. Slår automatiskt på alternativet -noleaf i find. " +"Tidigare resultat kan har misslyckats att inkludera kataloger som skulle ha " +"sökts igenom." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "okänd" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"varning: du har angivit flaggan %s efter argumentet %s som inte är en " +"flagga, men flaggor beror inte på position (%s påverkar test som är angivna " +"före den, liksom de som är angivna efter den). Ange flaggor före andra " +"argument.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"varning: flaggan -d är föråldrad; använd -depth istället, eftersom den " +"senare stöds enligt POSIX." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"standardsökväg är aktuell katalog; standarduttryck är -print\n" +"uttryck kan bestå av: operatorer, flaggor, tester och åtgärder:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operatorer (avtagande prioritetsordning; -and underförstås när inga andra\n" +"anges):\n" +" ( UTTR ) ! UTTR -not UTTR UTTR1 -a UTTR2 UTTR1 -and UTTR2\n" +" UTTR1 -o UTTR2 UTTR1 -or UTTR2 UTTR1 , UTTR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"positionsberoende flaggor (alltid sanna): -daystart -follow -regextype\n" +"\n" +"normala flaggor (alltid sanna, anges före andra uttryck):\n" +" -depth --help -maxdepth NIVÅER -mindepth NIVÅER -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"tests (N kan vara +N, -N eller N): -amin N -anewer FIL -atime N -cmin N\n" +" -cnewer FIL -ctime N -empty -false -fstype TYP -gid N -group NAMN\n" +" -ilname MÖNSTER -iname MÖNSTER -inum N -iwholename MÖNSTER -iregex " +"MÖNSTER\n" +" -links N -lname MÖNSTER -mmin N -mtime N -name MÖNSTER -newer FIL" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path MÖNSTER -perm [+-]RÄTTIGHET -regex MÖNSTER\n" +" -wholename MÖNSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAMN -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"åtgärder: -delete -print0 -printf FORMAT -fprintf FIL FORMAT -print \n" +" -fprint0 FIL -fprint FIL -ls -fls FIL -prune -quit\n" +" -exec KOMMANDO ; -exec KOMMANDO {} + -ok KOMMANDO ;\n" +" -execdir KOMMANDO ; -execdir KOMMANDO {} + -okdir KOMMANDO ;\n" + +# Lade till att man bör skriva felrapporten på engelska. +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Rapportera (och följ rättningen av) fel genom felrapporteringssidan för\n" +"findutils på http://savannah.gnu.org/ eller, om du inte har tillgång till\n" +"webben, genom att skicka e-post till . Skriv\n" +"felrapporter på engelska om möjligt.\n" +"Skicka synpunkter på översättningen till sv@li.org." + +# Osäker... hur översätta "sanity check"? +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "funktionskontroll av biblioteksfunktionen fnmatch() misslyckades." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"varning: Unix-filnamn innehåller normalt sett inte snedstreck (även om " +"sökvägar gör det). Det betyder att \"%s %s\" antagligen kommer alltid att " +"bli falsk på detta system. Du kanske tycker testet \"-wholename\" är " +"användbart, eller kanske \"-samefile\". Alternativt, om du använder GNU " +"grep, kunde du använda \"'find ... -print0 | grep -FzZ %s\"." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "varning: predikatet -ipath är föråldrat; använd -iwholename istället." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Kan inte öppna inmatningsfil \"%s\"" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "ogiltig rättighet \"%s\"" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"varning: du måste specificera ett lägesmönster %s som är likvärdigt med 000. " +"Betydelsen av -perm /000 kommer snart ändras för att överensstämma med -perm " +"000; alltså, för tillfället matchar det inga filer men kommer snart att " +"ändras för att matcha alla filer." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "tomt argument till -size ogiltigt" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "ogiltig typ \"%c\" för -size" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "ogiltigt argument \"%s\" till \"%s\"" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "ogiltigt argument %s för %s" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find version %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils version %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Aktiverade funktioner: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "varning: okänd kontrollsekvens \"\\%c\"" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "varning: okänt formatdirektiv \"%%%c\"" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Den aktuella katalogen är inkluderad i miljövariabeln PATH, vilket är " +"osäkert i kombination med åtgärden %s för find. Ta bort aktuell katalog från " +"din $PATH (alltså, ta bort \".\", inledande eller avslutande kolon)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Den aktuella katalogen är inkluderad i miljövariabeln PATH, vilket är " +"osäkert i kombination med åtgärden %s för find. Ta bort aktuell katalog från " +"din $PATH (alltså, ta bort \".\", inledande eller avslutande kolon)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Du kan inte använda {} inom verktygsnamnet för -execdir och -okdir, på grund " +"av att det innebär en möjlig säkerhetsrisk." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Endast en instans av {} stöds med -exec%s ... +" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "miljön är för stor för exec" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Kan inte öppna inmatningsfil \"%s\"" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "kan inte grena" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "fel vid väntande på %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s avslutades av signal %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "ogiltigt uttryck" + +#: find/tree.c:101 +#, fuzzy, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"ogiltigt uttryck; du har använt en binäroperator utan någonting före den." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, fuzzy, c-format +msgid "expected an expression after '%s'" +msgstr "oväntat extra predikat" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "ogiltigt uttryck; du har för många \")\"" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"ogiltigt uttryck; Jag förväntade mig att hitta ett \")\"-tecken någonstans " +"men kunde inte se ett." + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "ogiltigt uttryck; du har för många \")\"" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" +"ogiltigt uttryck; Jag förväntade mig att hitta ett \")\"-tecken någonstans " +"men kunde inte se ett." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "hoppsan -- ogiltig uttryckstyp!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "hoppsan -- ogiltig uttryckstyp (%d)!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "sökvägar måste komma före uttryck" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "ogiltigt predikat \"%s\"" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "ogiltigt predikat \"%s\"" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "ogiltigt argument \"%s\" till \"%s\"" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "argument till \"%s\" saknas" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "ogiltigt uttryck; du har för många \")\"" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "oväntat extra predikat" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "oväntat extra predikat" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "hoppsan -- ogiltig standardinsättning av \"and\"!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Användning: %s [--version | --help]\n" +"eller %s vanligaste_bigram < fillista > locate-databas\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Rapportera fel till \n" +"och synpunkter på översättningen till .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils version %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "dagar" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "ogiltigt argument \"%s\" till \"%s\"" + +#: locate/locate.c:478 +#, fuzzy, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" +"varning: sökvägen \"%s\" till locate-databasen innehåller ett inledande " +"kolon, vilket inte är ett giltigt databasnamn" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "locate-databasen \"%s\" är trasig eller ogiltig" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Storlek på locate-databasen: %s byte\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "Filnamn: %s " + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "Filnamn: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "med en sammanlagd längd på %s byte" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tav vilken %s innehåller blanksteg, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s innehåller nyradstecken, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\toch %s innehåller tecken med den höga biten satt.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Komprimeringsratio %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "Komprimeringsratio %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "locate-databasen \"%s\" är trasig eller ogiltig" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "Databasen %s är i formatet %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Användning: %s [-d sökväg | --database=sökväg] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYP]\n" +" [-version] [--help]\n" +" mönster...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate version %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "argument till --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "varning: locate-databasen kan endast läsas en gång från standard in." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "varning: databasen \"%s\" är mer än %d %s gammal" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; teckenvärden " +"får inte överstiga %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; teckenvärden " +"får inte överstiga %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; " +"efterföljande tecknen %s är okända." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Ogiltig inmatningsavskiljarspecifikation %s: avskiljaren måste vara antingen " +"ett enstaka tecken eller en specialsekvens som börjar med \\." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "miljön är för stor för exec" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs version %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Kan inte öppna inmatningsfil \"%s\"" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Dina miljövariabler upptar %ld byte\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Undre och övre POSIX-gränser för argumentlängd: %ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Undre och övre POSIX-gränser för argumentlängd: %ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Maximal längd på kommando som vi faktiskt kan använda: %ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Storlek på kommandobufferten som vi faktiskt använder: %ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"citattecknet %s är oavslutat; som standard är citattecken speciella för " +"xargs såvida du inte använder flaggan -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "dubbelt" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "enkelt" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "argumentraden är för lång" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "fel vid väntande på barnprocess" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: avslutades med status 255; avbryter" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: stoppades av signal %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: avslutades av signal %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: ogiltigt tal för flaggan -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: värdet på flaggan -%c ska vara >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: värdet på flaggan -%c ska vara < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Användning: %s [-0prtx] [--interactive] [--null] [-d|--" +"delimiter=avskiljare]\n" +" [-E filslutssträng] [-e[filslutssträng]] [--eof[=filslutssträng]]\n" +" [-L max-rader] [-l[max-rader]] [--max-lines[=max-rader]]\n" +" [-I ersättningsstr] [-i[ersättningsstr]] [--replace" +"[=ersättningsstr]]\n" +" [-n max-arg] [--max-args=max-arg]\n" +" [-s max-tecken] [--max-chars=max-tecken]\n" +" [-P max-proc] [--max-procs=max-proc]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fil]\n" +" [--version] [--help] [kommando [initiala argument]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "hoppsan -- ogiltig uttryckstyp i mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "hoppsan -- ogiltig uttryckstyp i mark_type!" + +#~ msgid "old" +#~ msgstr "gammalt" + +#, fuzzy +#~ msgid "Reducing arg_max (%lu) to arg_size (%lu)\n" +#~ msgstr "Reducerar arg_max (%ld) till arg_size (%ld)\n" + +#~ msgid "Success" +#~ msgstr "Lyckades" + +#~ msgid "No match" +#~ msgstr "Ingen träff" + +#~ msgid "Invalid regular expression" +#~ msgstr "Ogiltigt reguljärt uttryck" + +#~ msgid "Invalid collation character" +#~ msgstr "Ogiltigt sorteringstecken" + +#~ msgid "Invalid character class name" +#~ msgstr "Ogiltigt namn på teckenklass" + +#~ msgid "Trailing backslash" +#~ msgstr "Eftersläpande omvänt snedstreck" + +#~ msgid "Invalid back reference" +#~ msgstr "Ogiltig bakåtreferens" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "Omaka [ eller [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "Omaka ( eller \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "Omaka \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "Ogiltigt innehåll i \\{\\}" + +#~ msgid "Invalid range end" +#~ msgstr "Ogiltigt slut på intervall" + +#~ msgid "Memory exhausted" +#~ msgstr "Minnet slut" + +#~ msgid "Invalid preceding regular expression" +#~ msgstr "Ogiltigt föregående reguljärt uttryck" + +#~ msgid "Premature end of regular expression" +#~ msgstr "För tidigt slut på reguljärt uttryck" + +#~ msgid "Regular expression too big" +#~ msgstr "Reguljärt uttryck är för stort" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "Omaka ) eller \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "Inget föregående reguljärt uttryck" + +#~ msgid "Predicate List:\n" +#~ msgstr "Predikatlista:\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "Evalueringsträd:\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "Optimerat evalueringsträd:\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "virtuellt minne slut" + +#~ msgid "error in %s: %s" +#~ msgstr "fel i %s: %s" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "åtgärder: -exec KOMMANDO ; -fprint FIL -fprint0 FIL -fprintf FIL FORMAT\n" +#~ " -fls FIL -ok KOMMANDO ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" + +#~ msgid "inserting %s\n" +#~ msgstr "infogar %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " typ: %s %s " + +#~ msgid "left:\n" +#~ msgstr "vänster:\n" + +#~ msgid "right:\n" +#~ msgstr "höger:\n" + +#~ msgid "Normalized Eval Tree:\n" +#~ msgstr "Normaliserat evalueringsträd:\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n" +#~ " [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Användning: %s [-d sökväg] [--database=sökväg] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--wholepath] [--basename]\n" +#~ " [--limit=N | -l N] [--version] [--help] mönster...\n" + +#~ msgid "" +#~ "warning: locate database path `%s' contains a trailing colon, which is " +#~ "not a valid database name" +#~ msgstr "" +#~ "varning: sökvägen \"%s\" till locate-databasen innehåller ett " +#~ "eftersläpande kolon, vilket inte är ett giltigt databasnamn" + +#~ msgid "command too long" +#~ msgstr "kommandot är för långt" + +#~ msgid "can not fit single argument within argument list size limit" +#~ msgstr "" +#~ "får inte plats med ett ensamt argument inom gränsen för argumentlistans " +#~ "storlek" + +#~ msgid "argument list too long" +#~ msgstr "argumentlistan är för lång" + +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit" +#~ msgstr "" +#~ "åtgärder: -exec KOMMANDO ; -fprint FIL -fprint0 FIL -fprintf FIL FORMAT\n" +#~ " -fls FIL -ok KOMMANDO ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit" + +#~ msgid "" +#~ "\n" +#~ "Report bugs to ." +#~ msgstr "" +#~ "\n" +#~ "Rapportera fel till \n" +#~ "och synpunkter på översättningen till ." + +#~ msgid "Report bugs to ." +#~ msgstr "" +#~ "Rapportera fel till \n" +#~ "och synpunkter på översättningen till ." + +#~ msgid "memory exhausted" +#~ msgstr "minnet slut" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "%s ändrad under körning av %s" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "%s/.. ändrad under körning av %s" + +#~ msgid "unmatched %s quote" +#~ msgstr "omaka %s citattecken" + +#~ msgid "invalid argument %s for \"%s\"" +#~ msgstr "ogiltigt argument %s för \"%s\"" + +#~ msgid "ambiguous argument %s for \"%s\"" +#~ msgstr "tvetydigt argument %s för \"%s\"" diff --git a/po/tr.gmo b/po/tr.gmo new file mode 100644 index 0000000000000000000000000000000000000000..d10aa6d8e4187815dac7ceaba892fa5b7840955b GIT binary patch literal 28041 zcmcJXdz4*Qecz8?qznNQ9^svA1H+8)+_7Y1FeA&hWQ{Fhy^v&MA%u12-ZL|Yx%b@R zo_i(T;pNZ}y9r520}0OxLWs*Nv1tk|RcMouLTIvBq|HjY(uP$ClxC5nX<1qAA6>Mc z?{Dw(xHETb6PH;&{@!!WKKt?8zx{jet*<}h%J)V5eU|HmTt9tP6#XUmR}=h?zxO;X zimm~F5xfEX=irOM?|`2HC$5g7ZQvKc2f=TEe+Itk=~1)~od2;XIt2a#_$u(v!71?B z&xoSugS)^Sycc{k_=n(2!CRggMb879pxS#|xc?|P!~GY*7lGdaC&8*Hn_hR zbl}f`F9RO}p9_8!d;$0!@F&45p6&4^pvG}K_;RoVUIxA&WGK-GLAn-w8r%VX2~@xS z7F2!D{P8Gy33wf-ejfu>e+Lx(ejaq-Z-TdgUjsG%tDob`y&P2iuK`bkr$D+GeF;>3 z{{iHa=&wPVjILxbuLhqFs@>zD`gIP}Jbnsv;FrOh!T$y>fRj`vd=PAc-v#dn57QaZ z^J}2`{Wl;@MNeaJH-aw%UkSbed=>ah;1c);;9cMiGLq zoH=7s#9z;Vi9UW=6wQGu_jQ=$1>AoR>~eoKg{}kN0cyT~6BPaa47>sSQ5t_UcpLa> z@N=N}>Wwf7B#Yh+UIqSoz|VkGAAJt|-{5b73_bcRm22Mq9SEyN-vC9wzXNxHjcZv$ z;0pK@@C>N$-U(`)=fNw%-v*xq{w~N+qpyG(*LOk9mllPdJ5crR3HSGd6p4NnRJpH$ z4*Z*dS2L*RaK9a7%Ai078;z5bn=|4|4ze;B&#(Zujrs1Tsa@dqD?&5&SCnpFoZ8Q%us6FGEg% z>d&9RT%yZUnY5>Y&jPOoUjlBU+zp_{bqc1`_|Jhq0=^$q|2_(eFTVipr~K70`_FQJ zg350PzXghZ(@dK9;W&5;_nrHyt27Vm;2KX)T+u-lL+RL@i%=vl# zBT(!3&%xiO-S2@K_ais^dj1rAF85b4nV$rI0(=1ceeh%85jycF;Qs^B>vmjF%y)WEf1et>9n*pB* zahQT=FX+HCAX6Fr3aIbD488>XcEBg^_4C&NRqtU?<=+lo0saQ~bntVa#=Q=zz5fit zs?k&DJzvd%s`mt_`FtD5l8rtR-d_s%E$}rwzv2$h--p0!xL*Xt*AIeS@I&CUz^B~l z*R=!17jvNI=d~bH9W4bs5ANjtPeJkZGxz!a-3-#zC_k!;LFQ-!u zd?%>>d>jL$6V!KY5K=_%1}DL|*lky`cD%WfOgXYrs|fJvIDzDBxQ`%~}0#2RHBL+Q$XSO}F*HKG&68cXPd&>kQW` zxb&y>t3UDCD%bOL!yl^FY_<1;d$`uPG)HH-j&m(>ZRh$B*FWO=CtM3$`g2??Wm_YF z{ryA!{|>HS@VB;p5Ayq$xUS`TCf6>m*K%o&_4iLb*#E^(9|`wQ2HzfjYrUNdzXi8) zy_5@({w%;;R4sa=6(KzJ%*%xIV!($2HF-zSrMfT({{5e^282 zG#BC}8ge~_>k2OEm?^HG;`%wR`rrG)O#*(D>*eA8=fMM9*K_^j@Jt~2@D{EYa{UUI z{xYslas8TZ`1>r^Kj2#7x}Qsbui={E`dO|!xR$x}*W~)R{qizIKX2#yX|9iPy_2iM zwT(+_Re$$z#m4Sx@CP1vvMf6uRenhhp-6-_*OGIz~x){oQ7Wy#rgnkBBe9QWd8 zKk4N&juLU!aGS@-OWQ`=N)Z~DEV>vvr*iS;aZX|_7(TZ!Hv zS~hBxYc$N=ZWhNSNR{qNU~O= zyVzJv+lgCAhIzl&T}d>aqseNw*LMp8ddc@U^Mg`ZivhIr+m^DyY`3>`i%PbV#dy%} zyVV%d&;wQ59Q1lg)_1M6mo)p`-f*WYiY4b(dr6*)3>0px_R_3BQG3{lhoVTH=6&ci z=eny&FQy7+rn@TY@dKjv0g;MX)3dpW$k|^b>kjgy=fI_2cd$we>erFo$B)k+J;Yto z>$sEGHclNpym#I;ddX69u6R2Ust~>71t`)u+e`cYS7MW=-$kjj%iVU8#hs-1+%@ua zEpdlVE;P@s9K7?CYxH}}YQu=l!`A9zJKxLWLE3VMifZUBcRWLEal}+3nFEmc| zPBhWzP4eXZxIf6<^*7$Q)5QzSIm4z~a}GI@EI}E+L|micCY$0L-ehOuHVhXCpxJFq zHbcSDBAY)BPfkxZC-W)S>Lz(Mg#c=|yJt0B$gn|&b?&Pv3sY3=+F3}K2CT--Z+pp` z2S^5E>G5?m8b3gTjn^?zkGp%J^p-sw*SR`D^L`gux``d<9)(rsSfmKT?ox(;Xcd#> zsp_dS_Pr6ozh@2+C8Lw)^5yOT4qr&z&0^5URq~cyzUWlMH@TagofX{TZgtUabkQBG z0j)@M*%@*P>y9ki)Gx7iqSF#AIA9Jn3iL&i*u={Q7LFPhRG<(#8n@H z1p{d&WdO}ann7v(k@+hgnklg9P0&#F3D*bS-l;#`@0y+w77-IYW*90hBUhlg2-#yM zMKb5RD6J>O1TRGUm$I%2{BqSuhqe-I6t~!pmqh6OLF|=N>1VlEdyPgXKG!JJXd_;t z)-hku7b)h}=9i~YK+P$2*0g?EAjz9CwpEUVOEUBh&BA8haBC&)w1Y73xg3R>E~e;m z7RBrn`FLk#yE+pRx$6utowUM|bIk<8Ot!l}{3gyl!6y1WR)&N|&De%^8b*+uOheVi zqY@ONBaK=|eo3lJ)BM4OIuE>^f;~6IfVV zd30cdc_xFs_ z055qVAMB{K(@9z>Qi&Of7qzAvhoj&$O-sJQ(9IRu%u8~2)ZfMQ989Djk8CyAV(J}cgHKtn_EG{x4crQjU*Eo;r0%4DJ(JGo)vlg7ZHtWVh zf>!1^6hZVL(`Q_+o)y9#zDCb`=TpB6U(nPw3i#Ntv(Rm)O{O_pG3lA(S;E0|FNV$0 zazSmEz9qgmE@H2_jF(A6){VF=CvND@r08fmV$z^+MnwzntK(>|cF{Jdy5rLGhYS5s z$cy?kFLq`3QW>QCY(u6|uiI`&wlMMLw7P!0!Wt;$PRYBzA4PLhZK;R2 zjjPmiQ+d3YOj*Tc@$!dE!BF*PT~?_8i9DG!R?8-@+#5m7_MpY60$GpjKE4kV<4oG? zX0q)O8ogA@Z>FG`G@3b@c!(B-SdfDz>#mHBATzvUu4xmCBN>kP71c{RUD#C3S=-E%LseoXfj%1Gho@Y#!JUo6s4l~`LpE5*@m6A0L5Bdzy8$iX(G^A@y(+VnO* zB+JO`I-G2D!(fQktkEJkOmkjnUsGKcp77=nL#hr`^=U6z%WU93?Vjjn~ z9A~4uvlX24ns|iU&2(qwHp{o6m893}_M*FUqz$igce2qaY_zxH^eiXs)l(BtS%19l zbo2gwQcd0LKD@hLOf=wTYq!x>z~+{qh)T<9Vx;cvtG)iYQ)Rz)E)-8I=! zcF*ptuzy~aK4PU|ktQ{Z3i{Y?t$29BbCXP_I`i7tG}#NdVb+oY4fZ4JHi$1a(#3|! z4tqu~ElRjcGJiu2^6adTv5Pxd*e)m23qg48d~{JPS=j8m6xUPH#PN7u|7)Dgx>@5?5kx9_d9sn(TVhAuUeah1H`8}#?O_?k z)1w7@q`;cA+9?<44Ec<5yAJ7n+Z|HbV^&rH8HKDw{*#UE_N?ILrrlw^W&NrvNAz%? zFW2=NMPDAUC)It&?uqZNI$q;r*nQq_;nP-??Y5_wJ*r~WZY-Xv+n(L}_@?fCs8f-} zUB^!xnXf9@?1wKrJpkHqoI_JXgi2!R5ssHhR;A(}BI zRsX^Rr@Vp87;6~4-BDz7JAb1^gF0bS6?VX5!*YPoW({_<0!9X3o1w8^46^c@6WF(+ zy%aE>kNgx_8Npal2twg*3n7cE%wvI3@a0;r(Ouyuws6vn^{ufCOsLRJpAI6Ls)#wF zQqk?%NG%5c9IHsAMY?!X%ZGAI+Xve#kd;|fm>>jcy(3e&W`)2~wg=xXW++)>E$QK! zjYR92^+U?_cz!FGV=2j$|DbLS&qh#G$oiwNy|JbQ6NbU*$baAlVX&I_$x@ckWaaX! zO1U7D-*_@Rbc+8EPn?QQN8WV9hn6aaVM3N>d%#6^$Kj&~cOQ3+MUyt%?>{hKKD1|r z=nO@+`y$~k+_YJCWJJQ+Gz9szWrBzf&IY~5l3D+8XbE$ePGt29V(Pusl1>2c2^(+)5 zgo!TyUL4GKa7ZUXOgU`i-lD?nXSK{p1e%@M#f@q=2W>^e#F=<_vatKzRy>R75D7WO1NKsg`8q zb5}gK>{97&dY65Qw82&-7Lxv1`LZfw(qwAeR8$Fni_ZF~tHo$HyeBujMC#>H3n&>_ zD^R3sd@j)vf#eCMqT+eUg%x9NdUaY|h8>0Fht+x?^Ju5r&&0u^7Tpf4W`0KO7&k6_ zCxH>6skC!T=_ENsiM*g>c5H>l?Q-1_w8|zTcKKYNp@QW`Z}C|XU#I`I4uocveJWbT zqfB}z!`xyZnIfGw$2f#ii!DW0F%2v>V-sD_siMTrDtsb-CYwIgaL0}Z)53=qOweO- z;PevED$>)QPfWryM)L|668IIxOy0F<+O#KXwz!w62wl8&tSR%sSa6^p6a?U^Nk#tB`C#snA%#;oK>L-Y)U-;|oxl-d3W zrHmPxnM0#04~MjfDvTx-O6NC7EKG^ueMbacExA;uno)<)5DKMH^q7F1-CEK9UN(#|R&E$!;C zHAJWm79k^MOJWH@mTj90+H2a)-+Sb!+lH-ujsNLnoc4>~db@*)?f!a76%Wt^`gwh* zCp_+MEXR~uvGU8A@L43&AS4gM7$gp4UqU-c=*TC$y2`+N^9K_?ZWEPYe%a}OQI2

QiJP=JL+=xVc^8j~Yr^3F4OtB|^ z`5NEC)krv>;~Zq9Exc0lP6rg;9+*BlTljx>XX!Z$oM~_*sdJy)X?3OIisX9Uj&pRU zBMjOdu-{Be)R%8{x8W}wS9G+K#2E`vKT&h^cM3-XwIYXxxb4s-$_tvsh)T5?SE58L zYXn9xnp@#rIBGSQ3)Rv03RnfF8s)5FStu*hk!oXn$ z#q9;ztyNbF&rD2%8Z{a*F>HG5p?ku+Ysn7Uv5}3;OA>HZ@G5a&gh?O#neZ+);Y9)v< zrbFrpYa3^mHkD+7xvnFq!lFJ7g~e~0eKd>Tu&8$ySs}8IO29245NuoD_z<#(4U?+L zOi=$-gRgda$)FSp?Gog{3V|hHec8K+I81VrLloeZ>i3clen3i?d0C_Rm=TI47*?Q_ zx3_(eqj*%xD8XS;|>r2HOm$g-`KWzSEcu*hN{G)i2OW9X@-M4=JpHmLN~A5JINp{wDXB5yJsjzE--LhK z*xzd0H1~>EU%P$B_U#mG9A&qo?6r|{H#TnAu5vd}?gq*o zAkf%2-a~CL%x-Va9ZK6v>lZS&Cuw(LM|Zfvu(&zn`5?QE;3}H7H!IaM+wa{%1=-R7 z3D!8C#GN_ER?n3*Uv@W>oMz8!W3c1;_%?~qd^RUQ)s!E!l+0#H|CWh^`wz}nWZ5yh zed2b~r7&*eIH756qC3~Wj_gXB`JFAe(7WzFen;b`s+>Abdb%;6HM`0J&bgb|h&^#{ z<4zwd(}?cc6ECm$vzxFYjgpx5Ccw71nO*()EXcp%U+uf;-@e;rfM@JXz6B@OE03ZOcC^O2b%I z=R)_=`SxI?dZB8($#Cg>+G(Y3{h_#h@sUgCiFYc$d?xNVJc%aN)7VnlYcaK1>bfff zN?d$IPglB~L7&tncg5H0xqpurk_`3zPM2IfuRbCFTj|B~)UpP%(FVU|0=CyL^cRsT zt!_SyZP@(*y;UpO#YfgOgcI@F#YgB~2RYP_tw~;OwWq+vEj$MwXKrIotHs%g^#@>2 zC^=F?O8bFxZez}t2s!p_bNS{v)Q|Pgvvr@AJM_i(7Zpv6vlu>|L?5-%HP%tu+v!Hi zr;9P+YqjX@iV6SV(s?!s@>RNkX+jLX9WM}9?#)ej7jOOZJ^F-;k}#)Pvf^(bO^iDe z_cRa5kk~QLA8Q}_UAqtLKN5txcA?*O@nLSgd2H_rYg>xcHoZK~J?Nq0C%gmw;={)- zK74Te9`qIhS)*rPzz}A^s6kNRyb=O{HfPcy``eUPC}RP{FtvYP)7642*|Q9E*m zBv7|5iuB%>Wa}5!94)2(f3@aWkWB83W8y6K&?R{6S3xm%w#od_8?Y_uVNO{GF6pme zv8))E`%YRVo#YJ1HmtKty}<&>nl$gEVeK%C8B0&4*^pcq`>?UsFotmO7%)`qdhu-r166tAX~d zr;fU5LEietjq7ytadg1frlpgo^~T3Me|!zkX>&fFAzRjsIO`8xd_*LME_hVXDE0*R zEHUR+B#(J{={(E3Sa1sK6#Ln=dA&Aih*>6WNh^~b#%nH@%rm8rFhq)OG`7H^e-3Kh2Fan<<^?zIYw;#;*Jwyi&* zFGf3EQb5b3XnsR)>l9j5X$uv$Qd_asUs=a7TZ_ma z*c`*Ji)BTzpk8A_Ahe~f@L^4qtDXh5ZE-eqa$|38Whk|brBgDLKkZ{Z6`!qk*T@f% zXwPH|_1QpVrc6OTC)<0#RJR5*1S?huYN*#trUYuVS8BbInmxp=wqZsWALcm|qY5!n zk>VyqB!B}c=1sV-e|`qbfO>nh0KK52){V7Dsq%er< zh!13vL?#bx6Q~dSWA9oxgTbe?CsH_j6GEgFUbaL0wf6a#~h&Mq@2Y$SJFO%BQKp#h7Pe?2-Kn#J!{48 z4c?;g6KYb^tTda~LZ;6~^B8PH6BMwtj8vw)-e$3Bzb@exy2F9V_=R}L>9%=%p@hz4 zW7WW2W-Q2Mz}Lc_>tKe&`4a2UyJv2&hIKkXN}EMB5t*syC1?>$t2bVD4tr9X%v?sq z-ugrAcEDQ7<7i}KzBf8?Y)Dv0#Im_zlc_wO3g$LZ>B9O2IkK~Uc;1l4pIR6oF7Ok5 zAK2x_$|v)Ifiz=hyMlD``YX7c>lZE||FXm!D7mX^Iz(ocRYixOxlEXA!^a`r`UT?5fgf1P)7ZA1VCYJIv!>YKzq#@Z3*8?f*jND`ub1{DQS9T!;VG5& ztjzB6;023_U054ghht;TKh%N1nA|K{Nx=Yw>VrfO)K_gLLgG5fV`_ ztQSql9#P6W=JJhEQfub#tm6EkKFp$!5H|+VZWxZ^5~z^hG|n24dL;!C6A~IiHb$pt z1WP1O?4SVr8DEsI;5GCz>zmvgw1f9h>6*%**6}9UFBkVL4au&9T3dLagO6_HWaIw1kMVnk*5WY!%hmK6afE%{W5!Er66 zYcN7(x@B$}vm~8y+Vqc%fLFw8C~#)dmK43Isi72Aly$|bTKKvM^;|lyiIiHR-O?(| zwz2I;rvQQ^@}o8Z%Z58XnvFId0@y^DAY^5(GfX(SElG;vAZVyiLfe8QnmAKq8xH_% zs!#l~r;t#70m(KSweJ~3A&*OwdZ-W=ht_izLSfp&ua?vGR+cyTtUm<b(dIO^j*l2R$bc z4|_N^#g=9^FZ+W6W(edd|Kfr_D^T2TI4@8>4zV}BKj7juvh3tC!k zSRZ+qhaQf+uRh0wx6cd9YjYj`Y{FKhs+x|3npj*|-<#{vhQOjT8_QI+jGSYDh>!08 zL+yKwQ%S8|#+XJ+m~rC?2Cv{wrtKA-T`=nfWv0^$UL)2Q#>O)Y-pEwV9Aem9yycCo z6N*{u%tDbf-evBn9@jWYXB#Lq_H+XcJg##M)!;WCZ}|J1Yp80gA8*jnld&foc>ZWd z8_L=?oN(Z?$9=Y;tYhSe!}^Dh+T`jyOhMv?lJ1XwxWQQ*-Oe`LX)#4?@EQlqMR%Xr zeRThvJBIy2Oc;sl4Mgc`WS|$fmfqmObp2QZx@rNX=(LIaYILu8xfVHPPG+~;G|eqmJ2a=O^7=;BmE&E&8kx11TI4po_g zUjJoWVw9&6KkE<4YD>UcbhGD?hVh2}osTF0;yUylVL4 z%A>jptJsQ{2N>WNe}17bI~BAtYiuxFB0r7YW_bu>Ii>@zuW-c7zzd|Afxh$|*Gk-F z=N@t;YK;EgR#W=M;)1fHaq4>*5A#K6z%S_uUoDyEmKwCDIBDWk1X<$=5#Uc zt-zAw(n7`dQ1AA_!=(uTjrm0Oo$tTM;cZmw3+d>ptO}alvkZuXJj-J6VdSN4<)z?c z9E8Ig%vf&#uF36#ZH726Y!PQVCnBVT&5I;K|2(&yibQBlKE57H}C&&ROa}$ zJQuO&;=}6?So*9u8L{{9u@k#p^?dx{2w$o=9TDz|;}PL@tMd_e9X@#X@$z(pzblS6 zxbQNF$db24zQOJc<%-X$C*;E?uYYMF*Cu!Hvyg^NMNFQn!}PC3#X}aD3?|;0Ev>)@ zp+bLRzbJ!s8Fm-?sVtsb*qDFROYB9L$hC3QTbZ^H&5ziIV5^Y5#!Ad%2WyueCTJl+ z;2av4yQG5@I!8fnzHQ!soVvb+-KY-v)F0@$#7Y&Ci2OpN^|h#0Um^5-2%5L>oq!yI|?n)W%@(f}*oJ8YX3cPTIPVzCekH zthjI?x+z)_V?aAa)qA`Jc?}8MGO)_SDGFuYSv`17g&EnNik|Lnnz@j(Vgol!eDOTmWto6qOb}ff zR{sjX=9X-cFUD&m4K<$eWfYzb!59|cO3bkYlilVOiv%kYAvEJW_s~CWx9OlGtdr&p zG;!W7%v#rNwGN@P#o>N(yow7GH+)k*3qr+jZ*cyA#$%K!4rut@J8qixN&Hx>4{xvyFpZ^p$8P=!NuAWtS&eY38#}L2yASW|*oJ>x zoYL@jdcpCH@JcmQUv#&4+$)|3-Coo*Q$CNpxyk0JU}0(R(~wRbm#G(51%&RYvCa>@#W7`tM?Qo{1!KeL8q z10d2ix<#$QY(zA$IQ_vt?Ss0m?rdWW##1EiNDXqsrVq{N^oPaSIRD{g0_Q+N^jwo- ze~k?%LW0S-;YbKaL;Tr^@Otz#NMR#xI1_>&z2Qtqu|q7J2MHU`{ArMpEo}Uowss<< zek7zQUEA@-`H#_qAfb#u22ylu^e{*$QX5VrZ6|AxOcMJjOpC3IeP~)GszRbQO`s$g z!6~l^kj6y4v=51iwG@L)7{rxCmc@LLAKMFtR|-Mz3tpD|SiwUc6??&<%wrvdQczJj z>LRwLMW@XEl)O&9W2=H0%VK6!LVOLoYM# z{V@`zOZ>`{ZS{IKrpi(*$c){B3TG6}ag3zuC-xGO2i z*;q1=NXm+1CRIJ)5u2X*XD_8AsxJHEBZb9k{6zZ5 z2y6k`4gC-OF0#CJu~d9SFAIW%O$;Vc3YF>n@se>x=GbFU@aKOBL*_h!i3k zW=n@eymovVjrCE{H>SEiVTv{)Z*($b3jgxbd0)9PudHE0a(KA%ldIT`j#KI1zqaEf zxK3XF1fdk(>ClMPTxAx-0bT?UqLY8mxoJzx6;YTVm1^RV{WYcYSPq~Fis9sY{$jW& zR0ZkST!+-dj|lSB!Z;P}>hw}LiUnE`Q0_kdHsXpkC5J*v0P<8%&Bir1wN4EmYY6oy zy5^HpSb~b-X?DbQMD$~c=i zE4s<}6+<&#E2_+Vu3Hf+Iz*(Efpd}RlzZg&m9RaeokWC#G1g>K&;=q7#5P79v;PO- CUZk@C literal 0 HcmV?d00001 diff --git a/po/tr.po b/po/tr.po new file mode 100644 index 0000000..08a6aee --- /dev/null +++ b/po/tr.po @@ -0,0 +1,1144 @@ +# Turkish translations for findutils messages. +# Copyright (C) 2007 Free Software Foundation, Inc. +# +# Nilgün Belma Bugüner , 2001,...,2007. +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.6\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2007-05-30 18:39+0300\n" +"Last-Translator: Nilgün Belma Bugüner \n" +"Language-Team: Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "%2$s için %1$s argümanı geçersiz" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "%2$s için %1$s argümanı anlamsız" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Geçerli argümanlar:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Bilinmeyen sistem hatası" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: `%s' seçeneği belirsiz\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: `--%s' seçeneği argümansız kullanılır\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: seçenek `%c%s' argümansız kullanılır\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: `%s' seçeneği bir argümanla kullanılır\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: `--%s' seçeneği bilinmiyor\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: `%c%s' seçeneği tanınmıyor\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: kuraldışı seçenek -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: geçersiz seçenek -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: `-W %s' seçeneği belirsiz\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: `-W %s' seçeneği argümansız kullanılır\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "blok uzunluğu" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "“" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "”" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[eE]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[hH]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Kullanımı: %s [-H] [-L] [-P] [-Oseviye] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [dosyaYolu...] [ifade]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "Uyarı: %s dosyasının kipi 0000 olarak görünüyor" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Tanınmayan hata ayıklama seçeneği %s yoksayılıyor" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "-D seçeneğine boş argüman." + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "-O seçeneği ile bir ondalık tamsayı verilmelidir" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "-O'nun ardına lütfen bir ondalık sayı yazın" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "En iyileme seviyesi %s geçersiz" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"En iyileme seviyesi %lu çok büyük. Dosyaları çabucak bulmak istiyorsanız, " +"GNU locate kullanmayı düşünebilirsiniz" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"FIND_BLOCK_SIZE ortam değişkeni destekenmiyor, blok boyunu etkileyen tek şey " +"POSIXLY_CORRECT ortam değişkenidir" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "çalışılan dizin alınamadı" + +#: find/find.c:211 +msgid "cannot stat current directory" +msgstr "çalışılan dizin durumlanamadı" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Uyarı: %s dosya sistemi zaten ayrılmıştı." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Uyarı: %s dosya sistemi zaten bağlanmıştı." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s, %s yürütülürken değişti (eski aygıt numarası: %ld, yeni aygıt " +"numarası: %ld, dosya sistemi türü: %s) [ref %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s, %s yürütülürken değişti (eski dosya indisi: %ld, yeni dosya indisi: %" +"ld, dosya sistemi türü: %s) [ref %ld]" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"%s sembolik bağı dizin hiyerarşisinde bir döngünün parçası ve gösterdiği " +"dizini zaten ziyaret etmiştik." + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Dosya sisteminde döngü saptandı; %s, bir dizin gibi %d %s olarak aynı aygıt " +"ve düğüm numarasına sahip." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "seviye, dosya sistemi hiyerarşisinde daha yüksek" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "seviyeler, dosya sistemi hiyerarşisinde daha yüksek" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "uyarı: %s sembolik bağı izlenemiyor" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"UYARI: Sabit bağ sayısı %s için hatalı (st_nlink=%d ve biz zaten %d " +"altdizine baktık): bu dosya sistemi sürücünüzle ilgili bir yazılım hatası " +"olabilir. Find'in -noleaf seçeneği etkinleştiriliyor. Önceki sonuçlar " +"evvelce araştırılan dizinleri de içererek başarısız olmuş olabilir." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "bilinmeyen" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"uyarı: %s seçeneğini bir seçeneğin argümanı olmayan %s argümanından sonra " +"belirttiniz, ama seçenekler konuma bağlı değil ( %s kendinden önce de sonra " +"da belirtilse sınamaları etkiler). Lütfen seçenekleri diğer argümanlardan " +"önce belirtin.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"uyarı: -d seçeneği artık önerilmiyor; lütfen yerine POSIX uyumlu olan -depth " +"seçeneğini kullanın." + +#: find/parser.c:1002 +#, fuzzy, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" +"%s mevcut bir grubun ismi değil ve bir sayısal grup kimliği gibi de " +"görünmüyor, çünkü beklenmedik bir %s sonekine sahip" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "%s mevcut bir grubun ismi değil" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "-group için argüman boş, ama bir grup ismi olmalı" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"öntanımlı dosya yolu çalışılan dizindir; öntanımlı ifade ise -print\n" +"ifade şundan ibaret olabilir:\n" +"operatörler, seçenekler, sınamalar ve eylemler:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"operatörler (önceliği azaltan; -and başka bir şey verilmediğinden " +"örtüktür):\n" +" ( Ä°FADE ) ! Ä°FADE -not Ä°FADE Ä°FADE1 -a Ä°FADE2\n" +" Ä°FADE1 -and Ä°FADE2 Ä°FADE1 -o Ä°FADE2 Ä°FADE1 -or Ä°FADE2\n" +" Ä°FADE1 , Ä°FADE2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"konumsal seçenekler (daima `true'): -daystart -follow -regextype\n" +"normal seçenekler (daima `true', diğer ifadelerden önce belirtilirler):\n" +" -depth --help -maxdepth DÜZEYLER -mindepth DÜZEYLER -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"sınamalar (N, +N veya -N ya da N olabilir): -amin N -anewer DOSYA -" +"atime N -cmin N -cnewer DOSYA -ctime N -empty\n" +" -false -fstype TÜR -gid N -group Ä°SÄ°M -ilname KALIP -iname KALIP\n" +" -inum N --iwholename KALIP -iregex KALIP -links N -lname KALIP -mmin " +"N\n" +" -mtime N -name KALIP -newer DOSYA" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path KALIP -perm [+-]KÄ°P -regex KALIP\n" +" -readable -writable -executable\n" +" -wholename KALIP -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user Ä°SÄ°M -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"eylemler: -delete -print0 -printf BİÇİM -fprintf DOSYA BİÇİM -print \n" +" -fprint0 DOSYA -fprint DOSYA -ls -fls DOSYA -prune -quit\n" +" -exec KOMUT ; -exec KOMUT {} + -ok KOMUT ;\n" +" -execdir KOMUT ; -execdir KOMUT {} + -okdir KOMUT ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Yazılım hatalarını http://savannah.gnu.org/ adresindeki hata raporlama\n" +"sayfasından ya da eğer http erişiminiz yoksa \n" +"adresine raporlayınız.\n" +"Çeviri hatalarını ise adresine bildiriniz." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "fnmatch() kütüphane işlevinin tutarlılık sınaması başarısız oldu." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"Uyarı: Unix dosya isimleri genellikle / içermezler (dosya yolları içerir). " +"Bu, '%s %s' ifadesinin bu sistemde her zaman yanlış olarak sonuçlanacağı " +"anlamına gelir. '-wholename' veya '-samefile' sınamalarını daha kullanışlı " +"bulabilirsiniz. Ayrıca, eğer GNU grep kullanıyorsanız, 'find ... -print0 | " +"grep -FzZ %s' kullanabilirdiniz." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"uyarı: -ipath dayanağının kullanımı önerilmiyor; yerine lütfen -iwholename " +"kullanın." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "%s için bir pozitif onluk tamsayı argüman umuluyordu, fakat %s alındı" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "Bu sistem dosyanın doğum tarihini bulmak için bir yöntem sağlamıyor." + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "%s nasıl tarih ve saat olarak yorumlanacak, bilinmiyor" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "%s için doğum tarihi saptanamadı" + +#: find/parser.c:1760 +#, c-format +msgid "invalid mode %s" +msgstr "geçersiz kip %s" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"uyarı: %s ile /000'a eşdeğer bir kip şablonu belirttiniz. -perm /000 kalıcı " +"olarak -perm -000 ile değiştirilmiş olacaktır; yani, hiçbir dosya ile " +"eşleşmemek üzere kullanılmıştı, artık bütün dosyalarla eşleşecek." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "-size için boş (null) argüman geçersiz" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "-size türü `%c' geçersiz" + +#: find/parser.c:2027 +#, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "-size için argüman olarak `%s%c' geçersiz" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" +"-show-control-chars seçeneği ya 'literal' ya da 'safe' olması gereken tek " +"bir argüman alır" + +#: find/parser.c:2313 +#, c-format +msgid "Invalid argument %s to -used" +msgstr "-used için argüman olarak %s geçersiz" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find sürüm %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU gnulib sürüm %s kullanarak derlenmiş\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Etkin özellikler:" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "-type için argümanlar tek bir harf içermemeli" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "-type için bilinmeyen argüman: %c" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "uyarı: tanınmayan öncelem `\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "hata: biçim dizgesi sonunda %s" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "uyarı: tanınmayan biçem yönergesi `%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"hata: biçem yönergesi `%%%c' gelecekte kullanmak üzere yedeğe ayrılmıştır" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Çalışma dizini PATH ortam değişkeninde bulunuyor ve find'in %s eylemi ile " +"birlikte güvensiz oluyor. Lütfen bu dizini PATH ortam değişkeninizden " +"kaldırın (yani, \".\" ile bunun önündeki ve ardındaki iki nokta üstüste " +"işaretlerini kaldırın)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"%s göreli yolu PATH ortam değişkeninde bulunuyor ve find'in %s eylemi ile " +"birlikte güvensiz oluyor. Lütfen bu girdiyi PATH ortam değişkeninizden " +"kaldırın" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"-execdir ve -okdir seçeneklerinde uygulama ismi içinde {} kullanmamalısınız, " +"çünkü bu potensiyel bir güvenlik açığıdır." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "-exec%s ... + ile sadece bir {} desteklenmektedir" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "exec() için ortam çok geniş." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "bugünün sonu bulunmaya çalışılırken aritmetiksel üstten taşma oluştu" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "standart hata" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "standart çıktı" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Uyarı: %s dosyasının doğum günü saptanamadı" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "Standart girdi kapatılamıyor" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "Dizin değiştirilemedi" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "ayrılamaz" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "%s beklenirken hata oluştu" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s, %d sinyali ile sonlandırıldı" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "ifade geçersiz" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"geçersiz ifade; öncesinde başka hiçbirşey olmaksızın bir iki terimli '%s' " +"işleci kullanmalısınız" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "'%s' ile ')' arasında bir ifade umuluyordu" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "'%s' sonrasında bir ifade umuluyordu" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "geçersiz ifade; çok fazla ')' var" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"geçersiz ifade; bir ')' umuluyordu ama yok. Belki de '%s' sonrasında ek bir " +"dayanağa ihtiyacınız var" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "geçersiz ifade; boş parantezlere izin yok" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "geçersiz ifade; bir ')' olmalıydı ama hiç yok." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "hooop -- geçersiz ifade türü!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "hooop -- geçersiz ifade türü (%d)!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "dosya yolları ifadeyi öncelemelidir: %s" + +#: find/tree.c:1239 +#, c-format +msgid "unknown predicate `%s'" +msgstr "geçersiz yüklem `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "geçersiz dayanak `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "`%s' argümanı `%s'de geçersiz" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "`%s'de argüman eksik" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "çok fazla ')' var" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "umulmayan ek dayanak '%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "umulmayan ek dayanak" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "Hoop -- öntanımlı `and' yerleştirme geçersiz!" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Kullanımı: %s [--version | --help]\n" +"veya %s most_common_bigrams < dosya-listesi > konum-veritabanı\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Yazılım hatalarını adresine bildiriniz.\n" +"Çeviri hatalarını ise adresine bildirin.\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "yazma hatası" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils sürüm %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "gün" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "--max-database-age seçeneğinin argümanı boş olmamalı" + +#: locate/locate.c:219 locate/locate.c:226 +#, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "--max-database-age seçeneği için %s argümanı geçersiz" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "locate veritabanı %s ya bozuk ya da geçersiz" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Locate veritabanı boyu: %s bayt\n" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "Eşleşen Dosya isimleri: %s " + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "Tüm Dosya isimleri: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "%s baytlık bir birikimli uzunluk ile" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\t%s boşluk içeriyor, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s satırsonu karakteri içeriyor, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tve %s yüksek bitli karakterler içeriyor.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" +"Bazı dosyalar süzülüp atılmış olabilir, bu nedenle sıkıştırma oranını " +"hesaplayamayız.\n" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Sıkıştırma oranı %%%4.2f\n" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "Sıkıştırma oranı tanımlanmamış\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" +"locate veritabanı %s bir slocate veritabanı gibi görünüyor ama GNU findutils " +"tarafından desteklenmeyen %c güvenlik seviyesine de sahipmiş gibi görünüyor" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" +"%s bir slocate veritabanıdır. Henüz yeni yeni desteklenmektedir, şu an " +"sorunları olabilir." + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" +"%s desteklenmeyen %d güvenlik seviyeli bir slocate veritabanıdır; atlanıyor" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" +"-E seçeneğini belirttiniz ama bu seçenek sıfırdan farklı güvenlik seviyeli " +"slocate biçimli veritabanları ile kullanılmamalıdır. Bu veritabanı için " +"hiçbir sonuç üretilmeyecek.\n" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "%s bir slocate veritabanıdır. '-e' seçeneği etkin kılınıyor." + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "eski biçim locate veritabanı %s geçerli olmak için çok kısa" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "%s veritabanı %s biçiminde.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Kullanımı: %s [-d DosyaYolu | --database=DosyaYolu]\n" +" [-e | | -E | --[non-]existing] [-i | --ignore-case] [-w | --" +"wholename]\n" +" [-b | --basename] [--limit=N | -l N] [-S | --statistics] [-0 | --" +"null]\n" +" [-c | --count] [-P | -H | --nofollow] [-L | --follow] [-m | --" +"mmap ]\n" +" [ -s | --stdio ] [-A | --all] [-p | --print] [-r | --regex ]\n" +" [--regextype=TÜR] [--max-database-age D] [--version] [--help]\n" +" KALIP...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "grup izinleri kaldırılamadı" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "setuid izinleri kaldırılamadı" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "Ä°zinler tamamen kaldırılamadı" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "setgid izinleri kaldırılamadı" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate sürüm %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "--limit argümanı" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "Uyarı: locate veritabanı standart girdiden sadece bir kere okunabilir" + +#: locate/locate.c:1863 +#, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "uyarı: %s veritabanı %d den %s daha eski (aslında %.1f %s yaşında)" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; karakter " +"değerleri %lx değerini aşmamalı." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; karakter " +"değerleri %lo değerini aşmamalı." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; ardındaki %s " +"karakterleri tanınmıyor." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Girdi sınırlayıcı belirtimi %s geçersiz: sınırlanan şey ya tek bir karakter " +"ya da \\ ile öncelenmiş bir dizge olmalı." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "icra edilebilir olarak ortam çok geniş" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "uyarı: %ld değeri -s seçeneği için çok büyük, yerine %ld kullanılıyor" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs sürüm %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "Girdi dosyası %s açılamıyor" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Ortam değişkenleriniz %lu bayt tutuyor\n" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Argüman uzunluğunun POSIX üst sınırı (bu sistem): %lu\n" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" +"Argüman uzunluğu için izin verilen en küçük POSIX üst sınırı (tüm sistemler: " +"%lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Kullanabileceğimiz asgari komut uzunluğu: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Kullanmakta olduğumuz komut tamponunun boyu: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" +"\n" +"xargs şimdi çalışmaya devam edecek ve girdisini okumayı ve komutları " +"çalıştırmayı deneyecek; eğer istediğiniz bu değilse lütfen dosyasonu " +"tuşlayınız.\n" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" +"Uyarı: %s en azından bir kere çalışacak. Ä°stediğiniz bu değilse kesme " +"tuşlarına basınız.\n" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"%s karşılığı ile eşleşmiyor; -0 seçeneği ile belirtilmedikçe öntanımlı " +"olarak sarmalayıcı karakterler xarg'lara özeldir" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "çift" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "tek" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" +"Uyarı: girdide bir NUL karakter algılandı. Argüman listesi üzerinden " +"aktarılamaz. --null seçeneğini kullanmayı düşündünüz mü?" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "argüman satırı çok uzun" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "ast süreç beklenirken hata oluştu" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: durum 255 ile çıkıldı; bırakılıyor" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: %d sinyali ile durduruldu" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: %d sinyali ile sonlandırıldı" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: -%c seçeneği için geçersiz sayı\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: -%c seçeneği için değer >= %ld olmalı\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: -%c seçeneği için değer < %ld olmalı\n" + +#: xargs/xargs.c:1306 +#, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Kullanımı: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=ayraç]\n" +" [-E eof-dizgesi] -e[eof-dizgesi]] [--eof[=eof-dizgesi]]\n" +" [-L azami-satır-sayısı] [-l[azami-satır-sayısı]]\n" +" [--max-lines[=azami-satır-sayısı]] [-I değiştirme-dizgesi]\n" +" [-i[değiştirme-dizgesi]] [--replace[=değiştirme-dizgesi]]\n" +" [-n azami-arg-sayısı] [--max-args=azami-arg-sayısı]\n" +" [-s azami-karakter-sayısı] [--max-chars=azami-karakter-sayısı]\n" +" [-P azami-işlem-sayısı] [--max-procs=azami-işlem-sayısı]\n" +" [--show-limits] [--verbose] [--exit] [--no-run-if-empty]\n" +" [--arg-file=dosya] [--version] [--help] [komut [ilk-argümanlar]]\n" diff --git a/po/uk.gmo b/po/uk.gmo new file mode 100644 index 0000000000000000000000000000000000000000..c45f949c15dcb5b2dc917e5a83105096de0c9af0 GIT binary patch literal 23037 zcmc(md5|2}ecxM=M2RcOGHKdYWSf3u1T7$-mjFnL)Pkf45uk(!mjUn+L;<}sy}M(~ zv7Da4Vkt`IAxL1vA}NI?9a}UhDn3$*Y!JjnkOXa4E|*JAkK1}*Kk#3@JBl*kcYyZ+?|M%ZeE|5! zz`qOpE1>3i=TG?iwZL`UZw3AWunk-Vd@{732FBcf2k3y8y*G+J2;2yKAMhUF&jH)O zUj#lL;O_y2=br*U1pFJ|TY!J>C!>hJXcb?V13wJZxNSh~w+3{;FNf#<6nF*quLFhu zp96me_*cN62EP3=<^=v6@Fw6#fm6T-0{m~l3ilslu?K;_4b(ozf6A}B75KBv{k{uC1fxs1xdiwwp!jh)Q21R3G(Ls) zT7X{$uI2f+!t?(CbliU*$d;q`Lu^oqHUdTW9ej!Jhk(0*p9g*z_^*LY;3Zdjx#x?!O9@{Jsiw!2b^XQ{Y><(SH66c-I??59>hsLI8h8`;zr*GZ0RIP&C8I4U(H+29 z;GYA}1OE^3AA*GNcoZf66W}S}bHImKRQO&s;q`R^ILZCfj{0?4+a51=$Z z3H%^X`?&$Q3Ai7~QqeQO>wy0t3p6n!qc)zfh= za5wi41o&;>S?;f-(+1}IcR;olUCN}WNOUvsQsDjoQy|@<7Vu_%+y|6g|Na)g&;JSh zMef~JuaCC^HQ(L9+kuY(-wFITK=J241I4%R0TI<`J)J%dybA~_(Q`oY>o0)f*JV6Z z|J#9(E_xIwy8aPRc>HyMYd_)nJ_T&k{zc&3!0!Y95V&WXm%A(ezNh~*Q1W%fCp{jU zfpm#xf&4`$_*x760q|464-YHmP(3BNTa;c{GcuB*B9xr|Hu z$+$#^gIti*Z0|dPKf?ve_5o$X4H873_Dv=W@8&mV#y(f^ji}p4^7ivw8@bqC|08+7 zk4t?2Wv&l%t>%I}#uHd)dxvzU>+b`WKd5Acc-iNY0Ox?Bt7KcBCf9=f@^TjQd!Fk< zTr*q`aKT#hr2wNns%N?;`PAny*Zb|4x3P$#eOi3KC;S$88`o#JuHcePqB8vtYHfB% z4Y%rxPmSva`{iZw2){RQO@+2Hcn3FEhK5zZ3fE6@-OrVB=`-$u*_RLU8_|pq3zOp= zz-cbozAo2|TvaZ8FePSd?zOupY6N%)DB0ELau4iVcA)%`Ug#seS!chzPddQww{mUf zdOO#9xqgCcmP@wQK4X`z%3P(@>?F0OYo_z{S~GQ(*`%FRI%zvw=c2JolV;VGdJUes z`C4bzb!JmHTbr46Q?-uE($2&fV_MU0ezsPbEf1ujlV)>CCDpWh(z#Z<$mU&NRCdt@g|qc;myy6tw_?6_*JomM)n_QEDt zbW4xSwbLxCwVLW2&$VmK&RD6jkt}G(SuN|h*7T%n&86*xDcEdluEQ{XfM*AwokIw< zO^!v*K5?_v&C<35&a_+IIaUx}yEpIKw{_1>?$UO{?Oz+;yJOdutuAh-GwG4y=~$Se zohH>}s-C)dzFq71U+Iyw(zV}3uld5KO4yi*D9%Nb{kVHw5ncRCxKe3dAe3lvxTga zHk=^>n^t9O-2QgTZ1w8B7r$n$*{UvHa&hZLtT@T8kk6_Y>a3G=x|!Q}{q>t%GKHYB zZP1!@wR%0BfihlHTpYVq7156;&BI9@!UqCOw~&!lmC$jx%i_VI<>0Eys%+dX#<>II9^u8_{LZ9X4h~qb~V0;&hx@h!5 z?`1Ju3b`^tvrcPnZm~E{t{|$DuG_>Qv}T$pO0{5;r>dvUlFy9@{y98ErG}a3ve{M_ z37<;cO%l+H>Uqn}zUz3zn9NN~ObFcKKI)>)^}4$q9guD#I5bDMwHke^g*B?R#Mo{V zn}$JV!7T} z=;J%@aI(4XFt%Rmyb2jA8qE+ddQxvyun~)zk07DhQ0umtX3LC4pW?DZ)f7ALrt8TJ zYen0F%A{E(!GvWm)=3EyGpVn&)6tnHJxwKN7uCYF-PQ01Hn+7h<8N)Nz z=;98VtqxY8l7i@}dh2h0i6d`viB3DI;jw21+mR);Z3HcV=7Tj>Bq#&XEJS8NaH9!A zpW^1Be}Y$N&fvBB5rD(SVOd7mhw(In=}qaU2MEY;HENkL(ACq!DIO+^wtJDP79uVu zXIe3}fFB-$U1vatV9ORVhu8nprfqT8HVVzdX0-y=!woSW* zR@coZgeGX9>6ZB(sm6lC7*`I}7uNasqY6#CBB_(gdBvKDcGpwsxfga68h%u24LnZp zE44-=t=7;%wvkLrFXCNM2&PtR^9V)dkeh20o)8AHRnR!XDrU7&F^zIIgIyhLGLNzqzcQev*00Z zRy9@HKs;9p?xMYlXG)Bl>P}CyBlwrJxdz;0I`OYN7VT{j5Q(N{J)NRCLt`pUwbMEj zk>&4p*11fWxeEBB*T@FuB(=TkcM&6+wZ(q!leOGcxQs&d%haB3$sIE}@zH=SM3;nk zZ9g7IF&`_OZnx^O)CBrlOzAqwp%gbOb5Q2UJ<9@i-ZZ#DwVA|R>nfi5M6>}UJVJ5U?3{;p>#3#ewkK~beAMuJU zk`bgjh-5o$wBWaF#A1A=+pUIVzwJI?c&zTsB1AO=A`H8F;%aRQ>6UEh=fHZk>O|OU zY^P=XgKpI!mUqcg$kl5m7IiE(>Tch*bIXB`ZQpgH(dy8 z({{Vnj_%0NC9`DvsQo%!0Hkyr>beSb}5mmbgnkXIWR= zI>b+`Nm@xXmSGn7ByO(N0l^vu(Ii<@VC#_b#zdqQLzIA8hY z{*48Su-{wZ*hf{aAa~~VBVjAe`2Mur8mw)!Mn`tGAYDe9s=mZ`Ogob{m02>kwr4vi zCdA%=YkNsqLh7&;j?5B!hpjOm2sf2x;)?h+NM=dhKC{2M^IpCe?zuNQ7!}#7i*e&A z=FaE8>jRv2x9{4sWAi>2Pg`Eh{kH8}`;FG-ip0@(S?{}q0pX@jVok0Y?&jKE{ArAL z>l9tGb8t8u%1cW&b6~AXv9LZ?uA*v<|SyXLx5yI$#_A4^m zK!{M2yDczW+(^hn%7JLht@=S`O0cT9SF_F*`n#;7FgrphFk%Rs05tn>QH3EzGPu(K55u^ zRJ8Y5GT_ppM+b!wCkZI0*7-o%B6TWz zh8Gm5q*W!e7(Yeja$k+PdaXi{)Jq_7GXy5_hLAXm+TpahW-=JU)o$zEyZ5*?ga=po zpH2nGPVrk$H!!i?Z=_ezz)JeLG0YR1TciCji`K0_a$Oh}$;*UnIP9ThO=N(gxmJeh zYN&qu-!lMr0%goi031KQ4jgL6ZCVN0d7C;B z`7AoJ8nauyQwfT~g|#~s6vy_xQ&ddYfunGnP)0>@%u~mN>*PPQR_tl9jY_!>%lSUu zcE!_4oe(OX&ddz&yJz=S7tg3f46qWms=~!gwfb<$8S}toyNmL6jWkpPYfDt8sWdK8 z?8fIF$~0tT;zrnBqri4}p}~eCqKm@0rALO$;tG$hi`!%BEdsRD9PEMDA10)JT)2G7o;@lEHV}N0f?k$>tVZs*;t8aPn=&T0D^n zpHUJMXR)SFMVM7laRZauv3$-tj>moW;bD2%K?;HqVt>=!I`2W+4y$H9X*|wAP}X{! zsWvOUR?0}}hB8Jd1IT_23K^6g=GK`n^EDU|ZQNX-3MoZA`T#LS%FC16@BfsxI5D84 z%$zqH=D*RYY@spL!gMNpJ0ug-r@Dps{W>o;7LCX9D(K$i=6oeZ>jzt*k`IbqPAgJZ zPdciiFgWqK9tpfGwQ4xizGhm&PAmE(p`RU?0$War7RzurONO%!i7s(Pg}`D6;emII zYxeGF1-wgY7LYGZ)~~Fp)*Xs)2S2SStH0h*7u+~n5Z;-=LISH*L%n_Rn=+Y&rE$M_ z0fH7Z<83J>cvh=dKxwdCKe!m!aS;qL4oQ~}V|*f2G=+B?^zuns;Ta@W5{8n)Sx`;<6X?n2BnuwBARDlDdErafl2`HP_PFpIs4 zSdCqppK+{rEj=T#muv$sJJEuM<17q`Ho1|JQ0^>C z9?#DZw^$WnY|tb`UuD?o-XjI&&oK{J+MH)0&SPNCs^>xGl;*LuA7uL{)@kWidXM+M z6z+VFQ?_vt>6~z3(!@*F>cSNHj|;Qmbh)%?k&U*HGYiGC*_t^^O3O3Gj2#&hn~{u_NH z1%2RwL{x&s%}EEpkM|xzju~|h;%eM$`D?u=B$ulTDYlt447ReI7gw?IVb+$&;Tzza z*C=6e!M?pOu+YmUT;Oh4+hV6!L8`~$0LiKCMw0Uy62l_lq`;fri$5?higl^=P2h)E zqm)n-N}*t9%|<*yWAEw0ETF&ARqTYFHz+ZZ-hB>;w)u+?0i})fvJR@68lXqsD43d> zt|$X8&Lvnkn92B4`8h^2OpJzMA~>2Ot?#QD^yb)tf5pATP-AD%$e~q=Hvh7{FG7a3 z$p%QCV53jT2Ebfad=Z2&n%KqsB}^E?1Y;kTo`>ZJa}op_GUvfoa&?C9Jr!n^YSSa};-wj81eyqDO-49YnAcuWGhz9A5BwE%*QjKuY z@ii&sl1Q8C4_gtLm*s@CFP%vE8B-7;a2du?;ZA7xrHkct>G5^0_oxM_C?SE1 ziDfB{IO8~Dv;;RS0Jbbbnyw^+1Vhqjp|1h}vs3IN%AYrlREkJE`yz;)QEV_UpWYam zX|~7YTT%gR=U0sjO3b`Bl7buUm$mF)WBPM}VZ`NT0ZjX4Ku-Jp$=E8YlLJ&)&pg!{n3*4DGQVm}q6C za&k(?>2QozpNkHhrjh3%J=Z?WQ<6=v6e%!VFQ2X=eNymu8a}HCz^v*+ML?sq4JVl( zE*=h%@xmZH8Yb_G@~_JQi1DBw)(o!10#8U)Mhdd5>W#RmBFytTOWb0f*u+m_pbYbA&`^!$v=Q8hvvMfrH50XA0w`!1wV2pD z%HZG!6>L2t=?|!T9|t=Q;U)1yQG|F+yDlau!VTUzeF8)Z zx%C2~nwX*zZ@HB|5=Hf%Qqh5UOPT@k(T&Fy%uB{C$y8V(Et_x{0NE0m-CzP#S6Bga z)?<-AqI7CO}gTm+c zouz7mwx<(v3?~03zkLrfpdOMxio?kHI`7E6D>VlwGwF@G43=#}Hn*^>#OGpZ*+$4` zVld5FFM0CLB$s#Jl9{E?-mxZ`E#K@cE+=Q4#WVj8lVX!2gt>P#_Thn|ffaEXJ*j6# zJUGvAV9zSOGXKEXntUtfEmWesk;u=2I9&85 zOSq_X%571Minp3xTZq6Sa#F=3W=DN4ddD&>KGc-e9ttI|Y(Q{kcYAZYJ_fIM>MH&-$~CEcJrUH=4DlvasCo#{3^s z+J8R(8m00V28SGJeKP+?`ER)4$4eh~>~}7XJPsO)V~>ND<&Hk)zYZS4;#oqIC;KNL zN1BVXjBccT(Rs+x=L0Pmc~Z;}5AsHmpeM z$_p*h5$T+)vgzLP!}`W@`8^nwj4{;Jhh@!kPN4ysq2Tltv8wOcOzcVdjWbpUL>kg_C8?xv3xOG19raQwe{6?k{rymNo}NT7336I08(n7v@De|H1F1VGiwH{@B(54X4kBZafNWSI7VV` zWEQbVRyBVie{!62x6LYPVtMN2^wKZjX=fGz;`tNKKkV?Uw6K?tAUg=)YVkz56OK{h zprT^11K!2-9zj$=k~{I!A_n=s)9`TM>2+k<*B~tY*8rhjk~27uC{my7p9lW&otZA8 zSoUwhMkrtge7$oQ{Y41>cI0G<5h9XYb7U%{lq8r-(<3h|6r+oZN6-uG>1rErg6`C3 zFYfF$BP8&g@=#18n+&JSb%&~vSh#3f%t49vepIoKzy^5{Z+>hx83P*nyjkw7cK&?+ zMUt&&^<6r#J<|N6KDW)LOZ9^RS0Fgp+rcW8naB_MRxWc2is`N3X+}}(d(>z5U}BDYLm0Um1iC1xaq=5_=?w{|zgg<6Tk8DxAn9274EUhm8$JgP zBf=4*;>=Sx4W193oAO7(N81*i3m@s=4~LfbxJq? zZS7uRJjiN--cz9{T%3-V9$^B_LlmwAYwI%xal9~*{;<5}DJmZ2;DEQI`B&IJ6z?7L zyYT3Tz^AlI@Iz+PhmO)qd9jvW!+j-`fO7Z@eO|om%1@gYC@lq9?cIi@Z~n!VKTTiQ z4A~+ZWJE4rb`1x47jf2pMTyV?km00}H6(b!Zz;y&l%OQT;wsRx)B%z32So|a6g(@d zkZ4;OmWZuLY5VRkFI6iCqFS|?C0%gY;xvmDEV}3m%VW#!-`-7ylm75vv><4kdd=}# zzzWVW%W&jO!YpCrB<@OjVpTdtGK0ccaXO_`?Nb~p8CP*aNF(B$?6vK%h7yPeX;oC@ zb9FlF4MHfLi;{W~phN^EFroJ^UYQm(T@k^)y8Hhq5Qi>I$5Jg8S`1#8mj1bC#YM3P zK~&^U(QMCq*$`z+<-;)J_HPL*%Ux+M*=H=0vPY}ii0~>6`l^*)u<_=}|MS8Ma~39} zsMqj9ToaAH#tla$78S5gAw{w|;!$C$mXp3x?8+)DiIPwU|00wfDlLc7JR)g0mR!X^ zY80-O-UJ{p`o9ST#B$w1bjS!Yq^C@!^bD0VIk)A#8p|&XB1`>m1&9s3!I7z?B^>D) zghvDXLl9YngMJO+qm+hY4lIG0Gn31KiD0=)`}gBb4cW69{I7cA6e2167!H6Ba5-7T t{~_=kp$aP#eo~h, 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.2\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2007-01-03 13:55+0300\n" +"Last-Translator: Maxim V. Dziumanenko \n" +"Language-Team: Ukrainian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "некоректний аргумент %s для `%s'" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "некоректний аргумент %s для `%s'" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Припустимі аргументи:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Невідома системна помилка" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: ключ `%s' неоднозначний\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: ключ `--%s' використовується без аргументів\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: ключ `%c%s' викороистовується без аргументів\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: для ключа `%s' потрібно вказати аргумент\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: невідомий ключ `--%s'\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: невідомий ключ `%c%s'\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: невідомий ключ -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: некоректний ключ -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: для ключа потрібно вказати аргумент -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: ключ `-W %s' неоднозначний\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: ключ `-W %s' використовується без аргументів\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "розмір блоку" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "`" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "'" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yYтТ]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nNнН]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Використання: %s [-H] [-L] [-P] [-Oрівень] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [шлях...] [вираз]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Невідома ознака налагодження %s проігнорована" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "Не вказаний аргумент ключа -D" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "За ключем -O одразу має йти десяткове ціле число" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "Вкажіть десяткове ціле число після ключа -O" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "Некоректний рівень оптимізації %s" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"Рівень оптимізації %lu надто високий. Якщо треба дуже швидко шукати файли, " +"скористайтесь GNU locate." + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Змінна оточення FIND_BLOCK_SIZE не підтримується, на розмір блоку впливає " +"лише змінна оточення POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "не вдається отримати поточний каталог" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "не вдається отримати поточний каталог" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Попередження: файлову систему %s відключено." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Попередження: файлову систему %s підключено." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s змінено під час виконання %s (старий номер пристрою %ld, новий номер " +"пристрою %ld, файлова система %s) [посилань %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s змінено під час виконання %s (старий inode %ld, новий inode %ld, " +"файлова система %s) [посилань %ld]" + +#: find/find.c:1096 +#, fuzzy, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Символічне посилання `%s' є частиною циклу в ієрархії каталогів; у каталозі " +"на який воно вказує, пошук вже відбувався." + +#: find/find.c:1111 +#, fuzzy, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Зациклення у файловій системі; `%s' має той самий номер пристрою та inode, " +"що й каталог, який %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "рівнем вище у ієрархії файлової системи" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "рівнями вище у ієрархії файлової системи" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "попередження: не відбувся перехід за символічним посиланням %s" + +#: find/find.c:1405 +#, fuzzy, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"ПОПЕРЕДЖЕННЯ: Некоректна кількість жорстких посилань %s: можливо, це помилка " +"драйвера файлової системи. Автоматично включено параметр -noleaf. У " +"попередні результати можуть не бути включені каталоги, у яких мав би бути " +"проведений пошук." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "невідомо" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"попередження: ви вказали ключ %s після звичайного аргументу %s, але ключі не " +"є залежними від позиції (%s впливає на перевірки вказані перед ним, а також " +"на ті, що вказані після). Вказуйте ключі перед іншими аргументами.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"попередження: ключ -d застарів; натомість використовуйте -depth, оскільки " +"він є POSIX-сумісним." + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"типовий шлях: поточний каталог; типовий вираз: -print\n" +"вирази можуть складатись з: операторів, ключів, перевірок та дій:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"оператори (у спадному порядку; неявно вважається -and, якщо не вказано " +"інше):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"залежні від позиції ключі (завжди true): -daystart -follow -regextype\n" +"\n" +"звичайні параметри (завжди true, вказані перед іншими виразами):\n" +" -depth --help -maxdepth РІВНІВ -mindepth РІВНІВ -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"перевірки (N може бути +N або -N чи N): -amin N -anewer ФАЙЛ -atime N -cmin " +"N\n" +" -cnewer ФАЙЛ -ctime N -empty -false -fstype TYPE -gid N -group НАЗВА\n" +" -ilname ШАБЛОН -iname ШАБЛОН -inum N -iwholename ШАБЛОН -iregex " +"ШАБЛОН\n" +" -links N -lname ШАБЛОН -mmin N -mtime N -name ШАБЛОН -newer ФАЙЛ" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path ШАБЛОН -perm [+-]РЕЖИМ -regex ШАБЛОН\n" +" -readable -writable -executable\n" +" -wholename ШАБЛОН -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user НАЗВА -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"дії: -delete -print0 -printf ФОРМАТ -fprintf ФАЙЛ ФОРМАТ -print \n" +" -fprint0 ФАЙЛ -fprint ФАЙЛ -ls -fls ФАЙЛ -prune -quit\n" +" -exec КОМАНДА ; -exec КОМАНДА {} + -ok КОМАНДА ;\n" +" -execdir КОМАНДА ; -execdir КОМАНДА {} + -okdir КОМАНДА ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Сповіщайте про помилки у findutils (та слідкуйте за виправленням) на " +"сторінці\n" +"http://savannah.gnu.org/ або, якщо у вас немає доступу до веб, надсилайте\n" +"поштою за адресою ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "помилка перевірки бібліотечною функцією fnmatch()." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"попередження: назви файлів Unix зазвичай не містять зворотних косих рисок " +"(хоча вони містяться у шляхах). Це означає, що '%s %s' буде вважатись " +"завжди false на цій системі.Більш корисним буде вказати '-wholename' чи, " +"можливо, '-samefile'. Якщо ж ви користуєтесь GNU grep, можете " +"використовувати 'find ... -print0 | grep -FzZ %s'." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"попередження: ключ -ipath застарів; натомість користуйтесь -iwholename." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Не вдається відкрити вхідний файл `%s'" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "неправильний режим '%s'" + +#: find/parser.c:1779 +#, fuzzy, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"попередження: ви вказати шаблон прав доступу %s, який еквівалентний 000. " +"Значення -perm /000 скоро буде змінено, для сумісності з -perm -000; тобто, " +"зараз вираз не відповідає ніяким файлам, але скоро буде змінений, щоб " +"відповідав усім файлам." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "відсутній аргумент у -size" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "неправильний тип '%c' для -size" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "неправильний аргумент `%s' у `%s'" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" +"Параметр -show-control-chars приймає один аргумент, який має бути 'literal' " +"чи 'safe'" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "некоректний аргумент %s для `%s'" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find версії %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils версії %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Увімкнені функції: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "попередження: невідома послідовність '\\%c'" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "помилка: %s наприкінці рядка формату" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "попередження: невідомий формат директиви '%%%c'" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Поточний каталог включений в змінну оточення PATH, що у комбінації з дією %s " +"створює небезпеку. Видаліть поточний каталог із змінної $PATH (тобто, " +"видаліть \".\", або двокрапку попереду чи позаду)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Поточний каталог включений в змінну оточення PATH, що у комбінації з дією %s " +"створює небезпеку. Видаліть поточний каталог із змінної $PATH (тобто, " +"видаліть \".\", або двокрапку попереду чи позаду)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Неможна використовувати {} у назві утиліти для -execdir та -okdir, оскільки " +"це - потенційна проблема безпеки." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "У виразі -exec%s ... + підтримується лише один екземпляр {}" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "Оточення надто велике для виконання." + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Не вдається відкрити вхідний файл `%s'" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "не вдається створити процес" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "помилка очікування %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s перерваний сигналом %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "неправильний вираз" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"неправильний вираз; ви використовувати двійковий оператор '%s', але перед " +"ним нічого не вказано." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "між '%s' та ')' очікувався вираз" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "після '%s' очікувався вираз" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "неправильний вираз: надто багато символів ')'" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"неправильний вираз; очікувався символ ')' але він не знайдений. Можливо, " +"потрібен додатковий ключ після '%s'" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "неправильний вираз: порожні дужки неприпустимі." + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "неправильний вираз: очікувався символ ')', але він не знайдений." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "оопс -- неправильний тип виразу!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "оопс -- неправильний тип виразу (%d)!" + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "шляхи треба вказувати перед виразом: %s" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "неправильний ключ `%s'" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "неправильний ключ `%s'" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "неправильний аргумент `%s' у `%s'" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "відсутній аргумент у `%s'" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "надто багато символів ')'" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "неочікуваний зайвий ключ `%s'" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "неочікуваний зайвий ключ" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "оопс -- помилкова типова вставка оператора 'ТА' (and)" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Використання: %s [--version | --help]\n" +"чи %s most_common_bigrams < список-файлів > база-даних-locate\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Про помилки звітуйте за адресою .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils версії %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "днів" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "неправильний аргумент `%s' у `%s'" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "база даних locate `%s' пошкоджена чи неправильна" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Розмір бази даних locate: %s байтів\n" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "Відповідні назви файлів: %s " + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "Усі назви файлів: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "сукупна довжина: %s байтів" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\tз яких %s - пробіли, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s містять символи нового рядка, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tта %s містять символи з встановленим старшим бітом.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" +"Деякі назви файлів можуть бути відфільтровані, тож ступінь стиснення " +"неможливо підрахувати.\n" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Ступінь стиснення %4.2f%%\n" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "Ступінь стиснення невизначений\n" + +#: locate/locate.c:1002 +#, fuzzy, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" +"база даних locate `%s' схожа на базу даних slocate, але має рівень безпеки %" +"c, який наразі не підтримується GNU findutils" + +#: locate/locate.c:1119 +#, fuzzy, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" +"`%s' - це база даних slocate. Код підтримки цієї функціональності новий, " +"тож можливе виникнення проблем (з рештою, ви використовуєте код з CVS)." + +#: locate/locate.c:1133 +#, fuzzy, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "`%s' - це база даних slocate. Вмикається параметр '-e'." + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" +"Ви вказали ключ -E, але цей ключ не можна використовувати з базами даних у " +"форматі slocate які мають не нульовий рівень безпеки. Пошук у цій базі " +"даних не дасть результату.\n" + +#: locate/locate.c:1161 +#, fuzzy, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "`%s' - це база даних slocate. Вмикається параметр '-e'." + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "база даних locate `%s' пошкоджена чи неправильна" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "База даних %s має формат %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Використання: %s [-d шлях | --database=шлях] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=ТИП]\n" +" [-version] [--help]\n" +" шаблон...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "не вдається позбутись групових прав" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "не вдається позбутись прав setuid" + +#: locate/locate.c:1510 +#, fuzzy +msgid "Failed to fully drop privileges" +msgstr "Не вдається позбутись прав" + +#: locate/locate.c:1528 +#, fuzzy +msgid "failed to drop setgid privileges" +msgstr "не вдається позбутись прав setuid" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate версії %s\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "аргумент для --limit" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"попередження: базу даних locate можна прочитати з стандартного потоку вводу " +"лише один раз." + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "попередження: база даних '%s' застаріла більш ніж на %d %s" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "Некоректна escape-послідовність %s у визначенні роздільника для входу." + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Некоректна escape-послідовність %s у визначенні роздільника для входу; " +"значення символів не можуть перевищувати %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Некоректна escape-послідовність %s у визначенні роздільника для входу; " +"значення символів не можуть перевищувати %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Некоректна escape-послідовність %s у визначенні роздільника для входу; " +"невідомі символи %s наприкінці." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Некоректне визначення роздільника входу %s: роздільник має бути або символом " +"або escape-послідовністю, що починається з \\." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "оточення надто велике для виконання" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" +"попередження: значення %ld для ключа -s надто велике, натомість " +"використовується %ld" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs версії %s\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "Не вдається відкрити вхідний файл `%s'" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Змінні оточення займають %lu\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Нижня та верхня межа POSIX довжини аргументу: %lu, %lu\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "Нижня та верхня межа POSIX довжини аргументу: %lu, %lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Максимальна довжина команди, яку можна використовувати: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Розмір буфера команд, який використовується: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"непарні лапки %s quote; зазвичай лапки мають спеціальне значення, якщо не " +"вказано ключ -0" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "подвійна" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "одинарна" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "рядок аргументів надто великий" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "помилка очікування дочірнього процесу" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: завершився зі статусом 255; переривання роботи" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: зупинено сигналом %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: завершений сигналом %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: некоректне число для ключа -%c\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: значення для ключа -%c має бути >= %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: значення для ключа -%c має бути < %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Використання: %s [-0prtx] [--interactive] [--null] [-d|--" +"delimiter=роздільник]\n" +" [-E рядок-кінц-файлу] [-e[рядок-кінц-файлу]] [--eof[=рядок-кінц-" +"файлу]]\n" +" [-L макс-рядків] [-l[макс-рядків]] [--max-lines[=макс-рядків]]\n" +" [-I рядок-заміни] [-i[рядок-заміни]] [--replace[=рядок-заміни]]\n" +" [-n макс-аргументів] [--max-args=макс-аргументів]\n" +" [-s макс-символів] [--max-chars=макс-символів]\n" +" [-P макс-процесів] [--max-procs=макс-процесів] [[--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n" +" [--version] [--help] [команда [початкові-аргументи]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "оопс -- неправильний тип виразу у mark_stat!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "оопс -- неправильний тип виразу у mark_type!" diff --git a/po/vi.gmo b/po/vi.gmo new file mode 100644 index 0000000000000000000000000000000000000000..a3a6573adf90d963f280b4ebcc6f3933a7e97bdb GIT binary patch literal 32725 zcmc(o3y@q_ncpwVYiAa)c@rMXF)(NbtH-jAo}5R`>0u zACd-^#l{;O<7Gi>9Q;^f$-)-0tr)Obhf%;4k1z|nA)9O^m5{Jivsud7>_SmRrLw7{ zsQmulIrsMMo*vmiNV@9I*Z1D@{NCSp&guE9SH0-2h|fu`H*@{|i=*gofqy^DA3mRZ zMHHO_JPf=L_&D%wz-NJv0*B9vqA}o;z)t~}fj2H^LBZvs9Gd@JyUul4ZlK+R(_@Lj+f@CCrTflMX37s$|}M}X%8 zzXjB|ehO53uYO$=y&ZTSP~+YMRQolc@b?*@13m`41o#&~&Ht>|`*QCBs{IcDZvgHC zGQ{XxK(+UmK&nJP2GV8pA|~^G;2VMJcM7O+9RiAu4+9wY_mE(M+dUJLwN;8x%!Iv4+a3OEXEI(QFwA8-q>05Ubs zCQ$hK9B?o2LEzcH0nH$a`0G_L(Xkgq(F9QC{t6~}6Zby@*1126LgxWL0TjI-0}6jX z0A2`u8J&Lwcp2~!;MaiSs}I8@pe*_W;ERC|1^6hC=A*9x{{i>}kf}!}XCCLl$k2Y@Q~eV_yWB*3$n)a$ul2ZZF&HlX?~0mY9u19t;I4;1}>1WbT$9{2Kc z2ThVldIG5N{Ck*7czHQQdj;?{z_WmF2aZwhLZIfg52n=o4*_2ayc?+T z9RZ3jp9F5F{8=#jr@6n5#y1211}OZELNxKi6z~$@Gr%3d7hmM{z*Rs{6Lo->0gnNf zfqw)15%8J!d%gDPgs1br0ZNX42z-cse+GngqkAuoB2XE96DYj>J@9_uYauE{qOSwL z3;ZeYN7P$nFdEm9%g{BzS8eq2coPs5MSl(y-hU2!2spYaiv9@ruYn9LnqiU}_kBRk z>$^bp|C`*yiEo zz^l1$10_%21FGD!z;l2v+m5XRjssQiaiHkD4AeYc{sAwin}G}=`WR6B_B2rV{-3~0 zf%~uYcz6W(VeWqfyc@U$<`DcLQ20KuGm8ENaA?xw>lq*a0>(*z0T96c0D$M`=h`& z^Zw`4jF)!bbVC%y+<&I%{eYhVHNJ~ykTc){5SECRfa33=QWX7f;0YkADSD{v_4r=` zU(Egg3h)IqN_Wvqfs^#}TfpDu{zD)KQxq)#HSW8Bn}B}?L{y_!%z3%H9QY3IuL6z& z4+1X(9s#PKQ0mV2Y7bP(|rr@DV~2GI0l?byuJKA;Ck+V0MvY5S4Urf&z(Tsf1&|Se}i^`kUV;2 z%j4%pp!l@`6u$2OewlK|fp6n}_W>`bE#NTs$AE7D{xjgc!0!N`rJtFDQS@!@Kd|8W z;p~rkdH4|UIM43}-U7VrV_uF<1BI`Bzw7zwUf_qg|1ZFI(B35>*A4m-K9a|O%=J>Pja*x}@}B}X z>I)JWFRcf@h6~m;UHK^RVlI8Ax$d`bUarsKyXdZu@TCuEHQc`p_$jV?x!%epe*Z8R zq>4VzHOhrJM)z=axYEzd!x!OGA5ay&(!O>7oX^)k;M&FoOB&BNf#S6naiJbe|3EhL z>j36A2};gj50ekwU&wWs>u#=1T#(Ro52TK!xaPRlaoxvtJJ%m^&2Z`CxJ1u4ait&8 zAF@S%7#_R=xRdKnu5-Cw%_SWwIeZnDKL6AM`}HuKeepgq!Waw{zXf^&r;-*H*6Aap@zuzD!^EyoBo!uIssA zee?NV2$YUm!*w&)9bEa(UEwAM9^radxc>}r2iFB$pAF9h&gS|U*PFS%z@-mj9zD$U zCEf5j$@QCD`?+r7(&qzQYq>tnbvf5Omp&z~WA@GaEc&{c>-V{ia($Ak#x=&Zk4v9x zxLRBv*A1WBxQ6Xp_s<)F&!mG-=A&&O`QGB@vLDs9(_+vCI3sn5ED^Oe$kz9J9WajQ`*#cFozp}5p( zSL%tQ?4e?Fu0?azstu-+bYhp(53Y6Un`Z4zySd=nb=QoGde(B4q|s?xiDoCEUadyy z)_PZ&WlR;`w`ha9^ToDXsCV4KV$zPwYGS_FXvE1{*QmzDR_xjf4gN5VI4KwEvxV78 zHFo>sg;u*+-ydr}SH+Ebv+ZU&jFS2n^Mz7LnF&-|m(3-e@p^Oa5|u2+v&Bxe?HWZ; z!wA%Dsncx6N!yhx&A8OAHy75sv{-zo(TrOyp@G7MMzfN%hjR~W#RXxcRcW=s(}b%x z;%1R1piI3X?C}MpwgEyFRMWGG;mFyikkmV^xaoj%&3dOn4;t6*jZ;%wubSj8Zr0r1 za|`=+?%J}|6`Ju}d?!o5lcI6_&5+UKFPSWZ$L@e5A!C?$}!Byh}an+5K*SpsKN~2Lp=3t=l)f*aj zZjW!p&DNWuA&rZjVptODKty4+6)LDsg~DjQiC2#2wI3hT=Vk5^ha7_Zf`T5RlR-Bzt2iiFR$!!<Kje8ZdMK(PwL1q6t?g^^My z*jr>}q5J8<|+>@F6AKChCOZ16?bMAT`y@$qqiOWdU{+K4T>92t;2 z!Z3`PD}E5#pKlvOHr-NxC5A03FZjg zu(_B>^h?z`ItGqT%Ec!3O|~t4SD!KSJX2}P+*Z)B=m#@WBdx3q1}#{`>`lFv85fL3 zr7k|~B$ytIJowp?s!is`8yo=XA8tTwttdObwbnp;raURjrxJxNnd;hVx)353U8CNr zv?~YD#&M}qL-?>{n3HBt^%3mU3`Tp788i0Fiy+u6ve#W*3z>U0+o^)oa20ozmsFjiQdx`pjv*=xuRJCaPBpnvY>RiZaFS7=i}_ zYDVM$jYp!OtbPyu(ud{>tauYFRG#3f;QgKa)9tS08DSPR(S*WaX&$`-&V|S(loZOG zAEK#B zFcul+^2(PtV1P<%G+49xS%J7!D&kwU&~R~r-Jx69%sX!7xLT>9%$u%-L9NVIu;mEF z_^(oVeb;w&rX*Uf*1>g>gvEzSF^Czd)_?t79QqZzXg84zDUF=74em6JpgAE!w~sR- z6r`h#k=ri94JRnd82=so7x5&LIXt|qH!+tSkUsLEp3KO4^Lu@F05W#9O3MhCdRwh% zN1uBphtM?X%mO~^aI~}7F3oF}eR_6h@ld7KsnJj}hsHzM1?S!!WQ?ZeadbNv-UW24 znv}ZVRV^31=5qahq1aAJyDlSv9}k~0d-DXMU8%~hB+|YxDgAxyKAS}z>eQ5n)N@OUV!>heOZ%$}YrTtKh7?^>;pZ?O?cTL# z`?aoxMx|QtHp~gfL8XGpkle~lv;)>gso=aiY>f#;o#D{db5*q9$=A#(`asDGDi#4= z@=8AVQI%RPE?3Y>P^363nJ(;#LeMlS{R%^u_RD9UQ@Eq?&Q=aV`Y|6<9jFwIMYEVn zj|oTQ$Wv;#fl6|Oar5nVW8%E?TEzn>%i{cah`i2&U)L(`QJ2e&85G@g7wID9qqqrrYFH!IB-2I@ShLHzhm2E42@) zzQ~h#wl2Sy#=vctAA-^M^%1s%1-VAedbJ?k0^u!ab?xGQWFXT!8SnaWq}{El$~+XS zgi1}frd6Dc*I2_@@$8FS!O-+dTh=uJQh9P|td$i}xp#s})lQjN1+?zoIJFHI<3OcZ zPvqO9G@2EO-`W&svS=1)5+Pa^VnzX)yt^zrg3j=PxyU9KM>Fj964i`rb=Xw|Svj8B zX1yksZn}5aI7Zt_WmMqjQ0;BwZxd>0O02D~UBgkYk_Z^HndZkI^k5a#c@J7jZFJ02 zJYO)KsJndoU>G*aA~I7VNuzf&=(7FT z7{p55^Td?ej_am3@4D)$t(&I?Vwj;z2m26I!IpK43OP_AoGg;gv2>8>RO_Y3JuaF! zjz?D~`w7l->Je@?*B!|%Wp6_-akE)(Mpw7cHoR`Ry@f*Rqx~*H&wN~M>>CEl`tZ6| zZ?&gon(E0k(Ot7hHsE6Gw@_8W=8|BDGS6zbr|or(X8X`Sbz&Z#SmZ!#_e2R*eJTHL zp^#ba4fbtc$dvGQtBXlik)%@5cyD^Mi7_HM`?bt~;aIUQnnN!(Jk>fY|Hb)DVr z-H?6Vm+N#pyw|9b!%I7^kP+xUur|Vjy&HPobjOg`7~nt~g881hu@3ENwnT_E*+sEr>a%Z9UQb11$K$Q~Q`no-lfu3FCXn zSN9f0HFwyP?tRVf$?rBCuZc12zSS-h({>x%Xisr_)I`H>ET5{|rrrAdrtW>JQ<=pL zQ`ha@+HGV-B;?3ZQaJLsilm(au+6|4{p3_a{J^J6K;NZ+=5qu>v%bA7GjLTbskRs{&L#SdK1oTWkN1=f=I!RXNI{aJV zUIv)RM{$b0jNq&&1)+4erI5u{7O}u6#ByamRhO>Ddg@29ZC;+8pRgKrkFm$NC3h5Du$FpNO)QCX&my z?ve{S`NMmY$$k7?xNcu`L*!jIVrZFS7$&UJtP60~UB2t8og1fIVb-(__uF@D%^upb zRCR_T>wJ-L7jCME9V;T?u7McP69Hm7s9mF_+q`S%&W)2>+>frqR}{`3tj|{y z3-r~@KT0d-pRFH`vXpfuwu(|MCyfR#5nAJK&UGKl&GL4l_nBXYg6+(hdKL;A z!c>=kFAk<298!x>Qw|@wIjc1LL5VpFf#zq{38Si|PF2}3aV8O-JnVM8TwI8{PG^*6 z*6Pju>GwIZX)7G=^rg($fVZ^Tipup4f)V9CWhP_u2PIvXIx=4pCl#BY>G%N;Nq~^F zmS=+M^6yO@GJ-H25RR@UHLN6GT0+weFQ6Kpwlc3bjEpD?$9RyNxOpIm$!tfNQi){b z*RFVOt4mq9=|lE4EE}v=VkT}MR4l79rcKt2t%9z-ks}6dm&> zgs;UgA~=|f!pmDoGcNDEw6H&WVS2awq!su11rTKNnpBq5vR;y2G zuSAq_6Jyx297v)}r_q>zP-d~L>?*E-;bh@V+aU(j?1&Ii}Rrxr}n z<8cu5lF&+*r#+vThG&iz70$%)D~6eM*R*T1o|xJ6Ualf|@!qjW=99_k>+Up+lzvfH zi8dUQU;%TcG)sd-RuEJCJWBQ@Ea57IsZ?*8CxOKYLx~0?7)i$LZ=nsbGa!D&(zHls z`y;eu%+$;s>NR-;q-j>6cTph=euKusl?c&yMAFq3m-1LM?2sD5pcK*(ld$vq5|peU zr$%~0DWs%)PSjtr%MgCycXXsY_MD|CknT)yqa+8(H`%zLSt%|n_m9Q0g%(g+Ymm~? zt`3tSQgyHhD`F-Rb11T8Y$8~%QMdKl-B-CWeC>1mS10GRoqpHb^J&=bFQ8QV085~+ z7ld}g<9dHNNNUBhnrlO~NUlLxJP31;I*@+}?xdk3zu;BZ3cPoJaN&zpvJ%jjoentV zL}xhOO4s52*eY>1>=+&<{L(Vnpt@uU{gMb$9OTAOlp6w0e`?{&aRX1vrzf1^7yn?# z)@!!z*uw*SdMlAVkO!Lj_-P|)fWv+ZR>xeyhlkV38)9IlN#Ej*B=rH0hoe@J$d-L7 z^D${28DJTw1fx}&A00y^X2?e_xY3|neaUXgmTC>ucDK0E zNo;)rGTgb7%5xR$@1&4iWP*+@BSkhcpb5zR0-lnrG<;yS{U&brv!fdgM zTU?lJnVnHs=n67ewBk*h_M@aNRjTG??@o8pp#Nwrcgy+(6)RapoqIQMn~eg#ma6nM zTnp2yrK9cbs5_wuk1;hD@u42Qe}-44sd;Z%vJ~blhA9&w5D^n@L?eErL%6VBY2Q?* z*b^_l#dTkwW5f$n%8u6JVuAqbD`t-It|8FCtSF!%Z@b`PtqYpRh)Fey zYoSCeYY0X$T3F#jI9j!k3)9i|23Q5x6f&yfS!h+JCez0JSgU4ZR@0#i%@(gIXuVlh zX$?(n)H;BY!|X<4(I>1|$Pwr+`>;OJSZjvZFLViMYs~a(*~xDZQ({HsT;cMMen?Xs z?_#p(Ca>O+U&t$&(Z~|owp7Siwu4u{;EYT)iY>)!?RoZyf!JV7Gn=AhCRMf|3$pt{ zu?U>evtWkXE3!+wLrEhuF%4$aa0Fr4_F#OZ?MS13HN|Ophaw~6=d-zptaZj1()C_< zni~f4TYXC+-LfK0A=^(vbErMckHW?E=~h3DnK(`gQ|opaq-Om> z=1M7tS-<5VhivuO?+QpwSuz~FN_#rX;wx9B=cF@w2h0eAZ&s*?q1E+jf<~on03PL>vhQ)89K9NobnHr)&3pL_KwcF*}0qqLMQq-dAtO22?n5~&=FesRg}FSF!n6<=jMVUu&Q za|tz*xeltUFclYT6YiQy+%|i}4zvT6!ZnkZ&DHB{t1#!GHI5>=WO(QHom;zjIDdTI z@MhLW;nczuxoGX0JJddp<&;X|x3Um3Z|JmV3m0|EX{4-27q%v)x|aPW+(qoX9^PH; zuvA*O9IujGRnoBA)`s(?`t)YQy7j}?7OwCKG);5UrmbbT=c4fo#xK;CZD?AWUp{rB z==Lvt)3ujRebtqhzJ}b@mQUSRv7O)tmX3(I`-`1EyuA1%yQ7y+-D8`;OT{|;Gd#q) zFV#;UUV7Y>xVkmV%Zm?ocy_cjuXZ;rJ+R>BD$A$7=vvE*^j%qAe5#=#JXnII8A*xg zZTZw~iFYd4FY)aYw5(SrX@B|DXG+$ZtEvz}JioknvT@#_4*g)~mQNi=1eYEkcUR6Y zJ)s$OmQNj)pA zg%*#Hftp`^CjnJYAAaU5%!@vm^CK*LfvJ)W`3}Ze1)uHtXTBm7Gu1FhaD{utd~fOS z7K)SxRD1f7;0(B@Pr1=bGB(^>LkL&pTii^s?&g+H-3f=b>q|$OHdtfPcIg{(*}+}1 zmI2Y-&Az*nPGp{6I>G>j+k0TK;RxR!McH&iLqntcJu1{iGH3Ivz$)KhH^(r=ysz9> zY<}tS8gI?Q?Oa}b_-Yy&?L&^TFv zZ`x3jvLERzSjn(+eP}2!iSO}PX}G(WeQ0QIzQRN`554GaZ66xy<-Km1%>8p=7^Cf_ zhZA9I@%Vxv?Ks`{?SCH{Wd=uiZu{VcMkY)i#ZcjWYHu6*0cE=mmw{J0QKXbH; zY%^Vx_LjDeWkfJaO)Y&|uSQppsBc5P>-H8QqTaVhF|4+D)<{w1;IA(b4ue{GeTlGyn)oaP@)G$A^f>M|)7tIo?y&dp5F4sMK$e2MD>T7-62cU(Y*%ehuL4zs!0lJNIB!a^9;oh@Z(;uJ!RmGEo+1R zFEu1PgYc`>Jo9{3o5o6-n$#qi%SYfAZU%`ap6TFE#% zdd3O?)4sx7W$CD?SSc2E==Zj*(=D)xal4R|I~(zfRs8GQAC#zavh3+oD^E-8#E*~` zL;Gbq!`87P+3>)RQicelSlcX~JeOeT`~ZVvDR8@dqI+=O`2JXQtvp2Z44GRpL-qJrqtB(sVB`ZWr`<~R9+9^`$tq=y$9gaXTI``^=i#3 zQuQ2bil zPWd%ApINM~N0GA=S!UpXg-f``=%0Hk7zPg2{Cem8%MOgAIRB3Z7L;SK@foU&RYdA! zdGV_R1oLr*E2Lro*@*=5aaS-UtMkx=Yy|lf324SRxtK(H73T7qFdG&j8o7X;cX^iW ziL$(IWFprykMU@;g?(Pup7{zv7)(Auq-7#AsR%*QK&j1ZK64tv4y~ykcY+?6U!&_) z+=DA{gs@9473U&T(RVd;I#yqio9uvh0L*Kkt~{8owataMK@F#43F^-R6s>tNL)^l} z$GjVSi;PcDUD3AXEXK`yF23Jjx4<2{tY89<%Dg({RnN&HN)5)a_O97LlwWf)>$hM( zQRE5PZy_M0tO(`iy-kOR(AYanVhDVBxZq|^R{4z%nYV|mC;7GVfFFJA5J(j~)Q2sw$5Jtoi6&93=TkS`)rXVfL#gj=?D7{baG4yN0ODe_!I zALC#@>f2X8&zu-A%S0uy__&HI8rHR7FDP(@a%n^#@W zw3d$X;Pfq0zgfB!L@ioai;^Ha?0AEMN#^kR`uu3IjP;F&B$blmw1Muk@lluUR|*1vkbcv%gH^?X=~n*pe6aEGGk&&%`(^=KcKt}HigVND7l!8TnI$jghN%D z61lVYU7-wio_ayC3Rz!N zf=5dY=Fy_#mY&cPkyDv>rnFnfxHMs(n9TC=V`eM@bEeZ3l3^L+K>1{+?h4x8>+YV+ zxERxOBigbrP8fGyJ;^(^SSZJPy`x7;7^FYs#VCD)UU`qwKMMe&-MlrjgiPv2sDskbm}&DKuyC60v(c)yZOC?Lt`@jnUOQolu0t^AZ4}ta24!)!H)V1wAG9;8s~l}( zQGx}7e8|c=ktOem0Tvr$!BP#w^!P%@lWCaiDUQI=-(%CD=ZVU+c-)KK#r!T$GC$pt zC7m`iG0l1!hvM)7r?DOPPs_`l_Sp_sH@#;vA`p(iJ6`g7CF>4k_lYO-M3!JF)r+-G3Jd#&1aP4r6CV$EEc0)d= z?-yX{}g9pdl+^dkSu^Q>2vM|WJ;MsdSXqF8x zFNk}Ci?&y~#f0Z@MM8C0-xrT}bhL0aA?iP7Xi7>4+c;*pTAgw*h*(aE#Q(^Z=rFq1o8o;^dg-#6Y7IEDI5cWjPz#Bse~3bh z=VjVQl~x>SgcOQs3`5y6?aFhGBALpiQ!rBWA9 z`7@E?4X>Z{CVxKCR&>q1)>xln<(wm-!g&8t$!skiBZyqbb(QQrJxM3|mpw-*d54!l z=3G*Jr&B+Dhbu*to`k8-Mue>u>MeKbGBCSsxmY}=m-$nedaHd3{f99%2syQW_W{06 zDYu4?klK2`)(bXVxqbQ6C$C1Rf(c%&8eObR9d4oC^UNKpekz(qiot?O7_j(AN82*h za$Y*a{x)7ocnOCoH|7O0uLE*Pgb9WG4@_=zo0e|gg_o8iJ`TIM(OVcCBJF$$9&7MO zL_O&5y)taGm`=+V-b=zw%O5C}|A&pH5o#+cvZ5@`=e$!k&=FyGlPB^%y=US5?4WT| z&npBaJpsR>-mrtlU4zHwjSgb{Rl@+AO7MvXEv|>7rwr4(!HT2VxFbh{><8Q`+}u~g z$0N1T9b&);?s0FJU<+SeXI?%S+=EP68cWWi?dY+rl5IZ9$_72ZL>eh%KYWx$NOe3J zxRr~}<9iOVooC5~rvt~1rfWUk96@|e%s*e#u&LbFBMLCvF(`iP{#YesV^eYe6@`L~a zBzYnrx5vpJv2heag>5Y3(I&ZsUP99JQvbs0R%`|wzK;x(etuq1Q}fc3 z>`hrAq#x5`L>g`h?pm?gh8%&Z3eQ*L>_H5YmNFXi;214?`f>uK;Cx{3O09`y@hMgb zjX16-;USOe&(RJ?I1YY#Sy1gy)b=Q6J5;;>N*$^#ZQd6_A~JACV0q2gHkhS{YjM?< z9_Kt6Nyo9_;T6clzWqI+){25*eQm?<$Q_FiXa@sh}PuQer#**pMo*HC?4I_B6tbuquq2mo-q* zMOZr-)`UI7qB_`(=`8^&1HH=8UT(GCAfp$he9j%&aO3vgumD@uTgWf%=d4}G#UNvY z3d+G|V76~m@hhmgnfok@*ptbLY`GNN5DG_qX{hH&qZo=Uxe<~m=*x8D8k6-4_++{u z<|=Pi&bzAE)J)qlyAxJoG>u+Gbr~S9bs|+eeF6snq~2~sxx@7qk&@M6V+|S}3W9u# zPZFn!I>h8`W;SLaciN*9(u6$Rs$B{UVMPfU#K$Z*W`$B+KBfvbH`5blM^D`x_7w!) zTJ^O*g}i!o-m~X23NEHZ!1i&9m%C}CF(_gj0fy2QY@tL5v8klSh;gqh8DuiZnu)9` z=QmH~+6~1rk@WcLMdgYxKn=6}3CxBL#f5O_Ncg<68?Fk&W-nGE4$N9_E$@WUET)idK z^_omW9+OC!0}8%Bi;1!1c)#3613jU^n{sH6>@(UB^xwv~1m7H1sA<=fG2xdzV)x5-Y&pkXny?c;0b&;`h)vqmWp_r@u<>uW$N1KL?0= zW%2fxwJ@ANnUIEd)YYkN6oU_bWDV!DA!W*MJhDu+d_&*#zz98^Nmk8`a<=@JtUDg% zBx*F>T4t$^bYTPYv3RWJRo#P5BHXvG7pA7Q-?3rY*f2uTD8&Gej+U~+*8krQr0>-^ zb=R9I8DnZ37)#G%_$?ni)U<3)>va}&)GsfO;e*RjCu~j+ql7&oeX6EMwaIyi@@O+% zfa7)&M;Ps9fv$9n~-SiI6269b49WVn<%J1;5@&YQuu`h)Z%^S=n5~a=1^p&b8<5pX)y^4h;bQEjtYfm;T^E zzB&Kf2O1pK!B#R5Qacte&S@1Z>NET#g3rIg>S40bC0l0f8g*6hKbv4u(~X?WHzRWP zZ0G|+m9>9NlATuaC&l1Q|2qimc+p`o%gC!`|2qpj{Zj8!`?&>;m|0l4o-WEO>F7j+ym^w5C6pgxM2K)nVSRoqWfAREs6%rnX&)%>B#q|;$BQHc`xGg=q<99k^q`G^ff=AtF&DSaT z!nI1%t(w{_?_q-mddm!G_zMQfkMu~EW#z0lsPN6yYxBCv z?;Pp=9)+44!0Br6v5wD|`ouY*nuRDBOCO|Zpw>R)%6_%Nnk(5xdU7j1pFhUF7ORqO zSo5Kd>U+ABEHcJ{eNZ^DAF5zfnM2DDF2GFr+`X@cdRDHFDz?{t^`E<7P{cxAIJ94yXN42FUQNcWK`&21X(yEg2ObQ?W|Jtu61+shBSN z#f)Bj1lBfhSbG|C`pU6a0tZ}!!!ZKrKU?(H&O2G+2J`>TxEk+g+kpHLI_*k2)11BY zBfiXeR>(xU6Tv6sg>+3Qe;}mY(ODGROlLb%`^PyDU+N@1Mv;@g)Fc}babr-)kI;0^ zCF=D7Lh=i3#UUi*g4}|VfR+9+orJSc|grHW-d8uT;=hhDqTkDYualO%dq56Q-wek!}AC~F_2paljKlG`)0$Bi|nva zI^6?lM`c7qJA`h(F#^)9{fv3?=beNCQqCcw^6RqR7G{m;Cr3aozdDj_;uD`+n_@tQ z5-{CkOEXm~H@%L&?EXH2s`r%j<}|C(&jmRo**aD)`ay|yMQbK$!jkbQ-<>n9I{g)r z8Md=N_bLoN#F1_7D7vR4hu{vB3n8L@zXYLPZChTio1Gy!U2v09!oy}+AdTRVL;MO2 z89c}i*^bCG&dUvKI;}Fja&jzi$yRC7=?Q{wpI}#%c`l|?{g0bOK3-rn(V26B{|62h B7(oC4 literal 0 HcmV?d00001 diff --git a/po/vi.po b/po/vi.po new file mode 100644 index 0000000..86acc0e --- /dev/null +++ b/po/vi.po @@ -0,0 +1,1240 @@ +# Vietnamese translation for FindUtils. +# Copyright © 2007 Free Software Foundation, Inc. +# This file is distributed under the same license as the findutils-4.3.6 package. +# Clytie Siddall , 2006-2007. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.3.6\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2007-05-31 18:20+0930\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: BBEdit 8.2.3\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "đối số %s không hợp lệ cho %s" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "đối số %s mÆ¡ hồ cho %s" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "Các đối số hợp lệ:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "Không biết lỗi hệ thống" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s: tùy chọn « %s » là mÆ¡ hồ\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s: tùy chọn « --%s » không cho phép đối số\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s: tùy chọn « %c%s » không cho phép đối số\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s: tùy chọn « %s » cần đến đối số\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s: không nhận diện tùy chọn « --%s »\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s: không nhận diện tùy chọn « %c%s »\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: không cho phép tùy chọn « -- %c »\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s: tùy chọn không hợp lệ « -- %c »\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s: tùy chọn cần đến đối số « -- %c »\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s: tùy chọn « -W %s » là mÆ¡ hồ\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s: tùy chọn « -W %s » không cho phép đối số\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "cỡ khối" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "« " + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr " »" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[cC]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[kK]" + +#: find/util.c:163 +#, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Cách sá»­ dụng: %s [-H] [-L] [-P] [-Ocấp] [-D " + +#: find/util.c:165 +#, c-format +msgid "] [path...] [expression]\n" +msgstr "] [đường dẫn...] [biểu thức]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "Cảnh báo : có vẻ là tập tin %s có chế độ 0000" + +#: find/util.c:754 +#, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "Đang bỏ qua cờ gỡ lỗi không nhận diện %s" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "Đối số rỗng tới tùy chọn « -D »" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "Tùy chọn « -O » phải có một số nguyên thập phân theo đúng sau" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "Hãy ghi rõ một số thập phân đúng sau « -O »" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "Cấp tối Æ°u hoá không hợp lệ %s" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" +"Cấp tối Æ°u hoá %lu quá cao. Để tìm nhanh tập tin, khuyên bạn dùng phần mềm " +"locate của GNU." + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"Không hỗ trợ biến môi trường « FIND_BLOCK_SIZE » (tim kích cỡ của khối) thì " +"chỉ một điều làm ảnh hướng đến kích cỡ của khối: biến môi trường « " +"POSIXLY_CORRECT » (đúng kiểu Posix)" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "không thể lấy thÆ° mục hiện có" + +#: find/find.c:211 +msgid "cannot stat current directory" +msgstr "không thể lấy các thông tin về thÆ° mục hiện thời" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "Cảnh báo : hệ thống tập tin %s vừa bị tháo gắn kết." + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "Cảnh báo : hệ thống tập tin « %s » vừa được gắn kết." + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s đã thay đổi trong khi thì hành %s (số hiệu thiết bị cÅ© %ld, số thiết bị " +"mới « %ld », kiểu hệ thống tập tin là %s) [nhắc %ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"%s%s đã thay đổi trong khi thì hành %s (số hiệu inode cÅ© %ld, số inode mới %" +"ld, kiểu hệ thống tập tin là %s) [nhắc %ld]" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" +"Liên kết tượng trÆ°ng %s là phần của vòng lặp trong phân cấp thÆ° mục; đã thăm " +"thÆ° mục đến đó nó hướng." + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" +"Mới phát hiện vòng lặp hệ thống tập tin; %s có cùng một số hiệu thiết bị và " +"inode với thÆ° mục %d %s." + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "cấp cao hÆ¡n trong tôn ti hệ thống tập tin" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "cấp cao hÆ¡n trong tôn ti hệ thống tập tin" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "cảnh báo : không đi theo liên kết tượng trÆ°ng %s." + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" +"CẢNH BÁO : số đếm liên kết cứng không đúng đối với %s (thấy chỉ « st_nlink=%" +"d » nhÆ°ng đã thấy %d thÆ° mục con): có thể là lỗi trong trình điều khiển hệ " +"thống tập tin. Vì thế tá»± động bật tùy chọn « -noleaf » của find. Kết quả sớm " +"hÆ¡n có thể không gồm thÆ° mục nên được tìm kiếm." + +#: find/fstype.c:255 +msgid "unknown" +msgstr "không rõ" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" +"cảnh báo : bạn đã ghi ro tùy chọn %s sau đối số khác tùy chọn %s, nhÆ°ng mà " +"tùy chọn không phải thuộc vị trí (%s làm ảnh hướng đến điều thá»­ được ghi rõ " +"cả hai trước lẫn sau nó). Hãy ghi rõ tùy chọn _trước_ đối số khác.\n" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"cảnh báo : tùy chọn « -d » bị phản đối nên hãy sá»­ dụng tùy chọn « -depth " +"» (độ sâu) thay thế, vì nó là tính năng tuân theo POSIX." + +#: find/parser.c:1002 +#, fuzzy, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" +"%s không phải là tên của nhóm tồn tại; cÅ©ng không hình nhÆ° mã nhận diện nhóm " +"thuộc số, vì nó có hậu số bất thường %s" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "%s không phải là tên của nhóm tồn tại" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "đối số rỗng tới « -group » (nhóm): nên là tên nhóm" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"đường dẫn mặc định là thÆ° mục hiện có; biểu thức mặc định là « -print " +"» (in)\n" +"biểu thức có thể bao gồm: toán tá»­, tùy chọn, điều thá»­ và hành động:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"toán tá»­ (quyền đi trước giảm; ngụ ý tùy chọn « -and » (và)\n" +"khi không có điều khác):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +"[EXPR (biểu thức); not (không phải); and (và); or (hoặc)]\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"tùy chọn vị trí \t(đúng luôn):\n" +"\t-daystart \t\t(ngày bắt đầu)\n" +"\t-follow \t\t(theo)\n" +"\t-regextype\t\t(kiểu biểu thức chính quy)\n" +"\n" +"tùy chọn thường \t(đúng luôn, hãy ghi rõ trước các biểu thức khác):\n" +"\t-depth \t\t\t(độ sâu)\n" +"\t--help \t\t\t(trợ giúp)\n" +"\t-maxdepth CẤP \t(độ sâu tối đa)\n" +"\t-mindepth CẤP \t(độ sâu tối thiểu)\n" +"\t-mount \t\t(gắn kết)\n" +"\t-noleaf \t\t(không lá)\n" +"\t--version \t\t(phiên bản)\n" +"\t-xdev \t\t\t(chỉ thiết bị này)\n" +"\t-ignore_readdir_race \t\t(bỏ qua thÆ° mục đọc [race])\n" +"\t-noignore_readdir_race \t(đừng bỏ qua thÆ° mục đọc [race])\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"điều thá»­ (N có thể là +N hay -N hay N: ba kiểu cÅ©ng được):\n" +"\t-amin N \t\t(tối thiểu)\n" +"\t-anewer TẬP_TIN (mới hÆ¡n)\n" +"\t-atime N \t\t(giờ)\n" +"\t-cmin N \t\t(tối thiểu)\n" +"\t-cnewer TẬP_TIN (mới hÆ¡n)\n" +"\t-ctime N \t\t(giờ)\n" +"\t-empty \t\t(trống)\n" +"\t-false \t\t\t(sai)\n" +"\t-fstype KIỂU \t(kiểu hệ thống tập tin)\n" +"\t-gid N \t\t\t(thông tin nhận biết nhóm)\n" +"\t-group TÊN \t\t(nhóm)\n" +"\t-ilname MẪU \t(tên)\n" +"\t-iname MẤU \t(tên)\n" +"\t-inum N \t\t(số)\n" +"\t-iwholename MẤU (tên đầy đủ)\n" +"\t-iregex MẤU \t(biểu thức chính quy)\n" +" \t-links N \t\t(liên kết)\n" +"\t-lname MẤU \t(tên)\n" +"\t-mmin N \t\t(tối thiểu)\n" +"\t-mtime N \t\t(giờ)\n" +"\t-name MẤÚ \t(tên)\n" +"\t-newer TẬP_TIN \t(mới hÆ¡n)" + +#: find/parser.c:1058 +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +"-nouser \t\t\t(không có người dùng)\n" +"-nogroup \t\t(không có nhóm)\n" +"-path MẪU \t\t(đường dẫn)\n" +"-perm [+-]CHẾ_ĐỘ (vÄ©nh cá»­u)\n" +"-regex MẪU \t\t(biểu thức chính quy)\n" +"-readable \t\tđọc được\n" +"-writable \t\tghi được\n" +"-executable\t\tthá»±c hiện được\n" +"-wholename MẪU \t(tên đầy đủ)\n" +"-size N[bcwkMG] \t(cỡ)\n" +"-true \t\t\t(đúng)\n" +"-type [bcdpflsD] \t(kiểu)\n" +"-uid N \t\t\t(ID ngÆ°Æ¡i dùng)\n" +"-used N \t\t\t(đã dùng)\n" +"-user TÊN \t\t(người dùng)\n" +"-xtype [bcdpfls] \t(kiểu)\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"Hành động:\n" +"-delete \t(xóa bỏ)\n" +"\n" +"Lệnh in:\n" +"\t-print0\n" +"\t-printf DẠNG\n" +"\t-fprintf TẬP_TIN DẠNG\n" +"\t-print \n" +"\t-fprint0 TỆP\n" +"\t-fprint FILE\n" +"\n" +"Lệnh liệt kê:\n" +"\t-ls \n" +"\t-fls TỆP\n" +"-prune \t(xén bớt)\n" +"-quit\t\t(thoát)\n" +"\n" +"Lệnh thá»±c hiện:\n" +"\t-exec LỆNH\n" +"\t-exec LỆNH {} + -ok LỆNH\n" +"\t-execdir LỆNH\n" +"\t-execdir LỆNH {} + -okdir LỆNH\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"Hãy thông báo (và theo dõi cách sá»­a chữa) lỗi nào thông qua\n" +"trang thông báo lỗi findutils tại \n" +"hoặc, nếu không có cách truy cập Mạng,\n" +"bằng cách gởi thÆ° cho địa chỉ ." + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "việc kiểm tra sá»± đúng má»±c chức năng thÆ° viện « fnmatch() » bị lỗi." + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"cảnh báo: tên tập tin Unix thường không chứa sổ chéo (dù tên đường dẫn có " +"phải). Có nghÄ©a là « %s%s » sẽ rất có thể có kết quả « Sai » luôn luôn trên " +"hệ thống này. Có lẽ việc thá»­ ra « -wholename » (tên đầy đủ) hữu ích hÆ¡n cho " +"bạn, hoặc có lẽ « -samefile » (cùng tập tin). Hoặc, nếu bạn có dùng công cụ " +"« grep » của GNU, bạn có thể dùng lệnh « find ... -print0 | grep -FzZ %s »." + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" +"cảnh báo : vị ngữ « -ipath » (đường dẫn) bị phản đối thì hãy dùng tùy chọn « " +"-iwholename » (tên đầy đủ) thay thế." + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "Đợi đối số kiểu số nguyên thập phân dÆ°Æ¡ng tới %s, chỉ nhận %s" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "Hệ thống này không cung cấp cách tìm giờ sinh của tập tin." + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "Không thể tìm biết cách giải thích %s dạng ngày hay giờ" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "Không thể lấy giờ sinh của tập tin %s" + +#: find/parser.c:1760 +#, c-format +msgid "invalid mode %s" +msgstr "chế độ không hợp lệ %s" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" +"cảnh báo : bạn đã xác định một mẫu chế độ %s (bằng /000). Lời nghÄ©a của « -" +"perm /000 » đã được thay đổi để tÆ°Æ¡ng ứng với « -perm -000 »; tức là nó đã " +"từng không khớp với tập tin nào, bây giờ nó khớp với mọi tập tin." + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "đối số rỗng không hợp lệ đối với tùy chọn « -size » (kích cỡ)" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "kiểu « -size » (kích cỡ) không hợp lệ « %c »" + +#: find/parser.c:2027 +#, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "đối số không hợp lệ « %s%c » tới kích cỡ" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" +"Tùy chọn « -show-control-chars » (hiển thị các ký tá»± điều khiển) chấp nhận " +"một đối số riêng lẻ phải là « literal » (nghÄ©a chữ) hay « safe » (an toàn)." + +#: find/parser.c:2313 +#, c-format +msgid "Invalid argument %s to -used" +msgstr "Đối số không hợp lệ %s tới « -used » (đã dùng)" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "Trình find (tìm) phiên bản %s của GNU\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "Xây dá»±ng dùng gnulib phiên bản %s của GNU\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "Các tính năng hoạt động: " + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "Đối số tới « -type » (kiểu) nên chứa chỉ một chữ" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "Đối số không rõ tới « -type » (kiểu): %c" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "cảnh báo : không nhận diện ký tá»± thoát « \\%c »" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "lỗi: %s ở kết thúc của chuỗi định dạng" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "cảnh báo : không nhận diện chỉ thị định dạng « %%%c »" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "lỗĩ: chỉ thị định dạng « %%%c » dành để dùng trong tÆ°Æ¡ng lai" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"Gồm thÆ° mục hiện thời trong biến môi trường « PATH » (đường dẫn) mà không an " +"toàn khi được tổ hợp với hành động %s của trình find (tìm). Hãy gỡ bỏ thÆ° " +"mục hiện thời ra « $PATH » của bạn (tức là hãy gỡ bỏ dấu chấm « . » hay ký " +"tá»± hai chấm nào « : » nằm trước hay nằm theo)." + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"Đường dẫn tÆ°Æ¡ng đối %s được gồm trong biến môi trường PATH, mà không phải " +"bảo mật cùng với hành động %s của find. Hãy gỡ bỏ mục nhập đó ra $PATH." + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"Không cho phép bạn dùng ký tá»± « {} » bên trong tên tiện ích cho đối số « -" +"execdir » và « -okdir », vì có thể rủi ro bảo mật." + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "Hỗ trợ chỉ một thể hiện « {} » với đối số « -exec%s ... + »" + +#: find/parser.c:3016 +msgid "The environment is too large for exec()." +msgstr "Môi trường quá lớn đối với « exec() » (thì hành)" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "tràn cộng khi thá»­ tính kết thúc của hôm nay" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "thiết bị lỗi chuẩn" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "thiết bị xuất chuẩn" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "Cảnh báo : không thể quyết định giờ sinh của tập tin %s" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "Không thể đóng thiết bị nhập chuẩn" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "Lỗi thay đổi thÆ° mục" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "không thể tạo tiến trình con" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "gặp lỗi khi đời %s" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s bị chấm dứt bởi tín hiệu %d" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "biểu thức không hợp lệ" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" +"biểu thức không hợp lệ; bạn đã dùng toán tá»­ nhị phân « %s » không có gì nằm " +"trước nó." + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "đợi biểu thức giữa « %s » và « ) »" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "đợi biểu thức sau « %s »" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "biểu thức không hợp lệ; có quá nhiều ký tá»± « ) »" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" +"biểu thức không hợp lệ; đợi ký tá»± « ) » nhÆ°ng chÆ°a gặp. Có thể bạn cần nhập " +"vị ngữ thêm sau « %s »" + +#: find/tree.c:151 +msgid "invalid expression; empty parentheses are not allowed." +msgstr "biểu thức không hợp lệ; không cho phép dấu ngoặc rỗng." + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "biểu thức không hợp lệ; ngờ ký tá»± « ) » nhÆ°ng chÆ°a gặp." + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "rõ tiếc — kiểu biểu thức không hợp lệ." + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "rõ tiếc — kiểu biểu thức không hợp lệ (%d)." + +#: find/tree.c:1230 +#, c-format +msgid "paths must precede expression: %s" +msgstr "đương dẫn phải nằm trước biểu thức: %s" + +#: find/tree.c:1239 +#, c-format +msgid "unknown predicate `%s'" +msgstr "vị ngữ lạ « %s »" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "vị ngữ không hợp lệ « %s »" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "đối số « %s » không hợp lệ đối với « %s »" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "thiếu đối số đối với « %s »" + +#: find/tree.c:1346 +msgid "you have too many ')'" +msgstr "quá nhiều ký tá»± « ) »" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "gặp vị ngữ thêm bất thường « %s »" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "gặp vị ngữ thêm bất ngờ" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "rỗ tiếc — việc chèn mặc định điều « and » một cách không hợp lệ." + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Cách sá»­ dụng: %s [--version | --help]\n" +"\t\t\t\t\t(phiên bản, trợ giúp)\n" +"hoặc\n" +"%s gần_hết_chữ_đôi_thường < danh_sách_tập_tin > cÆ¡_sở_dữ_liệu_định_vị\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Hãy thông báo lỗi nào cho .\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "lỗi ghi" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "Trình findutils phiên bản %s của GNU\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "ngày" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" +"Không cho phép đối số đối số rỗng cho tùy chọn « --max-database-age » (tuổi " +"cÆ¡ sở dữ liệu tối đa)" + +#: locate/locate.c:219 locate/locate.c:226 +#, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "" +"đối số %s không hợp lệ cho tùy chọn « --max-database-age » (tuổi cÆ¡ sở dữ " +"liệu tối đa)" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "cÆ¡ sở dữ liệu locate (định vị) %s bị hỏng hay không hợp lệ" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "Kích cỡ của cÆ¡ sở dữ liệu định vị: %s bytes\n" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "Tên tập tin khớp: %s " + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "Mọi tên tập tin: %s " + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "có độ dài lÅ©y tích là %s byte" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\ttrong đó có %s chứa dấu cách, " + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s chứa ký tá»± dòng mới, " + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\tvà %s chứa ký tá»± đặt bộ bit cao.\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "Một số tập tin có thể bị lọc ra thì không thể tính tá»· lệ nén.\n" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "Tá»· lệ nén %4.2f%%\n" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "Tá»· lệ nén không xác định.\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" +"cÆ¡ sở dữ liệu locate (định vị) %s hình nhÆ° cÆ¡ sở dữ liệu slocate, nhÆ°ng có " +"vẻ là nó có cấp bảo mật %c mà findutils của GNU không hiện thời hỗ trợ" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" +"%s là cÆ¡ sở dữ liệu kiểu slocate. Chỉ bắt đầu hỗ trợ kiểu này: có thể gặp " +"lỗi." + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" +"%s là cÆ¡ sở dữ liệu kiểu slocate có cấp bảo mật không được hỗ trợ %d nên bỏ " +"qua nó." + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" +"Bạn đã ghi rõ tùy chọn « -E », nhÆ°ng tùy chọn đó không thể được dùng với cÆ¡ " +"sở dữ liệu định dạng slocate có cấp bảo mật khác số không. Vi thế không tạo " +"ra kết quả cho cÆ¡ sở dữ liệu này.\n" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "%s là cÆ¡ sở dữ liệu kiểu slocate nên bật tùy chọn « -e »." + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "CÆ¡ sở dữ liệu locate định dạng cÅ© %s quá ngắn để hợp lệ" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "CÆ¡ sở dÆ° liệu %s có dạng thức %s.\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"Cách sá»­ dụng: %s [-d đường_dẫn | --database=đường_dẫn] (cÆ¡ sở dữ liệu)\n" +"[-e | -E| --[non-] existing] \t\t([không] tồn tại)\n" +"[-i | --ignore-case] \t(bỏ qua chữ hoa/thường)\n" +"[-w | --wholename] \t(tên đầy đủ)\n" +"[-b | --basename] \t\t(tên cÆ¡ sở)\n" +"[--limit=N | -l N] \t\t(giới hạn)\n" +"[-S | --statistics] \t\t(thống kê)\n" +"[-0 | --null] \t\t\t(rỗng)\n" +"[-c | --count] \t\t\t(số đếm)\n" +"[-P | -H | --nofollow] \t(không đi theo)\n" +"[-L | --follow] \t\t(đi theo)\n" +"[-m | --mmap ] \t\t(bản đồ m)\n" +"[ -s | --stdio ] \t\t(thiết bị nhập/xuất)\n" +"[-A | --all] \t\t\t(tất cả)\n" +"[-p | --print]\t\t\t(in)\n" +"[-r | --regex ] \t\t(biểu thức chính quy)\n" +"[--regextype=KIỂU]\t\tkiểu biểu thức chính quy\n" +"[--max-database-age D]\t\t(tuổi cÆ¡ sở dữ liệu tối đa)\n" +"[--version] \t\t\t(phiên bản)\n" +"[--help] mẫu... \t\t(trợ giúp)\n" +"pattern...\t\t\t\t(mẫu)\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "lỗi bỏ quyền hạn nhóm" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "lỗi bỏ quyền hạn setuid" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "Lỗi bỏ hoàn toàn quyền hạn" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "lỗi bỏ quyền hạn setgid" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "Trình locate (định vị) phiên bản %s cua GNU\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "đối số đối với « --limit » (giới hạn)" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" +"cảnh báo : cÆ¡ sở dữ liệu định vị có thể được đọc từ thiết bị xuất chuẩn chỉ " +"một lần thôi." + +#: locate/locate.c:1863 +#, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "cảnh báo : cÆ¡ sở dữ liệu %s cÅ© hÆ¡n %d %s (thật là %.1f %s)" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "Gặp dãy thoát không hợp lệ « %s » trong đặc tả giới hạn dữ liệu nhập" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" +"Gặp dãy thoát không hợp lệ « %s » trong đặc tả giới hạn dữ liệu nhập: không " +"cho phép giá trị ký tá»± vượt trội %lx." + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" +"Gặp dãy thoát không hợp lệ « %s » trong đặc tả giới hạn dữ liệu nhập: không " +"cho phép giá trị ký tá»± vượt trội %lo." + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" +"Gặp dãy thoát không hợp lệ « %s » trong đặc tả giới hạn dữ liệu nhập: không " +"nhận diện ký tá»± « %s » nằm theo." + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"Gặp đặc tả giới hận dữ liệu nhập không hợp lệ « %s »: dấu giới hạn phải là " +"hoặc một ký tá»± đơn hoặc một dãy thoát bắt đầu với « \\ »." + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "môi trường quá lớn đối với « exec » (thì hành)" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" +"cảnh báo : giá trị %ld cho tùy chọn « -s » quá lớn nên dùng %ld thay thế" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "Trình xargs (đối số x) phiên bản %s của GNU\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "Không thể mở tập tin nhập %s" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "Các biến môi trường chiếm %lu byte\n" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "Giới hạn POSIX trên về độ dài đối số (hệ thống này): %lu\n" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" +"Giới hạn POSIX trên nhỏ nhất cho phép về độ dài đối số (mọi hệ thống): %lu\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "Độ dài lệnh tối đa mà thật có thể dùng: %ld\n" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "Kích cỡ của bộ đệm lệnh thật đang dùng: %lu\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" +"\n" +"Bây giờ sẽ tiếp tục thá»±c hiện xargs, cÅ©ng thá»­ đọc các lệnh nhập/xuất của nó. " +"Không muốn thì gõ phím kết thúc tập tin.\n" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" +"Cảnh báo : %s sẽ được chạy ít nhất một lần. Không muốn thì bấm phím ngắt.\n" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"chÆ°a khớp với dấu trích dẫn %s; mặc định là mọi dấu trích dẫn là đặc biệt " +"với xargs nếu không dùng tùy chọn « -0 »" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "đôi" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "đơn" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" +"cảnh báo : dữ liệu nhập chứa ký tá»± vô giá trị (NULL). Không thể gá»­i nó qua " +"trong danh sách đối số. Bạn thật sá»± muốn sá»­ dụng tùy chọn « -null » không?" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "dòng đối số quá dài" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "gặp lỗi khi đời tiến trình con" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: đã thoát với trạng thái 255; nên hủy bỏ" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: bị ngừng bởi tín hiệu %d" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: bị chấm dứt bởi tín hiệu %d" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: số không hợp lệ đối với tùy chọn « -%c »\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: giá trị cho tùy chọn « -%c » nên là ≥ %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: giá trị cho tùy chọn « -%c » nên là < %ld\n" + +#: xargs/xargs.c:1306 +#, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"Cách sá»­ dụng: %s [-0prtx]\n" +"[--interactive]\t\ttÆ°Æ¡ng tác\n" +" [--null]\t\t\trỗng\n" +" [-d|--delimiter=dấu_giới_hạn]\n" +"[-E eof-str] [-e[eof-str]] [--eof[=eof-str]] (chuỗi kết thúc tập tin)\n" +"[-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +"\t(số dòng tối đa)\n" +"[-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +"\t(thay thế chuỗi)\n" +"[-n max-args] [--max-args=max-args] (số đối số tối đa)\n" +"[-s max-chars] [--max-chars=max-chars] (số ký tá»± tối đa)\n" +"[-P max-procs] [--max-procs=max-procs] (số tiến trình tối đa)\n" +"[--verbose]\t\t\t\t\t\t(xuất chi tiết)\n" +"[--exit] \t\t\t\t\t\t\t(thoát)\n" +"[--no-run-if-empty] \t\t(đừng chạy nếu trống)\n" +"[--arg-file=tập_tin]\t\t\t\t(tập tin đối số)\n" +"[--version]\t\t\t\t\t\t(phiên bản)\n" +"[--help]\t\t\t\t\t\t\t(trợ giúp)\n" +"[lệnh [các_đối_số_đầu]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "rõ tiếc — kiểu biểu thức không hợp lệ trong « mark_stat »." + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "rõ tiếc — kiểu biểu thức không hợp lệ trong « mark_type »." + +#~ msgid "old" +#~ msgstr "cÅ©" + +#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n" +#~ msgstr "" +#~ "Đang rút gọn « arg_max » (đối số tối đa) (%ld) thành « arg-size » (kích " +#~ "cỡ đối số) (%ld)\n" diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo new file mode 100644 index 0000000000000000000000000000000000000000..6983d26ecde6dd26b5e54d5bbf591f0a05c9203a GIT binary patch literal 3411 zcmb7``)?Fg6vwY3K305CU!bBFWGO1M?3RLMK_DVAL_k9d2A|CCUY3#BnRV_=AH+XF z{eh@4G5)Yw30N_N0O`9!U;sP=-U|K*Qv4S|xXh;B#26mgz2Ho621xfV2g$!$ z@IKH6Dc-lh3a|-$2F}QwNO_+$#p5j?*|`J6)vN-fyv_h`0cV3`KLnEAa-UCu z#~^6^OJm zsIf}y$FOH(&%&nsQO=>l=x2e_xQqOs=ReaOwCHz4{X>iHr$zqIqI!m~=U`I~9>=Df z(<0wTuSfhB@{#IKxgNc!7L;eoh2kGjU8tvm*wmA>D2JRLux4V<#io2cij7ja>kj;- z+)&?^S5R_WSSig=ZIR%yMlQ9aq3S%CU_lw>qCq2hy=HIa(pGIp@~VXkmvA*^TDE2+ zT_sJ|MH1hbXbhCaRfDTm(n$%!_RN%(p{hx)rea#sF&%mBsU_ZUG)q8dA{&bGKQ2^W;QwEH zLJ!AtZgfJWZKl)X73$xL=oprWn@L04jxWoJqO5w^8TZ^xLI6LKrHGG*LLtI3zMQjX z)@|ThG$X<5ge9rqL1dYPx*10oT_bKlrQ{gt24kCH)*DxNTaEETJ|^mN1=|E|@UtG|M!onW%SMySPfY{VEznoVgzIdR3#Icf~7s}#}8 z6w>%As6t8|PP$e{;Ri|kdCPnqWl&Zpl#N~sMcsySY)zNEIur>#5m+zMm@vv(nbZ=> zQ%+JUwPuvZoTNgn=W4D<8cxWxl7Z)+t5sH7LZ#`WJdGBN@~Uw72_?Kp2`}c6nrQXn z$HS3u7>dezQKwN-NA#+oq=XmnNOiOddNt5nqe@$;wNyjuD!L`gUr>?AH5y+U->O== zkSoxDPD98Lb|`KvgT9e;)TB^qg_?@;m0QuCQt-J_OQm&fizX6}@}*j&#!zhEC_I1- zY0J=9OKVrJT{V)FNGKdwX&N>fQ>jJ&L@}!y?D=V3)r=*ae38O_G8wB{5UCnbq${=v zOIc;a&4gRH8YQN=bCM5yJ@9SuVCO;1ciwh+@SDMXEGV;`rIV*}$M(=@=f{t>Udnb2 z7X6ddO{0S?{V|fSAYVT>?HVQOo(o;yrrtvgVy9x~YiX<(@6NJDXwoos9CtdU72, 2002. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.1.7\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2002-09-03 14:29+0800\n" +"Last-Translator: Wang Li \n" +"Language-Team: Chinese (simplified) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=gb2312\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: gnulib/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "¡°%2$s¡±µÄ²ÎÊý %1$s ÎÞЧ" + +#: gnulib/lib/argmatch.c:135 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "¡°%2$s¡±µÄ²ÎÊý %1$s ÓжþÒåÐÔ" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "ºÏ·¨µÄ²ÎÊýΪ£º" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "δ֪µÄϵͳ´íÎó" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s£ºÑ¡Ïî¡°%s¡±ÓжþÒåÐÔ\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s£ºÑ¡Ïî¡°--%s¡±²»½ÓÊܲÎÊý\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s£ºÑ¡Ïî¡°%c%s¡±²»½ÓÊܲÎÊý\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s£ºÑ¡Ïî¡°%s¡±ÐèÒªÒ»¸ö²ÎÊý\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s£ºÎÞ·¨Ê¶±ðµÄÑ¡Ïî¡°--%s¡±\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s£ºÎÞ·¨Ê¶±ðµÄÑ¡Ïî¡°%c%s¡±\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s£º·Ç·¨Ñ¡Ïî -- %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s£º·Ç·¨Ñ¡Ïî -- %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s£ºÑ¡ÏîÐèÒªÒ»¸ö²ÎÊý -- %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s£ºÑ¡Ïî¡°-W %s¡±ÓжþÒåÐÔ\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s£ºÑ¡Ïî¡°-W %s¡±²»½ÓÊܲÎÊý\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "¿é´óС" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "¡°" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "¡±" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Ó÷¨£º%s [·¾¶...] [±í´ïʽ]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "Ó÷¨£º%s [·¾¶...] [±í´ïʽ]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "¾´¸æ£ºÎÞ·¨Ê¶±ðµÄתÒå×Ö·û¡°\\%c¡±" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "ÎÞ·¨»ñÈ¡µ±Ç°Ä¿Â¼" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "ÎÞ·¨»ñÈ¡µ±Ç°Ä¿Â¼" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "δ֪" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +#, fuzzy +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"ĬÈÏ·¾¶Îªµ±Ç°Ä¿Â¼£»Ä¬Èϱí´ïʽΪ -print\n" +"±í´ïʽ¿ÉÄÜÓÉÏÂÁгɷÝ×é³É£º\n" +"²Ù×÷·û (ÓÅÏȼ¶µÝ¼õ; ÔÚûÓиø³öÆäËü²Ù×÷·ûʱ£¬Òþº¬ -and)£º\n" +" ( ±í´ïʽ ) ! ±í´ïʽ -not ±í´ïʽ ±í´ïʽ1 -a ±í´ïʽ2 ±í´ïʽ1 -and ±í´ïʽ" +"2\n" + +#: find/parser.c:1044 +#, fuzzy +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"ĬÈÏ·¾¶Îªµ±Ç°Ä¿Â¼£»Ä¬Èϱí´ïʽΪ -print\n" +"±í´ïʽ¿ÉÄÜÓÉÏÂÁгɷÝ×é³É£º\n" +"²Ù×÷·û (ÓÅÏȼ¶µÝ¼õ; ÔÚûÓиø³öÆäËü²Ù×÷·ûʱ£¬Òþº¬ -and)£º\n" +" ( ±í´ïʽ ) ! ±í´ïʽ -not ±í´ïʽ ±í´ïʽ1 -a ±í´ïʽ2 ±í´ïʽ1 -and ±í´ïʽ" +"2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" + +#: find/parser.c:1053 +#, fuzzy +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +" -cnewer Îļþ -ctime N -empty -false -fstype ÀàÐÍ -gid N -group Ãû³Æ\n" +" -ilname Æ¥Åäģʽ -iname Æ¥Åäģʽ -inum N -ipath Æ¥Åäģʽ -iregex Æ¥ÅäÄ£" +"ʽ\n" +" -links N -lname Æ¥Åäģʽ -mmin N -mtime N -name Æ¥Åäģʽ -newer Îļþ\n" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path Æ¥Åäģʽ -perm [+-]·ÃÎÊģʽ -regex Æ¥Åäģʽ\n" +" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user Ãû³Æ\n" +" -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "·Ç·¨Ä£Ê½¡°%s¡±" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "-size µÄ null ²ÎÊýÎÞЧ" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "ÎÞЧµÄ -size ÀàÐÍ¡°%c¡±" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "¡°%2$s¡±µÄÎÞЧ²ÎÊý¡°%1$s¡±" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "¡°%2$s¡±µÄ²ÎÊý %1$s ÎÞЧ" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find °æ±¾ %s\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU find °æ±¾ %s\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "¾´¸æ£ºÎÞ·¨Ê¶±ðµÄתÒå×Ö·û¡°\\%c¡±" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "¾¯¸æ£º²»¿Éʶ±ðµÄ¸ñʽָÁî¡°%%%c¡±" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" + +#: find/parser.c:2873 +#, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "¶Ô exec À´Ëµ»·¾³¹ý´ó" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "ÎÞ·¨ fork" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "µÈ´ý %s ʱ³ö´í" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s ÓÉÓÚÐźŠ%d ¶øÖÕÖ¹" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "·Ç·¨±í´ïʽ" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +#, fuzzy +msgid "invalid expression; you have too many ')'" +msgstr "·Ç·¨±í´ïʽ" + +#: find/tree.c:145 +#, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "·Ç·¨±í´ïʽ" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "°¥Ñ½ -- ÎÞЧµÄ±í´ïʽÀàÐÍ£¡" + +#: find/tree.c:233 +#, fuzzy, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "°¥Ñ½ -- ÎÞЧµÄ±í´ïʽÀàÐÍ£¡" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "·¾¶±ØÐëÔÚ±í´ïʽ֮ǰ" + +#: find/tree.c:1239 +#, fuzzy, c-format +msgid "unknown predicate `%s'" +msgstr "ÎÞЧ¶ÏÑÔ¡°%s¡±" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "ÎÞЧ¶ÏÑÔ¡°%s¡±" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "¡°%2$s¡±µÄÎÞЧ²ÎÊý¡°%1$s¡±" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "ÒÅ©¡°%s¡±µÄ²ÎÊý" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "·Ç·¨±í´ïʽ" + +#: find/tree.c:1351 +#, fuzzy, c-format +msgid "unexpected extra predicate '%s'" +msgstr "ÎÞЧ¶ÏÑÔ¡°%s¡±" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +#, fuzzy +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"½«´íÎ󱨸浽 ¡£" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, fuzzy, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU find °æ±¾ %s\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "Ìì" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "¡°%2$s¡±µÄÎÞЧ²ÎÊý¡°%1$s¡±" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "" + +#: locate/locate.c:905 +#, c-format +msgid "Matching Filenames: %s " +msgstr "" + +#: locate/locate.c:906 +#, c-format +msgid "All Filenames: %s " +msgstr "" + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "" + +#: locate/locate.c:947 +#, c-format +msgid "Compression ratio is undefined\n" +msgstr "" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate °æ±¾ %s\n" + +#: locate/locate.c:1707 +#, fuzzy +msgid "argument to --limit" +msgstr "²ÎÊýÐйý³¤" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "" + +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "¾´¸æ£ºÊý¾Ý¿â¡°%s¡±±È %d %s »¹³Â¾É" + +#: xargs/xargs.c:302 +#, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "" + +#: xargs/xargs.c:320 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "" + +#: xargs/xargs.c:326 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "" + +#: xargs/xargs.c:335 +#, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "" + +#: xargs/xargs.c:380 +#, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "¶Ô exec À´Ëµ»·¾³¹ý´ó" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs °æ±¾ %s\n" + +#: xargs/xargs.c:652 +#, c-format +msgid "Cannot open input file %s" +msgstr "" + +#: xargs/xargs.c:688 +#, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "" + +#: xargs/xargs.c:691 +#, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "" + +#: xargs/xargs.c:694 +#, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "" + +#: xargs/xargs.c:701 +#, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "Ë«" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "µ¥" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "²ÎÊýÐйý³¤" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "µÈ´ý×Ó½ø³Ìʱ³ö´í" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s£ºÒÔ״̬ 255 Í˳ö£»ÖÐÖ¹" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s£ºÒòÐźŠ%d ¶øÍ£Ö¹" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s£ºÒòÐźŠ%d ¶øÖÕÖ¹" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s£ºÑ¡Ïî -%c µÄÊýÖµÎÞЧ\n" + +#: xargs/xargs.c:1274 +#, fuzzy, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s£ºÑ¡Ïî -%c µÄÖµ±ØÐë >= %ld\n" + +#: xargs/xargs.c:1288 +#, fuzzy, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s£ºÑ¡Ïî -%c µÄÖµ±ØÐë < %ld\n" + +#: xargs/xargs.c:1306 +#, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "°¥Ñ½ -- ÎÞЧµÄ±í´ïʽÀàÐÍ£¡" + +#, fuzzy +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "°¥Ñ½ -- ÎÞЧµÄ±í´ïʽÀàÐÍ£¡" + +#~ msgid "Success" +#~ msgstr "³É¹¦" + +#~ msgid "No match" +#~ msgstr "ûÓÐÆ¥Åä" + +#~ msgid "Invalid regular expression" +#~ msgstr "ÎÞЧµÄ³£¹æ±í´ïʽ" + +#~ msgid "Invalid collation character" +#~ msgstr "ÎÞЧµÄУ¿±×Ö·û" + +#~ msgid "Invalid character class name" +#~ msgstr "ÎÞЧµÄ×Ö·ûÀàÃû" + +#~ msgid "Trailing backslash" +#~ msgstr "ĩβµÄ·´Ð±Ïß" + +#~ msgid "Invalid back reference" +#~ msgstr "ÎÞЧµÄÏòºóÒýÓÃ" + +#~ msgid "Unmatched [ or [^" +#~ msgstr "²»Æ¥ÅäµÄ [ »ò [^" + +#~ msgid "Unmatched ( or \\(" +#~ msgstr "²»Æ¥ÅäµÄ ( »ò \\(" + +#~ msgid "Unmatched \\{" +#~ msgstr "²»Æ¥ÅäµÄ \\{" + +#~ msgid "Invalid content of \\{\\}" +#~ msgstr "ÎÞЧµÄ \\{\\} µÄÄÚÈÝ" + +#, fuzzy +#~ msgid "Invalid range end" +#~ msgstr "ÎÞЧµÄÏòºóÒýÓÃ" + +#~ msgid "Memory exhausted" +#~ msgstr "ÄÚ´æºÄ¾¡" + +#, fuzzy +#~ msgid "Invalid preceding regular expression" +#~ msgstr "ÎÞЧµÄ³£¹æ±í´ïʽ" + +#, fuzzy +#~ msgid "Premature end of regular expression" +#~ msgstr "ÎÞЧµÄ³£¹æ±í´ïʽ" + +#~ msgid "Regular expression too big" +#~ msgstr "³£¹æ±í´ïʽ¹ý´ó" + +#~ msgid "Unmatched ) or \\)" +#~ msgstr "²»Æ¥ÅäµÄ ) »ò \\)" + +#~ msgid "No previous regular expression" +#~ msgstr "ûÓÐÉÏÒ»¸ö³£¹æ±í´ïʽ" + +#, fuzzy +#~ msgid "" +#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" +#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" +#~ "delete\n" +#~ " -quit\n" +#~ msgstr "" +#~ "¶¯×÷£º-exec ÃüÁî ; -fprint Îļþ -fprint0 Îļþ -fprintf Îļþ ¸ñʽ\n" +#~ " -ok ÃüÁî ; -print -print0 -printf ¸ñʽ -prune -ls\n" + +#~ msgid "Predicate List:\n" +#~ msgstr "¶ÏÑÔÁÐ±í£º\n" + +#~ msgid "Eval Tree:\n" +#~ msgstr "ÇóÖµÊ÷£º\n" + +#~ msgid "Optimized Eval Tree:\n" +#~ msgstr "ÓÅ»¯µÄÇóÖµÊ÷£º\n" + +#, fuzzy +#~ msgid "Optimized command line:\n" +#~ msgstr "ÓÅ»¯µÄÇóÖµÊ÷£º\n" + +#~ msgid "virtual memory exhausted" +#~ msgstr "ÐéÄâÄÚ´æºÄ¾¡" + +#~ msgid "inserting %s\n" +#~ msgstr "ÕýÔÚ²åÈë %s\n" + +#~ msgid " type: %s %s " +#~ msgstr " ÀàÐÍ£º%s %s " + +#~ msgid "left:\n" +#~ msgstr "×ó£º\n" + +#~ msgid "right:\n" +#~ msgstr "ÓÒ£º\n" + +#~ msgid "%s changed during execution of %s" +#~ msgstr "ÔÚÖ´ÐÐ %2$s ÆÚ¼ä %1$s ±»¸Ä±ä" + +#~ msgid "%s/.. changed during execution of %s" +#~ msgstr "ÔÚÖ´ÐÐ %2$s ÆÚ¼ä %1$s/.. ±»¸Ä±ä" + +#~ msgid "error in %s: %s" +#~ msgstr "%s ÖеĴíÎó£º%s" + +#~ msgid "" +#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +#~ "options (always true): -daystart -depth -follow --help\n" +#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" +#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +#~ msgstr "" +#~ " ±í´ïʽ1 -o ±í´ïʽ2 ±í´ïʽ1 -or ±í´ïʽ2 ±í´ïʽ1 , ±í´ïʽ2\n" +#~ "Ñ¡Ïî (×ÜΪÕæ)£º-daystart -depth -follow --help\n" +#~ " -maxdepth ²ã´ÎÊý -mindepth ²ã´ÎÊý -mount -noleaf --version -xdev\n" +#~ "²âÊÔ (N ¿ÉÒÔΪ +N »ò -N »ò N)£º-amin N -anewer Îļþ -atime N -cmin N\n" + +#~ msgid "" +#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" +#~ msgstr "" +#~ "Ó÷¨£º%s [-d ·¾¶ | --database=·¾¶] [-e | --existing]\n" +#~ " [-i | --ignore-case] [--version] [--help] ģʽ...\n" + +#~ msgid "unmatched %s quote" +#~ msgstr "²»Æ¥ÅäµÄ%sÒýºÅ" + +#~ msgid "command too long" +#~ msgstr "ÃüÁî¹ý³¤" + +#~ msgid "argument list too long" +#~ msgstr "²ÎÊýÁбí¹ý³¤" diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo new file mode 100644 index 0000000000000000000000000000000000000000..7bccf368ab1a1589275b146cc87e22709bcc8113 GIT binary patch literal 11747 zcmeI2Yj9lUdB;x@NQ!c4nxtvcT>6qAEEOLiIT$;#<6w*o2H)z4B!m!iw0k6N*ga?2 zvujzDcI1m}$u}9tvav1j1>*?gyTKMlGVSC;rk80ybTXZOXl4pJXLmc((A$T6XlMF+ z-uLWkEy)S=OFPq^@zHff4S;M3q4@DA|Hw^`Qb!DXP#e~ z2d?~tS?}lI<9z>H{JrKkEvtp^Bq;nm01BV}92Ax>hB(3dL812{@R#7jpvY(0ZyCCt z1UahJ145#;8I=A#;4R>*AR@CafO5{Opq%gTK;hFbz~2Es!Qn-2cY?zIrJ(R*J%84M zIj|A@3HW93pFrXJ$3AW3R1Ye?9|8XgOoO*U_#!sDm+v;1Cv-duHqyQY{0`q|VeSgP zZ-t1b`Ch}KOTa$`SArr0(UVo6=uZ|*GkzEpdOwKJ=Yn4XZwDU+o53`=8GHd`sHI@a zRcr;{#H=zdr{`dkZLXd=R`7 z{5~k_Z2^V8OW@DIcfh{{-{5e63~pm_nSU$9JPCdQl<#Ljp=)1^*TI1Ae*{Gje*p6Z zli-KIAAn-iGsO1s?{Nf&HM+{bwMZPuk*?yJdj7u3aQ$c z$hq2hF>UP|?guN6@EliMeeUMhn(7y}$Zu4x`iM@+BfgWPYM(q0{4lS`K_1bcKj2-* zE4o_yEaF4>Bt8b!vmWHVjaMF#C+4Z`eK{y{TgAJScQvorgXq8~ct65hc|^bE5&gf1 zSM)`6Q1K#O>k(d&)dF6Tl{|}i@8kU{ujr*!cUyg+626yrQl9eMo^;A{RifL;If=ZR z3+5_DI9^iKjGF3IJ*j-R%6Ge}JJr>#I#PKRxcR0!=J=her#qGCuAN9j-VL%&!j)y$ zxmiD#R~?0}K;?b4m>+g$%1ajVsdR8(mse==b6rbhv83DS6w-N>b=WP%Xf{j~ayi$_ zt7IzYCh~r+caf?Lb2nylZV;q=PX^oBT*}MW)ih?DUO91)3i8VDY*l{N%{eT=Vf}2L zY5aiBJRm2B5z^LLXTbw_l1X_^-c72GUKOOeJSVN{lXMA#x*e~Jo@9Y7yOg`pO>h{< zfEjc*_-Xpw4XK2yyh5hK&8hlya;|WFw&u=M+6{Vxyqi(^-mEKUsSg^}<2jer(#a>@ z`<^M!PtM$OX6t*{v6WLH#H5jYkazNhK+T&!f01%JkS525tX7pur`;|%WB93TTh%9o zfAn}8oOCK#VL+#!Q+9nK9(d!BnUmv|C+idS!5o$J-N2iZS57+Z_aG|e)_nt{m*T>;!{6@of?aTj&gDraLVQ^=^a z>viF%F#3d_$%qT-!Cz_K;7baqYp*H83o)$-_4=@eltm(%Q{`I za`LJ>pU<}5eRtq&a6HfHZi;>I-OA6+RjE$Z>lakFvjJD)bEFPDV}kAGYES5TNmu!KB2QBZo&^t z@W`ED;82`eOvqbieE++Ik(mNj+65^RjZyFlfv@dP5^TgNSbqZxUR>B1rP0S zdhas|UUkl6D62$z;VjlBCM8-CE0?%}RGwZZ6Z};i zSw9bfDMFi8JXr#>Ln$*&)(;-{RzJbt-p8J>p0p}ygR+xu+Qq?`M5H;!PPKf^x>ZZt zmEEZm6uwuiY^yfvHdUutUm4PDhQt%%k2D!hCx7&8wkY69Y{FT-GFQ%}maSQ}YU%0+ z)FP#wNc9`0+@&~ewP8{1G-1cInYB%o$+c~Z>a1#@t;XZnX#-Y86_n01^S+PHkTXo_ zvz5U2ATpf%QPWAU zPEQF7TJ?FYOo}8LW>t?;Ifd_M(K=gI&N_7(lc_e;CmV0Ke$6NbRPt`skaQC{oU-gj z?w)XyE`bnbmEb0(m&vA632qnW*n}S+pO@4AM0KS$xL#vxthf!T?YnE&sYWd4cJosy zTlk}!m4+4;)<5PkO4_A?o#f}dc%8V}pFR#L>tWTIbK_}N)(=oFUoHeDqax#X(miM? zp`qY5w&Dr+$U9tm>`q@NtpwpNccUm)U7aUs&FpjMssL3;b*3cGbI~+JEesG9iLW|A zl>_*jEa`{w-^$K78%@K?wr{ts{1y#FK|P|{AZ}KeL@?{D*nc$=*i7G`Y;HPiyB;Ye zvG?^P9QYZ}pQX9Z3LH-yW1`z7ND+4>K6QHJY>DoMMl8Q0=j3`-XTj4qE7eKd6fZC0 z$CmZgOEs)kcmhtV?piI;)z*Jk3l|+upjL~>+#YyfJRfl%Pflw>_g0RPs2#(0W{jK3 zLZ98~q;c+cXP_;+{js%e%I?CPSfwlH7qV*g(p7Dhl~QRPE64`g+tx9HRD;E8KFR!~ zxu+XGPV3WBu8gfLhzEQskSWs^&cw&dRH(giv8e-DL_6UrN`e1*xOq7I(qbiK-zD~06YkZ9yWo~$)T zvw@sW2Vs*gu&NI46di~ZlJ1L&&9SSz$K!H=CxO6HIA3QW&D}nya5&u#zH5#ha3INC z=CIV#G`D(595=Y>-fE&ts=`$9NOFB3vChub>@tbGFl~E+^Tm0xa0RpQ4i8?zifTPIYLds8qLhO}o7e28g@1xo498&TDR7U^m}uH-BBV zENs2!>vuJ`G&eKQUPr-3Zjw{u=G!gv7^+%YTEEtOSMx%~t#pFC-JV0oIfb8VRZBbE zv|85f7SNx?4j-5)zwhgk`%x2eTf!W#t3c{)x4TZJmBCcr(0~T+5y?1^G^)kVbld5c zX74_{MPZ{<#G3LwOX^mwSk*SgiE`Sv!~QMrj_;x?+_y`7 z4c+11R~a!mwmW+Myjq}3f5pRF&DeMPHp@C;|CPzHv+;Na7hkznJTy_WTG)`Q z)BbRLNXUyzfYr8e==|iHFNeGOqn&5Un|2n@9SqOzeW!0zdDB?=SU*3au`{JtPI1`i zN4qB{MxxQ!=#J8%qtyLWsc%>D_07@Q6IOWiD$G*#U%Mkv(V@+% zzU7Xfex7{5$icqo$ZOI5H&jDuU`Oet7m5?-idRQjgHx#bd+talAwD{AVMf>dxa;)( z==ebK@|(riFP4wL7{0huPrUbzYC&)T1D|*wM3B5mQE*l&X7;^LGNjNK9(gg`e7SgH zTqvbN`0n@-v_UvkAHYg9C)_&_T^>eQhVSa_{e9Ikq0|ITb9j9hL!#lauy4G$^>{Qq zAW~oj^D*0WIx9=|JukJwxBCt$*>LE5xnH&ohqkcbt&(E03!Dk;s?l!Af!?*g&#|FX+L(ze8Qxp>g`c-2^m^H)U+|2r6>GJmI zz@hNktKxx-tS7H+s}G`M<5;tHDBOit{^$rfMVT4#mlPn8d2D?3nEs1xPiwSDr5n4sm zwZ0w)9*t~)>Bi-T=LW<6(c=CS#r;PkV#;eTvSrLiQy;AES^V*veJj#|Bi!8=oqOHrn+UUpO+whT+M&hT;!+rB0*;Qr z79zpoZ(bU{_w!LYO%0t4Rw|T%HaXFHC~mtA=X$rdx|XJ-LVU1 zx*yHRgs2A>Pue zRXHgS{NE}R>g=d0Zk;emls3`KGD;AhJdM+{Y8BX$(x3`YUW|qhTE>w?7q5lq4%ZqT z{*)ZciVnVPm5&^%En=CpT5)gcAbCl8VMZju&jwxh>gGL*DY53ZPko=-kmvqCkQji*if zCfj16MwvkTLdy-olM~yj;U&7X4~w&APBcR`Q{*_Zxh!OvW8$gs8D>}Eqe<#@LS+f< znn-bHfzSYVgCTpEW9>U z+<&qB>hr{g$%#GDo_)kfP9BFDeZJ}}G1kHDm}aNbTv*u8_Ju9 zO5^8AcB2bp{Vysc zntNDH?GVii_ntC|k+DK7R6IX+X2qka9GXl*;t9c3s{tuV>C!O?uK3yiFCdz#sZ}3@ z7Bg3t#tY{ z!a@Ya!8gKzm!qvi#p|zN#g!O6epnY5V_&JmsYF|?#3Z;92QXFbgrfr^(1=bSIZ)h+ z!tRQOUo$lThDcVT`*otJ6D_tDaz{q-d?sCBW$i+x@F*@Z4%6DeBmvR|N7P6TM=0OY zA6+Kb-6?aXYKq#IlH*8YrF=+RHRQ`#_m9ddm2_9AsARk`Lo2mJ=`vM_=MPe9h, 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: findutils 4.2.26\n" +"Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" +"POT-Creation-Date: 2007-06-09 18:49+0100\n" +"PO-Revision-Date: 2005-12-06 11:30+0800\n" +"Last-Translator: Abel Cheung \n" +"Language-Team: Chinese (traditional) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gnulib/lib/argmatch.c:134 +#, c-format +msgid "invalid argument %s for %s" +msgstr "%2$s 的參數 %1$s 無效" + +#: gnulib/lib/argmatch.c:135 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "%2$s 的參數 %1$s 不明確" + +#: gnulib/lib/argmatch.c:154 +#, c-format +msgid "Valid arguments are:" +msgstr "有效的參數為:" + +#: gnulib/lib/error.c:125 +msgid "Unknown system error" +msgstr "不明的系統錯誤" + +#: gnulib/lib/getopt.c:531 gnulib/lib/getopt.c:547 +#, c-format +msgid "%s: option `%s' is ambiguous\n" +msgstr "%s:選項 ‘%s’ 不明確\n" + +#: gnulib/lib/getopt.c:580 gnulib/lib/getopt.c:584 +#, c-format +msgid "%s: option `--%s' doesn't allow an argument\n" +msgstr "%s:選項 ‘--%s’ 不可配合參數使用\n" + +#: gnulib/lib/getopt.c:593 gnulib/lib/getopt.c:598 +#, c-format +msgid "%s: option `%c%s' doesn't allow an argument\n" +msgstr "%s:選項 ‘%c%s’ 不可配合參數使用\n" + +#: gnulib/lib/getopt.c:641 gnulib/lib/getopt.c:660 gnulib/lib/getopt.c:976 +#: gnulib/lib/getopt.c:995 +#, c-format +msgid "%s: option `%s' requires an argument\n" +msgstr "%s:選項 ‘%s’ 需要參數\n" + +#: gnulib/lib/getopt.c:698 gnulib/lib/getopt.c:701 +#, c-format +msgid "%s: unrecognized option `--%s'\n" +msgstr "%s:‘--%s’ 選項無法辨識\n" + +#: gnulib/lib/getopt.c:709 gnulib/lib/getopt.c:712 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" +msgstr "%s:‘%c%s’ 選項無法辨識\n" + +#: gnulib/lib/getopt.c:764 gnulib/lib/getopt.c:767 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s:不合法的選項 ─ %c\n" + +#: gnulib/lib/getopt.c:773 gnulib/lib/getopt.c:776 +#, c-format +msgid "%s: invalid option -- %c\n" +msgstr "%s:無效的選項 ─ %c\n" + +#: gnulib/lib/getopt.c:828 gnulib/lib/getopt.c:844 gnulib/lib/getopt.c:1048 +#: gnulib/lib/getopt.c:1066 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "%s:選項需要參數 ─ %c\n" + +#: gnulib/lib/getopt.c:897 gnulib/lib/getopt.c:913 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" +msgstr "%s:選項 ‘-W %s’ 不明確\n" + +#: gnulib/lib/getopt.c:937 gnulib/lib/getopt.c:955 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" +msgstr "%s:選項 ‘-W %s’ 不可配合參數使用\n" + +#: gnulib/lib/human.c:477 +msgid "block size" +msgstr "區段大小" + +#. 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. +#: gnulib/lib/quotearg.c:229 +msgid "`" +msgstr "‘" + +#: gnulib/lib/quotearg.c:230 +msgid "'" +msgstr "’" + +#: gnulib/lib/rpmatch.c:70 +msgid "^[yY]" +msgstr "^[yY]" + +#: gnulib/lib/rpmatch.c:73 +msgid "^[nN]" +msgstr "^[nN]" + +#: find/util.c:163 +#, fuzzy, c-format +msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "用法: %s [-H] [-L] [-P] [路徑...] [表達式]\n" + +#: find/util.c:165 +#, fuzzy, c-format +msgid "] [path...] [expression]\n" +msgstr "用法:%s [路徑...] [表達式]\n" + +#: find/util.c:206 +#, c-format +msgid "Warning: file %s appears to have mode 0000" +msgstr "" + +#: find/util.c:754 +#, fuzzy, c-format +msgid "Ignoring unrecognised debug flag %s" +msgstr "警告:無效辨認轉義控制序列 (escape sequence) ‘\\%c’" + +#: find/util.c:761 +msgid "Empty argument to the -D option." +msgstr "" + +#: find/util.c:775 +msgid "The -O option must be immediately followed by a decimal integer" +msgstr "" + +#: find/util.c:784 find/util.c:794 +msgid "Please specify a decimal number immediately after -O" +msgstr "" + +#: find/util.c:799 find/util.c:803 +#, c-format +msgid "Invalid optimisation level %s" +msgstr "" + +#: find/util.c:810 +#, c-format +msgid "" +"Optimisation level %lu is too high. If you want to find files very quickly, " +"consider using GNU locate." +msgstr "" + +#: find/util.c:941 +msgid "" +"The environment variable FIND_BLOCK_SIZE is not supported, the only thing " +"that affects the block size is the POSIXLY_CORRECT environment variable" +msgstr "" +"環境變數 FIND_BLOCK_SIZE 已經不再支援,唯一一個能夠影響檔案區段大小的環境變數" +"是 POSIXLY_CORRECT" + +#: find/find.c:207 +msgid "cannot get current directory" +msgstr "無法決定當前目錄位置" + +#: find/find.c:211 +#, fuzzy +msgid "cannot stat current directory" +msgstr "無法決定當前目錄位置" + +#: find/find.c:391 +#, c-format +msgid "Warning: filesystem %s has recently been unmounted." +msgstr "警告︰檔案系統 %s 剛剛被卸載。" + +#: find/find.c:401 +#, c-format +msgid "Warning: filesystem %s has recently been mounted." +msgstr "警告︰檔案系統 %s 剛剛被掛載。" + +#: find/find.c:497 +#, c-format +msgid "" +"%s%s changed during execution of %s (old device number %ld, new device " +"number %ld, filesystem type is %s) [ref %ld]" +msgstr "" +"執行 %3$s 時 %1$s%2$s 有所更改 (舊裝置編號為 %4$ld,新裝置編號為 %5$ld,檔案" +"系統類型為 %6$s) [ref %7$ld]" + +#: find/find.c:534 +#, c-format +msgid "" +"%s%s changed during execution of %s (old inode number %ld, new inode number %" +"ld, filesystem type is %s) [ref %ld]" +msgstr "" +"執行 %3$s 時 %1$s%2$s 有所更改 (舊 inode 編號為 %4$ld,新 inode 編號為 %5" +"$ld,檔案系統類型為 %6$s) [ref %7$ld]" + +#: find/find.c:1096 +#, c-format +msgid "" +"Symbolic link %s is part of a loop in the directory hierarchy; we have " +"already visited the directory to which it points." +msgstr "" + +#: find/find.c:1111 +#, c-format +msgid "" +"Filesystem loop detected; %s has the same device number and inode as a " +"directory which is %d %s." +msgstr "" + +#: find/find.c:1115 +msgid "level higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1116 +msgid "levels higher in the filesystem hierarchy" +msgstr "" + +#: find/find.c:1361 +#, c-format +msgid "warning: not following the symbolic link %s" +msgstr "" + +#: find/find.c:1405 +#, c-format +msgid "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we " +"already saw %d subdirectories): this may be a bug in your filesystem " +"driver. Automatically turning on find's -noleaf option. Earlier results " +"may have failed to include directories that should have been searched." +msgstr "" + +#: find/fstype.c:255 +msgid "unknown" +msgstr "" + +#: find/parser.c:469 +#, c-format +msgid "" +"warning: you have specified the %s option after a non-option argument %s, " +"but options are not positional (%s affects tests specified before it as well " +"as those specified after it). Please specify options before other " +"arguments.\n" +msgstr "" + +#: find/parser.c:754 +msgid "" +"warning: the -d option is deprecated; please use -depth instead, because the " +"latter is a POSIX-compliant feature." +msgstr "" +"警告:-d 選項已經過時,請改用 -depth,因為後者才是符合 POSIX 標準的選項。" + +#: find/parser.c:1002 +#, c-format +msgid "" +"%s is not the name of an existing group and it does not look like a numeric " +"group ID because it has the unexpected suffix %s" +msgstr "" + +#: find/parser.c:1015 +#, c-format +msgid "%s is not the name of an existing group" +msgstr "" + +#: find/parser.c:1020 +msgid "argument to -group is empty, but should be a group name" +msgstr "" + +#: find/parser.c:1041 +msgid "" +"\n" +"default path is the current directory; default expression is -print\n" +"expression may consist of: operators, options, tests, and actions:\n" +msgstr "" +"\n" +"預設路徑為目前的目錄,預設的表達式是 -print\n" +"表達式可以包括運算子、選項、測試和操作模式:\n" + +#: find/parser.c:1044 +msgid "" +"operators (decreasing precedence; -and is implicit where no others are " +"given):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" +msgstr "" +"以下的運算子優先次序由高至低排列;如果沒有運算子,則會假設為 -and :\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" + +#: find/parser.c:1048 +msgid "" +"positional options (always true): -daystart -follow -regextype\n" +"\n" +"normal options (always true, specified before other expressions):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" +msgstr "" +"位置選項 (邏輯值永遠為 true): -daystart -follow -regextype\n" +"\n" +"一般選項 (邏輯值永遠為 true,必須加在其它表達式之前):\n" +" -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" + +#: find/parser.c:1053 +msgid "" +"tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" +msgstr "" +"測試 (N 可以有或沒有正負號): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" +" -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " +"PATTERN\n" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" + +#: find/parser.c:1058 +#, fuzzy +msgid "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" +msgstr "" +" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NAME -xtype [bcdpfls]\n" + +#: find/parser.c:1063 +msgid "" +"actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" +msgstr "" +"操作模式: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" + +#: find/parser.c:1069 +msgid "" +"Report (and track progress on fixing) bugs via the findutils bug-reporting\n" +"page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" +"email to ." +msgstr "" +"請在 http://savannah.gnu.org/ 有關錯誤報告的網頁中匯報錯誤 (或者跟進\n" +"問題修正的進度)。又或者如果您無法瀏覽網頁,可以選擇用電子郵件寄至\n" +"。" + +#: find/parser.c:1123 +msgid "sanity check of the fnmatch() library function failed." +msgstr "測試 fnmatch() 是否可用時出錯。" + +#: find/parser.c:1137 +#, c-format +msgid "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." +msgstr "" +"警告:Unix 檔案名稱中一般上不會出現斜號 (雖然完整路徑會用斜號)。即是說,在本" +"系統中 ‘%s %s’ 可能永遠是 false。在這情況下 ‘-wholename’ 或 ‘-samefile’可能會" +"有用。又或者,如果您使用 GNU grep,可以嘗試使用 'find ... -print0 | grep -" +"FzZ %s'。" + +#: find/parser.c:1193 +msgid "" +"warning: the predicate -ipath is deprecated; please use -iwholename instead." +msgstr "警告:-ipath 選項已過時,請改用 -iwholename。" + +#: find/parser.c:1282 +#, c-format +msgid "Expected a positive decimal integer argument to %s, but got %s" +msgstr "" + +#: find/parser.c:1429 +msgid "This system does not provide a way to find the birth time of a file." +msgstr "" + +#: find/parser.c:1479 +#, c-format +msgid "I cannot figure out how to interpret %s as a date or time" +msgstr "" + +#: find/parser.c:1495 +#, fuzzy, c-format +msgid "Cannot obtain birth time of file %s" +msgstr "無法開啟檔案 ‘%s’ 作為輸入資料" + +#: find/parser.c:1760 +#, fuzzy, c-format +msgid "invalid mode %s" +msgstr "模式 ‘%s’ 無效" + +#: find/parser.c:1779 +#, c-format +msgid "" +"warning: you have specified a mode pattern %s (which is equivalent to /000). " +"The meaning of -perm /000 has now been changed to be consistent with -perm -" +"000; that is, while it used to match no files, it now matches all files." +msgstr "" + +#: find/parser.c:1974 +msgid "invalid null argument to -size" +msgstr "-size 後是無效的空白參數" + +#: find/parser.c:2022 +#, c-format +msgid "invalid -size type `%c'" +msgstr "-size 指定的檔案大小單位 ‘%c’ 無效" + +#: find/parser.c:2027 +#, fuzzy, c-format +msgid "Invalid argument `%s%c' to -size" +msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" + +#: find/parser.c:2203 +msgid "" +"The -show-control-chars option takes a single argument which must be " +"'literal' or 'safe'" +msgstr "" + +#: find/parser.c:2313 +#, fuzzy, c-format +msgid "Invalid argument %s to -used" +msgstr "%2$s 的參數 %1$s 無效" + +#: find/parser.c:2366 +#, c-format +msgid "GNU find version %s\n" +msgstr "GNU find %s 版本\n" + +#: find/parser.c:2367 locate/code.c:191 locate/locate.c:1668 xargs/xargs.c:622 +#, fuzzy, c-format +msgid "Built using GNU gnulib version %s\n" +msgstr "GNU findutils %s 版本\n" + +#: find/parser.c:2368 +#, c-format +msgid "Features enabled: " +msgstr "啟用了的功能:" + +#: find/parser.c:2475 +msgid "Arguments to -type should contain only one letter" +msgstr "" + +#: find/parser.c:2522 +#, c-format +msgid "Unknown argument to -type: %c" +msgstr "" + +#: find/parser.c:2643 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "警告:無效辨認轉義控制序列 (escape sequence) ‘\\%c’" + +#: find/parser.c:2659 +#, c-format +msgid "error: %s at end of format string" +msgstr "" + +#: find/parser.c:2698 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "" + +#: find/parser.c:2842 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/parser.c:2867 +#, c-format +msgid "" +"The current directory is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove the " +"current directory from your $PATH (that is, remove \".\" or leading or " +"trailing colons)" +msgstr "" +"PATH 環境變數中包括了當前目錄,當配合 find 的 %s 操作模式時會令系統安全產生漏" +"洞。請在 $PATH 變數中移除當前目錄 (即是 “.”,或者最前或最後的冒號)" + +#: find/parser.c:2873 +#, fuzzy, c-format +msgid "" +"The relative path %s is included in the PATH environment variable, which is " +"insecure in combination with the %s action of find. Please remove that " +"entry from $PATH" +msgstr "" +"PATH 環境變數中包括了當前目錄,當配合 find 的 %s 操作模式時會令系統安全產生漏" +"洞。請在 $PATH 變數中移除當前目錄 (即是 “.”,或者最前或最後的冒號)" + +#: find/parser.c:2976 +msgid "" +"You may not use {} within the utility name for -execdir and -okdir, because " +"this is a potential security problem." +msgstr "" +"您不應該在 -execdir 和 -okdir 中使用 {} 作為程式名稱,因為這樣做可能會造成安" +"全漏洞。" + +#: find/parser.c:2999 +#, c-format +msgid "Only one instance of {} is supported with -exec%s ... +" +msgstr "在 -exec%s ... + 裡面只可以使用一次 {}" + +#: find/parser.c:3016 +#, fuzzy +msgid "The environment is too large for exec()." +msgstr "執行 exec 時的環境變數太大" + +#: find/parser.c:3202 +msgid "arithmetic overflow when trying to calculate the end of today" +msgstr "" + +#: find/parser.c:3356 +msgid "standard error" +msgstr "" + +#: find/parser.c:3361 +msgid "standard output" +msgstr "" + +#: find/pred.c:1326 +#, fuzzy, c-format +msgid "Warning: cannot determine birth time of file %s" +msgstr "無法開啟檔案 ‘%s’ 作為輸入資料" + +#: find/pred.c:1390 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:1834 +msgid "Cannot close standard input" +msgstr "" + +#: find/pred.c:1869 +msgid "Failed to change directory" +msgstr "" + +#: find/pred.c:1910 xargs/xargs.c:1119 +msgid "cannot fork" +msgstr "fork 失敗" + +#: find/pred.c:1935 +#, c-format +msgid "error waiting for %s" +msgstr "等待 %s 時出現錯誤" + +#: find/pred.c:1944 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s 因訊號 %d 而終止" + +#: find/tree.c:91 find/tree.c:96 find/tree.c:176 find/tree.c:215 +msgid "invalid expression" +msgstr "表達式無效" + +#: find/tree.c:101 +#, c-format +msgid "" +"invalid expression; you have used a binary operator '%s' with nothing before " +"it." +msgstr "" + +#: find/tree.c:110 +#, c-format +msgid "expected an expression between '%s' and ')'" +msgstr "" + +#: find/tree.c:119 +#, c-format +msgid "expected an expression after '%s'" +msgstr "" + +#: find/tree.c:123 +msgid "invalid expression; you have too many ')'" +msgstr "表達式無效;出現太多的 ‘)’" + +#: find/tree.c:145 +#, fuzzy, c-format +msgid "" +"invalid expression; expected to find a ')' but didn't see one. Perhaps you " +"need an extra predicate after '%s'" +msgstr "表達式無效;‘)’ 本應出現但實際上沒有" + +#: find/tree.c:151 +#, fuzzy +msgid "invalid expression; empty parentheses are not allowed." +msgstr "表達式無效;出現太多的 ‘)’" + +#: find/tree.c:156 +msgid "" +"invalid expression; I was expecting to find a ')' somewhere but did not see " +"one." +msgstr "表達式無效;‘)’ 本應出現但實際上沒有" + +#: find/tree.c:161 find/tree.c:790 +msgid "oops -- invalid expression type!" +msgstr "表達式類型無效!" + +#: find/tree.c:233 +#, c-format +msgid "oops -- invalid expression type (%d)!" +msgstr "表達式類型 (%d) 無效!" + +#: find/tree.c:1230 +#, fuzzy, c-format +msgid "paths must precede expression: %s" +msgstr "路徑必須放在表達式之前" + +#: find/tree.c:1239 +#, c-format +msgid "unknown predicate `%s'" +msgstr "" + +#: find/tree.c:1259 +#, c-format +msgid "invalid predicate `%s'" +msgstr "" + +#: find/tree.c:1264 +#, c-format +msgid "invalid argument `%s' to `%s'" +msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" + +#: find/tree.c:1271 +#, c-format +msgid "missing argument to `%s'" +msgstr "‘%s’ 後缺少了參數" + +#: find/tree.c:1346 +#, fuzzy +msgid "you have too many ')'" +msgstr "表達式無效;出現太多的 ‘)’" + +#: find/tree.c:1351 +#, c-format +msgid "unexpected extra predicate '%s'" +msgstr "" + +#: find/tree.c:1353 +msgid "unexpected extra predicate" +msgstr "" + +#: find/tree.c:1469 +msgid "oops -- invalid default insertion of and!" +msgstr "" + +#: locate/code.c:132 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"用法: %s [--version | --help]\n" +"或 %s most_common_bigrams < 檔案清單 > locate資料庫\n" + +#: locate/code.c:136 locate/locate.c:1424 xargs/xargs.c:1317 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"請向 報告錯誤。\n" + +#: locate/code.c:154 +msgid "write error" +msgstr "" + +#: locate/code.c:190 +#, c-format +msgid "GNU findutils version %s\n" +msgstr "GNU findutils %s 版本\n" + +#: locate/locate.c:156 +msgid "days" +msgstr "日" + +#: locate/locate.c:203 +msgid "The argument argument for option --max-database-age must not be empty" +msgstr "" + +#: locate/locate.c:219 locate/locate.c:226 +#, fuzzy, c-format +msgid "Invalid argument %s for option --max-database-age" +msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" + +#: locate/locate.c:478 +#, c-format +msgid "locate database %s contains a filename longer than locate can handle" +msgstr "" + +#: locate/locate.c:613 +#, fuzzy, c-format +msgid "locate database %s is corrupt or invalid" +msgstr "locate 資料庫 ‘%s’ 內容已損壞或無效" + +#: locate/locate.c:900 +#, c-format +msgid "Locate database size: %s bytes\n" +msgstr "locate 資料庫大小:%s 位元組\n" + +#: locate/locate.c:905 +#, fuzzy, c-format +msgid "Matching Filenames: %s " +msgstr "檔案總數: %s," + +#: locate/locate.c:906 +#, fuzzy, c-format +msgid "All Filenames: %s " +msgstr "檔案總數: %s," + +#: locate/locate.c:909 +#, c-format +msgid "with a cumulative length of %s bytes" +msgstr "總長度共 %s 位元組" + +#: locate/locate.c:913 +#, c-format +msgid "" +"\n" +"\tof which %s contain whitespace, " +msgstr "" +"\n" +"\t其中 %s 個有空白字元," + +#: locate/locate.c:916 +#, c-format +msgid "" +"\n" +"\t%s contain newline characters, " +msgstr "" +"\n" +"\t%s 個有換行字元," + +#: locate/locate.c:919 +#, c-format +msgid "" +"\n" +"\tand %s contain characters with the high bit set.\n" +msgstr "" +"\n" +"\t和 %s 個含有不是 7 bit 的字元。\n" + +#: locate/locate.c:927 +#, c-format +msgid "" +"Some filenames may have been filtered out, so we cannot compute the " +"compression ratio.\n" +msgstr "" + +#: locate/locate.c:940 +#, fuzzy, c-format +msgid "Compression ratio %4.2f%% (higher is better)\n" +msgstr "壓縮比率 %4.2f%%\n" + +#: locate/locate.c:947 +#, fuzzy, c-format +msgid "Compression ratio is undefined\n" +msgstr "壓縮比率 %4.2f%%\n" + +#: locate/locate.c:1002 +#, c-format +msgid "" +"locate database %s looks like an slocate database but it seems to have " +"security level %c, which GNU findutils does not currently support" +msgstr "" + +#: locate/locate.c:1119 +#, c-format +msgid "" +"%s is an slocate database. Support for these is new, expect problems for " +"now." +msgstr "" + +#: locate/locate.c:1133 +#, c-format +msgid "" +"%s is an slocate database of unsupported security level %d; skipping it." +msgstr "" + +#: locate/locate.c:1150 +msgid "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" +msgstr "" + +#: locate/locate.c:1161 +#, c-format +msgid "%s is an slocate database. Turning on the '-e' option." +msgstr "" + +#: locate/locate.c:1199 +#, fuzzy, c-format +msgid "Old-format locate database %s is too short to be valid" +msgstr "locate 資料庫 ‘%s’ 內容已損壞或無效" + +#: locate/locate.c:1351 +#, c-format +msgid "Database %s is in the %s format.\n" +msgstr "資料庫 %s 使用了%s格式。\n" + +#: locate/locate.c:1372 +msgid "The database has little-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1374 +msgid "The database has big-endian machine-word encoding.\n" +msgstr "" + +#: locate/locate.c:1387 +#, c-format +msgid "The database machine-word encoding order is not obvious.\n" +msgstr "" + +#: locate/locate.c:1415 +#, fuzzy, c-format +msgid "" +"Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" +msgstr "" +"用法: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" +"stdio ]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TYPE]\n" +" [-version] [--help]\n" +" 檔案名稱樣式...\n" + +#: locate/locate.c:1478 +msgid "failed to drop group privileges" +msgstr "" + +#: locate/locate.c:1496 +msgid "failed to drop setuid privileges" +msgstr "" + +#: locate/locate.c:1510 +msgid "Failed to fully drop privileges" +msgstr "" + +#: locate/locate.c:1528 +msgid "failed to drop setgid privileges" +msgstr "" + +#: locate/locate.c:1667 +#, c-format +msgid "GNU locate version %s\n" +msgstr "GNU locate %s 版本\n" + +#: locate/locate.c:1707 +msgid "argument to --limit" +msgstr "" + +#: locate/locate.c:1790 +msgid "warning: the locate database can only be read from stdin once." +msgstr "警告:locate 資料庫只可以由標準輸入讀取一次。" + +# e.g. database `%s' is more than 8 days old +#: locate/locate.c:1863 +#, fuzzy, c-format +msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" +msgstr "警告:資料庫 ‘%s’ 是超過 %d %s前產生的" + +#: xargs/xargs.c:302 +#, fuzzy, c-format +msgid "Invalid escape sequence %s in input delimiter specification." +msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法。" + +#: xargs/xargs.c:320 +#, fuzzy, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lx." +msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:字元值不可以超過 %lx。" + +#: xargs/xargs.c:326 +#, fuzzy, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; character " +"values must not exceed %lo." +msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:字元值不可以超過 %lo。" + +#: xargs/xargs.c:335 +#, fuzzy, c-format +msgid "" +"Invalid escape sequence %s in input delimiter specification; trailing " +"characters %s not recognised." +msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:無法辨認最後的字元 ‘%s’。" + +#: xargs/xargs.c:380 +#, fuzzy, c-format +msgid "" +"Invalid input delimiter specification %s: the delimiter must be either a " +"single character or an escape sequence starting with \\." +msgstr "" +"分隔字元 ‘%s’ 不合法:分隔字元必須是一個 ASCII 字元或以反斜號 \\ 開始的轉義控" +"制序列 (escape sequence)。" + +#: xargs/xargs.c:397 +msgid "environment is too large for exec" +msgstr "執行 exec 時的環境變數太大" + +#: xargs/xargs.c:582 +#, c-format +msgid "warning: value %ld for -s option is too large, using %ld instead" +msgstr "" + +#: xargs/xargs.c:621 +#, c-format +msgid "GNU xargs version %s\n" +msgstr "GNU xargs %s 版本\n" + +#: xargs/xargs.c:652 +#, fuzzy, c-format +msgid "Cannot open input file %s" +msgstr "無法開啟檔案 ‘%s’ 作為輸入資料" + +#: xargs/xargs.c:688 +#, fuzzy, c-format +msgid "Your environment variables take up %lu bytes\n" +msgstr "環境變數總共用了 %ld 位元組\n" + +#: xargs/xargs.c:691 +#, fuzzy, c-format +msgid "POSIX upper limit on argument length (this system): %lu\n" +msgstr "POSIX 標準中參數長度上下限為:%ld, %ld\n" + +#: xargs/xargs.c:694 +#, fuzzy, c-format +msgid "" +"POSIX smallest allowable upper limit on argument length (all systems): %lu\n" +msgstr "POSIX 標準中參數長度上下限為:%ld, %ld\n" + +#: xargs/xargs.c:697 +#, c-format +msgid "Maximum length of command we could actually use: %ld\n" +msgstr "實際上可用的指令列長度上限:%ld\n" + +#: xargs/xargs.c:701 +#, fuzzy, c-format +msgid "Size of command buffer we are actually using: %lu\n" +msgstr "實際上使用的指令列緩衝區大小:%ld\n" + +#: xargs/xargs.c:707 +#, c-format +msgid "" +"\n" +"Execution of xargs will continue now, and it will try to read its input and " +"run commands; if this is not what you wanted to happen, please type the end-" +"of-file keystroke.\n" +msgstr "" + +#: xargs/xargs.c:715 +#, c-format +msgid "" +"Warning: %s will be run at least once. If you do not want that to happen, " +"then press the interrupt keystroke.\n" +msgstr "" + +#: xargs/xargs.c:841 xargs/xargs.c:934 +#, c-format +msgid "" +"unmatched %s quote; by default quotes are special to xargs unless you use " +"the -0 option" +msgstr "" +"%s引號不配合;除非使用 -0 選項,否則在預設模式下引號對於 xargs 來說是有特別意" +"義的" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "double" +msgstr "雙" + +#: xargs/xargs.c:842 xargs/xargs.c:935 +msgid "single" +msgstr "單" + +#: xargs/xargs.c:954 +msgid "" +"warning: a NUL character occurred in the input. It cannot be passed through " +"in the argument list. Did you mean to use the --null option?" +msgstr "" + +#: xargs/xargs.c:964 xargs/xargs.c:1021 +msgid "argument line too long" +msgstr "參數太長" + +#: xargs/xargs.c:1194 +msgid "error waiting for child process" +msgstr "等待子進程時出現錯誤" + +#: xargs/xargs.c:1210 +#, c-format +msgid "%s: exited with status 255; aborting" +msgstr "%s: 回傳碼為 255;中止" + +#: xargs/xargs.c:1212 +#, c-format +msgid "%s: stopped by signal %d" +msgstr "%s: 因訊號 %d 而停止" + +#: xargs/xargs.c:1214 +#, c-format +msgid "%s: terminated by signal %d" +msgstr "%s: 因訊號 %d 而中止" + +#: xargs/xargs.c:1267 +#, c-format +msgid "%s: invalid number for -%c option\n" +msgstr "%s: -%c 選項後的數值無效\n" + +#: xargs/xargs.c:1274 +#, c-format +msgid "%s: value for -%c option should be >= %ld\n" +msgstr "%s: -%c 選項後的數值必須不小於 %ld\n" + +#: xargs/xargs.c:1288 +#, c-format +msgid "%s: value for -%c option should be < %ld\n" +msgstr "%s: -%c 選項後的數值必須小於 %ld\n" + +#: xargs/xargs.c:1306 +#, fuzzy, c-format +msgid "" +"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [command [initial-arguments]]\n" +msgstr "" +"用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +" [-n max-args] [--max-args=max-args]\n" +" [-s max-chars] [--max-chars=max-chars]\n" +" [-P max-procs] [--max-procs=max-procs]\n" +" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +" [--version] [--help] [指令 [指令的參數]]\n" + +#~ msgid "oops -- invalid expression type in mark_stat!" +#~ msgstr "mark_stat 中的表達式類型無效!" + +#~ msgid "oops -- invalid expression type in mark_type!" +#~ msgstr "mark_type 中的表達式類型無效!" + +#~ msgid "old" +#~ msgstr "舊的" diff --git a/stamp-h.in b/stamp-h.in new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/stamp-h.in @@ -0,0 +1 @@ +timestamp diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..21ccb01 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,208 @@ +## DO NOT EDIT! GENERATED AUTOMATICALLY! +## Process this file with automake to produce Makefile.in. +# Copyright (C) 2004-2007 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. + +AUTOMAKE_OPTIONS = 1.5 foreign + +ACLOCAL_AMFLAGS = -I ../gnulib/m4 + +SUBDIRS = +TESTS = +TESTS_ENVIRONMENT = +noinst_PROGRAMS = +check_PROGRAMS = +noinst_HEADERS = +EXTRA_DIST = +BUILT_SOURCES = +SUFFIXES = +MOSTLYCLEANFILES = core *.stackdump +MOSTLYCLEANDIRS = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = + +AM_CPPFLAGS = \ + -I. -I$(srcdir) \ + -I.. -I$(srcdir)/.. \ + -I../gnulib/lib -I$(srcdir)/../gnulib/lib + +LDADD = ../gnulib/lib/libgnulib.a + +## begin gnulib module alloca-opt-tests + +TESTS += test-alloca-opt +check_PROGRAMS += test-alloca-opt + +## end gnulib module alloca-opt-tests + +## begin gnulib module allocsa-tests + +TESTS += test-allocsa +check_PROGRAMS += test-allocsa + +## end gnulib module allocsa-tests + +## begin gnulib module argmatch-tests + +TESTS += test-argmatch +check_PROGRAMS += test-argmatch +test_argmatch_LDADD = $(LDADD) @LIBINTL@ + +## end gnulib module argmatch-tests + +## begin gnulib module c-strstr-tests + +TESTS += test-c-strstr +check_PROGRAMS += test-c-strstr + +## end gnulib module c-strstr-tests + +## begin gnulib module canonicalize-lgpl-tests + +TESTS += test-canonicalize-lgpl.sh +TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' +check_PROGRAMS += test-canonicalize-lgpl +EXTRA_DIST += test-canonicalize-lgpl.sh + +## end gnulib module canonicalize-lgpl-tests + +## begin gnulib module dirname-tests + +TESTS += test-dirname +noinst_PROGRAMS += test-dirname +test_dirname_LDADD = $(LDADD) @LIBINTL@ +## end gnulib module dirname-tests + +## begin gnulib module fcntl-tests + +TESTS += test-fcntl +check_PROGRAMS += test-fcntl + +## end gnulib module fcntl-tests + +## begin gnulib module gettimeofday-tests + +TESTS += test-gettimeofday +check_PROGRAMS += test-gettimeofday + +## end gnulib module gettimeofday-tests + +## begin gnulib module inttypes-tests + +TESTS += test-inttypes +check_PROGRAMS += test-inttypes + +## end gnulib module inttypes-tests + +## begin gnulib module mbscasestr-tests + +TESTS += test-mbscasestr1 test-mbscasestr2.sh test-mbscasestr3.sh test-mbscasestr4.sh +TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' +EXTRA_DIST += test-mbscasestr2.sh test-mbscasestr3.sh test-mbscasestr4.sh +check_PROGRAMS += test-mbscasestr1 test-mbscasestr2 test-mbscasestr3 test-mbscasestr4 + +## end gnulib module mbscasestr-tests + +## begin gnulib module mbsstr-tests + +TESTS += test-mbsstr1 test-mbsstr2.sh test-mbsstr3.sh +TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' +EXTRA_DIST += test-mbsstr2.sh test-mbsstr3.sh +check_PROGRAMS += test-mbsstr1 test-mbsstr2 test-mbsstr3 + +## end gnulib module mbsstr-tests + +## begin gnulib module stat-time-tests + +TESTS += test-stat-time +check_PROGRAMS += test-stat-time +## end gnulib module stat-time-tests + +## begin gnulib module stdbool-tests + +TESTS += test-stdbool +check_PROGRAMS += test-stdbool + +## end gnulib module stdbool-tests + +## begin gnulib module stdint-tests + +TESTS += test-stdint +check_PROGRAMS += test-stdint + +## end gnulib module stdint-tests + +## begin gnulib module stdlib-tests + +TESTS += test-stdlib +check_PROGRAMS += test-stdlib + +## end gnulib module stdlib-tests + +## begin gnulib module string-tests + +TESTS += test-string +check_PROGRAMS += test-string + +## end gnulib module string-tests + +## begin gnulib module sys_stat-tests + +TESTS += test-sys_stat +check_PROGRAMS += test-sys_stat + +## end gnulib module sys_stat-tests + +## begin gnulib module sys_time-tests + +TESTS += test-sys_time +check_PROGRAMS += test-sys_time + +## end gnulib module sys_time-tests + +## begin gnulib module time-tests + +TESTS += test-time +check_PROGRAMS += test-time + +## end gnulib module time-tests + +## begin gnulib module unistd-tests + +TESTS += test-unistd +check_PROGRAMS += test-unistd + +## end gnulib module unistd-tests + +## begin gnulib module wchar-tests + +TESTS += test-wchar +check_PROGRAMS += test-wchar + +## end gnulib module wchar-tests + +## begin gnulib module wctype-tests + +TESTS += test-wctype +check_PROGRAMS += test-wctype + +## end gnulib module wctype-tests + +# Clean up after Solaris cc. +clean-local: + rm -rf SunWS_cache + +mostlyclean-local: mostlyclean-generic + @for dir in '' $(MOSTLYCLEANDIRS); do \ + if test -n "$$dir" && test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 0000000..502c4a3 --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,1203 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2004-2007 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. + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +TESTS = test-alloca-opt$(EXEEXT) test-allocsa$(EXEEXT) \ + test-argmatch$(EXEEXT) test-c-strstr$(EXEEXT) \ + test-canonicalize-lgpl.sh test-dirname$(EXEEXT) \ + test-fcntl$(EXEEXT) test-gettimeofday$(EXEEXT) \ + test-inttypes$(EXEEXT) test-mbscasestr1$(EXEEXT) \ + test-mbscasestr2.sh test-mbscasestr3.sh test-mbscasestr4.sh \ + test-mbsstr1$(EXEEXT) test-mbsstr2.sh test-mbsstr3.sh \ + test-stat-time$(EXEEXT) test-stdbool$(EXEEXT) \ + test-stdint$(EXEEXT) test-stdlib$(EXEEXT) test-string$(EXEEXT) \ + test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \ + test-time$(EXEEXT) test-unistd$(EXEEXT) test-wchar$(EXEEXT) \ + test-wctype$(EXEEXT) +noinst_PROGRAMS = test-dirname$(EXEEXT) +check_PROGRAMS = test-alloca-opt$(EXEEXT) test-allocsa$(EXEEXT) \ + test-argmatch$(EXEEXT) test-c-strstr$(EXEEXT) \ + test-canonicalize-lgpl$(EXEEXT) test-fcntl$(EXEEXT) \ + test-gettimeofday$(EXEEXT) test-inttypes$(EXEEXT) \ + test-mbscasestr1$(EXEEXT) test-mbscasestr2$(EXEEXT) \ + test-mbscasestr3$(EXEEXT) test-mbscasestr4$(EXEEXT) \ + test-mbsstr1$(EXEEXT) test-mbsstr2$(EXEEXT) \ + test-mbsstr3$(EXEEXT) test-stat-time$(EXEEXT) \ + test-stdbool$(EXEEXT) test-stdint$(EXEEXT) \ + test-stdlib$(EXEEXT) test-string$(EXEEXT) \ + test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \ + test-time$(EXEEXT) test-unistd$(EXEEXT) test-wchar$(EXEEXT) \ + test-wctype$(EXEEXT) +subdir = tests +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +test_alloca_opt_SOURCES = test-alloca-opt.c +test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT) +test_alloca_opt_LDADD = $(LDADD) +test_alloca_opt_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_allocsa_SOURCES = test-allocsa.c +test_allocsa_OBJECTS = test-allocsa.$(OBJEXT) +test_allocsa_LDADD = $(LDADD) +test_allocsa_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_argmatch_SOURCES = test-argmatch.c +test_argmatch_OBJECTS = test-argmatch.$(OBJEXT) +test_argmatch_DEPENDENCIES = $(LDADD) +test_c_strstr_SOURCES = test-c-strstr.c +test_c_strstr_OBJECTS = test-c-strstr.$(OBJEXT) +test_c_strstr_LDADD = $(LDADD) +test_c_strstr_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_canonicalize_lgpl_SOURCES = test-canonicalize-lgpl.c +test_canonicalize_lgpl_OBJECTS = test-canonicalize-lgpl.$(OBJEXT) +test_canonicalize_lgpl_LDADD = $(LDADD) +test_canonicalize_lgpl_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_dirname_SOURCES = test-dirname.c +test_dirname_OBJECTS = test-dirname.$(OBJEXT) +test_dirname_DEPENDENCIES = $(LDADD) +test_fcntl_SOURCES = test-fcntl.c +test_fcntl_OBJECTS = test-fcntl.$(OBJEXT) +test_fcntl_LDADD = $(LDADD) +test_fcntl_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_gettimeofday_SOURCES = test-gettimeofday.c +test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT) +test_gettimeofday_LDADD = $(LDADD) +test_gettimeofday_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_inttypes_SOURCES = test-inttypes.c +test_inttypes_OBJECTS = test-inttypes.$(OBJEXT) +test_inttypes_LDADD = $(LDADD) +test_inttypes_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_mbscasestr1_SOURCES = test-mbscasestr1.c +test_mbscasestr1_OBJECTS = test-mbscasestr1.$(OBJEXT) +test_mbscasestr1_LDADD = $(LDADD) +test_mbscasestr1_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_mbscasestr2_SOURCES = test-mbscasestr2.c +test_mbscasestr2_OBJECTS = test-mbscasestr2.$(OBJEXT) +test_mbscasestr2_LDADD = $(LDADD) +test_mbscasestr2_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_mbscasestr3_SOURCES = test-mbscasestr3.c +test_mbscasestr3_OBJECTS = test-mbscasestr3.$(OBJEXT) +test_mbscasestr3_LDADD = $(LDADD) +test_mbscasestr3_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_mbscasestr4_SOURCES = test-mbscasestr4.c +test_mbscasestr4_OBJECTS = test-mbscasestr4.$(OBJEXT) +test_mbscasestr4_LDADD = $(LDADD) +test_mbscasestr4_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_mbsstr1_SOURCES = test-mbsstr1.c +test_mbsstr1_OBJECTS = test-mbsstr1.$(OBJEXT) +test_mbsstr1_LDADD = $(LDADD) +test_mbsstr1_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_mbsstr2_SOURCES = test-mbsstr2.c +test_mbsstr2_OBJECTS = test-mbsstr2.$(OBJEXT) +test_mbsstr2_LDADD = $(LDADD) +test_mbsstr2_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_mbsstr3_SOURCES = test-mbsstr3.c +test_mbsstr3_OBJECTS = test-mbsstr3.$(OBJEXT) +test_mbsstr3_LDADD = $(LDADD) +test_mbsstr3_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_stat_time_SOURCES = test-stat-time.c +test_stat_time_OBJECTS = test-stat-time.$(OBJEXT) +test_stat_time_LDADD = $(LDADD) +test_stat_time_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_stdbool_SOURCES = test-stdbool.c +test_stdbool_OBJECTS = test-stdbool.$(OBJEXT) +test_stdbool_LDADD = $(LDADD) +test_stdbool_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_stdint_SOURCES = test-stdint.c +test_stdint_OBJECTS = test-stdint.$(OBJEXT) +test_stdint_LDADD = $(LDADD) +test_stdint_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_stdlib_SOURCES = test-stdlib.c +test_stdlib_OBJECTS = test-stdlib.$(OBJEXT) +test_stdlib_LDADD = $(LDADD) +test_stdlib_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_string_SOURCES = test-string.c +test_string_OBJECTS = test-string.$(OBJEXT) +test_string_LDADD = $(LDADD) +test_string_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_sys_stat_SOURCES = test-sys_stat.c +test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT) +test_sys_stat_LDADD = $(LDADD) +test_sys_stat_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_sys_time_SOURCES = test-sys_time.c +test_sys_time_OBJECTS = test-sys_time.$(OBJEXT) +test_sys_time_LDADD = $(LDADD) +test_sys_time_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_time_SOURCES = test-time.c +test_time_OBJECTS = test-time.$(OBJEXT) +test_time_LDADD = $(LDADD) +test_time_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_unistd_SOURCES = test-unistd.c +test_unistd_OBJECTS = test-unistd.$(OBJEXT) +test_unistd_LDADD = $(LDADD) +test_unistd_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_wchar_SOURCES = test-wchar.c +test_wchar_OBJECTS = test-wchar.$(OBJEXT) +test_wchar_LDADD = $(LDADD) +test_wchar_DEPENDENCIES = ../gnulib/lib/libgnulib.a +test_wctype_SOURCES = test-wctype.c +test_wctype_OBJECTS = test-wctype.$(OBJEXT) +test_wctype_LDADD = $(LDADD) +test_wctype_DEPENDENCIES = ../gnulib/lib/libgnulib.a +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = test-alloca-opt.c test-allocsa.c test-argmatch.c \ + test-c-strstr.c test-canonicalize-lgpl.c test-dirname.c \ + test-fcntl.c test-gettimeofday.c test-inttypes.c \ + test-mbscasestr1.c test-mbscasestr2.c test-mbscasestr3.c \ + test-mbscasestr4.c test-mbsstr1.c test-mbsstr2.c \ + test-mbsstr3.c test-stat-time.c test-stdbool.c test-stdint.c \ + test-stdlib.c test-string.c test-sys_stat.c test-sys_time.c \ + test-time.c test-unistd.c test-wchar.c test-wctype.c +DIST_SOURCES = test-alloca-opt.c test-allocsa.c test-argmatch.c \ + test-c-strstr.c test-canonicalize-lgpl.c test-dirname.c \ + test-fcntl.c test-gettimeofday.c test-inttypes.c \ + test-mbscasestr1.c test-mbscasestr2.c test-mbscasestr3.c \ + test-mbscasestr4.c test-mbsstr1.c test-mbsstr2.c \ + test-mbsstr3.c test-stat-time.c test-stdbool.c test-stdint.c \ + test-stdlib.c test-string.c test-sys_stat.c test-sys_time.c \ + test-time.c test-unistd.c test-wchar.c test-wctype.c +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +HEADERS = $(noinst_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = 1.5 foreign +ACLOCAL_AMFLAGS = -I ../gnulib/m4 +SUBDIRS = +TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' EXEEXT='@EXEEXT@' \ + LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ + LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ + LOCALE_ZH_CN='@LOCALE_ZH_CN@' EXEEXT='@EXEEXT@' \ + LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ + LOCALE_ZH_CN='@LOCALE_ZH_CN@' +noinst_HEADERS = +EXTRA_DIST = test-canonicalize-lgpl.sh test-mbscasestr2.sh \ + test-mbscasestr3.sh test-mbscasestr4.sh test-mbsstr2.sh \ + test-mbsstr3.sh +BUILT_SOURCES = +SUFFIXES = +MOSTLYCLEANFILES = core *.stackdump +MOSTLYCLEANDIRS = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = +AM_CPPFLAGS = \ + -I. -I$(srcdir) \ + -I.. -I$(srcdir)/.. \ + -I../gnulib/lib -I$(srcdir)/../gnulib/lib + +LDADD = ../gnulib/lib/libgnulib.a +test_argmatch_LDADD = $(LDADD) @LIBINTL@ +test_dirname_LDADD = $(LDADD) @LIBINTL@ +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(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 tests/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) +test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) + @rm -f test-alloca-opt$(EXEEXT) + $(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS) +test-allocsa$(EXEEXT): $(test_allocsa_OBJECTS) $(test_allocsa_DEPENDENCIES) + @rm -f test-allocsa$(EXEEXT) + $(LINK) $(test_allocsa_OBJECTS) $(test_allocsa_LDADD) $(LIBS) +test-argmatch$(EXEEXT): $(test_argmatch_OBJECTS) $(test_argmatch_DEPENDENCIES) + @rm -f test-argmatch$(EXEEXT) + $(LINK) $(test_argmatch_OBJECTS) $(test_argmatch_LDADD) $(LIBS) +test-c-strstr$(EXEEXT): $(test_c_strstr_OBJECTS) $(test_c_strstr_DEPENDENCIES) + @rm -f test-c-strstr$(EXEEXT) + $(LINK) $(test_c_strstr_OBJECTS) $(test_c_strstr_LDADD) $(LIBS) +test-canonicalize-lgpl$(EXEEXT): $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_DEPENDENCIES) + @rm -f test-canonicalize-lgpl$(EXEEXT) + $(LINK) $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_LDADD) $(LIBS) +test-dirname$(EXEEXT): $(test_dirname_OBJECTS) $(test_dirname_DEPENDENCIES) + @rm -f test-dirname$(EXEEXT) + $(LINK) $(test_dirname_OBJECTS) $(test_dirname_LDADD) $(LIBS) +test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES) + @rm -f test-fcntl$(EXEEXT) + $(LINK) $(test_fcntl_OBJECTS) $(test_fcntl_LDADD) $(LIBS) +test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) + @rm -f test-gettimeofday$(EXEEXT) + $(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS) +test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) + @rm -f test-inttypes$(EXEEXT) + $(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS) +test-mbscasestr1$(EXEEXT): $(test_mbscasestr1_OBJECTS) $(test_mbscasestr1_DEPENDENCIES) + @rm -f test-mbscasestr1$(EXEEXT) + $(LINK) $(test_mbscasestr1_OBJECTS) $(test_mbscasestr1_LDADD) $(LIBS) +test-mbscasestr2$(EXEEXT): $(test_mbscasestr2_OBJECTS) $(test_mbscasestr2_DEPENDENCIES) + @rm -f test-mbscasestr2$(EXEEXT) + $(LINK) $(test_mbscasestr2_OBJECTS) $(test_mbscasestr2_LDADD) $(LIBS) +test-mbscasestr3$(EXEEXT): $(test_mbscasestr3_OBJECTS) $(test_mbscasestr3_DEPENDENCIES) + @rm -f test-mbscasestr3$(EXEEXT) + $(LINK) $(test_mbscasestr3_OBJECTS) $(test_mbscasestr3_LDADD) $(LIBS) +test-mbscasestr4$(EXEEXT): $(test_mbscasestr4_OBJECTS) $(test_mbscasestr4_DEPENDENCIES) + @rm -f test-mbscasestr4$(EXEEXT) + $(LINK) $(test_mbscasestr4_OBJECTS) $(test_mbscasestr4_LDADD) $(LIBS) +test-mbsstr1$(EXEEXT): $(test_mbsstr1_OBJECTS) $(test_mbsstr1_DEPENDENCIES) + @rm -f test-mbsstr1$(EXEEXT) + $(LINK) $(test_mbsstr1_OBJECTS) $(test_mbsstr1_LDADD) $(LIBS) +test-mbsstr2$(EXEEXT): $(test_mbsstr2_OBJECTS) $(test_mbsstr2_DEPENDENCIES) + @rm -f test-mbsstr2$(EXEEXT) + $(LINK) $(test_mbsstr2_OBJECTS) $(test_mbsstr2_LDADD) $(LIBS) +test-mbsstr3$(EXEEXT): $(test_mbsstr3_OBJECTS) $(test_mbsstr3_DEPENDENCIES) + @rm -f test-mbsstr3$(EXEEXT) + $(LINK) $(test_mbsstr3_OBJECTS) $(test_mbsstr3_LDADD) $(LIBS) +test-stat-time$(EXEEXT): $(test_stat_time_OBJECTS) $(test_stat_time_DEPENDENCIES) + @rm -f test-stat-time$(EXEEXT) + $(LINK) $(test_stat_time_OBJECTS) $(test_stat_time_LDADD) $(LIBS) +test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) + @rm -f test-stdbool$(EXEEXT) + $(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS) +test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) + @rm -f test-stdint$(EXEEXT) + $(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS) +test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES) + @rm -f test-stdlib$(EXEEXT) + $(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS) +test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) + @rm -f test-string$(EXEEXT) + $(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS) +test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) + @rm -f test-sys_stat$(EXEEXT) + $(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS) +test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) + @rm -f test-sys_time$(EXEEXT) + $(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS) +test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) + @rm -f test-time$(EXEEXT) + $(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) +test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) + @rm -f test-unistd$(EXEEXT) + $(LINK) $(test_unistd_OBJECTS) $(test_unistd_LDADD) $(LIBS) +test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) + @rm -f test-wchar$(EXEEXT) + $(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS) +test-wctype$(EXEEXT): $(test_wctype_OBJECTS) $(test_wctype_DEPENDENCIES) + @rm -f test-wctype$(EXEEXT) + $(LINK) $(test_wctype_OBJECTS) $(test_wctype_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-allocsa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argmatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-canonicalize-lgpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasestr1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasestr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasestr3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbscasestr4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat-time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(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 + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *$$ws$$tst$$ws*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *$$ws$$tst$$ws*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all tests failed"; \ + else \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(PROGRAMS) $(HEADERS) +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) + -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-checkPROGRAMS clean-generic clean-local \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(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-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(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: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-local \ + clean-noinstPROGRAMS ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-local pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am + + +# Clean up after Solaris cc. +clean-local: + rm -rf SunWS_cache + +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: diff --git a/tests/test-alloca-opt.c b/tests/test-alloca-opt.c new file mode 100644 index 0000000..65bc19f --- /dev/null +++ b/tests/test-alloca-opt.c @@ -0,0 +1,65 @@ +/* Test of optional automatic memory allocation. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#if HAVE_ALLOCA + +static void +do_allocation (int n) +{ + void *ptr = alloca (n); + (void) ptr; +} + +void (*func) (int) = do_allocation; + +#endif + +int +main () +{ +#if HAVE_ALLOCA + int i; + + /* Repeat a lot of times, to make sure there's no memory leak. */ + for (i = 0; i < 100000; i++) + { + /* Try various values. + n = 0 gave a crash on Alpha with gcc-2.5.8. + Some versions of MacOS X have a stack size limit of 512 KB. */ + func (34); + func (134); + func (399); + func (510823); + func (129321); + func (0); + func (4070); + func (4095); + func (1); + func (16582); + } +#endif + + return 0; +} diff --git a/tests/test-allocsa.c b/tests/test-allocsa.c new file mode 100644 index 0000000..9d41448 --- /dev/null +++ b/tests/test-allocsa.c @@ -0,0 +1,62 @@ +/* Test of safe automatic memory allocation. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2005. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "allocsa.h" + +#include + +static void +do_allocation (int n) +{ + void *ptr = allocsa (n); + freesa (ptr); + ptr = safe_alloca (n); +} + +void (*func) (int) = do_allocation; + +int +main () +{ + int i; + + /* Repeat a lot of times, to make sure there's no memory leak. */ + for (i = 0; i < 50000; i++) + { + /* Try various values. + n = 0 gave a crash on Alpha with gcc-2.5.8. + Some versions of MacOS X have a stack size limit of 512 KB. */ + func (34); + func (134); + func (399); + func (510823); + func (129321); + func (0); + func (4070); + func (4095); + func (1); + func (16582); + } + + return 0; +} diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c new file mode 100644 index 0000000..e61b88f --- /dev/null +++ b/tests/test-argmatch.c @@ -0,0 +1,107 @@ +/* Test of exact or abbreviated match search. + Copyright (C) 1990, 1998-1999, 2001-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 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. */ + +/* Written by Bruno Haible , 2007, based on test code + by David MacKenzie . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "argmatch.h" + +#include +#include + +#include "progname.h" + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +enum backup_type +{ + no_backups, + simple_backups, + numbered_existing_backups, + numbered_backups +}; + +static const char *const backup_args[] = +{ + "no", "none", "off", + "simple", "never", "single", + "existing", "nil", "numbered-existing", + "numbered", "t", "newstyle", + NULL +}; + +static const enum backup_type backup_vals[] = +{ + no_backups, no_backups, no_backups, + simple_backups, simple_backups, simple_backups, + numbered_existing_backups, numbered_existing_backups, numbered_existing_backups, + numbered_backups, numbered_backups, numbered_backups +}; + +int +main (int argc, char *argv[]) +{ + set_program_name (argv[0]); + + /* Not found. */ + ASSERT (ARGMATCH ("klingon", backup_args, backup_vals) == -1); + + /* Exact match. */ + ASSERT (ARGMATCH ("none", backup_args, backup_vals) == 1); + ASSERT (ARGMATCH ("nil", backup_args, backup_vals) == 7); + + /* Too long. */ + ASSERT (ARGMATCH ("nilpotent", backup_args, backup_vals) == -1); + + /* Abbreviated. */ + ASSERT (ARGMATCH ("simpl", backup_args, backup_vals) == 3); + ASSERT (ARGMATCH ("simp", backup_args, backup_vals) == 3); + ASSERT (ARGMATCH ("sim", backup_args, backup_vals) == 3); + + /* Exact match and abbreviated. */ + ASSERT (ARGMATCH ("numbered", backup_args, backup_vals) == 9); + ASSERT (ARGMATCH ("numbere", backup_args, backup_vals) == -2); + ASSERT (ARGMATCH ("number", backup_args, backup_vals) == -2); + ASSERT (ARGMATCH ("numbe", backup_args, backup_vals) == -2); + ASSERT (ARGMATCH ("numb", backup_args, backup_vals) == -2); + ASSERT (ARGMATCH ("num", backup_args, backup_vals) == -2); + ASSERT (ARGMATCH ("nu", backup_args, backup_vals) == -2); + ASSERT (ARGMATCH ("n", backup_args, backup_vals) == -2); + + /* Ambiguous abbreviated. */ + ASSERT (ARGMATCH ("ne", backup_args, backup_vals) == -2); + + /* Ambiguous abbreviated, but same value. */ + ASSERT (ARGMATCH ("si", backup_args, backup_vals) == 3); + ASSERT (ARGMATCH ("s", backup_args, backup_vals) == 3); + + return 0; +} + diff --git a/tests/test-c-strstr.c b/tests/test-c-strstr.c new file mode 100644 index 0000000..204e0a5 --- /dev/null +++ b/tests/test-c-strstr.c @@ -0,0 +1,142 @@ +/* Test of searching in a string. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "c-strstr.h" + +#include +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + { + const char input[] = "foo"; + const char *result = c_strstr (input, ""); + ASSERT (result == input); + } + + { + const char input[] = "foo"; + const char *result = c_strstr (input, "o"); + ASSERT (result == input + 1); + } + + { + const char input[] = "ABC ABCDAB ABCDABCDABDE"; + const char *result = c_strstr (input, "ABCDABD"); + ASSERT (result == input + 15); + } + + { + const char input[] = "ABC ABCDAB ABCDABCDABDE"; + const char *result = c_strstr (input, "ABCDABE"); + ASSERT (result == NULL); + } + + /* Check that a very long haystack is handled quickly if the needle is + short and occurs near the beginning. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *needle = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + char *haystack = (char *) malloc (m + 1); + if (haystack != NULL) + { + memset (haystack, 'A', m); + haystack[0] = 'B'; + haystack[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (c_strstr (haystack, needle) == haystack + 1); + } + + free (haystack); + } + } + + /* Check that a very long needle is discarded quickly if the haystack is + short. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *haystack = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"; + char *needle = (char *) malloc (m + 1); + if (needle != NULL) + { + memset (needle, 'A', m); + needle[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (c_strstr (haystack, needle) == NULL); + } + + free (needle); + } + } + + /* Check that the asymptotic worst-case complexity is not quadratic. */ + { + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 2); + char *needle = (char *) malloc (m + 2); + if (haystack != NULL && needle != NULL) + { + const char *result; + + 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 = c_strstr (haystack, needle); + ASSERT (result == haystack + m); + } + if (needle != NULL) + free (needle); + if (haystack != NULL) + free (haystack); + } + + return 0; +} diff --git a/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c new file mode 100644 index 0000000..738482b --- /dev/null +++ b/tests/test-canonicalize-lgpl.c @@ -0,0 +1,85 @@ +/* Test of execution of program termination handlers. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "canonicalize.h" + +#include +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* Check that the symbolic link to a file can be resolved. */ + { + char *result1 = canonicalize_file_name ("t-can-lgpl.tmp/huk"); + char *result2 = canonicalize_file_name ("t-can-lgpl.tmp/tra"); + ASSERT (result1 != NULL); + ASSERT (result2 != NULL); + ASSERT (strcmp (result1, result2) == 0); + ASSERT (strcmp (result1 + strlen (result1) - 19, "/t-can-lgpl.tmp/tra") == 0); + free (result1); + free (result2); + } + + /* Check that the symbolic link to a directory can be resolved. */ + { + char *result1 = canonicalize_file_name ("t-can-lgpl.tmp/plo"); + char *result2 = canonicalize_file_name ("t-can-lgpl.tmp/bef"); + char *result3 = canonicalize_file_name ("t-can-lgpl.tmp/lum"); + ASSERT (result1 != NULL); + ASSERT (result2 != NULL); + ASSERT (result3 != NULL); + ASSERT (strcmp (result1, result2) == 0); + ASSERT (strcmp (result2, result3) == 0); + ASSERT (strcmp (result1 + strlen (result1) - 19, "/t-can-lgpl.tmp/lum") == 0); + free (result1); + free (result2); + free (result3); + } + + /* Check that a symbolic link to a nonexistent file yields NULL. */ + { + char *result = canonicalize_file_name ("t-can-lgpl.tmp/ouk"); + ASSERT (result == NULL); + } + + /* Check that a loop of symbolic links is detected. */ + { + char *result = canonicalize_file_name ("ise"); + ASSERT (result == NULL); + } + + return 0; +} diff --git a/tests/test-canonicalize-lgpl.sh b/tests/test-canonicalize-lgpl.sh new file mode 100755 index 0000000..54d30b7 --- /dev/null +++ b/tests/test-canonicalize-lgpl.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles t-can-lgpl.tmp ise" +mkdir t-can-lgpl.tmp +ln -s t-can-lgpl.tmp/ket ise \ + || { echo "Skipping test: symbolic links not supported on this filesystem" + rm -fr $tmpfiles + exit 77 + } +(cd t-can-lgpl.tmp \ + && ln -s bef plo \ + && ln -s tra huk \ + && ln -s lum bef \ + && ln -s wum ouk \ + && ln -s ../ise ket \ + && echo > tra \ + && mkdir lum +) || exit 1 + +./test-canonicalize-lgpl${EXEEXT} +result=$? + +rm -fr $tmpfiles + +exit $result diff --git a/tests/test-dirname.c b/tests/test-dirname.c new file mode 100644 index 0000000..4114b77 --- /dev/null +++ b/tests/test-dirname.c @@ -0,0 +1,196 @@ +/* Test the gnulib dirname module. + Copyright (C) 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 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. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "dirname.h" + +#include +#include +#include +#include + +const char *program_name = "test-dirname"; + +struct test { + const char *name; /* Name under test. */ + const char *dir; /* dir_name (name). */ + const char *last; /* last_component (name). */ + const char *base; /* base_name (name). */ + const char *stripped; /* name after strip_trailing_slashes (name). */ + bool modified; /* result of strip_trailing_slashes (name). */ + bool absolute; /* IS_ABSOLUTE_FILE_NAME (name). */ +}; + +static struct test tests[] = { + {"d/f", "d", "f", "f", "d/f", false, false}, + {"/d/f", "/d", "f", "f", "/d/f", false, true}, + {"d/f/", "d", "f/", "f/", "d/f", true, false}, + {"d/f//", "d", "f//", "f/", "d/f", true, false}, + {"f", ".", "f", "f", "f", false, false}, + {"/", "/", "", "/", "/", false, true}, +#if DOUBLE_SLASH_IS_DISTINCT_ROOT + {"//", "//", "", "//", "//", false, true}, + {"//d", "//", "d", "d", "//d", false, true}, +#else + {"//", "/", "", "/", "/", true, true}, + {"//d", "/", "d", "d", "//d", false, true}, +#endif + {"///", "/", "", "/", "/", true, true}, + {"///a///", "/", "a///", "a/", "///a", true, true}, + /* POSIX requires dirname("") and basename("") to both return ".", + but dir_name and base_name are defined differently. */ + {"", ".", "", "", "", false, false}, + {".", ".", ".", ".", ".", false, false}, + {"..", ".", "..", "..", "..", false, false}, +#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR + {"a\\", ".", "a\\", "a\\", "a", true, false}, + {"a\\b", "a", "b", "b", "a\\b", false, false}, + {"\\", "\\", "", "\\", "\\", false, true}, + {"\\/\\", "\\", "", "\\", "\\", true, true}, + {"\\\\/", "\\", "", "\\", "\\", true, true}, + {"\\//", "\\", "", "\\", "\\", true, true}, + {"//\\", "/", "", "/", "/", true, true}, +#else + {"a\\", ".", "a\\", "a\\", "a\\", false, false}, + {"a\\b", ".", "a\\b", "a\\b", "a\\b", false, false}, + {"\\", ".", "\\", "\\", "\\", false, false}, + {"\\/\\", "\\", "\\", "\\", "\\/\\",false, false}, + {"\\\\/", ".", "\\\\/","\\\\/","\\\\", true, false}, + {"\\//", ".", "\\//", "\\/", "\\", true, false}, +# if DOUBLE_SLASH_IS_DISTINCT_ROOT + {"//\\", "//", "\\", "\\", "//\\", false, true}, +# else + {"//\\", "/", "\\", "\\", "//\\", false, true}, +# endif +#endif +#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX +# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE + {"c:", "c:", "", "c:", "c:", false, false}, + {"c:/", "c:/", "", "c:/", "c:/", false, true}, + {"c://", "c:/", "", "c:/", "c:/", true, true}, + {"c:/d", "c:/", "d", "d", "c:/d", false, true}, + {"c://d", "c:/", "d", "d", "c://d",false, true}, + {"c:/d/", "c:/", "d/", "d/", "c:/d", true, true}, + {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, true}, + {"c:d", "c:.", "d", "d", "c:d", false, false}, + {"c:d/", "c:.", "d/", "d/", "c:d", true, false}, + {"c:d/f", "c:d", "f", "f", "c:d/f",false, false}, + {"a:b:c", "a:.", "b:c", "./b:c","a:b:c",false, false}, + {"a/b:c", "a", "b:c", "./b:c","a/b:c",false, false}, + {"a/b:c/", "a", "b:c/", "./b:c/","a/b:c",true, false}, +# else /* ! FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE */ + {"c:", "c:", "", "c:", "c:", false, true}, + {"c:/", "c:", "", "c:", "c:", true, true}, + {"c://", "c:", "", "c:", "c:", true, true}, + {"c:/d", "c:", "d", "d", "c:/d", false, true}, + {"c://d", "c:", "d", "d", "c://d",false, true}, + {"c:/d/", "c:", "d/", "d/", "c:/d", true, true}, + {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, true}, + {"c:d", "c:", "d", "d", "c:d", false, true}, + {"c:d/", "c:", "d/", "d/", "c:d", true, true}, + {"c:d/f", "c:d", "f", "f", "c:d/f",false, true}, + {"a:b:c", "a:", "b:c", "./b:c","a:b:c",false, true}, + {"a/b:c", "a", "b:c", "./b:c","a/b:c",false, false}, + {"a/b:c/", "a", "b:c/", "./b:c/","a/b:c",true, false}, +# endif +#else /* ! FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX */ + {"c:", ".", "c:", "c:", "c:", false, false}, + {"c:/", ".", "c:/", "c:/", "c:", true, false}, + {"c://", ".", "c://", "c:/", "c:", true, false}, + {"c:/d", "c:", "d", "d", "c:/d", false, false}, + {"c://d", "c:", "d", "d", "c://d",false, false}, + {"c:/d/", "c:", "d/", "d/", "c:/d", true, false}, + {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, false}, + {"c:d", ".", "c:d", "c:d", "c:d", false, false}, + {"c:d/", ".", "c:d/", "c:d/", "c:d", true, false}, + {"c:d/f", "c:d", "f", "f", "c:d/f",false, false}, + {"a:b:c", ".", "a:b:c","a:b:c","a:b:c",false, false}, + {"a/b:c", "a", "b:c", "b:c", "a/b:c",false, false}, + {"a/b:c/", "a", "b:c/", "b:c/", "a/b:c",true, false}, +#endif + {"1:", ".", "1:", "1:", "1:", false, false}, + {"1:/", ".", "1:/", "1:/", "1:", true, false}, + {"/:", "/", ":", ":", "/:", false, true}, + {"/:/", "/", ":/", ":/", "/:", true, true}, + /* End sentinel. */ + {NULL, NULL, NULL, NULL, NULL, false, false} +}; + +int +main () +{ + struct test *t; + bool ok = true; + + for (t = tests; t->name; t++) + { + char *dir = dir_name (t->name); + int dirlen = dir_len (t->name); + char *last = last_component (t->name); + char *base = base_name (t->name); + int baselen = base_len (base); + char *stripped = strdup (t->name); + bool modified = strip_trailing_slashes (stripped); + bool absolute = IS_ABSOLUTE_FILE_NAME (t->name); + if (! (strcmp (dir, t->dir) == 0 + && (dirlen == strlen (dir) + || (dirlen + 1 == strlen (dir) && dir[dirlen] == '.')))) + { + ok = false; + printf ("dir_name `%s': got `%s' len %d, expected `%s' len %ld\n", + t->name, dir, dirlen, + t->dir, (unsigned long) strlen (t->dir)); + } + if (strcmp (last, t->last)) + { + ok = false; + printf ("last_component `%s': got `%s', expected `%s'\n", + t->name, last, t->last); + } + if (! (strcmp (base, t->base) == 0 + && (baselen == strlen (base) + || (baselen + 1 == strlen (base) + && ISSLASH (base[baselen]))))) + { + ok = false; + printf ("base_name `%s': got `%s' len %d, expected `%s' len %ld\n", + t->name, base, baselen, + t->base, (unsigned long) strlen (t->base)); + } + if (strcmp (stripped, t->stripped) || modified != t->modified) + { + ok = false; + printf ("strip_trailing_slashes `%s': got %s %s, expected %s %s\n", + t->name, stripped, modified ? "changed" : "unchanged", + t->stripped, t->modified ? "changed" : "unchanged"); + } + if (t->absolute != absolute) + { + ok = false; + printf ("`%s': got %s, expected %s\n", t->name, + absolute ? "absolute" : "relative", + t->absolute ? "absolute" : "relative"); + } + free (dir); + free (base); + free (stripped); + } + return ok ? 0 : 1; +} diff --git a/tests/test-fcntl.c b/tests/test-fcntl.c new file mode 100644 index 0000000..21f67cf --- /dev/null +++ b/tests/test-fcntl.c @@ -0,0 +1,36 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +/* Check that the various O_* macros are defined. */ +int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK + | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC + | O_BINARY | O_TEXT; + +/* Check that the various SEEK_* macros are defined. */ +int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; + +int +main () +{ + return 0; +} diff --git a/tests/test-gettimeofday.c b/tests/test-gettimeofday.c new file mode 100644 index 0000000..ecb9edd --- /dev/null +++ b/tests/test-gettimeofday.c @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2005, 2007 Free Software Foundation + * Written by Jim Meyering. + * + * 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. */ + +#include + +#include +#include + +#include +#include + +int +main (int argc, char *argv[]) +{ + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0) + { + fprintf (stderr, "gettimeofday still clobbers the localtime buffer!\n"); + return 1; + } + else + { + return 0; + } +} diff --git a/tests/test-inttypes.c b/tests/test-inttypes.c new file mode 100644 index 0000000..fa09b45 --- /dev/null +++ b/tests/test-inttypes.c @@ -0,0 +1,122 @@ +/* Test of substitute. + 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#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 */ +#include + +#include + +/* 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; +} diff --git a/tests/test-mbscasestr1.c b/tests/test-mbscasestr1.c new file mode 100644 index 0000000..1e65856 --- /dev/null +++ b/tests/test-mbscasestr1.c @@ -0,0 +1,144 @@ +/* Test of case-insensitive searching in a string. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* This test is executed in the C locale. */ + + { + const char input[] = "foo"; + const char *result = mbscasestr (input, ""); + ASSERT (result == input); + } + + { + const char input[] = "foo"; + const char *result = mbscasestr (input, "O"); + ASSERT (result == input + 1); + } + + { + const char input[] = "ABC ABCDAB ABCDABCDABDE"; + const char *result = mbscasestr (input, "ABCDaBD"); + ASSERT (result == input + 15); + } + + { + const char input[] = "ABC ABCDAB ABCDABCDABDE"; + const char *result = mbscasestr (input, "ABCDaBE"); + ASSERT (result == NULL); + } + + /* Check that a very long haystack is handled quickly if the needle is + short and occurs near the beginning. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *needle = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaAaaaaaaAAAAaaaaaaa" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + char *haystack = (char *) malloc (m + 1); + if (haystack != NULL) + { + memset (haystack, 'A', m); + haystack[0] = 'B'; + haystack[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (mbscasestr (haystack, needle) == haystack + 1); + } + + free (haystack); + } + } + + /* Check that a very long needle is discarded quickly if the haystack is + short. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *haystack = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"; + char *needle = (char *) malloc (m + 1); + if (needle != NULL) + { + memset (needle, 'A', m); + needle[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (mbscasestr (haystack, needle) == NULL); + } + + free (needle); + } + } + + /* Check that the asymptotic worst-case complexity is not quadratic. */ + { + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 2); + char *needle = (char *) malloc (m + 2); + if (haystack != NULL && needle != NULL) + { + const char *result; + + 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 = mbscasestr (haystack, needle); + ASSERT (result == haystack + m); + } + if (needle != NULL) + free (needle); + if (haystack != NULL) + free (haystack); + } + + return 0; +} diff --git a/tests/test-mbscasestr2.c b/tests/test-mbscasestr2.c new file mode 100644 index 0000000..5488187 --- /dev/null +++ b/tests/test-mbscasestr2.c @@ -0,0 +1,156 @@ +/* Test of searching in a string. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* configure should already have checked that the locale is supported. */ + if (setlocale (LC_ALL, "") == NULL) + return 1; + + { + const char input[] = "f\303\266\303\266"; + const char *result = mbscasestr (input, ""); + ASSERT (result == input); + } + + { + const char input[] = "f\303\266\303\266"; + const char *result = mbscasestr (input, "\303\266"); + ASSERT (result == input + 1); + } + + { + const char input[] = "f\303\266\303\266"; + const char *result = mbscasestr (input, "\266\303"); + ASSERT (result == NULL); + } + + { + const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */ + const char *result = mbscasestr (input, "\303\244BCD\303\204BD"); /* "äBCDÄBD" */ + ASSERT (result == input + 19); + } + + { + const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */ + const char *result = mbscasestr (input, "\303\204BCD\303\204BE"); /* "ÄBCDÄBE" */ + ASSERT (result == NULL); + } + + /* Check that a very long haystack is handled quickly if the needle is + short and occurs near the beginning. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *needle = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + char *haystack = (char *) malloc (m + 1); + if (haystack != NULL) + { + memset (haystack, 'a', m); + haystack[0] = '\303'; haystack[1] = '\204'; + haystack[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (mbscasestr (haystack, needle) == haystack + 2); + } + + free (haystack); + } + } + + /* Check that a very long needle is discarded quickly if the haystack is + short. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *haystack = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"; + char *needle = (char *) malloc (m + 1); + if (needle != NULL) + { + memset (needle, 'A', m); + needle[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (mbscasestr (haystack, needle) == NULL); + } + + free (needle); + } + } + + /* Check that the asymptotic worst-case complexity is not quadratic. */ + { + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 3); + char *needle = (char *) malloc (m + 3); + if (haystack != NULL && needle != NULL) + { + const char *result; + + memset (haystack, 'A', 2 * m); + haystack[2 * m] = '\303'; haystack[2 * m + 1] = '\247'; + haystack[2 * m + 2] = '\0'; + + memset (needle, 'a', m); + needle[m] = '\303'; needle[m + 1] = '\207'; + needle[m + 2] = '\0'; + + result = mbscasestr (haystack, needle); + ASSERT (result == haystack + m); + } + if (needle != NULL) + free (needle); + if (haystack != NULL) + free (haystack); + } + + return 0; +} diff --git a/tests/test-mbscasestr2.sh b/tests/test-mbscasestr2.sh new file mode 100755 index 0000000..bcb3ecd --- /dev/null +++ b/tests/test-mbscasestr2.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test whether a specific UTF-8 locale is installed. +: ${LOCALE_FR_UTF8=fr_FR.UTF-8} +if test $LOCALE_FR_UTF8 = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no french Unicode locale is installed" + else + echo "Skipping test: no french Unicode locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_FR_UTF8 \ +./test-mbscasestr2${EXEEXT} diff --git a/tests/test-mbscasestr3.c b/tests/test-mbscasestr3.c new file mode 100644 index 0000000..24ace44 --- /dev/null +++ b/tests/test-mbscasestr3.c @@ -0,0 +1,96 @@ +/* Test of case-insensitive searching in a string. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* configure should already have checked that the locale is supported. */ + if (setlocale (LC_ALL, "") == NULL) + return 1; + + /* Tests with a character < 0x30. */ + { + const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */ + const char *result = mbscasestr (input, " "); + ASSERT (result == input + 4); + } + + { + const char input[] = "\312\276\300\375"; /* "示例" */ + const char *result = mbscasestr (input, " "); + ASSERT (result == NULL); + } + + /* Tests with a character >= 0x30. */ + { + const char input[] = "\272\305123\324\313\320\320\241\243"; /* "号123运行。" */ + const char *result = mbscasestr (input, "2"); + ASSERT (result == input + 3); + } + + /* The following tests show how mbscasestr() is different from + strcasestr(). */ + + { + const char input[] = "\313\320\320\320"; /* "诵行" */ + const char *result = mbscasestr (input, "\320\320"); /* "行" */ + ASSERT (result == input + 2); + } + + { + const char input[] = "\203\062\332\066123\324\313\320\320\241\243"; /* "씋123运行。" */ + const char *result = mbscasestr (input, "2"); + ASSERT (result == input + 5); + } + + { + const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */ + const char *result = mbscasestr (input, "\276\300"); /* "纠" */ + ASSERT (result == NULL); + } + + { + const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */ + const char *result = mbscasestr (input, "\375 "); /* invalid multibyte sequence */ + ASSERT (result == NULL); + } + + return 0; +} diff --git a/tests/test-mbscasestr3.sh b/tests/test-mbscasestr3.sh new file mode 100755 index 0000000..6e45a7e --- /dev/null +++ b/tests/test-mbscasestr3.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test whether a specific GB18030 locale is installed. +: ${LOCALE_ZH_CN=zh_CN.GB18030} +if test $LOCALE_ZH_CN = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no chinese GB18030 locale is installed" + else + echo "Skipping test: no chinese GB18030 locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_ZH_CN \ +./test-mbscasestr3${EXEEXT} diff --git a/tests/test-mbscasestr4.c b/tests/test-mbscasestr4.c new file mode 100644 index 0000000..146b3fe --- /dev/null +++ b/tests/test-mbscasestr4.c @@ -0,0 +1,70 @@ +/* Test of case-insensitive searching in a string. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* configure should already have checked that the locale is supported. */ + if (setlocale (LC_ALL, "") == NULL) + return 1; + + { + const char input[] = "GOLD NEEDLE BEATS TIN NEEDLE"; + ASSERT (mbscasestr (input, "Needle") == input + 5); + } + + /* The following tests show how mbscasestr() is different from + strcasestr(). */ + + { + const char input[] = "s\303\266zc\303\274k"; /* sözcük */ + ASSERT (mbscasestr (input, "\303\266z") == input + 1); + ASSERT (mbscasestr (input, "\303\266c") == NULL); + } + + /* This test shows how a string of larger size can be found in a string of + smaller size. */ + { + const char input[] = "*Tbilisi imini*"; + ASSERT (mbscasestr (input, "TB\304\260L\304\260S\304\260 \304\260m\304\260n\304\260") == input + 1); /* TBÄ°LÄ°SÄ° Ä°mÄ°nÄ° */ + } + + return 0; +} diff --git a/tests/test-mbscasestr4.sh b/tests/test-mbscasestr4.sh new file mode 100755 index 0000000..6c37280 --- /dev/null +++ b/tests/test-mbscasestr4.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test whether a specific Turkish locale is installed. +: ${LOCALE_TR_UTF8=tr_TR.UTF-8} +if test $LOCALE_TR_UTF8 = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no turkish Unicode locale is installed" + else + echo "Skipping test: no turkish Unicode locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_TR_UTF8 \ +./test-mbscasestr4${EXEEXT} diff --git a/tests/test-mbsstr1.c b/tests/test-mbsstr1.c new file mode 100644 index 0000000..d1b079a --- /dev/null +++ b/tests/test-mbsstr1.c @@ -0,0 +1,143 @@ +/* Test of searching in a string. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* This test is executed in the C locale. */ + + { + const char input[] = "foo"; + const char *result = mbsstr (input, ""); + ASSERT (result == input); + } + + { + const char input[] = "foo"; + const char *result = mbsstr (input, "o"); + ASSERT (result == input + 1); + } + + { + const char input[] = "ABC ABCDAB ABCDABCDABDE"; + const char *result = mbsstr (input, "ABCDABD"); + ASSERT (result == input + 15); + } + + { + const char input[] = "ABC ABCDAB ABCDABCDABDE"; + const char *result = mbsstr (input, "ABCDABE"); + ASSERT (result == NULL); + } + + /* Check that a very long haystack is handled quickly if the needle is + short and occurs near the beginning. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *needle = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + char *haystack = (char *) malloc (m + 1); + if (haystack != NULL) + { + memset (haystack, 'A', m); + haystack[0] = 'B'; + haystack[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (mbsstr (haystack, needle) == haystack + 1); + } + + free (haystack); + } + } + + /* Check that a very long needle is discarded quickly if the haystack is + short. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *haystack = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"; + char *needle = (char *) malloc (m + 1); + if (needle != NULL) + { + memset (needle, 'A', m); + needle[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (mbsstr (haystack, needle) == NULL); + } + + free (needle); + } + } + + /* Check that the asymptotic worst-case complexity is not quadratic. */ + { + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 2); + char *needle = (char *) malloc (m + 2); + if (haystack != NULL && needle != NULL) + { + const char *result; + + 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 = mbsstr (haystack, needle); + ASSERT (result == haystack + m); + } + if (needle != NULL) + free (needle); + if (haystack != NULL) + free (haystack); + } + + return 0; +} diff --git a/tests/test-mbsstr2.c b/tests/test-mbsstr2.c new file mode 100644 index 0000000..8ce3be7 --- /dev/null +++ b/tests/test-mbsstr2.c @@ -0,0 +1,156 @@ +/* Test of searching in a string. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* configure should already have checked that the locale is supported. */ + if (setlocale (LC_ALL, "") == NULL) + return 1; + + { + const char input[] = "f\303\266\303\266"; + const char *result = mbsstr (input, ""); + ASSERT (result == input); + } + + { + const char input[] = "f\303\266\303\266"; + const char *result = mbsstr (input, "\303\266"); + ASSERT (result == input + 1); + } + + { + const char input[] = "f\303\266\303\266"; + const char *result = mbsstr (input, "\266\303"); + ASSERT (result == NULL); + } + + { + const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */ + const char *result = mbsstr (input, "\303\204BCD\303\204BD"); /* "ÄBCDÄBD" */ + ASSERT (result == input + 19); + } + + { + const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */ + const char *result = mbsstr (input, "\303\204BCD\303\204BE"); /* "ÄBCDÄBE" */ + ASSERT (result == NULL); + } + + /* Check that a very long haystack is handled quickly if the needle is + short and occurs near the beginning. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *needle = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; + char *haystack = (char *) malloc (m + 1); + if (haystack != NULL) + { + memset (haystack, 'A', m); + haystack[0] = '\303'; haystack[1] = '\204'; + haystack[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (mbsstr (haystack, needle) == haystack + 2); + } + + free (haystack); + } + } + + /* Check that a very long needle is discarded quickly if the haystack is + short. */ + { + size_t repeat = 10000; + size_t m = 1000000; + char *haystack = + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" + "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"; + char *needle = (char *) malloc (m + 1); + if (needle != NULL) + { + memset (needle, 'A', m); + needle[m] = '\0'; + + for (; repeat > 0; repeat--) + { + ASSERT (mbsstr (haystack, needle) == NULL); + } + + free (needle); + } + } + + /* Check that the asymptotic worst-case complexity is not quadratic. */ + { + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 3); + char *needle = (char *) malloc (m + 3); + if (haystack != NULL && needle != NULL) + { + const char *result; + + memset (haystack, 'A', 2 * m); + haystack[2 * m] = '\303'; haystack[2 * m + 1] = '\207'; + haystack[2 * m + 2] = '\0'; + + memset (needle, 'A', m); + needle[m] = '\303'; needle[m + 1] = '\207'; + needle[m + 2] = '\0'; + + result = mbsstr (haystack, needle); + ASSERT (result == haystack + m); + } + if (needle != NULL) + free (needle); + if (haystack != NULL) + free (haystack); + } + + return 0; +} diff --git a/tests/test-mbsstr2.sh b/tests/test-mbsstr2.sh new file mode 100755 index 0000000..79d06df --- /dev/null +++ b/tests/test-mbsstr2.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test whether a specific UTF-8 locale is installed. +: ${LOCALE_FR_UTF8=fr_FR.UTF-8} +if test $LOCALE_FR_UTF8 = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no french Unicode locale is installed" + else + echo "Skipping test: no french Unicode locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_FR_UTF8 \ +./test-mbsstr2${EXEEXT} diff --git a/tests/test-mbsstr3.c b/tests/test-mbsstr3.c new file mode 100644 index 0000000..9f65520 --- /dev/null +++ b/tests/test-mbsstr3.c @@ -0,0 +1,95 @@ +/* Test of searching in a string. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* configure should already have checked that the locale is supported. */ + if (setlocale (LC_ALL, "") == NULL) + return 1; + + /* Tests with a character < 0x30. */ + { + const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */ + const char *result = mbsstr (input, " "); + ASSERT (result == input + 4); + } + + { + const char input[] = "\312\276\300\375"; /* "示例" */ + const char *result = mbsstr (input, " "); + ASSERT (result == NULL); + } + + /* Tests with a character >= 0x30. */ + { + const char input[] = "\272\305123\324\313\320\320\241\243"; /* "号123运行。" */ + const char *result = mbsstr (input, "2"); + ASSERT (result == input + 3); + } + + /* The following tests show how mbsstr() is different from strstr(). */ + + { + const char input[] = "\313\320\320\320"; /* "诵行" */ + const char *result = mbsstr (input, "\320\320"); /* "行" */ + ASSERT (result == input + 2); + } + + { + const char input[] = "\203\062\332\066123\324\313\320\320\241\243"; /* "씋123运行。" */ + const char *result = mbsstr (input, "2"); + ASSERT (result == input + 5); + } + + { + const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */ + const char *result = mbsstr (input, "\276\300"); /* "纠" */ + ASSERT (result == NULL); + } + + { + const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */ + const char *result = mbsstr (input, "\375 "); /* invalid multibyte sequence */ + ASSERT (result == NULL); + } + + return 0; +} diff --git a/tests/test-mbsstr3.sh b/tests/test-mbsstr3.sh new file mode 100755 index 0000000..732c01f --- /dev/null +++ b/tests/test-mbsstr3.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Test whether a specific GB18030 locale is installed. +: ${LOCALE_ZH_CN=zh_CN.GB18030} +if test $LOCALE_ZH_CN = none; then + if test -f /usr/bin/localedef; then + echo "Skipping test: no chinese GB18030 locale is installed" + else + echo "Skipping test: no chinese GB18030 locale is supported" + fi + exit 77 +fi + +LC_ALL=$LOCALE_ZH_CN \ +./test-mbsstr3${EXEEXT} diff --git a/tests/test-stat-time.c b/tests/test-stat-time.c new file mode 100644 index 0000000..907ba4b --- /dev/null +++ b/tests/test-stat-time.c @@ -0,0 +1,183 @@ +/* Test of . + Copyright (C) 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 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. */ + +/* Written by James Youngman , 2007. */ + +#include + +#include "stat-time.h" + +#include +#include +#include +#include +#include +#include + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) + +enum { NFILES = 4 }; + +static void +cleanup (int sig) +{ + /* Remove temporary files. */ + unlink ("t-stt-stamp1"); + unlink ("t-stt-testfile"); + unlink ("t-stt-stamp2"); + unlink ("t-stt-renamed"); + unlink ("t-stt-stamp3"); + + if (sig != 0) + _exit (1); +} + +static int +open_file (const char *filename, int flags) +{ + int fd = open (filename, flags | O_WRONLY, 0500); + if (fd >= 0) + { + close (fd); + return 1; + } + else + { + return 0; + } +} + +static void +create_file (const char *filename) +{ + ASSERT (open_file (filename, O_CREAT | O_EXCL)); +} + +static void +do_stat (const char *filename, struct stat *p) +{ + ASSERT (stat (filename, p) == 0); +} + +static void +prepare_test (struct stat *statinfo, struct timespec *modtimes) +{ + int i; + + create_file ("t-stt-stamp1"); + sleep (2); + create_file ("t-stt-testfile"); + sleep (2); + create_file ("t-stt-stamp2"); + sleep (2); + ASSERT (chmod ("t-stt-testfile", 0400) == 0); + sleep (2); + create_file ("t-stt-stamp3"); + + do_stat ("t-stt-stamp1", &statinfo[0]); + do_stat ("t-stt-testfile", &statinfo[1]); + do_stat ("t-stt-stamp2", &statinfo[2]); + do_stat ("t-stt-stamp3", &statinfo[3]); + + /* Now use our access functions. */ + for (i = 0; i < NFILES; ++i) + { + modtimes[i] = get_stat_mtime (&statinfo[i]); + } +} + +static void +test_mtime (const struct stat *statinfo, struct timespec *modtimes) +{ + int i; + + /* Use the struct stat fields directly. */ + ASSERT (statinfo[0].st_mtime < statinfo[2].st_mtime); /* mtime(stamp1) < mtime(stamp2) */ + ASSERT (statinfo[2].st_mtime < statinfo[3].st_mtime); /* mtime(stamp2) < mtime(stamp3) */ + ASSERT (statinfo[2].st_mtime < statinfo[1].st_ctime); /* mtime(stamp2) < ctime(renamed) */ + + /* Now check the result of the access functions. */ + ASSERT (modtimes[0].tv_sec < modtimes[2].tv_sec); /* mtime(stamp1) < mtime(stamp2) */ + ASSERT (modtimes[2].tv_sec < modtimes[3].tv_sec); /* mtime(stamp2) < mtime(stamp3) */ + + /* verify equivalence */ + for (i = 0; i < NFILES; ++i) + { + struct timespec ts; + ts = get_stat_mtime (&statinfo[i]); + ASSERT (ts.tv_sec == statinfo[i].st_mtime); + } + + ASSERT (statinfo[2].st_mtime < statinfo[1].st_ctime); /* mtime(stamp2) < ctime(renamed) */ +} + +static void +test_birthtime (const struct stat *statinfo, + const struct timespec *modtimes, + struct timespec *birthtimes) +{ + int i; + + /* Collect the birth times.. */ + for (i = 0; i < NFILES; ++i) + { + birthtimes[i] = get_stat_birthtime (&statinfo[i]); + if (birthtimes[i].tv_nsec < 0) + return; + } + + ASSERT (modtimes[0].tv_sec < birthtimes[1].tv_sec); /* mtime(stamp1) < birthtime(renamed) */ + ASSERT (birthtimes[1].tv_sec < modtimes[2].tv_sec); /* birthtime(renamed) < mtime(stamp2) */ +} + +int +main () +{ + struct stat statinfo[NFILES]; + struct timespec modtimes[NFILES]; + struct timespec birthtimes[NFILES]; + +#ifdef SIGHUP + signal (SIGHUP, cleanup); +#endif +#ifdef SIGINT + signal (SIGINT, cleanup); +#endif +#ifdef SIGQUIT + signal (SIGQUIT, cleanup); +#endif +#ifdef SIGTERM + signal (SIGTERM, cleanup); +#endif + + cleanup (0); + prepare_test (statinfo, modtimes); + test_mtime (statinfo, modtimes); + test_birthtime (statinfo, modtimes, birthtimes); + + cleanup (0); + return 0; +} diff --git a/tests/test-stdbool.c b/tests/test-stdbool.c new file mode 100644 index 0000000..28e9b22 --- /dev/null +++ b/tests/test-stdbool.c @@ -0,0 +1,96 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#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 + +#if 0 /* Cannot be guaranteed with gnulib's . */ +struct s { _Bool s: 1; _Bool t; } s; +#endif + +char a[true == 1 ? 1 : -1]; +char b[false == 0 ? 1 : -1]; +char c[__bool_true_false_are_defined == 1 ? 1 : -1]; +#if 0 /* Cannot be guaranteed with gnulib's . */ +char d[(bool) 0.5 == true ? 1 : -1]; +bool e = &s; +#endif +char f[(_Bool) 0.0 == false ? 1 : -1]; +char g[true]; +char h[sizeof (_Bool)]; +#if 0 /* See above. */ +char i[sizeof s.t]; +#endif +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 0 /* Cannot be guaranteed with gnulib's . */ +#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 +#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 () +{ + return 0; +} diff --git a/tests/test-stdint.c b/tests/test-stdint.c new file mode 100644 index 0000000..7dbc062 --- /dev/null +++ b/tests/test-stdint.c @@ -0,0 +1,359 @@ +/* Test of substitute. + 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 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. */ + +/* Written by Bruno Haible , 2006. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +/* Whether to enable pedantic checks. */ +#define DO_PEDANTIC 0 + +#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +#include + +#include "verify.h" +#include "intprops.h" + +#if __GNUC__ >= 2 && DO_PEDANTIC +# define verify_same_types(expr1,expr2) \ + extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \ + extern void _verify_func(__LINE__) (__typeof__ (expr2) *); +# define _verify_func(line) _verify_func2(line) +# define _verify_func2(line) verify_func_ ## line +#else +# define verify_same_types(expr1,expr2) extern void verify_func (int) +#endif + +/* 7.18.1.1. Exact-width integer types */ +/* 7.18.2.1. Limits of exact-width integer types */ + +int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX }; +verify (TYPE_MINIMUM (int8_t) == INT8_MIN); +verify (TYPE_MAXIMUM (int8_t) == INT8_MAX); +verify_same_types (INT8_MIN, (int8_t) 0 + 0); +verify_same_types (INT8_MAX, (int8_t) 0 + 0); + +int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX }; +verify (TYPE_MINIMUM (int16_t) == INT16_MIN); +verify (TYPE_MAXIMUM (int16_t) == INT16_MAX); +verify_same_types (INT16_MIN, (int16_t) 0 + 0); +verify_same_types (INT16_MAX, (int16_t) 0 + 0); + +int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX }; +verify (TYPE_MINIMUM (int32_t) == INT32_MIN); +verify (TYPE_MAXIMUM (int32_t) == INT32_MAX); +verify_same_types (INT32_MIN, (int32_t) 0 + 0); +verify_same_types (INT32_MAX, (int32_t) 0 + 0); + +#ifdef INT64_MAX +int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX }; +verify (TYPE_MINIMUM (int64_t) == INT64_MIN); +verify (TYPE_MAXIMUM (int64_t) == INT64_MAX); +verify_same_types (INT64_MIN, (int64_t) 0 + 0); +verify_same_types (INT64_MAX, (int64_t) 0 + 0); +#endif + +uint8_t b1[2] = { UINT8_C (17), UINT8_MAX }; +verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX); +verify_same_types (UINT8_MAX, (uint8_t) 0 + 0); + +uint16_t b2[2] = { UINT16_C (17), UINT16_MAX }; +verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX); +verify_same_types (UINT16_MAX, (uint16_t) 0 + 0); + +uint32_t b3[2] = { UINT32_C (17), UINT32_MAX }; +verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX); +verify_same_types (UINT32_MAX, (uint32_t) 0 + 0); + +#ifdef UINT64_MAX +uint64_t b4[2] = { UINT64_C (17), UINT64_MAX }; +verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX); +verify_same_types (UINT64_MAX, (uint64_t) 0 + 0); +#endif + +#if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX +/* ok */ +#else +err or; +#endif + +#if UINT8_MAX && UINT16_MAX && UINT32_MAX +/* ok */ +#else +err or; +#endif + +/* 7.18.1.2. Minimum-width integer types */ +/* 7.18.2.2. Limits of minimum-width integer types */ + +int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX }; +verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN); +verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX); +verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0); +verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0); + +int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX }; +verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN); +verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX); +verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0); +verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0); + +int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX }; +verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN); +verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX); +verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0); +verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0); + +#ifdef INT_LEAST64_MAX +int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX }; +verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN); +verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX); +verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0); +verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0); +#endif + +uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX }; +verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX); +verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0); + +uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX }; +verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX); +verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0); + +uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX }; +verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX); +verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0); + +#ifdef UINT_LEAST64_MAX +uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX }; +verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX); +verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0); +#endif + +#if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX +/* ok */ +#else +err or; +#endif + +#if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX +/* ok */ +#else +err or; +#endif + +/* 7.18.1.3. Fastest minimum-width integer types */ +/* 7.18.2.3. Limits of fastest minimum-width integer types */ + +int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX }; +verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN); +verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX); +verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0); +verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0); + +int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX }; +verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN); +verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX); +verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0); +verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0); + +int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX }; +verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN); +verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX); +verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0); +verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0); + +#ifdef INT_FAST64_MAX +int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX }; +verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN); +verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX); +verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0); +verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0); +#endif + +uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX }; +verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX); +verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0); + +uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX }; +verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX); +verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0); + +uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX }; +verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX); +verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0); + +#ifdef UINT_FAST64_MAX +uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX }; +verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX); +verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0); +#endif + +#if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX +/* ok */ +#else +err or; +#endif + +#if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX +/* ok */ +#else +err or; +#endif + +/* 7.18.1.4. Integer types capable of holding object pointers */ +/* 7.18.2.4. Limits of integer types capable of holding object pointers */ + +intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX }; +verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN); +verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX); +verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0); +verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0); + +uintptr_t h[2] = { 17, UINTPTR_MAX }; +verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX); +verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0); + +#if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX +/* ok */ +#else +err or; +#endif + +/* 7.18.1.5. Greatest-width integer types */ +/* 7.18.2.5. Limits of greatest-width integer types */ + +intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX }; +verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); +verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); +verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0); +verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0); + +uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX }; +verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); +verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0); + +#if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX +/* ok */ +#else +err or; +#endif + +/* 7.18.3. Limits of other integer types */ + +#include + +verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN); +verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX); +verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0); +verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0); + +#if PTRDIFF_MIN && PTRDIFF_MAX +/* ok */ +#else +err or; +#endif + +#include + +verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN); +verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX); +verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0); +verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0); + +#if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX +/* ok */ +#else +err or; +#endif + +verify (TYPE_MAXIMUM (size_t) == SIZE_MAX); +verify_same_types (SIZE_MAX, (size_t) 0 + 0); + +#if SIZE_MAX +/* ok */ +#else +err or; +#endif + +#if HAVE_WCHAR_T +verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN); +verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX); +verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0); +verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0); + +# if WCHAR_MIN != 17 && WCHAR_MAX +/* ok */ +# else +err or; +# endif +#endif + +#if HAVE_WINT_T +# include + +verify (TYPE_MINIMUM (wint_t) == WINT_MIN); +verify (TYPE_MAXIMUM (wint_t) == WINT_MAX); +verify_same_types (WINT_MIN, (wint_t) 0 + 0); +verify_same_types (WINT_MAX, (wint_t) 0 + 0); + +# if WINT_MIN != 17 && WINT_MAX +/* ok */ +# else +err or; +# endif +#endif + +/* 7.18.4. Macros for integer constants */ + +verify (INT8_C (17) == 17); +verify_same_types (INT8_C (17), (int_least8_t)0 + 0); +verify (UINT8_C (17) == 17); +verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0); + +verify (INT16_C (17) == 17); +verify_same_types (INT16_C (17), (int_least16_t)0 + 0); +verify (UINT16_C (17) == 17); +verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0); + +verify (INT32_C (17) == 17); +verify_same_types (INT32_C (17), (int_least32_t)0 + 0); +verify (UINT32_C (17) == 17); +verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0); + +#ifdef INT64_C +verify (INT64_C (17) == 17); +verify_same_types (INT64_C (17), (int_least64_t)0 + 0); +#endif +#ifdef UINT64_C +verify (UINT64_C (17) == 17); +verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0); +#endif + +verify (INTMAX_C (17) == 17); +verify_same_types (INTMAX_C (17), (intmax_t)0 + 0); +verify (UINTMAX_C (17) == 17); +verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0); + + +int +main () +{ + return 0; +} diff --git a/tests/test-stdlib.c b/tests/test-stdlib.c new file mode 100644 index 0000000..bdd23ea --- /dev/null +++ b/tests/test-stdlib.c @@ -0,0 +1,38 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +int exitcode; + +int +main () +{ + /* Check that some macros are defined and different integer constants. */ + switch (exitcode) + { + case EXIT_SUCCESS: + case EXIT_FAILURE: + break; + } + + return 0; +} diff --git a/tests/test-string.c b/tests/test-string.c new file mode 100644 index 0000000..7a2a836 --- /dev/null +++ b/tests/test-string.c @@ -0,0 +1,28 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +int +main () +{ + return 0; +} diff --git a/tests/test-sys_stat.c b/tests/test-sys_stat.c new file mode 100644 index 0000000..7f7549f --- /dev/null +++ b/tests/test-sys_stat.c @@ -0,0 +1,261 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +#include "verify.h" + +/* Check the existence of some macros. */ +int a[] = + { + S_IFMT, + S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG, +#ifdef S_IFLNK /* missing on mingw and djgpp */ + S_IFLNK, +#endif +#ifdef S_IFSOCK /* missing on mingw and djgpp */ + S_IFSOCK, +#endif + S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR, + S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP, + S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH, + S_ISUID, S_ISGID, S_ISVTX, + S_ISBLK (S_IFREG), + S_ISCHR (S_IFREG), + S_ISDIR (S_IFREG), + S_ISFIFO (S_IFREG), + S_ISREG (S_IFREG), + S_ISLNK (S_IFREG), + S_ISSOCK (S_IFREG), + S_ISDOOR (S_IFREG), + S_ISMPB (S_IFREG), + S_ISNAM (S_IFREG), + S_ISNWK (S_IFREG), + S_ISPORT (S_IFREG), + S_ISCTG (S_IFREG), + S_ISOFD (S_IFREG), + S_ISOFL (S_IFREG), + S_ISWHT (S_IFREG) + }; + +/* Sanity checks. */ + +verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR)); +verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP)); +verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH)); + +verify (S_ISBLK (S_IFBLK)); +verify (!S_ISBLK (S_IFCHR)); +verify (!S_ISBLK (S_IFDIR)); +verify (!S_ISBLK (S_IFIFO)); +verify (!S_ISBLK (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISBLK (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISBLK (S_IFSOCK)); +#endif + +verify (!S_ISCHR (S_IFBLK)); +verify (S_ISCHR (S_IFCHR)); +verify (!S_ISCHR (S_IFDIR)); +verify (!S_ISCHR (S_IFIFO)); +verify (!S_ISCHR (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISCHR (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISCHR (S_IFSOCK)); +#endif + +verify (!S_ISDIR (S_IFBLK)); +verify (!S_ISDIR (S_IFCHR)); +verify (S_ISDIR (S_IFDIR)); +verify (!S_ISDIR (S_IFIFO)); +verify (!S_ISDIR (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISDIR (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISDIR (S_IFSOCK)); +#endif + +verify (!S_ISFIFO (S_IFBLK)); +verify (!S_ISFIFO (S_IFCHR)); +verify (!S_ISFIFO (S_IFDIR)); +verify (S_ISFIFO (S_IFIFO)); +verify (!S_ISFIFO (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISFIFO (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISFIFO (S_IFSOCK)); +#endif + +verify (!S_ISREG (S_IFBLK)); +verify (!S_ISREG (S_IFCHR)); +verify (!S_ISREG (S_IFDIR)); +verify (!S_ISREG (S_IFIFO)); +verify (S_ISREG (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISREG (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISREG (S_IFSOCK)); +#endif + +verify (!S_ISLNK (S_IFBLK)); +verify (!S_ISLNK (S_IFCHR)); +verify (!S_ISLNK (S_IFDIR)); +verify (!S_ISLNK (S_IFIFO)); +verify (!S_ISLNK (S_IFREG)); +#ifdef S_IFLNK +verify (S_ISLNK (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISLNK (S_IFSOCK)); +#endif + +verify (!S_ISSOCK (S_IFBLK)); +verify (!S_ISSOCK (S_IFCHR)); +verify (!S_ISSOCK (S_IFDIR)); +verify (!S_ISSOCK (S_IFIFO)); +verify (!S_ISSOCK (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISSOCK (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (S_ISSOCK (S_IFSOCK)); +#endif + +verify (!S_ISDOOR (S_IFBLK)); +verify (!S_ISDOOR (S_IFCHR)); +verify (!S_ISDOOR (S_IFDIR)); +verify (!S_ISDOOR (S_IFIFO)); +verify (!S_ISDOOR (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISDOOR (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISDOOR (S_IFSOCK)); +#endif + +verify (!S_ISMPB (S_IFBLK)); +verify (!S_ISMPB (S_IFCHR)); +verify (!S_ISMPB (S_IFDIR)); +verify (!S_ISMPB (S_IFIFO)); +verify (!S_ISMPB (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISMPB (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISMPB (S_IFSOCK)); +#endif + +verify (!S_ISNAM (S_IFBLK)); +verify (!S_ISNAM (S_IFCHR)); +verify (!S_ISNAM (S_IFDIR)); +verify (!S_ISNAM (S_IFIFO)); +verify (!S_ISNAM (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISNAM (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISNAM (S_IFSOCK)); +#endif + +verify (!S_ISNWK (S_IFBLK)); +verify (!S_ISNWK (S_IFCHR)); +verify (!S_ISNWK (S_IFDIR)); +verify (!S_ISNWK (S_IFIFO)); +verify (!S_ISNWK (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISNWK (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISNWK (S_IFSOCK)); +#endif + +verify (!S_ISPORT (S_IFBLK)); +verify (!S_ISPORT (S_IFCHR)); +verify (!S_ISPORT (S_IFDIR)); +verify (!S_ISPORT (S_IFIFO)); +verify (!S_ISPORT (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISPORT (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISPORT (S_IFSOCK)); +#endif + +verify (!S_ISCTG (S_IFBLK)); +verify (!S_ISCTG (S_IFCHR)); +verify (!S_ISCTG (S_IFDIR)); +verify (!S_ISCTG (S_IFIFO)); +verify (!S_ISCTG (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISCTG (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISCTG (S_IFSOCK)); +#endif + +verify (!S_ISOFD (S_IFBLK)); +verify (!S_ISOFD (S_IFCHR)); +verify (!S_ISOFD (S_IFDIR)); +verify (!S_ISOFD (S_IFIFO)); +verify (!S_ISOFD (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISOFD (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISOFD (S_IFSOCK)); +#endif + +verify (!S_ISOFL (S_IFBLK)); +verify (!S_ISOFL (S_IFCHR)); +verify (!S_ISOFL (S_IFDIR)); +verify (!S_ISOFL (S_IFIFO)); +verify (!S_ISOFL (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISOFL (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISOFL (S_IFSOCK)); +#endif + +verify (!S_ISWHT (S_IFBLK)); +verify (!S_ISWHT (S_IFCHR)); +verify (!S_ISWHT (S_IFDIR)); +verify (!S_ISWHT (S_IFIFO)); +verify (!S_ISWHT (S_IFREG)); +#ifdef S_IFLNK +verify (!S_ISWHT (S_IFLNK)); +#endif +#ifdef S_IFSOCK +verify (!S_ISWHT (S_IFSOCK)); +#endif + +int +main () +{ + return 0; +} diff --git a/tests/test-sys_time.c b/tests/test-sys_time.c new file mode 100644 index 0000000..83c7231 --- /dev/null +++ b/tests/test-sys_time.c @@ -0,0 +1,30 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +struct timeval a; + +int +main () +{ + return 0; +} diff --git a/tests/test-time.c b/tests/test-time.c new file mode 100644 index 0000000..2d54f36 --- /dev/null +++ b/tests/test-time.c @@ -0,0 +1,30 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +struct timespec a; + +int +main () +{ + return 0; +} diff --git a/tests/test-unistd.c b/tests/test-unistd.c new file mode 100644 index 0000000..755708a --- /dev/null +++ b/tests/test-unistd.c @@ -0,0 +1,31 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +/* Check that the various SEEK_* macros are defined. */ +int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; + +int +main () +{ + return 0; +} diff --git a/tests/test-wchar.c b/tests/test-wchar.c new file mode 100644 index 0000000..c88e5e7 --- /dev/null +++ b/tests/test-wchar.c @@ -0,0 +1,28 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +int +main () +{ + return 0; +} diff --git a/tests/test-wctype.c b/tests/test-wctype.c new file mode 100644 index 0000000..ff8b9c1 --- /dev/null +++ b/tests/test-wctype.c @@ -0,0 +1,44 @@ +/* Test of substitute. + Copyright (C) 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 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. */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +int +main () +{ + /* Check that the isw* functions exist as functions or as macros. */ + iswalnum (0); + iswalpha (0); +#if 0 /* not portable: missing on mingw */ + iswblank (0); +#endif + iswcntrl (0); + iswdigit (0); + iswgraph (0); + iswlower (0); + iswprint (0); + iswpunct (0); + iswspace (0); + iswupper (0); + iswxdigit (0); + + return 0; +} diff --git a/xargs/Makefile.am b/xargs/Makefile.am new file mode 100644 index 0000000..1832aa5 --- /dev/null +++ b/xargs/Makefile.am @@ -0,0 +1,15 @@ +AUTOMAKE_OPTIONS = std-options +localedir = $(datadir)/locale +bin_PROGRAMS = xargs +man_MANS = xargs.1 +INCLUDES = -I.. -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\" +LDADD = ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ +EXTRA_DIST = $(man_MANS) +SUBDIRS = testsuite + +$(PROGRAMS): ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a + +dist-hook: findutils-check-manpages + +findutils-check-manpages: + $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) diff --git a/xargs/Makefile.in b/xargs/Makefile.in new file mode 100644 index 0000000..c4d8178 --- /dev/null +++ b/xargs/Makefile.in @@ -0,0 +1,926 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = xargs$(EXEEXT) +subdir = xargs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +xargs_SOURCES = xargs.c +xargs_OBJECTS = xargs.$(OBJEXT) +xargs_LDADD = $(LDADD) +xargs_DEPENDENCIES = ../find/version.o ../lib/libfind.a \ + ../gnulib/lib/libgnulib.a +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/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 = xargs.c +DIST_SOURCES = xargs.c +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = -I.. -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\" +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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 = $(datadir)/locale +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = std-options +man_MANS = xargs.1 +LDADD = ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a @INTLLIBS@ +EXTRA_DIST = $(man_MANS) +SUBDIRS = testsuite +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(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 xargs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits xargs/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(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) + +installcheck-binPROGRAMS: $(bin_PROGRAMS) + bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err &2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad +xargs$(EXEEXT): $(xargs_OBJECTS) $(xargs_DEPENDENCIES) + @rm -f xargs$(EXEEXT) + $(LINK) $(xargs_OBJECTS) $(xargs_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xargs.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +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 + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(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) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) $(MANS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(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-man + +install-dvi: install-dvi-recursive + +install-exec-am: install-binPROGRAMS + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: installcheck-binPROGRAMS + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic ctags ctags-recursive dist-hook distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installcheck-binPROGRAMS installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-man uninstall-man1 + + +$(PROGRAMS): ../find/version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a + +dist-hook: findutils-check-manpages + +findutils-check-manpages: + $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) +# 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/testsuite/Makefile.am b/xargs/testsuite/Makefile.am new file mode 100644 index 0000000..c923715 --- /dev/null +++ b/xargs/testsuite/Makefile.am @@ -0,0 +1,258 @@ +AUTOMAKE_OPTIONS=dejagnu +XARGS = ../xargs +XARGSFLAGS = +DEJATOOL = xargs +#EXTRA_DIST = config/*.exp inputs/*.xi xargs.*/*.exp xargs.*/*.xo + +EXTRA_DIST_EXP = \ +config/unix.exp \ +xargs.gnu/0n3.exp \ +xargs.gnu/delim-o.exp \ +xargs.gnu/E_-0.exp \ +xargs.gnu/empty_def-r.exp \ +xargs.gnu/empty-r.exp \ +xargs.gnu/idef-0.exp \ +xargs.gnu/idef-s26-0.exp \ +xargs.gnu/l1-0.exp \ +xargs.gnu/l1_2-0.exp \ +xargs.gnu/L2-0.exp \ +xargs.gnu/L2_2-0.exp \ +xargs.gnu/L3-0.exp \ +xargs.gnu/n1-0.exp \ +xargs.gnu/n2-0.exp \ +xargs.gnu/n2-s26-0.exp \ +xargs.gnu/n2-s26-x-0.exp \ +xargs.gnu/n3-0.exp \ +xargs.gnu/n3-s36-0.exp \ +xargs.gnu/noeof-0.exp \ +xargs.gnu/nothing.exp \ +xargs.gnu/P3-n1-IARG.exp \ +xargs.gnu/r.exp \ +xargs.gnu/s118-0.exp \ +xargs.gnu/s19-0.exp \ +xargs.gnu/s19_2-0.exp \ +xargs.gnu/s20-0.exp \ +xargs.gnu/s30-0.exp \ +xargs.gnu/space-0.exp \ +xargs.gnu/space-r.exp \ +xargs.gnu/space-t-0.exp \ +xargs.posix/EEOFb.exp \ +xargs.posix/EEOFe.exp \ +xargs.posix/EEOF.exp \ +xargs.posix/E_.exp \ +xargs.posix/E_-IARG.exp \ +xargs.posix/arg_max_32bit_linux_bug.exp \ +xargs.posix/arg_max_64bit_linux_bug.exp \ +xargs.posix/childfail.exp \ +xargs.posix/empty_def.exp \ +xargs.posix/empty.exp \ +xargs.posix/hithere.exp \ +xargs.posix/IARG-E_.exp \ +xargs.posix/IARG.exp \ +xargs.posix/IARG-s15.exp \ +xargs.posix/L2_2.exp \ +xargs.posix/uc_L2.exp \ +xargs.posix/L2-n2.exp \ +xargs.posix/L3.exp \ +xargs.posix/n1.exp \ +xargs.posix/n2.exp \ +xargs.posix/n2-s26.exp \ +xargs.posix/n2-s26-x.exp \ +xargs.posix/n3.exp \ +xargs.posix/n3-s36.exp \ +xargs.posix/noeof.exp \ +xargs.posix/quotes.exp \ +xargs.posix/rc-123.exp \ +xargs.posix/rc-124.exp \ +xargs.posix/rc-125.exp \ +xargs.posix/rc-126.exp \ +xargs.posix/rc-127.exp \ +xargs.posix/s118.exp \ +xargs.posix/s19_2.exp \ +xargs.posix/s19.exp \ +xargs.posix/s20.exp \ +xargs.posix/s30.exp \ +xargs.posix/s470.exp \ +xargs.posix/s47.exp \ +xargs.posix/s48.exp \ +xargs.posix/s6.exp \ +xargs.posix/savannah-11865.exp \ +xargs.posix/space.exp \ +xargs.posix/space-I.exp \ +xargs.posix/sv-bug-18714.exp \ +xargs.posix/sv-bug-18714b.exp \ +xargs.posix/unmatched2.exp \ +xargs.posix/unmatched.exp \ +xargs.posix/unmatched-n2-x.exp \ +xargs.sysv/eEOF.exp \ +xargs.sysv/e.exp \ +xargs.sysv/empty_def-t.exp \ +xargs.sysv/empty-t.exp \ +xargs.sysv/eof1.exp \ +xargs.sysv/iARG.exp \ +xargs.sysv/idef.exp \ +xargs.sysv/idef-s26.exp \ +xargs.sysv/iquotes.exp \ +xargs.sysv/l1_2.exp \ +xargs.sysv/l1.exp \ +xargs.sysv/l1n4.exp \ +xargs.sysv/lc_l2.exp \ +xargs.sysv/s30-t.exp \ +xargs.sysv/sv-bug-18713.exp \ +xargs.sysv/space-t.exp \ +xargs.sysv/trace.exp + + + +EXTRA_DIST_XO = \ +xargs.gnu/0n3.xo \ +xargs.gnu/E_-0.xo \ +xargs.gnu/delim-o.xo \ +xargs.gnu/idef-0.xo \ +xargs.gnu/idef-s26-0.xo \ +xargs.gnu/l1-0.xo \ +xargs.gnu/l1_2-0.xo \ +xargs.gnu/L2-0.xo \ +xargs.gnu/L2_2-0.xo \ +xargs.gnu/L3-0.xo \ +xargs.gnu/n1-0.xo \ +xargs.gnu/n2-0.xo \ +xargs.gnu/n2-s26-0.xo \ +xargs.gnu/n2-s26-x-0.xo \ +xargs.gnu/n3-0.xo \ +xargs.gnu/n3-s36-0.xo \ +xargs.gnu/noeof-0.xo \ +xargs.gnu/nothing.xo \ +xargs.gnu/P3-n1-IARG.xo \ +xargs.gnu/r.xo \ +xargs.gnu/s118-0.xo \ +xargs.gnu/s19-0.xo \ +xargs.gnu/s20-0.xo \ +xargs.gnu/s30-0.xo \ +xargs.gnu/space-0.xo \ +xargs.gnu/space-t-0.xo \ +xargs.posix/EEOFb.xo \ +xargs.posix/EEOFe.xo \ +xargs.posix/EEOF.xo \ +xargs.posix/E_-IARG.xo \ +xargs.posix/empty_def.xo \ +xargs.posix/empty.xo \ +xargs.posix/E_.xo \ +xargs.posix/hithere.xo \ +xargs.posix/IARG-E_.xo \ +xargs.posix/IARG-s15.xo \ +xargs.posix/IARG.xo \ +xargs.posix/L2_2.xo \ +xargs.posix/L2-n2.xo \ +xargs.posix/uc_L2.xo \ +xargs.posix/L3.xo \ +xargs.posix/n1.xo \ +xargs.posix/n2-s26.xo \ +xargs.posix/n2-s26-x.xo \ +xargs.posix/n2.xo \ +xargs.posix/n3-s36.xo \ +xargs.posix/n3.xo \ +xargs.posix/noeof.xo \ +xargs.posix/quotes.xo \ +xargs.posix/rc-123.xo \ +xargs.posix/s118.xo \ +xargs.posix/s19.xo \ +xargs.posix/s20.xo \ +xargs.posix/s30.xo \ +xargs.posix/s470.xo \ +xargs.posix/s47.xo \ +xargs.posix/s48.xo \ +xargs.posix/savannah-11865.xo \ +xargs.posix/space.xo \ +xargs.posix/sv-bug-18714.xo \ +xargs.posix/sv-bug-18714b.xo \ +xargs.posix/unmatched2.xo \ +xargs.posix/unmatched.xo \ +xargs.sysv/eEOF.xo \ +xargs.sysv/empty_def-t.xo \ +xargs.sysv/empty-t.xo \ +xargs.sysv/eof1.xo \ +xargs.sysv/e.xo \ +xargs.sysv/iARG.xo \ +xargs.sysv/idef-s26.xo \ +xargs.sysv/idef.xo \ +xargs.sysv/iquotes.xo \ +xargs.sysv/l1_2.xo \ +xargs.sysv/l1n4.xo \ +xargs.sysv/l1.xo \ +xargs.sysv/lc_l2.xo \ +xargs.sysv/s30-t.xo \ +xargs.sysv/sv-bug-18713.xo \ +xargs.sysv/space-t.xo \ +xargs.sysv/trace.xo + + + +EXTRA_DIST_XE = \ +xargs.gnu/space-t-0.xe \ +xargs.sysv/empty_def-t.xe \ +xargs.sysv/empty-t.xe \ +xargs.sysv/s30-t.xe \ +xargs.sysv/space-t.xe \ +xargs.sysv/trace.xe + + +EXTRA_DIST_XI = \ +inputs/16383-ys.xi \ +inputs/32767-ys.xi \ +inputs/blank.xi \ +inputs/empty.xi \ +inputs/eof_-0.xi \ +inputs/EOFb.xi \ +inputs/EOFe.xi \ +inputs/eofstr.xi \ +inputs/eof_.xi \ +inputs/eof1.xi \ +inputs/EOF.xi \ +inputs/ett.xi \ +inputs/files0.xi \ +inputs/files.xi \ +inputs/foobar.xi \ +inputs/formfeeds.xi \ +inputs/ftt.xi \ +inputs/helloworld.xi \ +inputs/items-0.xi \ +inputs/items.xi \ +inputs/ldata-0.xi \ +inputs/ldatab-0.xi \ +inputs/ldatab.xi \ +inputs/ldata.xi \ +inputs/lines.xi \ +inputs/noeof-0.xi \ +inputs/noeof.xi \ +inputs/Pdata.xi \ +inputs/quotes.xi \ +inputs/space.xi \ +inputs/stairs-0.xi \ +inputs/stairs2-0.xi \ +inputs/stairs2.xi \ +inputs/stairs.xi \ +inputs/stt.xi \ +inputs/unmatched2.xi \ +inputs/unmatched.xi \ +inputs/verticaltabs.xi + + +EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI) $(EXTRA_DIST_XE) + + + +# DIST_SUBDIRS = config inputs xargs.gnu xargs.posix xargs.sysv + +CLEANFILES = *.log *.sum site.exp site.bak + +FORCE: + +checklists: + cd $(srcdir) && \ + ( find config inputs xargs.gnu xargs.posix xargs.sysv \( -name "*.exp" -o -name "*.xo" -o -name "*.xi" -o -name "*.xe" \) -print ; \ + ls $(EXTRA_DIST_XI) ; \ + ls $(EXTRA_DIST_XE) ; \ + ls $(EXTRA_DIST_XO) ; \ + ls $(EXTRA_DIST_EXP) ; ) | \ + sort | uniq -c | awk '$$1 != 2 { print; }' diff --git a/xargs/testsuite/Makefile.in b/xargs/testsuite/Makefile.in new file mode 100644 index 0000000..4265d67 --- /dev/null +++ b/xargs/testsuite/Makefile.in @@ -0,0 +1,901 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = xargs/testsuite +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gnulib/m4/absolute-header.m4 \ + $(top_srcdir)/gnulib/m4/alloca.m4 \ + $(top_srcdir)/gnulib/m4/allocsa.m4 \ + $(top_srcdir)/gnulib/m4/argmatch.m4 \ + $(top_srcdir)/gnulib/m4/bison.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/chdir-long.m4 \ + $(top_srcdir)/gnulib/m4/chown.m4 \ + $(top_srcdir)/gnulib/m4/clock_time.m4 \ + $(top_srcdir)/gnulib/m4/close-stream.m4 \ + $(top_srcdir)/gnulib/m4/closeout.m4 \ + $(top_srcdir)/gnulib/m4/codeset.m4 \ + $(top_srcdir)/gnulib/m4/cycle-check.m4 \ + $(top_srcdir)/gnulib/m4/d-ino.m4 \ + $(top_srcdir)/gnulib/m4/d-type.m4 \ + $(top_srcdir)/gnulib/m4/dirfd.m4 \ + $(top_srcdir)/gnulib/m4/dirname.m4 \ + $(top_srcdir)/gnulib/m4/dos.m4 \ + $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ + $(top_srcdir)/gnulib/m4/dup2.m4 \ + $(top_srcdir)/gnulib/m4/eealloc.m4 \ + $(top_srcdir)/gnulib/m4/error.m4 \ + $(top_srcdir)/gnulib/m4/exitfail.m4 \ + $(top_srcdir)/gnulib/m4/extensions.m4 \ + $(top_srcdir)/gnulib/m4/fchdir.m4 \ + $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ + $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fileblocks.m4 \ + $(top_srcdir)/gnulib/m4/filemode.m4 \ + $(top_srcdir)/gnulib/m4/filenamecat.m4 \ + $(top_srcdir)/gnulib/m4/flexmember.m4 \ + $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpending.m4 \ + $(top_srcdir)/gnulib/m4/fstypename.m4 \ + $(top_srcdir)/gnulib/m4/fts.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ + $(top_srcdir)/gnulib/m4/getdate.m4 \ + $(top_srcdir)/gnulib/m4/getdelim.m4 \ + $(top_srcdir)/gnulib/m4/getline.m4 \ + $(top_srcdir)/gnulib/m4/getopt.m4 \ + $(top_srcdir)/gnulib/m4/gettext.m4 \ + $(top_srcdir)/gnulib/m4/gettime.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ + $(top_srcdir)/gnulib/m4/glibc21.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ + $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib/m4/hash.m4 \ + $(top_srcdir)/gnulib/m4/human.m4 \ + $(top_srcdir)/gnulib/m4/i-ring.m4 \ + $(top_srcdir)/gnulib/m4/iconv.m4 \ + $(top_srcdir)/gnulib/m4/idcache.m4 \ + $(top_srcdir)/gnulib/m4/inline.m4 \ + $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ + $(top_srcdir)/gnulib/m4/inttypes.m4 \ + $(top_srcdir)/gnulib/m4/lchown.m4 \ + $(top_srcdir)/gnulib/m4/lib-ld.m4 \ + $(top_srcdir)/gnulib/m4/lib-link.m4 \ + $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ + $(top_srcdir)/gnulib/m4/localcharset.m4 \ + $(top_srcdir)/gnulib/m4/locale-fr.m4 \ + $(top_srcdir)/gnulib/m4/locale-tr.m4 \ + $(top_srcdir)/gnulib/m4/locale-zh.m4 \ + $(top_srcdir)/gnulib/m4/longlong.m4 \ + $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ + $(top_srcdir)/gnulib/m4/lstat.m4 \ + $(top_srcdir)/gnulib/m4/mbchar.m4 \ + $(top_srcdir)/gnulib/m4/mbiter.m4 \ + $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ + $(top_srcdir)/gnulib/m4/mbscasestr.m4 \ + $(top_srcdir)/gnulib/m4/mbslen.m4 \ + $(top_srcdir)/gnulib/m4/mbsstr.m4 \ + $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ + $(top_srcdir)/gnulib/m4/memchr.m4 \ + $(top_srcdir)/gnulib/m4/memcmp.m4 \ + $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/memrchr.m4 \ + $(top_srcdir)/gnulib/m4/memset.m4 \ + $(top_srcdir)/gnulib/m4/mktime.m4 \ + $(top_srcdir)/gnulib/m4/modechange.m4 \ + $(top_srcdir)/gnulib/m4/mountlist.m4 \ + $(top_srcdir)/gnulib/m4/nls.m4 \ + $(top_srcdir)/gnulib/m4/onceonly_2_57.m4 \ + $(top_srcdir)/gnulib/m4/openat.m4 \ + $(top_srcdir)/gnulib/m4/pathmax.m4 \ + $(top_srcdir)/gnulib/m4/po.m4 \ + $(top_srcdir)/gnulib/m4/progtest.m4 \ + $(top_srcdir)/gnulib/m4/quote.m4 \ + $(top_srcdir)/gnulib/m4/quotearg.m4 \ + $(top_srcdir)/gnulib/m4/readlink.m4 \ + $(top_srcdir)/gnulib/m4/regex.m4 \ + $(top_srcdir)/gnulib/m4/rpmatch.m4 \ + $(top_srcdir)/gnulib/m4/save-cwd.m4 \ + $(top_srcdir)/gnulib/m4/savedir.m4 \ + $(top_srcdir)/gnulib/m4/setenv.m4 \ + $(top_srcdir)/gnulib/m4/ssize_t.m4 \ + $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ + $(top_srcdir)/gnulib/m4/stat-time.m4 \ + $(top_srcdir)/gnulib/m4/stdbool.m4 \ + $(top_srcdir)/gnulib/m4/stdint.m4 \ + $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ + $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ + $(top_srcdir)/gnulib/m4/stpcpy.m4 \ + $(top_srcdir)/gnulib/m4/strdup.m4 \ + $(top_srcdir)/gnulib/m4/strftime.m4 \ + $(top_srcdir)/gnulib/m4/string_h.m4 \ + $(top_srcdir)/gnulib/m4/strndup.m4 \ + $(top_srcdir)/gnulib/m4/strnlen.m4 \ + $(top_srcdir)/gnulib/m4/strtoimax.m4 \ + $(top_srcdir)/gnulib/m4/strtol.m4 \ + $(top_srcdir)/gnulib/m4/strtoll.m4 \ + $(top_srcdir)/gnulib/m4/strtoul.m4 \ + $(top_srcdir)/gnulib/m4/strtoull.m4 \ + $(top_srcdir)/gnulib/m4/strtoumax.m4 \ + $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_h.m4 \ + $(top_srcdir)/gnulib/m4/time_r.m4 \ + $(top_srcdir)/gnulib/m4/timespec.m4 \ + $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ + $(top_srcdir)/gnulib/m4/ulonglong.m4 \ + $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ + $(top_srcdir)/gnulib/m4/unistd_h.m4 \ + $(top_srcdir)/gnulib/m4/wchar.m4 \ + $(top_srcdir)/gnulib/m4/wchar_t.m4 \ + $(top_srcdir)/gnulib/m4/wctype.m4 \ + $(top_srcdir)/gnulib/m4/wcwidth.m4 \ + $(top_srcdir)/gnulib/m4/wint_t.m4 \ + $(top_srcdir)/gnulib/m4/xalloc.m4 \ + $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ + $(top_srcdir)/gnulib/m4/xstrndup.m4 \ + $(top_srcdir)/gnulib/m4/xstrtod.m4 \ + $(top_srcdir)/gnulib/m4/xstrtol.m4 \ + $(top_srcdir)/gnulib/m4/yesno.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXPECT = expect +RUNTEST = runtest +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +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@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FNMATCH_H = @FNMATCH_H@ +GETOPT_H = @GETOPT_H@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +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_READLINK = @GNULIB_READLINK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GREP = @GREP@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +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_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_READLINK = @HAVE_READLINK@ +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_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_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE__BOOL = @HAVE__BOOL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +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@ +POSUB = @POSUB@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +RANLIB = @RANLIB@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_STRPTIME = @REPLACE_STRPTIME@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDBOOL_H = @STDBOOL_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +U = @U@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = dejagnu +XARGS = ../xargs +XARGSFLAGS = +DEJATOOL = xargs +#EXTRA_DIST = config/*.exp inputs/*.xi xargs.*/*.exp xargs.*/*.xo +EXTRA_DIST_EXP = \ +config/unix.exp \ +xargs.gnu/0n3.exp \ +xargs.gnu/delim-o.exp \ +xargs.gnu/E_-0.exp \ +xargs.gnu/empty_def-r.exp \ +xargs.gnu/empty-r.exp \ +xargs.gnu/idef-0.exp \ +xargs.gnu/idef-s26-0.exp \ +xargs.gnu/l1-0.exp \ +xargs.gnu/l1_2-0.exp \ +xargs.gnu/L2-0.exp \ +xargs.gnu/L2_2-0.exp \ +xargs.gnu/L3-0.exp \ +xargs.gnu/n1-0.exp \ +xargs.gnu/n2-0.exp \ +xargs.gnu/n2-s26-0.exp \ +xargs.gnu/n2-s26-x-0.exp \ +xargs.gnu/n3-0.exp \ +xargs.gnu/n3-s36-0.exp \ +xargs.gnu/noeof-0.exp \ +xargs.gnu/nothing.exp \ +xargs.gnu/P3-n1-IARG.exp \ +xargs.gnu/r.exp \ +xargs.gnu/s118-0.exp \ +xargs.gnu/s19-0.exp \ +xargs.gnu/s19_2-0.exp \ +xargs.gnu/s20-0.exp \ +xargs.gnu/s30-0.exp \ +xargs.gnu/space-0.exp \ +xargs.gnu/space-r.exp \ +xargs.gnu/space-t-0.exp \ +xargs.posix/EEOFb.exp \ +xargs.posix/EEOFe.exp \ +xargs.posix/EEOF.exp \ +xargs.posix/E_.exp \ +xargs.posix/E_-IARG.exp \ +xargs.posix/arg_max_32bit_linux_bug.exp \ +xargs.posix/arg_max_64bit_linux_bug.exp \ +xargs.posix/childfail.exp \ +xargs.posix/empty_def.exp \ +xargs.posix/empty.exp \ +xargs.posix/hithere.exp \ +xargs.posix/IARG-E_.exp \ +xargs.posix/IARG.exp \ +xargs.posix/IARG-s15.exp \ +xargs.posix/L2_2.exp \ +xargs.posix/uc_L2.exp \ +xargs.posix/L2-n2.exp \ +xargs.posix/L3.exp \ +xargs.posix/n1.exp \ +xargs.posix/n2.exp \ +xargs.posix/n2-s26.exp \ +xargs.posix/n2-s26-x.exp \ +xargs.posix/n3.exp \ +xargs.posix/n3-s36.exp \ +xargs.posix/noeof.exp \ +xargs.posix/quotes.exp \ +xargs.posix/rc-123.exp \ +xargs.posix/rc-124.exp \ +xargs.posix/rc-125.exp \ +xargs.posix/rc-126.exp \ +xargs.posix/rc-127.exp \ +xargs.posix/s118.exp \ +xargs.posix/s19_2.exp \ +xargs.posix/s19.exp \ +xargs.posix/s20.exp \ +xargs.posix/s30.exp \ +xargs.posix/s470.exp \ +xargs.posix/s47.exp \ +xargs.posix/s48.exp \ +xargs.posix/s6.exp \ +xargs.posix/savannah-11865.exp \ +xargs.posix/space.exp \ +xargs.posix/space-I.exp \ +xargs.posix/sv-bug-18714.exp \ +xargs.posix/sv-bug-18714b.exp \ +xargs.posix/unmatched2.exp \ +xargs.posix/unmatched.exp \ +xargs.posix/unmatched-n2-x.exp \ +xargs.sysv/eEOF.exp \ +xargs.sysv/e.exp \ +xargs.sysv/empty_def-t.exp \ +xargs.sysv/empty-t.exp \ +xargs.sysv/eof1.exp \ +xargs.sysv/iARG.exp \ +xargs.sysv/idef.exp \ +xargs.sysv/idef-s26.exp \ +xargs.sysv/iquotes.exp \ +xargs.sysv/l1_2.exp \ +xargs.sysv/l1.exp \ +xargs.sysv/l1n4.exp \ +xargs.sysv/lc_l2.exp \ +xargs.sysv/s30-t.exp \ +xargs.sysv/sv-bug-18713.exp \ +xargs.sysv/space-t.exp \ +xargs.sysv/trace.exp + +EXTRA_DIST_XO = \ +xargs.gnu/0n3.xo \ +xargs.gnu/E_-0.xo \ +xargs.gnu/delim-o.xo \ +xargs.gnu/idef-0.xo \ +xargs.gnu/idef-s26-0.xo \ +xargs.gnu/l1-0.xo \ +xargs.gnu/l1_2-0.xo \ +xargs.gnu/L2-0.xo \ +xargs.gnu/L2_2-0.xo \ +xargs.gnu/L3-0.xo \ +xargs.gnu/n1-0.xo \ +xargs.gnu/n2-0.xo \ +xargs.gnu/n2-s26-0.xo \ +xargs.gnu/n2-s26-x-0.xo \ +xargs.gnu/n3-0.xo \ +xargs.gnu/n3-s36-0.xo \ +xargs.gnu/noeof-0.xo \ +xargs.gnu/nothing.xo \ +xargs.gnu/P3-n1-IARG.xo \ +xargs.gnu/r.xo \ +xargs.gnu/s118-0.xo \ +xargs.gnu/s19-0.xo \ +xargs.gnu/s20-0.xo \ +xargs.gnu/s30-0.xo \ +xargs.gnu/space-0.xo \ +xargs.gnu/space-t-0.xo \ +xargs.posix/EEOFb.xo \ +xargs.posix/EEOFe.xo \ +xargs.posix/EEOF.xo \ +xargs.posix/E_-IARG.xo \ +xargs.posix/empty_def.xo \ +xargs.posix/empty.xo \ +xargs.posix/E_.xo \ +xargs.posix/hithere.xo \ +xargs.posix/IARG-E_.xo \ +xargs.posix/IARG-s15.xo \ +xargs.posix/IARG.xo \ +xargs.posix/L2_2.xo \ +xargs.posix/L2-n2.xo \ +xargs.posix/uc_L2.xo \ +xargs.posix/L3.xo \ +xargs.posix/n1.xo \ +xargs.posix/n2-s26.xo \ +xargs.posix/n2-s26-x.xo \ +xargs.posix/n2.xo \ +xargs.posix/n3-s36.xo \ +xargs.posix/n3.xo \ +xargs.posix/noeof.xo \ +xargs.posix/quotes.xo \ +xargs.posix/rc-123.xo \ +xargs.posix/s118.xo \ +xargs.posix/s19.xo \ +xargs.posix/s20.xo \ +xargs.posix/s30.xo \ +xargs.posix/s470.xo \ +xargs.posix/s47.xo \ +xargs.posix/s48.xo \ +xargs.posix/savannah-11865.xo \ +xargs.posix/space.xo \ +xargs.posix/sv-bug-18714.xo \ +xargs.posix/sv-bug-18714b.xo \ +xargs.posix/unmatched2.xo \ +xargs.posix/unmatched.xo \ +xargs.sysv/eEOF.xo \ +xargs.sysv/empty_def-t.xo \ +xargs.sysv/empty-t.xo \ +xargs.sysv/eof1.xo \ +xargs.sysv/e.xo \ +xargs.sysv/iARG.xo \ +xargs.sysv/idef-s26.xo \ +xargs.sysv/idef.xo \ +xargs.sysv/iquotes.xo \ +xargs.sysv/l1_2.xo \ +xargs.sysv/l1n4.xo \ +xargs.sysv/l1.xo \ +xargs.sysv/lc_l2.xo \ +xargs.sysv/s30-t.xo \ +xargs.sysv/sv-bug-18713.xo \ +xargs.sysv/space-t.xo \ +xargs.sysv/trace.xo + +EXTRA_DIST_XE = \ +xargs.gnu/space-t-0.xe \ +xargs.sysv/empty_def-t.xe \ +xargs.sysv/empty-t.xe \ +xargs.sysv/s30-t.xe \ +xargs.sysv/space-t.xe \ +xargs.sysv/trace.xe + +EXTRA_DIST_XI = \ +inputs/16383-ys.xi \ +inputs/32767-ys.xi \ +inputs/blank.xi \ +inputs/empty.xi \ +inputs/eof_-0.xi \ +inputs/EOFb.xi \ +inputs/EOFe.xi \ +inputs/eofstr.xi \ +inputs/eof_.xi \ +inputs/eof1.xi \ +inputs/EOF.xi \ +inputs/ett.xi \ +inputs/files0.xi \ +inputs/files.xi \ +inputs/foobar.xi \ +inputs/formfeeds.xi \ +inputs/ftt.xi \ +inputs/helloworld.xi \ +inputs/items-0.xi \ +inputs/items.xi \ +inputs/ldata-0.xi \ +inputs/ldatab-0.xi \ +inputs/ldatab.xi \ +inputs/ldata.xi \ +inputs/lines.xi \ +inputs/noeof-0.xi \ +inputs/noeof.xi \ +inputs/Pdata.xi \ +inputs/quotes.xi \ +inputs/space.xi \ +inputs/stairs-0.xi \ +inputs/stairs2-0.xi \ +inputs/stairs2.xi \ +inputs/stairs.xi \ +inputs/stt.xi \ +inputs/unmatched2.xi \ +inputs/unmatched.xi \ +inputs/verticaltabs.xi + +EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI) $(EXTRA_DIST_XE) + +# DIST_SUBDIRS = config inputs xargs.gnu xargs.posix xargs.sysv +CLEANFILES = *.log *.sum site.exp site.bak +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(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 xargs/testsuite/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits xargs/testsuite/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: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +check-DEJAGNU: site.exp + srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \ + if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + then :; else exit_status=1; fi; \ + done; \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi; \ + exit $$exit_status +site.exp: Makefile + @echo 'Making a new site.exp file...' + @echo '## these variables are automatically generated by make ##' >site.tmp + @echo '# Do not edit here. If you wish to override these values' >>site.tmp + @echo '# edit the last section' >>site.tmp + @echo 'set srcdir $(srcdir)' >>site.tmp + @echo "set objdir `pwd`" >>site.tmp + @echo 'set build_alias "$(build_alias)"' >>site.tmp + @echo 'set build_triplet $(build_triplet)' >>site.tmp + @echo 'set host_alias "$(host_alias)"' >>site.tmp + @echo 'set host_triplet $(host_triplet)' >>site.tmp + @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp + @test ! -f site.exp || \ + sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @-rm -f site.bak + @test ! -f site.exp || mv site.exp site.bak + @mv site.tmp site.exp + +distclean-DEJAGNU: + -rm -f site.exp site.bak + -l='$(DEJATOOL)'; for tool in $$l; do \ + rm -f $$tool.sum $$tool.log; \ + done + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +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-DEJAGNU distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ + distclean distclean-DEJAGNU distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am + + +FORCE: + +checklists: + cd $(srcdir) && \ + ( find config inputs xargs.gnu xargs.posix xargs.sysv \( -name "*.exp" -o -name "*.xo" -o -name "*.xi" -o -name "*.xe" \) -print ; \ + ls $(EXTRA_DIST_XI) ; \ + ls $(EXTRA_DIST_XE) ; \ + ls $(EXTRA_DIST_XO) ; \ + ls $(EXTRA_DIST_EXP) ; ) | \ + sort | uniq -c | awk '$$1 != 2 { print; }' +# 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/testsuite/config/unix.exp b/xargs/testsuite/config/unix.exp new file mode 100644 index 0000000..00b6b4f --- /dev/null +++ b/xargs/testsuite/config/unix.exp @@ -0,0 +1,184 @@ +# -*- TCL -*- +# Test-specific TCL procedures required by DejaGNU. +# Copyright (C) 1994, 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 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. + +# Modified by David MacKenzie from the gcc files +# written by Rob Savoye . + + +verbose "base_dir is $base_dir" 2 + +set objfile "xargs.o" +set dir "$base_dir/.." +set path "$dir/$objfile" +if ![file exists $path] then { + error "$path does not exist" +} else { + set XARGS [findfile $base_dir/../xargs [transform xargs]] +} + +global XARGS + + +set XARGS [findfile $base_dir/../xargs $base_dir/../xargs [transform xargs]] +if [ string match "/*" $XARGS ] { + verbose "XARGS is set to $XARGS" 1 +} else { + error "Failed to find a binary to test" +} + +global XARGSFLAGS +if ![info exists XARGSFLAGS] then { + set XARGSFLAGS "" +} + +# Called by runtest. +# Extract and print the version number of xargs. +proc xargs_version {} { + global XARGS + global XARGSFLAGS + + if {[which $XARGS] != 0} then { + set tmp [ eval exec $XARGS $XARGSFLAGS --version xargs.out 2> xargs.err" + send_log "$cmd\n" + if $verbose>1 then { + send_user "Spawning \"$cmd\"\n" + } + + set status 0 + if {[catch "exec $cmd" comp_output]} then { + if {[lindex $::errorCode 0] == "CHILDSTATUS"} then { + set status [lindex $::errorCode 2] + } else { + fail "$testname, failure in testing framework, $comp_output" + return + } + } + + catch "exec cat xargs.err" comp_error + + if {$execrc != $status} then { + if {$status == 0} then { + fail "$testname, unexpected success" + } elseif {$execrc == 0} then { + fail "$testname, unexpected failure, $comp_output, $comp_error" + } else { + fail "$testname, expected exit code $execrc, but got exit code $status" + } + return + } + # ok, at least exit code match. + + if [file exists $outfile] then { + set cmp_cmd "cmp xargs.out $outfile" + send_log "$cmp_cmd\n" + catch "exec $cmp_cmd" cmpout + if {$cmpout != ""} then { + # stdout is wrong. + catch "exec diff -u xargs.out $outfile" diffs + send_log "stdout diffs: $diffs\n" + fail "$testname, wrong stdout output: $cmpout" + return + } + } elseif {[file size xargs.out] != 0} then { + fail "$testname, output on stdout should be empty" + return + } + + # if stderr check is enabled, + if {$errfile != ""} then { + if {[file exists $errfile]} then { + set cmp_cmd "cmp xargs.err $errfile" + send_log "$cmp_cmd\n" + catch "exec $cmp_cmd" cmperr + if {$cmperr != ""} then { + # stderr is wrong + catch "exec diff -ua xargs.err $errfile" diffs + send_log "stderr diffs: $diffs\n" + fail "$testname, wrong stderr output: $cmperr" + return + } + } elseif {[file size xargs.err] != 0} then { + fail "$testname, output on stderr should be empty" + return + } + } + + pass "$testname" +} + +# Called by runtest. +# Clean up (remove temporary files) before runtest exits. +proc xargs_exit {} { + catch "exec rm -f xargs.out xargs.err" +} diff --git a/xargs/testsuite/inputs/16383-ys.xi b/xargs/testsuite/inputs/16383-ys.xi new file mode 100644 index 0000000..9084d4c --- /dev/null +++ b/xargs/testsuite/inputs/16383-ys.xi @@ -0,0 +1 @@ +y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y \ No newline at end of file diff --git a/xargs/testsuite/inputs/32767-ys.xi b/xargs/testsuite/inputs/32767-ys.xi new file mode 100644 index 0000000..320ff33 --- /dev/null +++ b/xargs/testsuite/inputs/32767-ys.xi @@ -0,0 +1 @@ +y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y \ No newline at end of file diff --git a/xargs/testsuite/inputs/EOF.xi b/xargs/testsuite/inputs/EOF.xi new file mode 100644 index 0000000..2a1c7a4 --- /dev/null +++ b/xargs/testsuite/inputs/EOF.xi @@ -0,0 +1,5 @@ +one +two + EOF +three +four diff --git a/xargs/testsuite/inputs/EOFb.xi b/xargs/testsuite/inputs/EOFb.xi new file mode 100644 index 0000000..f302113 --- /dev/null +++ b/xargs/testsuite/inputs/EOFb.xi @@ -0,0 +1,5 @@ +one +two + bEOF +three +four diff --git a/xargs/testsuite/inputs/EOFe.xi b/xargs/testsuite/inputs/EOFe.xi new file mode 100644 index 0000000..f391070 --- /dev/null +++ b/xargs/testsuite/inputs/EOFe.xi @@ -0,0 +1,5 @@ +one +two + EOFe +three +four diff --git a/xargs/testsuite/inputs/Pdata.xi b/xargs/testsuite/inputs/Pdata.xi new file mode 100644 index 0000000..250f10d --- /dev/null +++ b/xargs/testsuite/inputs/Pdata.xi @@ -0,0 +1,3 @@ +sleep 2 && echo one +sleep 1 && echo two +echo three diff --git a/xargs/testsuite/inputs/blank.xi b/xargs/testsuite/inputs/blank.xi new file mode 100644 index 0000000..b28b04f --- /dev/null +++ b/xargs/testsuite/inputs/blank.xi @@ -0,0 +1,3 @@ + + + diff --git a/xargs/testsuite/inputs/empty.xi b/xargs/testsuite/inputs/empty.xi new file mode 100644 index 0000000..c7c1dc8 --- /dev/null +++ b/xargs/testsuite/inputs/empty.xi @@ -0,0 +1,3 @@ +foo '' bar +baz '' +'' fnord diff --git a/xargs/testsuite/inputs/eof1.xi b/xargs/testsuite/inputs/eof1.xi new file mode 100644 index 0000000..0a4baec --- /dev/null +++ b/xargs/testsuite/inputs/eof1.xi @@ -0,0 +1,5 @@ +firstline +secondline + _ +thirdline +fourthline diff --git a/xargs/testsuite/inputs/eof_-0.xi b/xargs/testsuite/inputs/eof_-0.xi new file mode 100644 index 0000000000000000000000000000000000000000..6e6fa1a1149ba9b486de59bee347ceae245a9d46 GIT binary patch literal 20 bcmd1LOJyi2&u55dD9I>FO=U>SFD(K9Mdb$2 literal 0 HcmV?d00001 diff --git a/xargs/testsuite/inputs/eof_.xi b/xargs/testsuite/inputs/eof_.xi new file mode 100644 index 0000000..e6270a7 --- /dev/null +++ b/xargs/testsuite/inputs/eof_.xi @@ -0,0 +1,5 @@ +one +two +_ +three +four \ No newline at end of file diff --git a/xargs/testsuite/inputs/eofstr.xi b/xargs/testsuite/inputs/eofstr.xi new file mode 100644 index 0000000..6e60cfd --- /dev/null +++ b/xargs/testsuite/inputs/eofstr.xi @@ -0,0 +1,5 @@ +firstline +secondline +EOF +thirdline +fourthline diff --git a/xargs/testsuite/inputs/ett.xi b/xargs/testsuite/inputs/ett.xi new file mode 100644 index 0000000..ec54624 --- /dev/null +++ b/xargs/testsuite/inputs/ett.xi @@ -0,0 +1,3 @@ +exit 255 +echo 1 +echo 2 diff --git a/xargs/testsuite/inputs/files.xi b/xargs/testsuite/inputs/files.xi new file mode 100644 index 0000000..5590252 --- /dev/null +++ b/xargs/testsuite/inputs/files.xi @@ -0,0 +1,22 @@ +/src/gnu/autoconf-1.11 +/src/gnu/autoconf-1.11/README +/src/gnu/autoconf-1.11/Makefile.in +/src/gnu/autoconf-1.11/INSTALL +/src/gnu/autoconf-1.11/NEWS +/src/gnu/autoconf-1.11/COPYING +/src/gnu/autoconf-1.11/ChangeLog +/src/gnu/autoconf-1.11/autoconf.texi +/src/gnu/autoconf-1.11/acconfig.h +/src/gnu/autoconf-1.11/autoconf.sh +/src/gnu/autoconf-1.11/acgeneral.m4 +/src/gnu/autoconf-1.11/acspecific.m4 +/src/gnu/autoconf-1.11/configure +/src/gnu/autoconf-1.11/configure.in +/src/gnu/autoconf-1.11/autoheader.sh +/src/gnu/autoconf-1.11/mkinstalldirs +/src/gnu/autoconf-1.11/install.sh +/src/gnu/autoconf-1.11/autoconf.info +/src/gnu/autoconf-1.11/standards.texi +/src/gnu/autoconf-1.11/make-stds.texi +/src/gnu/autoconf-1.11/standards.info +/src/gnu/autoconf-1.11/texinfo.tex diff --git a/xargs/testsuite/inputs/files0.xi b/xargs/testsuite/inputs/files0.xi new file mode 100644 index 0000000000000000000000000000000000000000..08ab0e2f546702f9775b82c22da7863d9983cf97 GIT binary patch literal 753 zcmaiyQ44}F6ovgmZV3GWDG5O>GKe0>cAXb>#x|j!pOV>2cfIa>oOAEF(1%PFRve{O2>jWa**ID76$FG}r?}Lm_!pU(=$Xl(s*e?|F43EL=uuq2dG&~5^GP)(TLPwz>1y?JJLqF2S{vC2B7yWlLg9U0|J#Vd$%AI*ucm` whsJr)_X@3}(pDs3vvrK787Z4N$0%Wy3tnQFKU3`dAL{EBN?a~J547Y(FA9?WH~;_u literal 0 HcmV?d00001 diff --git a/xargs/testsuite/inputs/foobar.xi b/xargs/testsuite/inputs/foobar.xi new file mode 100644 index 0000000..e10988c --- /dev/null +++ b/xargs/testsuite/inputs/foobar.xi @@ -0,0 +1,3 @@ +foo bar +baz +ugh diff --git a/xargs/testsuite/inputs/formfeeds.xi b/xargs/testsuite/inputs/formfeeds.xi new file mode 100644 index 0000000..ecb2715 --- /dev/null +++ b/xargs/testsuite/inputs/formfeeds.xi @@ -0,0 +1,2 @@ +1 2 3 4 +a b c d diff --git a/xargs/testsuite/inputs/ftt.xi b/xargs/testsuite/inputs/ftt.xi new file mode 100644 index 0000000..633a5d0 --- /dev/null +++ b/xargs/testsuite/inputs/ftt.xi @@ -0,0 +1,3 @@ +false +echo 1 +echo 2 diff --git a/xargs/testsuite/inputs/helloworld.xi b/xargs/testsuite/inputs/helloworld.xi new file mode 100644 index 0000000..95d09f2 --- /dev/null +++ b/xargs/testsuite/inputs/helloworld.xi @@ -0,0 +1 @@ +hello world \ No newline at end of file diff --git a/xargs/testsuite/inputs/items-0.xi b/xargs/testsuite/inputs/items-0.xi new file mode 100644 index 0000000000000000000000000000000000000000..b217e3acac501907edc18ec4473db18bdefc7edf GIT binary patch literal 63 zcmW;C$q9f!5Jkav?Jb9nP1KtsIBNWUggVwaHag3~S)XH}XA8NfP*(|dn-Fiv-|^wX E2W$NbCIA2c literal 0 HcmV?d00001 diff --git a/xargs/testsuite/inputs/items.xi b/xargs/testsuite/inputs/items.xi new file mode 100644 index 0000000..163874e --- /dev/null +++ b/xargs/testsuite/inputs/items.xi @@ -0,0 +1,8 @@ + +dumb + s s + f f + r r + t t + v v + \ No newline at end of file diff --git a/xargs/testsuite/inputs/ldata-0.xi b/xargs/testsuite/inputs/ldata-0.xi new file mode 100644 index 0000000000000000000000000000000000000000..eaee504bd7d072622d2b57449c365f3096e2a9f1 GIT binary patch literal 108 xcmZ|G$pHW$2m`Q=(iH&D{TCBKp5`B+D$R_|p +# +# This is because Linux's execve implementation requires that the sum of +# the sizes of all argument string pointers not exceed 128K (the actual +# limit is ARG_MAX - sizeof (void*)). The difference between 32- and +# 64-bit systems is because sizeof (void*) differs (4 vs. 8). +# +# Tue Nov 22 19:36:49 2005: Use 'true' rather than 'echo', otherwise the +# differences in the value of ARG_MAX on various platforms will cause the +# test to fail. +xargs_start p { true } 32767-ys.xi + diff --git a/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp b/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp new file mode 100644 index 0000000..84f2985 --- /dev/null +++ b/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp @@ -0,0 +1,13 @@ +# +# See message from Jim Meyering. <87hdaam57n.fsf_-_@rho.meyering.net> +# +# This is because Linux's execve implementation requires that the sum of +# the sizes of all argument string pointers not exceed 128K (the actual +# limit is ARG_MAX - sizeof (void*)). The difference between 32- and +# 64-bit systems is because sizeof (void*) differs (4 vs. 8). +# +# Tue Nov 22 19:36:49 2005: Use 'true' rather than 'echo', otherwise the +# differences in the value of ARG_MAX on various platforms will cause the +# test to fail. +xargs_start p { true } 16383-ys.xi + diff --git a/xargs/testsuite/xargs.posix/childfail.exp b/xargs/testsuite/xargs.posix/childfail.exp new file mode 100644 index 0000000..d5cdacb --- /dev/null +++ b/xargs/testsuite/xargs.posix/childfail.exp @@ -0,0 +1 @@ +xargs_start 123 { false } files.xi diff --git a/xargs/testsuite/xargs.posix/empty.exp b/xargs/testsuite/xargs.posix/empty.exp new file mode 100644 index 0000000..cfab826 --- /dev/null +++ b/xargs/testsuite/xargs.posix/empty.exp @@ -0,0 +1 @@ +xargs_start p {echo this plus that} diff --git a/xargs/testsuite/xargs.posix/empty.xo b/xargs/testsuite/xargs.posix/empty.xo new file mode 100644 index 0000000..b8e9a02 --- /dev/null +++ b/xargs/testsuite/xargs.posix/empty.xo @@ -0,0 +1 @@ +this plus that diff --git a/xargs/testsuite/xargs.posix/empty_def.exp b/xargs/testsuite/xargs.posix/empty_def.exp new file mode 100644 index 0000000..765c4bb --- /dev/null +++ b/xargs/testsuite/xargs.posix/empty_def.exp @@ -0,0 +1 @@ +xargs_start p {} diff --git a/xargs/testsuite/xargs.posix/empty_def.xo b/xargs/testsuite/xargs.posix/empty_def.xo new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/xargs/testsuite/xargs.posix/empty_def.xo @@ -0,0 +1 @@ + diff --git a/xargs/testsuite/xargs.posix/hithere.exp b/xargs/testsuite/xargs.posix/hithere.exp new file mode 100644 index 0000000..0256d4b --- /dev/null +++ b/xargs/testsuite/xargs.posix/hithere.exp @@ -0,0 +1 @@ +xargs_start p {-s470 echo hi there} files.xi diff --git a/xargs/testsuite/xargs.posix/hithere.xo b/xargs/testsuite/xargs.posix/hithere.xo new file mode 100644 index 0000000..0c6845b --- /dev/null +++ b/xargs/testsuite/xargs.posix/hithere.xo @@ -0,0 +1,2 @@ +hi there /src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in /src/gnu/autoconf-1.11/INSTALL /src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING /src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi /src/gnu/autoconf-1.11/acconfig.h /src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4 /src/gnu/autoconf-1.11/configure +hi there /src/gnu/autoconf-1.11/configure.in /src/gnu/autoconf-1.11/autoheader.sh /src/gnu/autoconf-1.11/mkinstalldirs /src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info /src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi /src/gnu/autoconf-1.11/standards.info /src/gnu/autoconf-1.11/texinfo.tex diff --git a/xargs/testsuite/xargs.posix/n1.exp b/xargs/testsuite/xargs.posix/n1.exp new file mode 100644 index 0000000..40ddc9e --- /dev/null +++ b/xargs/testsuite/xargs.posix/n1.exp @@ -0,0 +1 @@ +xargs_start p {-n1} stairs.xi diff --git a/xargs/testsuite/xargs.posix/n1.xo b/xargs/testsuite/xargs.posix/n1.xo new file mode 100644 index 0000000..c2a8cce --- /dev/null +++ b/xargs/testsuite/xargs.posix/n1.xo @@ -0,0 +1,18 @@ +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 +1 +22 +333 +4444 +55555 +666666 +7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/n2-s26-x.exp b/xargs/testsuite/xargs.posix/n2-s26-x.exp new file mode 100644 index 0000000..fd59c05 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s26-x.exp @@ -0,0 +1 @@ +xargs_start f {-n2 -s26 -x} stairs.xi skip diff --git a/xargs/testsuite/xargs.posix/n2-s26-x.xo b/xargs/testsuite/xargs.posix/n2-s26-x.xo new file mode 100644 index 0000000..7b6db82 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s26-x.xo @@ -0,0 +1,3 @@ +1 22 +333 4444 +55555 666666 diff --git a/xargs/testsuite/xargs.posix/n2-s26.exp b/xargs/testsuite/xargs.posix/n2-s26.exp new file mode 100644 index 0000000..ba76660 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s26.exp @@ -0,0 +1 @@ +xargs_start p {-n2 -s26} stairs.xi diff --git a/xargs/testsuite/xargs.posix/n2-s26.xo b/xargs/testsuite/xargs.posix/n2-s26.xo new file mode 100644 index 0000000..a9e8dfa --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s26.xo @@ -0,0 +1,11 @@ +1 22 +333 4444 +55555 666666 +7777777 +88888888 +999999999 1 +22 333 +4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/n2.exp b/xargs/testsuite/xargs.posix/n2.exp new file mode 100644 index 0000000..6bcbad2 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2.exp @@ -0,0 +1 @@ +xargs_start p {-n2} stairs.xi diff --git a/xargs/testsuite/xargs.posix/n2.xo b/xargs/testsuite/xargs.posix/n2.xo new file mode 100644 index 0000000..33d8177 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2.xo @@ -0,0 +1,9 @@ +1 22 +333 4444 +55555 666666 +7777777 88888888 +999999999 1 +22 333 +4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/n3-s36.exp b/xargs/testsuite/xargs.posix/n3-s36.exp new file mode 100644 index 0000000..00c80e9 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n3-s36.exp @@ -0,0 +1 @@ +xargs_start p {-n3 -s36} stairs2.xi diff --git a/xargs/testsuite/xargs.posix/n3-s36.xo b/xargs/testsuite/xargs.posix/n3-s36.xo new file mode 100644 index 0000000..7484486 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n3-s36.xo @@ -0,0 +1,7 @@ +999999999 88888888 +7777777 666666 55555 +4444 333 22 +1 999999999 88888888 +7777777 666666 55555 +4444 333 22 +1 diff --git a/xargs/testsuite/xargs.posix/n3.exp b/xargs/testsuite/xargs.posix/n3.exp new file mode 100644 index 0000000..472b614 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n3.exp @@ -0,0 +1 @@ +xargs_start p {-n3} files.xi diff --git a/xargs/testsuite/xargs.posix/n3.xo b/xargs/testsuite/xargs.posix/n3.xo new file mode 100644 index 0000000..e663e64 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n3.xo @@ -0,0 +1,8 @@ +/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in +/src/gnu/autoconf-1.11/INSTALL /src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING +/src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi /src/gnu/autoconf-1.11/acconfig.h +/src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4 +/src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in /src/gnu/autoconf-1.11/autoheader.sh +/src/gnu/autoconf-1.11/mkinstalldirs /src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info +/src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi /src/gnu/autoconf-1.11/standards.info +/src/gnu/autoconf-1.11/texinfo.tex diff --git a/xargs/testsuite/xargs.posix/noeof.exp b/xargs/testsuite/xargs.posix/noeof.exp new file mode 100644 index 0000000..ad49437 --- /dev/null +++ b/xargs/testsuite/xargs.posix/noeof.exp @@ -0,0 +1 @@ +xargs_start p {} noeof.xi diff --git a/xargs/testsuite/xargs.posix/noeof.xo b/xargs/testsuite/xargs.posix/noeof.xo new file mode 100644 index 0000000..45f9997 --- /dev/null +++ b/xargs/testsuite/xargs.posix/noeof.xo @@ -0,0 +1 @@ +first second diff --git a/xargs/testsuite/xargs.posix/quotes.exp b/xargs/testsuite/xargs.posix/quotes.exp new file mode 100644 index 0000000..574e1ec --- /dev/null +++ b/xargs/testsuite/xargs.posix/quotes.exp @@ -0,0 +1 @@ +xargs_start p {} quotes.xi diff --git a/xargs/testsuite/xargs.posix/quotes.xo b/xargs/testsuite/xargs.posix/quotes.xo new file mode 100644 index 0000000..9b6477f --- /dev/null +++ b/xargs/testsuite/xargs.posix/quotes.xo @@ -0,0 +1,2 @@ +this is quoted stuff and +an embedded newline with single quotes as well. diff --git a/xargs/testsuite/xargs.posix/rc-123.exp b/xargs/testsuite/xargs.posix/rc-123.exp new file mode 100644 index 0000000..217de0f --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-123.exp @@ -0,0 +1 @@ +xargs_start 123 {-n1 -IARG sh -c ARG} ftt.xi diff --git a/xargs/testsuite/xargs.posix/rc-123.xo b/xargs/testsuite/xargs.posix/rc-123.xo new file mode 100644 index 0000000..1191247 --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-123.xo @@ -0,0 +1,2 @@ +1 +2 diff --git a/xargs/testsuite/xargs.posix/rc-124.exp b/xargs/testsuite/xargs.posix/rc-124.exp new file mode 100644 index 0000000..4fe3aba --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-124.exp @@ -0,0 +1 @@ +xargs_start 124 {-n1 -IARG sh -c ARG} ett.xi skip diff --git a/xargs/testsuite/xargs.posix/rc-125.exp b/xargs/testsuite/xargs.posix/rc-125.exp new file mode 100644 index 0000000..6624880 --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-125.exp @@ -0,0 +1,11 @@ +# +# The technique of using "kill $$" is unreliable. For example, +# on MacOS X, the child just exits with a nonzero status. +# This works better but is harder to use in a DejaGnu test: +# yes | xargs -I{} echo | true +# Part of the problem here of course is that the exit status of the +# pipeline is the exit status of its last compinent. +# +# This problem is recorded as Savannah bug# 19969. +# +xargs_start 125 {-n1 -IARG sh -c ARG} stt.xi skip diff --git a/xargs/testsuite/xargs.posix/rc-126.exp b/xargs/testsuite/xargs.posix/rc-126.exp new file mode 100644 index 0000000..17cb9f4 --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-126.exp @@ -0,0 +1 @@ +xargs_start 126 {/} {} skip diff --git a/xargs/testsuite/xargs.posix/rc-127.exp b/xargs/testsuite/xargs.posix/rc-127.exp new file mode 100644 index 0000000..8e4278a --- /dev/null +++ b/xargs/testsuite/xargs.posix/rc-127.exp @@ -0,0 +1 @@ +xargs_start 127 {./missing} {} skip diff --git a/xargs/testsuite/xargs.posix/s118.exp b/xargs/testsuite/xargs.posix/s118.exp new file mode 100644 index 0000000..1f0fc9f --- /dev/null +++ b/xargs/testsuite/xargs.posix/s118.exp @@ -0,0 +1 @@ +xargs_start p {-s118} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s118.xo b/xargs/testsuite/xargs.posix/s118.xo new file mode 100644 index 0000000..06b617a --- /dev/null +++ b/xargs/testsuite/xargs.posix/s118.xo @@ -0,0 +1 @@ +1 22 333 4444 55555 666666 7777777 88888888 999999999 1 22 333 4444 55555 666666 7777777 88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/s19.exp b/xargs/testsuite/xargs.posix/s19.exp new file mode 100644 index 0000000..86f9337 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s19.exp @@ -0,0 +1 @@ +xargs_start f {-s19} stairs.xi skip diff --git a/xargs/testsuite/xargs.posix/s19.xo b/xargs/testsuite/xargs.posix/s19.xo new file mode 100644 index 0000000..afb3bc3 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s19.xo @@ -0,0 +1,6 @@ +1 22 333 +4444 +55555 +666666 +7777777 +88888888 diff --git a/xargs/testsuite/xargs.posix/s19_2.exp b/xargs/testsuite/xargs.posix/s19_2.exp new file mode 100644 index 0000000..be27aef --- /dev/null +++ b/xargs/testsuite/xargs.posix/s19_2.exp @@ -0,0 +1 @@ +xargs_start f {-s19} stairs2.xi skip diff --git a/xargs/testsuite/xargs.posix/s20.exp b/xargs/testsuite/xargs.posix/s20.exp new file mode 100644 index 0000000..f87d441 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s20.exp @@ -0,0 +1 @@ +xargs_start p {-s20} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s20.xo b/xargs/testsuite/xargs.posix/s20.xo new file mode 100644 index 0000000..7f7032e --- /dev/null +++ b/xargs/testsuite/xargs.posix/s20.xo @@ -0,0 +1,14 @@ +1 22 333 +4444 +55555 +666666 +7777777 +88888888 +999999999 +1 22 333 +4444 +55555 +666666 +7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/s30.exp b/xargs/testsuite/xargs.posix/s30.exp new file mode 100644 index 0000000..9faa71b --- /dev/null +++ b/xargs/testsuite/xargs.posix/s30.exp @@ -0,0 +1 @@ +xargs_start p {-s30} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s30.xo b/xargs/testsuite/xargs.posix/s30.xo new file mode 100644 index 0000000..64ba7cb --- /dev/null +++ b/xargs/testsuite/xargs.posix/s30.xo @@ -0,0 +1,6 @@ +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.posix/s47.exp b/xargs/testsuite/xargs.posix/s47.exp new file mode 100644 index 0000000..8f79b2a --- /dev/null +++ b/xargs/testsuite/xargs.posix/s47.exp @@ -0,0 +1 @@ +xargs_start f {-s47} files.xi skip diff --git a/xargs/testsuite/xargs.posix/s47.xo b/xargs/testsuite/xargs.posix/s47.xo new file mode 100644 index 0000000..26eed8f --- /dev/null +++ b/xargs/testsuite/xargs.posix/s47.xo @@ -0,0 +1,18 @@ +/src/gnu/autoconf-1.11 +/src/gnu/autoconf-1.11/README +/src/gnu/autoconf-1.11/Makefile.in +/src/gnu/autoconf-1.11/INSTALL +/src/gnu/autoconf-1.11/NEWS +/src/gnu/autoconf-1.11/COPYING +/src/gnu/autoconf-1.11/ChangeLog +/src/gnu/autoconf-1.11/autoconf.texi +/src/gnu/autoconf-1.11/acconfig.h +/src/gnu/autoconf-1.11/autoconf.sh +/src/gnu/autoconf-1.11/acgeneral.m4 +/src/gnu/autoconf-1.11/acspecific.m4 +/src/gnu/autoconf-1.11/configure +/src/gnu/autoconf-1.11/configure.in +/src/gnu/autoconf-1.11/autoheader.sh +/src/gnu/autoconf-1.11/mkinstalldirs +/src/gnu/autoconf-1.11/install.sh +/src/gnu/autoconf-1.11/autoconf.info diff --git a/xargs/testsuite/xargs.posix/s470.exp b/xargs/testsuite/xargs.posix/s470.exp new file mode 100644 index 0000000..5828ce6 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s470.exp @@ -0,0 +1 @@ +xargs_start p {-s470} files.xi skip diff --git a/xargs/testsuite/xargs.posix/s470.xo b/xargs/testsuite/xargs.posix/s470.xo new file mode 100644 index 0000000..8107725 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s470.xo @@ -0,0 +1,2 @@ +/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in /src/gnu/autoconf-1.11/INSTALL /src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING /src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi /src/gnu/autoconf-1.11/acconfig.h /src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4 /src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in +/src/gnu/autoconf-1.11/autoheader.sh /src/gnu/autoconf-1.11/mkinstalldirs /src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info /src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi /src/gnu/autoconf-1.11/standards.info /src/gnu/autoconf-1.11/texinfo.tex diff --git a/xargs/testsuite/xargs.posix/s48.exp b/xargs/testsuite/xargs.posix/s48.exp new file mode 100644 index 0000000..506e77b --- /dev/null +++ b/xargs/testsuite/xargs.posix/s48.exp @@ -0,0 +1 @@ +xargs_start p {-s48} files.xi diff --git a/xargs/testsuite/xargs.posix/s48.xo b/xargs/testsuite/xargs.posix/s48.xo new file mode 100644 index 0000000..5590252 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s48.xo @@ -0,0 +1,22 @@ +/src/gnu/autoconf-1.11 +/src/gnu/autoconf-1.11/README +/src/gnu/autoconf-1.11/Makefile.in +/src/gnu/autoconf-1.11/INSTALL +/src/gnu/autoconf-1.11/NEWS +/src/gnu/autoconf-1.11/COPYING +/src/gnu/autoconf-1.11/ChangeLog +/src/gnu/autoconf-1.11/autoconf.texi +/src/gnu/autoconf-1.11/acconfig.h +/src/gnu/autoconf-1.11/autoconf.sh +/src/gnu/autoconf-1.11/acgeneral.m4 +/src/gnu/autoconf-1.11/acspecific.m4 +/src/gnu/autoconf-1.11/configure +/src/gnu/autoconf-1.11/configure.in +/src/gnu/autoconf-1.11/autoheader.sh +/src/gnu/autoconf-1.11/mkinstalldirs +/src/gnu/autoconf-1.11/install.sh +/src/gnu/autoconf-1.11/autoconf.info +/src/gnu/autoconf-1.11/standards.texi +/src/gnu/autoconf-1.11/make-stds.texi +/src/gnu/autoconf-1.11/standards.info +/src/gnu/autoconf-1.11/texinfo.tex diff --git a/xargs/testsuite/xargs.posix/s6.exp b/xargs/testsuite/xargs.posix/s6.exp new file mode 100644 index 0000000..a5a714f --- /dev/null +++ b/xargs/testsuite/xargs.posix/s6.exp @@ -0,0 +1 @@ +xargs_start f {-s6} files.xi skip diff --git a/xargs/testsuite/xargs.posix/savannah-11865.exp b/xargs/testsuite/xargs.posix/savannah-11865.exp new file mode 100644 index 0000000..fa7d41a --- /dev/null +++ b/xargs/testsuite/xargs.posix/savannah-11865.exp @@ -0,0 +1 @@ +xargs_start p {-iARG -s86 echo ARG is xARGx} files.xi diff --git a/xargs/testsuite/xargs.posix/savannah-11865.xo b/xargs/testsuite/xargs.posix/savannah-11865.xo new file mode 100644 index 0000000..f28510b --- /dev/null +++ b/xargs/testsuite/xargs.posix/savannah-11865.xo @@ -0,0 +1,22 @@ +/src/gnu/autoconf-1.11 is x/src/gnu/autoconf-1.11x +/src/gnu/autoconf-1.11/README is x/src/gnu/autoconf-1.11/READMEx +/src/gnu/autoconf-1.11/Makefile.in is x/src/gnu/autoconf-1.11/Makefile.inx +/src/gnu/autoconf-1.11/INSTALL is x/src/gnu/autoconf-1.11/INSTALLx +/src/gnu/autoconf-1.11/NEWS is x/src/gnu/autoconf-1.11/NEWSx +/src/gnu/autoconf-1.11/COPYING is x/src/gnu/autoconf-1.11/COPYINGx +/src/gnu/autoconf-1.11/ChangeLog is x/src/gnu/autoconf-1.11/ChangeLogx +/src/gnu/autoconf-1.11/autoconf.texi is x/src/gnu/autoconf-1.11/autoconf.texix +/src/gnu/autoconf-1.11/acconfig.h is x/src/gnu/autoconf-1.11/acconfig.hx +/src/gnu/autoconf-1.11/autoconf.sh is x/src/gnu/autoconf-1.11/autoconf.shx +/src/gnu/autoconf-1.11/acgeneral.m4 is x/src/gnu/autoconf-1.11/acgeneral.m4x +/src/gnu/autoconf-1.11/acspecific.m4 is x/src/gnu/autoconf-1.11/acspecific.m4x +/src/gnu/autoconf-1.11/configure is x/src/gnu/autoconf-1.11/configurex +/src/gnu/autoconf-1.11/configure.in is x/src/gnu/autoconf-1.11/configure.inx +/src/gnu/autoconf-1.11/autoheader.sh is x/src/gnu/autoconf-1.11/autoheader.shx +/src/gnu/autoconf-1.11/mkinstalldirs is x/src/gnu/autoconf-1.11/mkinstalldirsx +/src/gnu/autoconf-1.11/install.sh is x/src/gnu/autoconf-1.11/install.shx +/src/gnu/autoconf-1.11/autoconf.info is x/src/gnu/autoconf-1.11/autoconf.infox +/src/gnu/autoconf-1.11/standards.texi is x/src/gnu/autoconf-1.11/standards.texix +/src/gnu/autoconf-1.11/make-stds.texi is x/src/gnu/autoconf-1.11/make-stds.texix +/src/gnu/autoconf-1.11/standards.info is x/src/gnu/autoconf-1.11/standards.infox +/src/gnu/autoconf-1.11/texinfo.tex is x/src/gnu/autoconf-1.11/texinfo.texx diff --git a/xargs/testsuite/xargs.posix/space-I.exp b/xargs/testsuite/xargs.posix/space-I.exp new file mode 100644 index 0000000..69eb0b7 --- /dev/null +++ b/xargs/testsuite/xargs.posix/space-I.exp @@ -0,0 +1 @@ +xargs_start p {-IARG echo from ARG to xARGy} space.xi diff --git a/xargs/testsuite/xargs.posix/space.exp b/xargs/testsuite/xargs.posix/space.exp new file mode 100644 index 0000000..3ba833b --- /dev/null +++ b/xargs/testsuite/xargs.posix/space.exp @@ -0,0 +1 @@ +xargs_start p {echo this plus that} space.xi diff --git a/xargs/testsuite/xargs.posix/space.xo b/xargs/testsuite/xargs.posix/space.xo new file mode 100644 index 0000000..b8e9a02 --- /dev/null +++ b/xargs/testsuite/xargs.posix/space.xo @@ -0,0 +1 @@ +this plus that diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714.exp b/xargs/testsuite/xargs.posix/sv-bug-18714.exp new file mode 100644 index 0000000..b40e105 --- /dev/null +++ b/xargs/testsuite/xargs.posix/sv-bug-18714.exp @@ -0,0 +1,10 @@ +# Form feed is not a separator. +# +# POSIX specifies that is the serarator +# in the POSIX locale, and is defined +# as or . +# +# On the other hand, includes Form Feed and +# Vertical Tab. By default, those should not be +# separators. +xargs_start p {printf "\[%s\]\n"} formfeeds.xi diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714.xo b/xargs/testsuite/xargs.posix/sv-bug-18714.xo new file mode 100644 index 0000000..5ec9a95 --- /dev/null +++ b/xargs/testsuite/xargs.posix/sv-bug-18714.xo @@ -0,0 +1,2 @@ +[1 2 3 4] +[a b c d] diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714b.exp b/xargs/testsuite/xargs.posix/sv-bug-18714b.exp new file mode 100644 index 0000000..f110daf --- /dev/null +++ b/xargs/testsuite/xargs.posix/sv-bug-18714b.exp @@ -0,0 +1,10 @@ +# Vertical tab is not a separator. +# +# POSIX specifies that is the serarator +# in the POSIX locale, and is defined +# as or . +# +# On the other hand, includes Form Feed and +# Vertical Tab. By default, those should not be +# separators. +xargs_start p {printf "\[%s\]\n"} verticaltabs.xi diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714b.xo b/xargs/testsuite/xargs.posix/sv-bug-18714b.xo new file mode 100644 index 0000000..ec33986 --- /dev/null +++ b/xargs/testsuite/xargs.posix/sv-bug-18714b.xo @@ -0,0 +1,2 @@ +[q w e r] +[6 7 8 9] diff --git a/xargs/testsuite/xargs.posix/uc_L2.exp b/xargs/testsuite/xargs.posix/uc_L2.exp new file mode 100644 index 0000000..8ad3dd7 --- /dev/null +++ b/xargs/testsuite/xargs.posix/uc_L2.exp @@ -0,0 +1 @@ +xargs_start p {-L2} ldata.xi diff --git a/xargs/testsuite/xargs.posix/uc_L2.xo b/xargs/testsuite/xargs.posix/uc_L2.xo new file mode 100644 index 0000000..7234702 --- /dev/null +++ b/xargs/testsuite/xargs.posix/uc_L2.xo @@ -0,0 +1,5 @@ +1 22 333 4444 55555 666666 +7777777 88888888 +999999999 1 22 333 4444 55555 +666666 7777777 88888888 +999999999 diff --git a/xargs/testsuite/xargs.posix/unmatched-n2-x.exp b/xargs/testsuite/xargs.posix/unmatched-n2-x.exp new file mode 100644 index 0000000..720b48f --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched-n2-x.exp @@ -0,0 +1 @@ +xargs_start f {-n2 -x} unmatched.xi skip diff --git a/xargs/testsuite/xargs.posix/unmatched.exp b/xargs/testsuite/xargs.posix/unmatched.exp new file mode 100644 index 0000000..a98c920 --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched.exp @@ -0,0 +1 @@ +xargs_start f {} unmatched.xi skip diff --git a/xargs/testsuite/xargs.posix/unmatched.xo b/xargs/testsuite/xargs.posix/unmatched.xo new file mode 100644 index 0000000..5626abf --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched.xo @@ -0,0 +1 @@ +one diff --git a/xargs/testsuite/xargs.posix/unmatched2.exp b/xargs/testsuite/xargs.posix/unmatched2.exp new file mode 100644 index 0000000..12b17f3 --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched2.exp @@ -0,0 +1 @@ +xargs_start f {} unmatched2.xi skip diff --git a/xargs/testsuite/xargs.posix/unmatched2.xo b/xargs/testsuite/xargs.posix/unmatched2.xo new file mode 100644 index 0000000..5626abf --- /dev/null +++ b/xargs/testsuite/xargs.posix/unmatched2.xo @@ -0,0 +1 @@ +one diff --git a/xargs/testsuite/xargs.sysv/e.exp b/xargs/testsuite/xargs.sysv/e.exp new file mode 100644 index 0000000..86c3af1 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/e.exp @@ -0,0 +1 @@ +xargs_start p {-e} eof_.xi diff --git a/xargs/testsuite/xargs.sysv/e.xo b/xargs/testsuite/xargs.sysv/e.xo new file mode 100644 index 0000000..28a9314 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/e.xo @@ -0,0 +1 @@ +one two _ three four diff --git a/xargs/testsuite/xargs.sysv/eEOF.exp b/xargs/testsuite/xargs.sysv/eEOF.exp new file mode 100644 index 0000000..8ac68aa --- /dev/null +++ b/xargs/testsuite/xargs.sysv/eEOF.exp @@ -0,0 +1 @@ +xargs_start p {-eEOF} eofstr.xi diff --git a/xargs/testsuite/xargs.sysv/eEOF.xo b/xargs/testsuite/xargs.sysv/eEOF.xo new file mode 100644 index 0000000..7f4c1cd --- /dev/null +++ b/xargs/testsuite/xargs.sysv/eEOF.xo @@ -0,0 +1 @@ +firstline secondline diff --git a/xargs/testsuite/xargs.sysv/empty-t.exp b/xargs/testsuite/xargs.sysv/empty-t.exp new file mode 100644 index 0000000..8047015 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty-t.exp @@ -0,0 +1 @@ +xargs_start p {-t echo this plus that} diff --git a/xargs/testsuite/xargs.sysv/empty-t.xe b/xargs/testsuite/xargs.sysv/empty-t.xe new file mode 100644 index 0000000..ec9c43d --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty-t.xe @@ -0,0 +1 @@ +echo this plus that diff --git a/xargs/testsuite/xargs.sysv/empty-t.xo b/xargs/testsuite/xargs.sysv/empty-t.xo new file mode 100644 index 0000000..b8e9a02 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty-t.xo @@ -0,0 +1 @@ +this plus that diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.exp b/xargs/testsuite/xargs.sysv/empty_def-t.exp new file mode 100644 index 0000000..2f1e9b9 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty_def-t.exp @@ -0,0 +1 @@ +xargs_start p {-t} diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.xe b/xargs/testsuite/xargs.sysv/empty_def-t.xe new file mode 100644 index 0000000..da4ae85 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty_def-t.xe @@ -0,0 +1 @@ +/bin/echo diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.xo b/xargs/testsuite/xargs.sysv/empty_def-t.xo new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/empty_def-t.xo @@ -0,0 +1 @@ + diff --git a/xargs/testsuite/xargs.sysv/eof1.exp b/xargs/testsuite/xargs.sysv/eof1.exp new file mode 100644 index 0000000..ca178e8 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/eof1.exp @@ -0,0 +1 @@ +xargs_start p {-E_} eof1.xi diff --git a/xargs/testsuite/xargs.sysv/eof1.xo b/xargs/testsuite/xargs.sysv/eof1.xo new file mode 100644 index 0000000..7f4c1cd --- /dev/null +++ b/xargs/testsuite/xargs.sysv/eof1.xo @@ -0,0 +1 @@ +firstline secondline diff --git a/xargs/testsuite/xargs.sysv/iARG.exp b/xargs/testsuite/xargs.sysv/iARG.exp new file mode 100644 index 0000000..2e2ec75 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/iARG.exp @@ -0,0 +1 @@ +xargs_start p {-iARG echo ARG is xARGx} files.xi diff --git a/xargs/testsuite/xargs.sysv/iARG.xo b/xargs/testsuite/xargs.sysv/iARG.xo new file mode 100644 index 0000000..f28510b --- /dev/null +++ b/xargs/testsuite/xargs.sysv/iARG.xo @@ -0,0 +1,22 @@ +/src/gnu/autoconf-1.11 is x/src/gnu/autoconf-1.11x +/src/gnu/autoconf-1.11/README is x/src/gnu/autoconf-1.11/READMEx +/src/gnu/autoconf-1.11/Makefile.in is x/src/gnu/autoconf-1.11/Makefile.inx +/src/gnu/autoconf-1.11/INSTALL is x/src/gnu/autoconf-1.11/INSTALLx +/src/gnu/autoconf-1.11/NEWS is x/src/gnu/autoconf-1.11/NEWSx +/src/gnu/autoconf-1.11/COPYING is x/src/gnu/autoconf-1.11/COPYINGx +/src/gnu/autoconf-1.11/ChangeLog is x/src/gnu/autoconf-1.11/ChangeLogx +/src/gnu/autoconf-1.11/autoconf.texi is x/src/gnu/autoconf-1.11/autoconf.texix +/src/gnu/autoconf-1.11/acconfig.h is x/src/gnu/autoconf-1.11/acconfig.hx +/src/gnu/autoconf-1.11/autoconf.sh is x/src/gnu/autoconf-1.11/autoconf.shx +/src/gnu/autoconf-1.11/acgeneral.m4 is x/src/gnu/autoconf-1.11/acgeneral.m4x +/src/gnu/autoconf-1.11/acspecific.m4 is x/src/gnu/autoconf-1.11/acspecific.m4x +/src/gnu/autoconf-1.11/configure is x/src/gnu/autoconf-1.11/configurex +/src/gnu/autoconf-1.11/configure.in is x/src/gnu/autoconf-1.11/configure.inx +/src/gnu/autoconf-1.11/autoheader.sh is x/src/gnu/autoconf-1.11/autoheader.shx +/src/gnu/autoconf-1.11/mkinstalldirs is x/src/gnu/autoconf-1.11/mkinstalldirsx +/src/gnu/autoconf-1.11/install.sh is x/src/gnu/autoconf-1.11/install.shx +/src/gnu/autoconf-1.11/autoconf.info is x/src/gnu/autoconf-1.11/autoconf.infox +/src/gnu/autoconf-1.11/standards.texi is x/src/gnu/autoconf-1.11/standards.texix +/src/gnu/autoconf-1.11/make-stds.texi is x/src/gnu/autoconf-1.11/make-stds.texix +/src/gnu/autoconf-1.11/standards.info is x/src/gnu/autoconf-1.11/standards.infox +/src/gnu/autoconf-1.11/texinfo.tex is x/src/gnu/autoconf-1.11/texinfo.texx diff --git a/xargs/testsuite/xargs.sysv/idef-s26.exp b/xargs/testsuite/xargs.sysv/idef-s26.exp new file mode 100644 index 0000000..348661b --- /dev/null +++ b/xargs/testsuite/xargs.sysv/idef-s26.exp @@ -0,0 +1 @@ +xargs_start f {-i -s26 echo from \{\} to x{}y} items.xi skip diff --git a/xargs/testsuite/xargs.sysv/idef-s26.xo b/xargs/testsuite/xargs.sysv/idef-s26.xo new file mode 100644 index 0000000..94f1e34 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/idef-s26.xo @@ -0,0 +1 @@ +from dumb to xdumby diff --git a/xargs/testsuite/xargs.sysv/idef.exp b/xargs/testsuite/xargs.sysv/idef.exp new file mode 100644 index 0000000..78049fa --- /dev/null +++ b/xargs/testsuite/xargs.sysv/idef.exp @@ -0,0 +1 @@ +xargs_start p {-i echo from \{\} to x{}y} items.xi diff --git a/xargs/testsuite/xargs.sysv/idef.xo b/xargs/testsuite/xargs.sysv/idef.xo new file mode 100644 index 0000000..a78e799 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/idef.xo @@ -0,0 +1,6 @@ +from dumb to xdumby +from s s to xs s y +from f f to xf f y +from r r to xr r y +from t t to xt t y +from v v to xv v y diff --git a/xargs/testsuite/xargs.sysv/iquotes.exp b/xargs/testsuite/xargs.sysv/iquotes.exp new file mode 100644 index 0000000..43b8877 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/iquotes.exp @@ -0,0 +1 @@ +xargs_start p {-i__ echo FIRST __ IS OK} quotes.xi diff --git a/xargs/testsuite/xargs.sysv/iquotes.xo b/xargs/testsuite/xargs.sysv/iquotes.xo new file mode 100644 index 0000000..10ce85c --- /dev/null +++ b/xargs/testsuite/xargs.sysv/iquotes.xo @@ -0,0 +1,5 @@ +FIRST this is IS OK +FIRST quoted stuff IS OK +FIRST and +an embedded newline IS OK +FIRST with single quotes as well. IS OK diff --git a/xargs/testsuite/xargs.sysv/l1.exp b/xargs/testsuite/xargs.sysv/l1.exp new file mode 100644 index 0000000..5dbec2a --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1.exp @@ -0,0 +1 @@ +xargs_start p {-l} ldata.xi diff --git a/xargs/testsuite/xargs.sysv/l1.xo b/xargs/testsuite/xargs.sysv/l1.xo new file mode 100644 index 0000000..b654880 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1.xo @@ -0,0 +1,9 @@ +1 22 333 4444 +55555 666666 +7777777 +88888888 +999999999 1 22 +333 4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.sysv/l1_2.exp b/xargs/testsuite/xargs.sysv/l1_2.exp new file mode 100644 index 0000000..ffb6ad6 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1_2.exp @@ -0,0 +1 @@ +xargs_start p {-l} ldatab.xi diff --git a/xargs/testsuite/xargs.sysv/l1_2.xo b/xargs/testsuite/xargs.sysv/l1_2.xo new file mode 100644 index 0000000..f9dc665 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1_2.xo @@ -0,0 +1,6 @@ +1 22 333 4444 55555 666666 +7777777 88888888 999999999 1 22 +333 4444 55555 +666666 7777777 +88888888 +999999999 diff --git a/xargs/testsuite/xargs.sysv/l1n4.exp b/xargs/testsuite/xargs.sysv/l1n4.exp new file mode 100644 index 0000000..4eef466 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1n4.exp @@ -0,0 +1 @@ +xargs_start p {-l1 -n4} files.xi diff --git a/xargs/testsuite/xargs.sysv/l1n4.xo b/xargs/testsuite/xargs.sysv/l1n4.xo new file mode 100644 index 0000000..03f29b5 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/l1n4.xo @@ -0,0 +1,6 @@ +/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README /src/gnu/autoconf-1.11/Makefile.in /src/gnu/autoconf-1.11/INSTALL +/src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING /src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi +/src/gnu/autoconf-1.11/acconfig.h /src/gnu/autoconf-1.11/autoconf.sh /src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4 +/src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in /src/gnu/autoconf-1.11/autoheader.sh /src/gnu/autoconf-1.11/mkinstalldirs +/src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info /src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi +/src/gnu/autoconf-1.11/standards.info /src/gnu/autoconf-1.11/texinfo.tex diff --git a/xargs/testsuite/xargs.sysv/lc_l2.exp b/xargs/testsuite/xargs.sysv/lc_l2.exp new file mode 100644 index 0000000..c50b16c --- /dev/null +++ b/xargs/testsuite/xargs.sysv/lc_l2.exp @@ -0,0 +1 @@ +xargs_start p {-l2} files.xi diff --git a/xargs/testsuite/xargs.sysv/lc_l2.xo b/xargs/testsuite/xargs.sysv/lc_l2.xo new file mode 100644 index 0000000..0fa9424 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/lc_l2.xo @@ -0,0 +1,11 @@ +/src/gnu/autoconf-1.11 /src/gnu/autoconf-1.11/README +/src/gnu/autoconf-1.11/Makefile.in /src/gnu/autoconf-1.11/INSTALL +/src/gnu/autoconf-1.11/NEWS /src/gnu/autoconf-1.11/COPYING +/src/gnu/autoconf-1.11/ChangeLog /src/gnu/autoconf-1.11/autoconf.texi +/src/gnu/autoconf-1.11/acconfig.h /src/gnu/autoconf-1.11/autoconf.sh +/src/gnu/autoconf-1.11/acgeneral.m4 /src/gnu/autoconf-1.11/acspecific.m4 +/src/gnu/autoconf-1.11/configure /src/gnu/autoconf-1.11/configure.in +/src/gnu/autoconf-1.11/autoheader.sh /src/gnu/autoconf-1.11/mkinstalldirs +/src/gnu/autoconf-1.11/install.sh /src/gnu/autoconf-1.11/autoconf.info +/src/gnu/autoconf-1.11/standards.texi /src/gnu/autoconf-1.11/make-stds.texi +/src/gnu/autoconf-1.11/standards.info /src/gnu/autoconf-1.11/texinfo.tex diff --git a/xargs/testsuite/xargs.sysv/s30-t.exp b/xargs/testsuite/xargs.sysv/s30-t.exp new file mode 100644 index 0000000..4145c8d --- /dev/null +++ b/xargs/testsuite/xargs.sysv/s30-t.exp @@ -0,0 +1 @@ +xargs_start p {-s30 -t} stairs.xi diff --git a/xargs/testsuite/xargs.sysv/s30-t.xe b/xargs/testsuite/xargs.sysv/s30-t.xe new file mode 100644 index 0000000..f91bf78 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/s30-t.xe @@ -0,0 +1,6 @@ +/bin/echo 1 22 333 4444 55555 +/bin/echo 666666 7777777 +/bin/echo 88888888 999999999 +/bin/echo 1 22 333 4444 55555 +/bin/echo 666666 7777777 +/bin/echo 88888888 999999999 diff --git a/xargs/testsuite/xargs.sysv/s30-t.xo b/xargs/testsuite/xargs.sysv/s30-t.xo new file mode 100644 index 0000000..64ba7cb --- /dev/null +++ b/xargs/testsuite/xargs.sysv/s30-t.xo @@ -0,0 +1,6 @@ +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 +1 22 333 4444 55555 +666666 7777777 +88888888 999999999 diff --git a/xargs/testsuite/xargs.sysv/space-t.exp b/xargs/testsuite/xargs.sysv/space-t.exp new file mode 100644 index 0000000..1d9c857 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/space-t.exp @@ -0,0 +1 @@ +xargs_start p {-t echo this plus that} space.xi diff --git a/xargs/testsuite/xargs.sysv/space-t.xe b/xargs/testsuite/xargs.sysv/space-t.xe new file mode 100644 index 0000000..ec9c43d --- /dev/null +++ b/xargs/testsuite/xargs.sysv/space-t.xe @@ -0,0 +1 @@ +echo this plus that diff --git a/xargs/testsuite/xargs.sysv/space-t.xo b/xargs/testsuite/xargs.sysv/space-t.xo new file mode 100644 index 0000000..b8e9a02 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/space-t.xo @@ -0,0 +1 @@ +this plus that diff --git a/xargs/testsuite/xargs.sysv/sv-bug-18713.exp b/xargs/testsuite/xargs.sysv/sv-bug-18713.exp new file mode 100644 index 0000000..036d092 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/sv-bug-18713.exp @@ -0,0 +1 @@ +xargs_start p {-n1 printf "@%s@\n"} empty.xi diff --git a/xargs/testsuite/xargs.sysv/sv-bug-18713.xo b/xargs/testsuite/xargs.sysv/sv-bug-18713.xo new file mode 100644 index 0000000..9225e36 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/sv-bug-18713.xo @@ -0,0 +1,7 @@ +@foo@ +@@ +@bar@ +@baz@ +@@ +@@ +@fnord@ diff --git a/xargs/testsuite/xargs.sysv/trace.exp b/xargs/testsuite/xargs.sysv/trace.exp new file mode 100644 index 0000000..c8364ff --- /dev/null +++ b/xargs/testsuite/xargs.sysv/trace.exp @@ -0,0 +1 @@ +xargs_start p {-n2 -t echo } foobar.xi diff --git a/xargs/testsuite/xargs.sysv/trace.xe b/xargs/testsuite/xargs.sysv/trace.xe new file mode 100644 index 0000000..dfbe22e --- /dev/null +++ b/xargs/testsuite/xargs.sysv/trace.xe @@ -0,0 +1,2 @@ +echo foo bar +echo baz ugh diff --git a/xargs/testsuite/xargs.sysv/trace.xo b/xargs/testsuite/xargs.sysv/trace.xo new file mode 100644 index 0000000..171b5a3 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/trace.xo @@ -0,0 +1,2 @@ +foo bar +baz ugh diff --git a/xargs/xargs.1 b/xargs/xargs.1 new file mode 100644 index 0000000..71373d7 --- /dev/null +++ b/xargs/xargs.1 @@ -0,0 +1,296 @@ +.TH XARGS 1 \" -*- nroff -*- +.SH NAME +xargs \- build and execute command lines from standard input +.SH SYNOPSIS +.B xargs +[\-0prtx] [\-E eof-str] [\-e[eof-str]] [\-\-eof[=eof-str]] [\-\-null] +[\-d delimiter] [\-\-delimiter delimiter] +[\-I replace-str] [\-i[replace-str]] [\-\-replace[=replace-str]] +[\-l[max-lines]] [\-L max-lines] [\-\-max\-lines[=max-lines]] [\-n max-args] [\-\-max\-args=max-args] +[\-s max-chars] [\-\-max\-chars=max-chars] [\-P max-procs] [\-\-max\-procs=max-procs] +[\-\-interactive] [\-\-verbose] [\-\-exit] [\-\-no\-run\-if\-empty] +[\-\-arg\-file=file] [\-\-show\-limits] [\-\-version] [\-\-help] +[command [initial-arguments]] +.SH DESCRIPTION +This manual page +documents the GNU version of +.BR xargs . +.B xargs +reads items from the standard input, delimited by blanks (which can be +protected with double or single quotes or a backslash) or newlines, +and executes the +.I command +(default is /bin/echo) one or more times with any +.I initial-arguments +followed by items read from standard input. Blank lines on the +standard input are ignored. +.P +Because Unix filenames can contain blanks and newlines, this default +behaviour is often problematic; filenames containing blanks +and/or newlines are incorrectly processed by +.BR xargs . +In these situations it is better to use the `\-0' option, which +prevents such problems. When using this option you will need to +ensure that the program which produces the input for +.B xargs +also uses a null character as a separator. If that program is +GNU +.B find +for example, the `\-print0' option does this for you. +.P +If any invocation of the command exits with a status of 255, +.B xargs +will stop immediately without reading any further input. An error +message is issued on stderr when this happens. +.SS OPTIONS +.TP +.I "\-\-arg\-file=file, \-a file" +Read items from +.I file +instead of standard input. If you use this option, stdin remains +unchanged when commands are run. Otherwise, stdin is redirected +from +.IR /dev/null . + +.TP +.I "\-\-null, \-0" +Input items are terminated by a null character instead of by +whitespace, and the quotes and backslash are not special (every +character is taken literally). Disables the end of file string, which +is treated like any other argument. Useful when input items might +contain white space, quote marks, or backslashes. The GNU find +\-print0 option produces input suitable for this mode. +.TP +.I "\-\-delimiter=delim, \-d delim" +Input items are terminated by the specified character. Quotes and +backslash are not special; every character in the input is taken +literally. Disables the end-of-file string, which is treated like any +other argument. This can be used when the input consists of simply +newline-separated items, although it is almost always better to design +your program to use `\-\-null' where this is possible. The specified +delimiter may be a single character, a C-style character escape such +as +.BR \en , +or an octal or hexadecimal escape code. Octal and hexadecimal +escape codes are understood as for the +.B printf +command. Multibyte characters are not supported. + +.TP +.I "\-Eeof-str" +Set the end of file string to \fIeof-str\fR. If the end of file +string occurs as a line of input, the rest of the input is ignored. +If neither \-E nor \-e is used, no end of file string is used. +.TP +.I "\-\-eof[=eof-str], \-e[eof-str]" +This option is a synonym for the `\-E' option. Use `\-E' instead, +because it is POSIX compliant while this option is not. If +\fIeof-str\fR is omitted, there is no end of file string. If neither +\-E nor \-e is used, no end of file string is used. +.TP +.I "\-\-help" +Print a summary of the options to +.B xargs +and exit. +.TP +.I "\-I replace-str" +Replace occurrences of \fIreplace-str\fR in the initial-arguments with +names read from standard input. Also, unquoted blanks do not +terminate input items; instead the separator is the newline character. +Implies \fI\-x\fP and \fI\-L 1\fP. +.TP +.I "\-\-replace[=replace-str], \-i[replace-str]" +This option is a synonym for \-I\fIreplace-str\fR if \fIreplace-str\fR +is specified, and for \-I{} otherwise. This option is deprecated; use +\-I instead. +.TP +.I "\-L max-lines" +Use at most \fImax-lines\fR nonblank input lines per command line. +Trailing blanks cause an input line to be logically continued on the +next input line. Implies \fI\-x\fR. +.TP +.I "\-\-max-lines[=max-lines], \-l[max-lines]" +Synonym for the \-L option. Unlike \-L, the \fImax-lines\fR argument +is optional. If \fImax-args\fR is not specified, it defaults to one. +The \-l option is deprecated since the POSIX standard specifies \-L +instead. +.TP +.I "\-\-max\-args=max-args, \-n max-args" +Use at most \fImax-args\fR arguments per command line. Fewer than +\fImax-args\fR arguments will be used if the size (see the \-s option) +is exceeded, unless the \-x option is given, in which case \fBxargs\fR +will exit. +.TP +.I "\-\-interactive, \-p" +Prompt the user about whether to run each command line and read a line +from the terminal. Only run the command line if the response starts +with `y' or `Y'. Implies \fI\-t\fR. +.TP +.I "\-\-no\-run\-if\-empty, \-r" +If the standard input does not contain any nonblanks, do not run the +command. Normally, the command is run once even if there is no input. +This option is a GNU extension. +.TP +.I "\-\-max\-chars=max-chars, \-s max-chars" +Use at most \fImax-chars\fR characters per command line, including the +command and initial-arguments and the terminating nulls at the ends of +the argument strings. The largest allowed value is system-dependent, +and is calculated as the argument length limit for exec, less the size +of your environment, less 2048 bytes of headroom. If this value is +more than 128KiB, 128Kib is used as the default value; otherwise, the +default value is the maximum. +.TP +.I "\-\-verbose, \-t" +Print the command line on the standard error output before executing +it. +.TP +.I "\-\-version" +Print the version number of +.B xargs +and exit. +.TP +.I "\-\-show\\-limits" +Display the limits on the command-line length which are imposed by the +operating system, +.BR xargs ' +choice of buffer size and the +.I \-s +option. Pipe the input from +.B /dev/null +(and perhaps specify +.BR --no-run-if-empty ) +if you don't want +.B xargs +to do anything. +.TP +.I "\-\-exit, \-x" +Exit if the size (see the \fI\-s\fR option) is exceeded. +.TP +.I "\-\-max\-procs=max-procs, \-P max-procs" +Run up to \fImax-procs\fR processes at a time; the default is 1. If +\fImax-procs\fR is 0, \fBxargs\fR will run as many processes as +possible at a time. Use the \fI\-n\fR option with \fI\-P\fR; +otherwise chances are that only one exec will be done. +.SH "EXAMPLES" +.nf +.B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f + +.fi +Find files named +.B core +in or below the directory +.B /tmp +and delete them. Note that this will work incorrectly if there are +any filenames containing newlines or spaces. +.P +.B find /tmp \-name core \-type f \-print0 | xargs \-0 /bin/rm \-f + +.fi +Find files named +.B core +in or below the directory +.B /tmp +and delete them, processing filenames in such a way that file or +directory names containing spaces or newlines are correctly handled. +.P +.nf +.B cut \-d: \-f1 < /etc/passwd | sort | xargs echo + +.fi +Generates a compact listing of all the users on the system. +.SH "EXIT STATUS" +.B xargs +exits with the following status: +.nf +0 if it succeeds +123 if any invocation of the command exited with status 1-125 +124 if the command exited with status 255 +125 if the command is killed by a signal +126 if the command cannot be run +127 if the command is not found +1 if some other error occurred. +.fi +.P +Exit codes greater than 128 are used by the shell to indicate that +a program died due to a fatal signal. +.SH "STANDARDS CONFORMANCE" +As of GNU xargs version 4.2.9, the default behaviour of +.B xargs +is not to have a logical end-of-file marker. POSIX (IEEE Std 1003.1, +2004 Edition) allows this. +.P +The \-l and \-i options appear in the 1997 version of the POSIX +standard, but do not appear in the 2004 version of the standard. +Therefore you should use \-L and \-I instead, respectively. +.P +The POSIX stadard allows implementations to have a limit on the size +of arguments to the +.B exec +functions. This limit could be as low as 4096 bytes including the size of the +environment. For scripts to be portable, they must not rely on a +larger value. However, I know of no implementation whose actual limit +is that small. The +.B \-\-show\-limits +option can be used to discover the actual limits in force on the +current system. + + +.SH "SEE ALSO" +\fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), +\fBFinding Files\fP (on-line in Info, or printed) +.SH "BUGS" +The \-L option is incompatible with the \-I option, but perhaps should not be. +.P +It is not possible for +.B xargs +to be used securely, since there will always be a time gap between the +production of the list of input files and their use in the commands +that +.B xargs +issues. If other users have access to the system, they can manipulate +the filesystem during this time window to force the action of the +commands +.B xargs +runs to apply to files that you didn't intend. For a more detailed +discussion of this and related problems, please refer to the +``Security Considerations'' chapter in the findutils Texinfo +documentation. The \-execdir option of +.B find +can often be used as a more secure alternative. + +When you use the \-I option, each line read from the input is buffered +internally. This means that there is an upper limit on the length +of input line that +.B xargs +will accept when used with the \-I option. To work around this +limitation, you can use the \-s option to increase the amount of +buffer space that +.B xargs +uses, and you can also use an extra invocation of +.B xargs +to ensure that very long lines do not occur. +For example: +.P +.B somecommand | xargs \-s 50000 echo | xargs \-I '{}' \-s 100000 rm '{}' +.P +Here, the first invocation of +.B xargs +has no input line length limit +because it doesn't use the \-i option. The second invocation of +.B xargs +does have such a limit, but we have ensured that the it never encounters +a line which is longer than it can handle. This is not an ideal +solution. Instead, the \-i option should not impose a line length +limit, which is why this discussion appears in the BUGS section. +The problem doesn't occur with the output of +.BR find (1) +because it emits just one filename per line. +.P +The best way to report a bug is to use the form at +http://savannah.gnu.org/bugs/?group=findutils. +The reason for this is that you will then be able to track progress in +fixing the problem. Other comments about \fBxargs\fP(1) and about +the findutils package in general can be sent to the +.I bug\-findutils +mailing list. To join the list, send email to +.IR bug\-findutils\-request@gnu.org . diff --git a/xargs/xargs.c b/xargs/xargs.c new file mode 100644 index 0000000..c6b016f --- /dev/null +++ b/xargs/xargs.c @@ -0,0 +1,1318 @@ +/* xargs -- build and execute command lines from standard input + Copyright (C) 1990, 91, 92, 93, 94, 2000, 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 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. +*/ + +/* Written by Mike Rendell + and David MacKenzie . + Modifications by + James Youngman + Dmitry V. Levin +*/ + +#include + +# ifndef PARAMS +# if defined PROTOTYPES || (defined __STDC__ && __STDC__) +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +# endif + +#include + +#if !defined (isascii) || defined (STDC_HEADERS) +#ifdef isascii +#undef isascii +#endif +#define isascii(c) 1 +#endif + +#ifdef isblank +#define ISBLANK(c) (isascii (c) && isblank (c)) +#else +#define ISBLANK(c) ((c) == ' ' || (c) == '\t') +#endif + +#define ISSPACE(c) (ISBLANK (c) || (c) == '\n' || (c) == '\r' \ + || (c) == '\f' || (c) == '\v') + +#include +#include +#include +#include +#include + +#if defined(STDC_HEADERS) +#include +#endif + +#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) +#include +#if !defined(STDC_HEADERS) +#include +#endif +#else +#include +#define memcpy(dest, source, count) (bcopy((source), (dest), (count))) +#endif + +#ifndef _POSIX_SOURCE +#include +#endif + +#ifdef HAVE_LIMITS_H +#include +#endif + +#ifndef LONG_MAX +#define LONG_MAX (~(1 << (sizeof (long) * 8 - 1))) +#endif + +/* The presence of unistd.h is assumed by gnulib these days, so we + * might as well assume it too. + */ +#include + +#include + +#if !defined(SIGCHLD) && defined(SIGCLD) +#define SIGCHLD SIGCLD +#endif + +#include "wait.h" +#include "quotearg.h" + + +#ifdef STDC_HEADERS +#include +#else +extern int errno; +#endif + +#ifdef HAVE_LOCALE_H +#include +#endif +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + +#include "buildcmd.h" + + +/* Return nonzero if S is the EOF string. */ +#define EOF_STR(s) (eof_str && *eof_str == *s && !strcmp (eof_str, s)) + +/* Do multibyte processing if multibyte characters are supported, + unless multibyte sequences are search safe. Multibyte sequences + are search safe if searching for a substring using the byte + comparison function 'strstr' gives no false positives. All 8-bit + encodings and the UTF-8 multibyte encoding are search safe, but + the EUC encodings are not. + BeOS uses the UTF-8 encoding exclusively, so it is search safe. */ +#if defined __BEOS__ +# define MULTIBYTE_IS_SEARCH_SAFE 1 +#endif +#define DO_MULTIBYTE (HAVE_MBLEN && ! MULTIBYTE_IS_SEARCH_SAFE) + +#if DO_MULTIBYTE +# if HAVE_MBRLEN +# include +# else + /* Simulate mbrlen with mblen as best we can. */ +# define mbstate_t int +# define mbrlen(s, n, ps) mblen (s, n) +# endif +#endif + +/* Not char because of type promotion; NeXT gcc can't handle it. */ +typedef int boolean; +#define true 1 +#define false 0 + +#if __STDC__ +#define VOID void +#else +#define VOID char +#endif + +#include +#include "closeout.h" +#include "gnulib-version.h" + +void error PARAMS ((int status, int errnum, char *message,...)); + +extern char *version_string; + +/* The name this program was run with. */ +char *program_name; + +static FILE *input_stream; + +/* Buffer for reading arguments from input. */ +static char *linebuf; + +static int keep_stdin = 0; + +/* Line number in stdin since the last command was executed. */ +static int lineno = 0; + +static struct buildcmd_state bc_state; +static struct buildcmd_control bc_ctl; + +/* Did we already complain about NUL characters in the input? */ +static int nullwarning_given = 0; + + +/* If nonzero, when this string is read on stdin it is treated as + end of file. + IEEE Std 1003.1, 2004 Edition allows this to be NULL. + In findutils releases up to and including 4.2.8, this was "_". +*/ +static char *eof_str = NULL; + +/* Number of chars in the initial args. */ +/* static int initial_argv_chars = 0; */ + +/* true when building up initial arguments in `cmd_argv'. */ +static boolean initial_args = true; + +/* If nonzero, the maximum number of child processes that can be running + at once. */ +static int proc_max = 1; + +/* Total number of child processes that have been executed. */ +static int procs_executed = 0; + +/* The number of elements in `pids'. */ +static int procs_executing = 0; + +/* List of child processes currently executing. */ +static pid_t *pids = NULL; + +/* The number of allocated elements in `pids'. */ +static int pids_alloc = 0; + +/* Exit status; nonzero if any child process exited with a + status of 1-125. */ +static volatile int child_error = 0; + +static volatile int original_exit_value; + +/* If true, print each command on stderr before executing it. */ +static boolean print_command = false; /* Option -t */ + +/* If true, query the user before executing each command, and only + execute the command if the user responds affirmatively. */ +static boolean query_before_executing = false; + +/* The delimiter for input arguments. This is only consulted if the + * -0 or -d option had been given. + */ +static char input_delimiter = '\0'; + + +static struct option const longopts[] = +{ + {"null", no_argument, NULL, '0'}, + {"arg-file", required_argument, NULL, 'a'}, + {"delimiter", required_argument, NULL, 'd'}, + {"eof", optional_argument, NULL, 'e'}, + {"replace", optional_argument, NULL, 'I'}, + {"max-lines", optional_argument, NULL, 'l'}, + {"max-args", required_argument, NULL, 'n'}, + {"interactive", no_argument, NULL, 'p'}, + {"no-run-if-empty", no_argument, NULL, 'r'}, + {"max-chars", required_argument, NULL, 's'}, + {"verbose", no_argument, NULL, 't'}, + {"show-limits", no_argument, NULL, 'S'}, + {"exit", no_argument, NULL, 'x'}, + {"max-procs", required_argument, NULL, 'P'}, + {"version", no_argument, NULL, 'v'}, + {"help", no_argument, NULL, 'h'}, + {NULL, no_argument, NULL, 0} +}; + +static int read_line PARAMS ((void)); +static int read_string PARAMS ((void)); +static boolean print_args PARAMS ((boolean ask)); +/* static void do_exec PARAMS ((void)); */ +static int xargs_do_exec (const struct buildcmd_control *cl, struct buildcmd_state *state); +static void exec_if_possible PARAMS ((void)); +static void add_proc PARAMS ((pid_t pid)); +static void wait_for_proc PARAMS ((boolean all)); +static void wait_for_proc_all PARAMS ((void)); +static long parse_num PARAMS ((char *str, int option, long min, long max, int fatal)); +static void usage PARAMS ((FILE * stream)); + + + +static char +get_char_oct_or_hex_escape(const char *s) +{ + const char * p; + int base = 8; + unsigned long val; + char *endp; + + assert('\\' == s[0]); + + if ('x' == s[1]) + { + /* hex */ + p = s+2; + base = 16; + } + else if (isdigit(s[1])) + { + /* octal */ + p = s+1; + base = 8; + } + else + { + p = NULL; /* Silence compiler warning. */ + error(1, 0, + _("Invalid escape sequence %s in input delimiter specification."), + s); + } + errno = 0; + endp = (char*)p; + val = strtoul(p, &endp, base); + + /* This if condition is carefully constructed to do + * the right thing if UCHAR_MAX has the same + * value as ULONG_MAX. IF UCHAR_MAX==ULONG_MAX, + * then val can never be greater than UCHAR_MAX. + */ + if ((ULONG_MAX == val && ERANGE == errno) + || (val > UCHAR_MAX)) + { + if (16 == base) + { + error(1, 0, + _("Invalid escape sequence %s in input delimiter specification; character values must not exceed %lx."), + s, (unsigned long)UCHAR_MAX); + } + else + { + error(1, 0, + _("Invalid escape sequence %s in input delimiter specification; character values must not exceed %lo."), + s, (unsigned long)UCHAR_MAX); + } + } + + /* check for trailing garbage */ + if (0 != *endp) + { + error(1, 0, + _("Invalid escape sequence %s in input delimiter specification; trailing characters %s not recognised."), + s, endp); + } + + return (char) val; +} + + +static char +get_input_delimiter(const char *s) +{ + if (1 == strlen(s)) + { + return s[0]; + } + else + { + if ('\\' == s[0]) + { + /* an escape code */ + switch (s[1]) + { + case 'a': + return '\a'; + case 'b': + return '\b'; + case 'f': + return '\f'; + case 'n': + return '\n'; + case 'r': + return '\r'; + case 't': + return'\t'; + case 'v': + return '\v'; + case '\\': + return '\\'; + default: + return get_char_oct_or_hex_escape(s); + } + } + else + { + error(1, 0, + _("Invalid input delimiter specification %s: the delimiter must be either a single character or an escape sequence starting with \\."), + s); + /*NOTREACHED*/ + return 0; + } + } +} + +static void +noop (void) +{ + /* does nothing. */ +} + +static void +fail_due_to_env_size (void) +{ + error (1, 0, _("environment is too large for exec")); +} + + +int +main (int argc, char **argv) +{ + int optc; + int show_limits = 0; /* --show-limits */ + int always_run_command = 1; + char *input_file = "-"; /* "-" is stdin */ + char *default_cmd = "/bin/echo"; + int (*read_args) PARAMS ((void)) = read_line; + void (*act_on_init_result)(void) = noop; + enum BC_INIT_STATUS bcstatus; + enum { XARGS_POSIX_HEADROOM = 2048u }; + + program_name = argv[0]; + original_exit_value = 0; + +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + atexit (close_stdout); + atexit (wait_for_proc_all); + + /* xargs is required by POSIX to allow 2048 bytes of headroom + * for extra environment variables (that perhaps the utliity might + * want to set before execing something else). + */ + bcstatus = bc_init_controlinfo(&bc_ctl, XARGS_POSIX_HEADROOM); + + /* The bc_init_controlinfo call may have determined that the + * environment is too big. In that case, we will fail with + * an error message after processing the command-line options, + * as "xargs --help" should still work even if the environment is + * too big. + * + * Some of the argument processing depends on the contents of + * bc_ctl, which will be in an undefined state if bc_init_controlinfo() + * failed. + */ + if (BC_INIT_ENV_TOO_BIG == bcstatus) + { + act_on_init_result = fail_due_to_env_size; + } + else if (BC_INIT_CANNOT_ACCOMODATE_HEADROOM == bcstatus) + { + /* All POSIX systems are required to support ARG_MAX of at least + * 4096. For everything to work the total of (command line + + * headroom + environment) must fit into this. POSIX requires + * that we use a headroom of 2048 bytes. The user is in control + * of the size of the environment. + * + * In general if bc_init_controlinfo() returns + * BC_INIT_CANNOT_ACCOMODATE_HEADROOM, its caller can try again + * with a smaller headroom. However, in the case of xargs, this + * would not be POSIX-compliant. + */ + act_on_init_result = fail_due_to_env_size; + } + else + { + /* IEEE Std 1003.1, 2003 specifies that the combined argument and + * environment list shall not exceed {ARG_MAX}-2048 bytes. It also + * specifies that it shall be at least LINE_MAX. + */ +#ifdef _SC_ARG_MAX + long val = sysconf(_SC_ARG_MAX); + if (val > 0) + { + /* Note that val can in fact be greater than ARG_MAX + * and bc_ctl.arg_max can also be greater than ARG_MAX. + */ + assert(bc_ctl.arg_max <= (val-XARGS_POSIX_HEADROOM)); + } + else + { +# if defined(ARG_MAX) + assert(bc_ctl.arg_max <= (ARG_MAX-XARGS_POSIX_HEADROOM)); +# endif + } +#else + /* No _SC_ARG_MAX */ + assert(bc_ctl.arg_max <= (ARG_MAX-XARGS_POSIX_HEADROOM)); +#endif + + +#ifdef LINE_MAX + /* This assertion ensures that this xargs implementation + * conforms to the POSIX requirement that the default command + * line length shall be at least LINE_MAX. + */ + assert(bc_ctl.arg_max >= LINE_MAX); +#endif + + bc_ctl.exec_callback = xargs_do_exec; + + /* Start with a reasonable default size, though this can be + * adjusted via the -s option. + */ + bc_use_sensible_arg_max(&bc_ctl); + } + + while ((optc = getopt_long (argc, argv, "+0a:E:e::i::I:l::L:n:prs:txP:d:", + longopts, (int *) 0)) != -1) + { + switch (optc) + { + case '0': + read_args = read_string; + input_delimiter = '\0'; + break; + + case 'd': + read_args = read_string; + input_delimiter = get_input_delimiter(optarg); + break; + + case 'E': /* POSIX */ + case 'e': /* deprecated */ + if (optarg && (strlen(optarg) > 0)) + eof_str = optarg; + else + eof_str = 0; + break; + + case 'h': + usage (stdout); + return 0; + + case 'I': /* POSIX */ + case 'i': /* deprecated */ + if (optarg) + bc_ctl.replace_pat = optarg; + else + bc_ctl.replace_pat = "{}"; + /* -i excludes -n -l. */ + bc_ctl.args_per_exec = 0; + bc_ctl.lines_per_exec = 0; + break; + + case 'L': /* POSIX */ + bc_ctl.lines_per_exec = parse_num (optarg, 'L', 1L, -1L, 1); + /* -L excludes -i -n. */ + bc_ctl.args_per_exec = 0; + bc_ctl.replace_pat = NULL; + break; + + case 'l': /* deprecated */ + if (optarg) + bc_ctl.lines_per_exec = parse_num (optarg, 'l', 1L, -1L, 1); + else + bc_ctl.lines_per_exec = 1; + /* -l excludes -i -n. */ + bc_ctl.args_per_exec = 0; + bc_ctl.replace_pat = NULL; + break; + + case 'n': + bc_ctl.args_per_exec = parse_num (optarg, 'n', 1L, -1L, 1); + /* -n excludes -i -l. */ + bc_ctl.lines_per_exec = 0; + if (bc_ctl.args_per_exec == 1 && bc_ctl.replace_pat) + /* ignore -n1 in '-i -n1' */ + bc_ctl.args_per_exec = 0; + else + bc_ctl.replace_pat = NULL; + break; + + /* The POSIX standard specifies that it is not an error + * for the -s option to specify a size that the implementation + * cannot support - in that case, the relevant limit is used. + */ + case 's': + { + size_t arg_size; + act_on_init_result(); + arg_size = parse_num (optarg, 's', 1L, + bc_ctl.posix_arg_size_max, 0); + if (arg_size > bc_ctl.posix_arg_size_max) + { + error (0, 0, + _("warning: value %ld for -s option is too large, " + "using %ld instead"), + arg_size, bc_ctl.posix_arg_size_max); + arg_size = bc_ctl.posix_arg_size_max; + } + bc_ctl.arg_max = arg_size; + } + break; + + case 'S': + show_limits = true; + break; + + case 't': + print_command = true; + break; + + case 'x': + bc_ctl.exit_if_size_exceeded = true; + break; + + case 'p': + query_before_executing = true; + print_command = true; + break; + + case 'r': + always_run_command = 0; + break; + + case 'P': + proc_max = parse_num (optarg, 'P', 0L, -1L, 1); + break; + + case 'a': + input_file = optarg; + break; + + case 'v': + printf (_("GNU xargs version %s\n"), version_string); + printf (_("Built using GNU gnulib version %s\n"), gnulib_version); + return 0; + + default: + usage (stderr); + return 1; + } + } + + /* If we had deferred failing due to problems in bc_init_controlinfo(), + * do it now. + * + * We issue this error message after processing command line + * arguments so that it is possible to use "xargs --help" even if + * the environment is too large. + */ + act_on_init_result(); + assert(BC_INIT_OK == bcstatus); + + if (0 == strcmp (input_file, "-")) + { + input_stream = stdin; + } + else + { + keep_stdin = 1; /* see prep_child_for_exec() */ + input_stream = fopen (input_file, "r"); + if (NULL == input_stream) + { + error (1, errno, + _("Cannot open input file %s"), + quotearg_n_style(0, locale_quoting_style, input_file)); + } + } + + if (bc_ctl.replace_pat || bc_ctl.lines_per_exec) + bc_ctl.exit_if_size_exceeded = true; + + if (optind == argc) + { + optind = 0; + argc = 1; + argv = &default_cmd; + } + + /* We want to be able to print size_t values as unsigned long, so if + * the cast isn't value-preserving, we have a problem. This isn't a + * problem in C89, because size_t was known to be no wider than + * unsigned long. In C99 this is no longer the case, but there are + * special C99 ways to print such values. Unfortunately this + * program tries to work on both C89 and C99 systems. + */ +#if defined(SIZE_MAX) +# if SIZE_MAX > ULONG_MAX +# error "I'm not sure how to print size_t values on your system" +# endif +#else + /* Without SIZE_MAX (i.e. limits.h) this is probably + * close to the best we can do. + */ + assert(sizeof(size_t) <= sizeof(unsigned long)); +#endif + + if (show_limits) + { + fprintf(stderr, + _("Your environment variables take up %lu bytes\n"), + (unsigned long)bc_size_of_environment()); + fprintf(stderr, + _("POSIX upper limit on argument length (this system): %lu\n"), + (unsigned long)bc_ctl.posix_arg_size_max); + fprintf(stderr, + _("POSIX smallest allowable upper limit on argument length (all systems): %lu\n"), + (unsigned long)bc_ctl.posix_arg_size_min); + fprintf(stderr, + _("Maximum length of command we could actually use: %ld\n"), + (unsigned long)(bc_ctl.posix_arg_size_max - + bc_size_of_environment())); + fprintf(stderr, + _("Size of command buffer we are actually using: %lu\n"), + (unsigned long)bc_ctl.arg_max); + + if (isatty(STDIN_FILENO)) + { + fprintf(stderr, + _("\n" + "Execution of xargs will continue now, and it will " + "try to read its input and run commands; if this is " + "not what you wanted to happen, please type the " + "end-of-file keystroke.\n")); + if (always_run_command) + { + fprintf(stderr, + _("Warning: %s will be run at least once. " + "If you do not want that to happen, then press " + "the interrupt keystroke.\n"), + argv[optind]); + } + } + } + + linebuf = (char *) xmalloc (bc_ctl.arg_max + 1); + bc_state.argbuf = (char *) xmalloc (bc_ctl.arg_max + 1); + + /* Make sure to listen for the kids. */ + signal (SIGCHLD, SIG_DFL); + + if (!bc_ctl.replace_pat) + { + for (; optind < argc; optind++) + bc_push_arg (&bc_ctl, &bc_state, + argv[optind], strlen (argv[optind]) + 1, + NULL, 0, + initial_args); + initial_args = false; + bc_ctl.initial_argc = bc_state.cmd_argc; + bc_state.cmd_initial_argv_chars = bc_state.cmd_argv_chars; + + while ((*read_args) () != -1) + if (bc_ctl.lines_per_exec && lineno >= bc_ctl.lines_per_exec) + { + xargs_do_exec (&bc_ctl, &bc_state); + lineno = 0; + } + + /* SYSV xargs seems to do at least one exec, even if the + input is empty. */ + if (bc_state.cmd_argc != bc_ctl.initial_argc + || (always_run_command && procs_executed == 0)) + xargs_do_exec (&bc_ctl, &bc_state); + + } + else + { + int i; + size_t len; + size_t *arglen = (size_t *) xmalloc (sizeof (size_t) * argc); + + for (i = optind; i < argc; i++) + arglen[i] = strlen(argv[i]); + bc_ctl.rplen = strlen (bc_ctl.replace_pat); + while ((len = (*read_args) ()) != -1) + { + /* Don't do insert on the command name. */ + bc_clear_args(&bc_ctl, &bc_state); + bc_state.cmd_argv_chars = 0; /* begin at start of buffer */ + + bc_push_arg (&bc_ctl, &bc_state, + argv[optind], arglen[optind] + 1, + NULL, 0, + initial_args); + len--; + initial_args = false; + + for (i = optind + 1; i < argc; i++) + bc_do_insert (&bc_ctl, &bc_state, + argv[i], arglen[i], + NULL, 0, + linebuf, len, + initial_args); + xargs_do_exec (&bc_ctl, &bc_state); + } + } + + original_exit_value = child_error; + return child_error; +} + + +/* Read a line of arguments from the input and add them to the list of + arguments to pass to the command. Ignore blank lines and initial blanks. + Single and double quotes and backslashes quote metacharacters and blanks + as they do in the shell. + Return -1 if eof (either physical or logical) is reached, + otherwise the length of the last string read (including the null). */ + +static int +read_line (void) +{ +/* States for read_line. */ + enum read_line_state + { + NORM = 0, + SPACE = 1, + QUOTE = 2, + BACKSLASH = 3 + }; + static boolean eof = false; + /* Start out in mode SPACE to always strip leading spaces (even with -i). */ + enum read_line_state state = SPACE; /* The type of character we last read. */ + int prevc; /* The previous value of c. */ + int quotc = 0; /* The last quote character read. */ + int c = EOF; + boolean first = true; /* true if reading first arg on line. */ + boolean seen_arg = false; /* true if we have seen any arg (or part of one) yet */ + int len; + char *p = linebuf; + /* Including the NUL, the args must not grow past this point. */ + char *endbuf = linebuf + bc_ctl.arg_max - bc_state.cmd_initial_argv_chars - 1; + + if (eof) + return -1; + while (1) + { + prevc = c; + c = getc (input_stream); + + if (c == EOF) + { + /* COMPAT: SYSV seems to ignore stuff on a line that + ends without a \n; we don't. */ + eof = true; + if (p == linebuf) + return -1; + *p++ = '\0'; + len = p - linebuf; + if (state == QUOTE) + { + exec_if_possible (); + error (1, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"), + quotc == '"' ? _("double") : _("single")); + } + if (first && EOF_STR (linebuf)) + return -1; + if (!bc_ctl.replace_pat) + bc_push_arg (&bc_ctl, &bc_state, + linebuf, len, + NULL, 0, + initial_args); + return len; + } + switch (state) + { + case SPACE: + if (ISSPACE (c)) + continue; + state = NORM; + /* aaahhhh.... */ + + case NORM: + if (c == '\n') + { + if (!ISBLANK (prevc)) + lineno++; /* For -l. */ + if (p == linebuf) + { + if (seen_arg) + { + /* An empty argument, add it to the list as normal. */ + } + else + { + /* Blank line. */ + state = SPACE; + continue; + } + } + *p++ = '\0'; + len = p - linebuf; + if (EOF_STR (linebuf)) + { + eof = true; + return first ? -1 : len; + } + if (!bc_ctl.replace_pat) + bc_push_arg (&bc_ctl, &bc_state, + linebuf, len, + NULL, 0, + initial_args); + return len; + } + seen_arg = true; + + /* POSIX: In the POSIX locale, the separators are and + * , but not or . + */ + if (!bc_ctl.replace_pat && ISBLANK (c)) + { + *p++ = '\0'; + len = p - linebuf; + if (EOF_STR (linebuf)) + { + eof = true; + return first ? -1 : len; + } + bc_push_arg (&bc_ctl, &bc_state, + linebuf, len, + NULL, 0, + initial_args); + p = linebuf; + state = SPACE; + first = false; + continue; + } + switch (c) + { + case '\\': + state = BACKSLASH; + continue; + + case '\'': + case '"': + state = QUOTE; + quotc = c; + continue; + } + break; + + case QUOTE: + if (c == '\n') + { + exec_if_possible (); + error (1, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"), + quotc == '"' ? _("double") : _("single")); + } + if (c == quotc) + { + state = NORM; + seen_arg = true; /* Makes a difference for e.g. just '' or "" as the first arg on a line */ + continue; + } + break; + + case BACKSLASH: + state = NORM; + break; + } + + if ( (0 == c) && !nullwarning_given ) + { + /* This is just a warning message. We only issue it once. */ + error (0, 0, + _("warning: a NUL character occurred in the input. " + "It cannot be passed through in the argument list. " + "Did you mean to use the --null option?")); + nullwarning_given = 1; + } + +#if 1 + if (p >= endbuf) + { + exec_if_possible (); + error (1, 0, _("argument line too long")); + } + *p++ = c; +#else + append_char_to_buf(&linebuf, &endbuf, &p, c); +#endif + } +} + +/* Read a null-terminated string from the input and add it to the list of + arguments to pass to the command. + Return -1 if eof (either physical or logical) is reached, + otherwise the length of the string read (including the null). */ + +static int +read_string (void) +{ + static boolean eof = false; + int len; + char *p = linebuf; + /* Including the NUL, the args must not grow past this point. */ + char *endbuf = linebuf + bc_ctl.arg_max - bc_state.cmd_initial_argv_chars - 1; + + if (eof) + return -1; + while (1) + { + int c = getc (input_stream); + if (c == EOF) + { + eof = true; + if (p == linebuf) + return -1; + *p++ = '\0'; + len = p - linebuf; + if (!bc_ctl.replace_pat) + bc_push_arg (&bc_ctl, &bc_state, + linebuf, len, + NULL, 0, + initial_args); + return len; + } + if (c == input_delimiter) + { + lineno++; /* For -l. */ + *p++ = '\0'; + len = p - linebuf; + if (!bc_ctl.replace_pat) + bc_push_arg (&bc_ctl, &bc_state, + linebuf, len, + NULL, 0, + initial_args); + return len; + } + if (p >= endbuf) + { + exec_if_possible (); + error (1, 0, _("argument line too long")); + } + *p++ = c; + } +} + +/* Print the arguments of the command to execute. + If ASK is nonzero, prompt the user for a response, and + if the user responds affirmatively, return true; + otherwise, return false. */ + +static boolean +print_args (boolean ask) +{ + int i; + + for (i = 0; i < bc_state.cmd_argc - 1; i++) + fprintf (stderr, "%s ", bc_state.cmd_argv[i]); + if (ask) + { + static FILE *tty_stream; + int c, savec; + + if (!tty_stream) + { + tty_stream = fopen ("/dev/tty", "r"); + if (!tty_stream) + error (1, errno, "/dev/tty"); + } + fputs ("?...", stderr); + fflush (stderr); + c = savec = getc (tty_stream); + while (c != EOF && c != '\n') + c = getc (tty_stream); + if (savec == 'y' || savec == 'Y') + return true; + } + else + putc ('\n', stderr); + + return false; +} + + +/* Close stdin and attach /dev/null to it. + * This resolves Savannah bug #3992. + */ +static void +prep_child_for_exec (void) +{ + if (!keep_stdin) + { + const char inputfile[] = "/dev/null"; + /* fprintf(stderr, "attaching stdin to /dev/null\n"); */ + + close(0); + if (open(inputfile, O_RDONLY) < 0) + { + /* This is not entirely fatal, since + * executing the child with a closed + * stdin is almost as good as executing it + * with its stdin attached to /dev/null. + */ + error (0, errno, "%s", quotearg_n_style(0, locale_quoting_style, inputfile)); + } + } +} + + +/* Execute the command that has been built in `cmd_argv'. This may involve + waiting for processes that were previously executed. */ + +static int +xargs_do_exec (const struct buildcmd_control *ctl, struct buildcmd_state *state) +{ + pid_t child; + + (void) ctl; + (void) state; + + bc_push_arg (&bc_ctl, &bc_state, + (char *) NULL, 0, + NULL, 0, + false); /* Null terminate the arg list. */ + + if (!query_before_executing || print_args (true)) + { + if (proc_max && procs_executing >= proc_max) + wait_for_proc (false); + if (!query_before_executing && print_command) + print_args (false); + /* If we run out of processes, wait for a child to return and + try again. */ + while ((child = fork ()) < 0 && errno == EAGAIN && procs_executing) + wait_for_proc (false); + switch (child) + { + case -1: + error (1, errno, _("cannot fork")); + + case 0: /* Child. */ + prep_child_for_exec(); + execvp (bc_state.cmd_argv[0], bc_state.cmd_argv); + error (0, errno, "%s", bc_state.cmd_argv[0]); + _exit (errno == ENOENT ? 127 : 126); + /*NOTREACHED*/ + } + add_proc (child); + } + + bc_clear_args(&bc_ctl, &bc_state); + return 1; /* Success */ +} + +/* Execute the command if possible. */ + +static void +exec_if_possible (void) +{ + if (bc_ctl.replace_pat || initial_args || + bc_state.cmd_argc == bc_ctl.initial_argc || bc_ctl.exit_if_size_exceeded) + return; + xargs_do_exec (&bc_ctl, &bc_state); +} + +/* Add the process with id PID to the list of processes that have + been executed. */ + +static void +add_proc (pid_t pid) +{ + int i; + + /* Find an empty slot. */ + for (i = 0; i < pids_alloc && pids[i]; i++) + ; + if (i == pids_alloc) + { + if (pids_alloc == 0) + { + pids_alloc = proc_max ? proc_max : 64; + pids = (pid_t *) xmalloc (sizeof (pid_t) * pids_alloc); + } + else + { + pids_alloc *= 2; + pids = (pid_t *) xrealloc (pids, + sizeof (pid_t) * pids_alloc); + } + memset (&pids[i], '\0', sizeof (pid_t) * (pids_alloc - i)); + } + pids[i] = pid; + procs_executing++; + procs_executed++; +} + +/* If ALL is true, wait for all child processes to finish; + otherwise, wait for one child process to finish. + Remove the processes that finish from the list of executing processes. */ + +static void +wait_for_proc (boolean all) +{ + while (procs_executing) + { + int i, status; + + do + { + pid_t pid; + + while ((pid = wait (&status)) == (pid_t) -1) + if (errno != EINTR) + error (1, errno, _("error waiting for child process")); + + /* Find the entry in `pids' for the child process + that exited. */ + for (i = 0; i < pids_alloc && pid != pids[i]; i++) + ; + } + while (i == pids_alloc); /* A child died that we didn't start? */ + + /* Remove the child from the list. */ + pids[i] = 0; + procs_executing--; + + if (WEXITSTATUS (status) == 126 || WEXITSTATUS (status) == 127) + exit (WEXITSTATUS (status)); /* Can't find or run the command. */ + if (WEXITSTATUS (status) == 255) + error (124, 0, _("%s: exited with status 255; aborting"), bc_state.cmd_argv[0]); + if (WIFSTOPPED (status)) + error (125, 0, _("%s: stopped by signal %d"), bc_state.cmd_argv[0], WSTOPSIG (status)); + if (WIFSIGNALED (status)) + error (125, 0, _("%s: terminated by signal %d"), bc_state.cmd_argv[0], WTERMSIG (status)); + if (WEXITSTATUS (status) != 0) + child_error = 123; + + if (!all) + break; + } +} + +/* Wait for all child processes to finish. */ + +static void +wait_for_proc_all (void) +{ + static boolean waiting = false; + + if (waiting) + return; + + waiting = true; + wait_for_proc (true); + waiting = false; + + if (original_exit_value != child_error) + { + /* wait_for_proc() changed the value of child_error(). This + * function is registered via atexit(), and so may have been + * called from exit(). We now know that the original value + * passed to exit() is no longer the exit status we require. + * The POSIX standard states that the behaviour if exit() is + * called more than once is undefined. Therefore we now have to + * exit with _exit() instead of exit(). + */ + _exit(child_error); + } + +} + +/* Return the value of the number represented in STR. + OPTION is the command line option to which STR is the argument. + If the value does not fall within the boundaries MIN and MAX, + Print an error message mentioning OPTION. If FATAL is true, + we also exit. */ + +static long +parse_num (char *str, int option, long int min, long int max, int fatal) +{ + char *eptr; + long val; + + val = strtol (str, &eptr, 10); + if (eptr == str || *eptr) + { + fprintf (stderr, _("%s: invalid number for -%c option\n"), + program_name, option); + usage (stderr); + exit(1); + } + else if (val < min) + { + fprintf (stderr, _("%s: value for -%c option should be >= %ld\n"), + program_name, option, min); + if (fatal) + { + usage (stderr); + exit(1); + } + else + { + val = min; + } + } + else if (max >= 0 && val > max) + { + fprintf (stderr, _("%s: value for -%c option should be < %ld\n"), + program_name, option, max); + if (fatal) + { + usage (stderr); + exit(1); + } + else + { + val = max; + } + } + return val; +} + +static void +usage (FILE *stream) +{ + fprintf (stream, _("\ +Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n\ + [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n\ + [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n\ + [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n\ + [-n max-args] [--max-args=max-args]\n\ + [-s max-chars] [--max-chars=max-chars]\n\ + [-P max-procs] [--max-procs=max-procs] [--show-limits]\n\ + [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n\ + [--version] [--help] [command [initial-arguments]]\n"), + program_name); + fputs (_("\nReport bugs to .\n"), stream); +} -- 2.7.4