├── tests ├── qlist │ ├── list15.good │ ├── root │ │ ├── a-b │ │ │ ├── a-0 │ │ │ │ ├── CONTENTS │ │ │ │ ├── SLOT │ │ │ │ └── repository │ │ │ └── b-0 │ │ │ │ ├── CONTENTS │ │ │ │ ├── SLOT │ │ │ │ └── repository │ │ ├── -merge-foo │ │ │ └── CONTENTS │ │ ├── virtual │ │ │ ├── pkg-1 │ │ │ │ ├── CONTENTS │ │ │ │ ├── SLOT │ │ │ │ └── repository │ │ │ └── sub-2 │ │ │ │ ├── CONTENTS │ │ │ │ ├── SLOT │ │ │ │ └── repository │ │ ├── app-arch │ │ │ └── cpio-2.11 │ │ │ │ ├── SLOT │ │ │ │ ├── repository │ │ │ │ └── CONTENTS │ │ └── sys-fs │ │ │ └── mtools-4.0.13 │ │ │ ├── SLOT │ │ │ ├── repository │ │ │ ├── IUSE │ │ │ └── USE │ ├── list10.good │ ├── list16.good │ ├── list17.good │ ├── list01.good │ ├── list07.good │ ├── list14.good │ ├── Makefile.am │ ├── list11.good │ ├── list12.good │ ├── list09.good │ ├── list08.good │ ├── list02.good │ ├── list13.good │ ├── list04.good │ └── list06.good ├── qlop │ ├── test04.good │ ├── list04.good │ ├── list05.good │ ├── list01.good │ ├── list06.good │ ├── list07.good │ ├── list08.good │ ├── Makefile.am │ ├── list02.good │ ├── list09.good │ ├── list03.good │ └── list10.good ├── mkdir │ ├── .gitignore │ ├── Makefile.am │ ├── test.c │ └── dotest ├── qfile │ ├── root │ │ ├── bin │ │ │ └── bash │ │ └── app-shells │ │ │ └── bash-4.4_p23-r1 │ │ │ ├── COUNTER │ │ │ ├── EAPI │ │ │ ├── SLOT │ │ │ ├── LICENSE │ │ │ ├── SIZE │ │ │ ├── CATEGORY │ │ │ ├── PF │ │ │ ├── repository │ │ │ ├── BUILD_TIME │ │ │ ├── CHOST │ │ │ ├── CBUILD │ │ │ ├── CFLAGS │ │ │ ├── CXXFLAGS │ │ │ ├── LDFLAGS │ │ │ ├── NEEDED │ │ │ ├── REQUIRES │ │ │ ├── DESCRIPTION │ │ │ ├── HOMEPAGE │ │ │ ├── NEEDED.ELF.2 │ │ │ ├── IUSE │ │ │ ├── USE │ │ │ ├── DEFINED_PHASES │ │ │ ├── DEPEND │ │ │ ├── INHERITED │ │ │ ├── RDEPEND │ │ │ ├── KEYWORDS │ │ │ ├── FEATURES │ │ │ └── IUSE_EFFECTIVE │ ├── Makefile.am │ └── dotest ├── copy_file │ ├── .gitignore │ ├── dotest │ └── Makefile.am ├── install │ ├── .gitignore │ ├── Makefile.am │ └── dotest ├── qmanifest │ ├── manifest06.good │ ├── root │ │ ├── notatree │ │ │ └── .keep │ │ ├── simpletree │ │ │ ├── my-cat │ │ │ │ ├── mypackage │ │ │ │ │ ├── unrecorded-file │ │ │ │ │ ├── mypackage-0.ebuild │ │ │ │ │ ├── mypackage-2.ebuild │ │ │ │ │ ├── metadata.xml │ │ │ │ │ └── mypackage-1.ebuild │ │ │ │ └── Manifest.gz │ │ │ ├── metadata │ │ │ │ ├── layout.conf │ │ │ │ └── Manifest.gz │ │ │ ├── Manifest.files.gz │ │ │ └── Manifest │ │ └── etc │ │ │ └── portage │ │ │ └── repos.conf │ │ │ └── qtest.conf │ ├── manifest05.good │ ├── manifest00.good │ ├── key.gpg │ ├── manifest02.good │ ├── manifest03.good │ ├── manifest04.good │ ├── Makefile.am │ ├── manifest07.good │ └── manifest01.good ├── rmspace │ ├── .gitignore │ ├── dotest │ ├── Makefile.am │ └── test.c ├── qcheck │ ├── list03.good │ ├── root │ │ ├── bin │ │ │ ├── good-sym │ │ │ ├── bad-md5 │ │ │ ├── bad-mtime │ │ │ ├── bad-mtime-sym │ │ │ ├── bad-sha1 │ │ │ ├── good-md5 │ │ │ ├── good-sha1 │ │ │ └── bad-mtime-obj │ │ ├── a-b │ │ │ └── pkg-1.0 │ │ │ │ ├── SLOT │ │ │ │ ├── repository │ │ │ │ └── CONTENTS │ │ └── virtual │ │ │ └── pkg-1 │ │ │ ├── CONTENTS │ │ │ ├── SLOT │ │ │ └── repository │ ├── Makefile.am │ ├── list07.good │ ├── list06.good │ ├── list02.good │ ├── list01.good │ ├── list04.good │ ├── list05.good │ ├── list09.good │ └── list08.good ├── qdepends │ ├── list01.good │ ├── root │ │ ├── app-arch │ │ │ └── cpio-2.11 │ │ │ │ ├── SLOT │ │ │ │ ├── repository │ │ │ │ └── CONTENTS │ │ └── x11-apps │ │ │ └── xdm-1.1.11-r3 │ │ │ ├── USE │ │ │ ├── RDEPEND │ │ │ └── DEPEND │ ├── list02.good │ ├── list06.good │ ├── list03.good │ ├── list04.good │ ├── Makefile.am │ ├── list05.good │ ├── list08.good │ └── list07.good ├── quse │ ├── list01.good │ ├── portdir │ │ └── profiles │ │ │ ├── desc │ │ │ ├── one.desc │ │ │ ├── two.desc │ │ │ └── elibc.desc │ │ │ ├── arch.list │ │ │ ├── use.desc │ │ │ └── use.local.desc │ └── Makefile.am ├── atom_explode │ ├── .gitignore │ ├── ebuildlist.xz │ ├── portageatoms.xz │ ├── dotest │ ├── atom-explode.py │ ├── Makefile.am │ └── basic.tests ├── profile │ ├── profile1 │ │ └── etc │ │ │ ├── parent.conf │ │ │ └── portage │ │ │ ├── this.level.conf │ │ │ ├── subdir │ │ │ └── file.conf │ │ │ └── make.conf │ └── Makefile.am ├── atom_compare │ ├── .gitignore │ ├── static.q.good │ ├── static.q.tests │ ├── atom-compare.py │ ├── static.tests │ └── Makefile.am ├── qxpak │ ├── list01.good │ ├── list02.good │ └── Makefile.am ├── qatom │ └── Makefile.am ├── qtbz2 │ └── Makefile.am ├── qmerge │ ├── Makefile.am │ └── packages │ │ └── sys-devel │ │ ├── qmerge-test-1.3.tbz2 │ │ └── qmerge-test-2.0.tbz2 ├── source │ ├── Makefile.am │ └── space ├── Makefile.am └── valgrind-wrapper │ └── qvalgrind ├── man └── include │ ├── qtegrity-authors.include │ ├── qfile-authors.include │ ├── qxpak.desc │ ├── qtbz2.desc │ ├── qpkg.optdesc.yaml │ ├── qtbz2.optdesc.yaml │ ├── quse.desc │ ├── qsearch.desc │ ├── qsize.desc │ ├── qgrep.optdesc.yaml │ ├── qpkg.desc │ ├── qtegrity-70-relevant-files.include │ ├── qkeyword.optdesc.yaml │ ├── qcheck.optdesc.yaml │ ├── qmerge.desc │ ├── qgrep.desc │ ├── qmanifest.optdesc.yaml │ ├── qlist.desc │ ├── q.desc │ ├── qsearch.optdesc.yaml │ ├── qtegrity.desc │ ├── qsize.optdesc.yaml │ ├── qwhich.optdesc.yaml │ ├── qwhich.desc │ ├── qatom.desc │ ├── qmanifest-01-generation.include │ ├── qfile-02-orphans.include │ ├── q.optdesc.yaml │ ├── qkeyword-01-latest-testing.include │ ├── quse.optdesc.yaml │ └── qkeyword.desc ├── autotools ├── snippet │ └── .gitignore ├── m4 │ ├── xalloc.m4 │ ├── msvc-nothrow.m4 │ ├── timespec.m4 │ ├── save-cwd.m4 │ ├── xsize.m4 │ ├── localcharset.m4 │ ├── mbiter.m4 │ ├── mbchar.m4 │ ├── md5.m4 │ ├── sha1.m4 │ ├── sha256.m4 │ ├── sha512.m4 │ ├── filenamecat.m4 │ ├── off_t.m4 │ ├── malloca.m4 │ ├── error.m4 │ ├── rawmemchr.m4 │ ├── mkdirat.m4 │ ├── musl.m4 │ ├── memrchr.m4 │ ├── msvc-inval.m4 │ ├── open-cloexec.m4 │ ├── __inline.m4 │ ├── group-member.m4 │ ├── zzgnulib.m4 │ ├── codeset.m4 │ ├── unitypes_h.m4 │ ├── strdup.m4 │ ├── sys_cdefs_h.m4 │ ├── mempcpy.m4 │ ├── strncasecmp.m4 │ ├── off64_t.m4 │ ├── opendir.m4 │ ├── closedir.m4 │ ├── stdint_h.m4 │ ├── inttypes_h.m4 │ ├── openat.m4 │ ├── faccessat.m4 │ ├── reallocarray.m4 │ └── chdir-long.m4 └── gnulib │ ├── isnand.c │ ├── issymlinkat.c │ ├── xsize.c │ ├── ialloc.c │ ├── stdlib.c │ ├── byteswap.c │ ├── issymlink.c │ ├── mbchar.c │ ├── stat-time.c │ ├── timespec.c │ ├── isnanf.c │ ├── math.c │ ├── isnanl.c │ ├── unistd.c │ ├── mbiterf.c │ ├── same-inode.c │ ├── exitfail.c │ ├── exitfail.h │ ├── u64.c │ ├── iswblank.c │ ├── iswdigit.c │ ├── wctype-h.c │ ├── mbszero.c │ ├── renameat.c │ ├── c32tolower.c │ ├── c32isblank.c │ ├── c32isdigit.c │ ├── c32isgraph.c │ ├── c32isalnum.c │ ├── c32isalpha.c │ ├── c32islower.c │ ├── c32isprint.c │ ├── c32isspace.c │ ├── c32isupper.c │ ├── getprogname.h │ ├── c32iscntrl.c │ ├── c32isxdigit.c │ ├── getline.c │ ├── rawmemchr.valgrind │ ├── c32ispunct.c │ ├── root-uid.h │ ├── unicase │ └── tolower.c │ ├── assert.in.h │ ├── itold.c │ ├── frexpl.c │ ├── iswpunct.c │ ├── unictype │ ├── ctype_alnum.c │ ├── ctype_alpha.c │ ├── ctype_blank.c │ ├── ctype_cntrl.c │ ├── ctype_digit.c │ ├── ctype_graph.c │ ├── ctype_lower.c │ ├── ctype_print.c │ ├── ctype_punct.c │ ├── ctype_space.c │ ├── ctype_upper.c │ └── ctype_xdigit.c │ ├── asnprintf.c │ ├── strncat.c │ ├── strtoll.c │ ├── memchr.valgrind │ └── iswxdigit.c ├── applets.sh ├── libq ├── busybox.h ├── xchdir.h ├── prelink.h ├── rmspace.h ├── profile.h ├── copy_file.h ├── eat_file.h ├── xchdir.c ├── basename.h ├── human_readable.h ├── xregex.h ├── basename.c ├── xsystem.h ├── safe_io.h ├── xpak.h ├── xmkdir.h ├── move_file.h ├── colors.h ├── contents.h ├── scandirat.h ├── Makefile.am ├── xregex.c ├── set.h └── xasprintf.h ├── HACKING.md └── template.c /tests/qlist/list15.good: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/qlop/test04.good: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/mkdir/.gitignore: -------------------------------------------------------------------------------- 1 | m 2 | -------------------------------------------------------------------------------- /tests/qfile/root/bin/bash: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/copy_file/.gitignore: -------------------------------------------------------------------------------- 1 | m 2 | -------------------------------------------------------------------------------- /tests/install/.gitignore: -------------------------------------------------------------------------------- 1 | q 2 | -------------------------------------------------------------------------------- /tests/qlist/root/a-b/a-0/CONTENTS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/qlist/root/a-b/b-0/CONTENTS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/qmanifest/manifest06.good: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/rmspace/.gitignore: -------------------------------------------------------------------------------- 1 | m 2 | -------------------------------------------------------------------------------- /tests/qcheck/list03.good: -------------------------------------------------------------------------------- 1 | a-b/pkg 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/bin/good-sym: -------------------------------------------------------------------------------- 1 | good-md5 -------------------------------------------------------------------------------- /tests/qlist/root/-merge-foo/CONTENTS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/qlist/root/a-b/a-0/SLOT: -------------------------------------------------------------------------------- 1 | a-0 2 | -------------------------------------------------------------------------------- /tests/qlist/root/a-b/b-0/SLOT: -------------------------------------------------------------------------------- 1 | b-0 2 | -------------------------------------------------------------------------------- /tests/qmanifest/root/notatree/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/qcheck/root/a-b/pkg-1.0/SLOT: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/bin/bad-md5: -------------------------------------------------------------------------------- 1 | baaad 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/bin/bad-mtime: -------------------------------------------------------------------------------- 1 | asdf 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/bin/bad-mtime-sym: -------------------------------------------------------------------------------- 1 | good-md5 -------------------------------------------------------------------------------- /tests/qcheck/root/bin/bad-sha1: -------------------------------------------------------------------------------- 1 | baaad 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/bin/good-md5: -------------------------------------------------------------------------------- 1 | asdf 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/bin/good-sha1: -------------------------------------------------------------------------------- 1 | asdf 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/virtual/pkg-1/CONTENTS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/qcheck/root/virtual/pkg-1/SLOT: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/qlist/root/a-b/a-0/repository: -------------------------------------------------------------------------------- 1 | a 2 | -------------------------------------------------------------------------------- /tests/qlist/root/a-b/b-0/repository: -------------------------------------------------------------------------------- 1 | b 2 | -------------------------------------------------------------------------------- /tests/qlist/root/virtual/pkg-1/CONTENTS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/qlist/root/virtual/pkg-1/SLOT: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /tests/qlist/root/virtual/sub-2/CONTENTS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/qcheck/root/bin/bad-mtime-obj: -------------------------------------------------------------------------------- 1 | asdf 2 | -------------------------------------------------------------------------------- /tests/qdepends/list01.good: -------------------------------------------------------------------------------- 1 | DEPEND=" 2 | " 3 | -------------------------------------------------------------------------------- /tests/qlist/list10.good: -------------------------------------------------------------------------------- 1 | sys-fs/mtools-4.0.13 2 | -------------------------------------------------------------------------------- /tests/qlist/list16.good: -------------------------------------------------------------------------------- 1 | virtual/sub:1/1234 2 | -------------------------------------------------------------------------------- /tests/qlist/root/app-arch/cpio-2.11/SLOT: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/qlist/root/sys-fs/mtools-4.0.13/SLOT: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/qlist/root/virtual/sub-2/SLOT: -------------------------------------------------------------------------------- 1 | 1/1234 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/a-b/pkg-1.0/repository: -------------------------------------------------------------------------------- 1 | gentoo 2 | -------------------------------------------------------------------------------- /tests/qcheck/root/virtual/pkg-1/repository: -------------------------------------------------------------------------------- 1 | repo 2 | -------------------------------------------------------------------------------- /tests/qdepends/root/app-arch/cpio-2.11/SLOT: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/qlist/root/virtual/pkg-1/repository: -------------------------------------------------------------------------------- 1 | repo 2 | -------------------------------------------------------------------------------- /tests/qlist/root/virtual/sub-2/repository: -------------------------------------------------------------------------------- 1 | repo 2 | -------------------------------------------------------------------------------- /man/include/qtegrity-authors.include: -------------------------------------------------------------------------------- 1 | Sam Besselink 2 | -------------------------------------------------------------------------------- /tests/qdepends/list02.good: -------------------------------------------------------------------------------- 1 | DEPEND=" 2 | a/b 3 | " 4 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/COUNTER: -------------------------------------------------------------------------------- 1 | 4119 -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/EAPI: -------------------------------------------------------------------------------- 1 | 6 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/SLOT: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/qlist/root/app-arch/cpio-2.11/repository: -------------------------------------------------------------------------------- 1 | gentoo 2 | -------------------------------------------------------------------------------- /tests/quse/list01.good: -------------------------------------------------------------------------------- 1 | ONE[abc] cow 2 | TWO[abc] pig 3 | -------------------------------------------------------------------------------- /tests/quse/portdir/profiles/desc/one.desc: -------------------------------------------------------------------------------- 1 | abc - cow 2 | -------------------------------------------------------------------------------- /tests/quse/portdir/profiles/desc/two.desc: -------------------------------------------------------------------------------- 1 | abc - pig 2 | -------------------------------------------------------------------------------- /tests/qdepends/list06.good: -------------------------------------------------------------------------------- 1 | DEPEND=" 2 | a[foo(+)] 3 | " 4 | -------------------------------------------------------------------------------- /tests/qdepends/root/app-arch/cpio-2.11/repository: -------------------------------------------------------------------------------- 1 | gentoo 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/LICENSE: -------------------------------------------------------------------------------- 1 | GPL-3 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/SIZE: -------------------------------------------------------------------------------- 1 | 8259979 2 | -------------------------------------------------------------------------------- /tests/qlist/root/sys-fs/mtools-4.0.13/repository: -------------------------------------------------------------------------------- 1 | gentoo 2 | -------------------------------------------------------------------------------- /tests/atom_explode/.gitignore: -------------------------------------------------------------------------------- 1 | basic 2 | e 3 | q 4 | me 5 | py 6 | -------------------------------------------------------------------------------- /tests/qdepends/list03.good: -------------------------------------------------------------------------------- 1 | DEPEND=" 2 | foo? ( a/b ) 3 | " 4 | -------------------------------------------------------------------------------- /tests/qdepends/list04.good: -------------------------------------------------------------------------------- 1 | DEPEND=" 2 | || ( a/b ) 3 | " 4 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/CATEGORY: -------------------------------------------------------------------------------- 1 | app-shells 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/PF: -------------------------------------------------------------------------------- 1 | bash-4.4_p23-r1 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/repository: -------------------------------------------------------------------------------- 1 | gentoo 2 | -------------------------------------------------------------------------------- /man/include/qfile-authors.include: -------------------------------------------------------------------------------- 1 | TGL 2 | -------------------------------------------------------------------------------- /tests/profile/profile1/etc/parent.conf: -------------------------------------------------------------------------------- 1 | CONFIG_PROTECT_MASK="-* asdf" 2 | -------------------------------------------------------------------------------- /tests/profile/profile1/etc/portage/this.level.conf: -------------------------------------------------------------------------------- 1 | FEATURES="-* feat" 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/BUILD_TIME: -------------------------------------------------------------------------------- 1 | 1547713708 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/CHOST: -------------------------------------------------------------------------------- 1 | x86_64-pc-linux-gnu 2 | -------------------------------------------------------------------------------- /tests/qlop/list04.good: -------------------------------------------------------------------------------- 1 | 2005-01-27T05:56:39 >>> sys-devel/gcc-3.4.3-r1 2 | -------------------------------------------------------------------------------- /tests/qlop/list05.good: -------------------------------------------------------------------------------- 1 | 2005-01-27T05:56:39 >>> sys-devel/gcc-3.4.3-r1 2 | -------------------------------------------------------------------------------- /tests/qmanifest/manifest05.good: -------------------------------------------------------------------------------- 1 | qmanifest: no such overlay: notatree 2 | -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/my-cat/mypackage/unrecorded-file: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /man/include/qxpak.desc: -------------------------------------------------------------------------------- 1 | \fIqxpak\fR is like ar and tar for xpak archives. 2 | -------------------------------------------------------------------------------- /tests/atom_compare/.gitignore: -------------------------------------------------------------------------------- 1 | basic 2 | portage 3 | static 4 | static.q 5 | -------------------------------------------------------------------------------- /tests/profile/profile1/etc/portage/subdir/file.conf: -------------------------------------------------------------------------------- 1 | ACCEPT_LICENSE='lic' 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/CBUILD: -------------------------------------------------------------------------------- 1 | x86_64-pc-linux-gnu 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/CFLAGS: -------------------------------------------------------------------------------- 1 | -O3 -march=native -pipe 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/CXXFLAGS: -------------------------------------------------------------------------------- 1 | -O3 -march=native -pipe 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/LDFLAGS: -------------------------------------------------------------------------------- 1 | -Wl,-O1 -Wl,--as-needed 2 | -------------------------------------------------------------------------------- /tests/qlist/root/sys-fs/mtools-4.0.13/IUSE: -------------------------------------------------------------------------------- 1 | X static-libs abi_x86_32 abi_x86_64 2 | -------------------------------------------------------------------------------- /tests/qlist/list17.good: -------------------------------------------------------------------------------- 1 | sys-fs/mtools-4.0.13 X -abi_x86_32 abi_x86_64 -static-libs 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/NEEDED: -------------------------------------------------------------------------------- 1 | /bin/bash libreadline.so.7,libc.so.6 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/REQUIRES: -------------------------------------------------------------------------------- 1 | x86_64: libc.so.6 libreadline.so.7 2 | -------------------------------------------------------------------------------- /tests/qlist/root/sys-fs/mtools-4.0.13/USE: -------------------------------------------------------------------------------- 1 | abi_x86_64 elibc_SunOS kernel_SunOS prefix X 2 | -------------------------------------------------------------------------------- /tests/qmanifest/manifest00.good: -------------------------------------------------------------------------------- 1 | bad_tree: /simpletree (main) 2 | not_a_tree: /notatree 3 | -------------------------------------------------------------------------------- /autotools/snippet/.gitignore: -------------------------------------------------------------------------------- 1 | /_Noreturn.h 2 | /arg-nonnull.h 3 | /c++defs.h 4 | /warn-on-use.h 5 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/DESCRIPTION: -------------------------------------------------------------------------------- 1 | The standard GNU Bourne again shell 2 | -------------------------------------------------------------------------------- /applets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sed -n '/^DECLARE_APPLET/s:.*(\(.*\))$:\1:p' "${0%/*}"/applets.h | sort 3 | -------------------------------------------------------------------------------- /tests/qdepends/root/x11-apps/xdm-1.1.11-r3/USE: -------------------------------------------------------------------------------- 1 | amd64 elibc_glibc ipv6 kernel_linux userland_GNU 2 | -------------------------------------------------------------------------------- /tests/qmanifest/key.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/portage-utils/HEAD/tests/qmanifest/key.gpg -------------------------------------------------------------------------------- /tests/qmanifest/manifest02.good: -------------------------------------------------------------------------------- 1 | verifying /notatree... 2 | verification must be done on a full tree 3 | -------------------------------------------------------------------------------- /tests/qmanifest/manifest03.good: -------------------------------------------------------------------------------- 1 | verifying notatree... 2 | verification must be done on a full tree 3 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/HOMEPAGE: -------------------------------------------------------------------------------- 1 | http://tiswww.case.edu/php/chet/bash/bashtop.html 2 | -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/metadata/layout.conf: -------------------------------------------------------------------------------- 1 | # dummy file to flag this to be a full repository 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/NEEDED.ELF.2: -------------------------------------------------------------------------------- 1 | X86_64;/bin/bash;;;libreadline.so.7,libc.so.6;x86_64 2 | -------------------------------------------------------------------------------- /tests/qlist/list01.good: -------------------------------------------------------------------------------- 1 | a-b/a 2 | a-b/b 3 | app-arch/cpio 4 | sys-fs/mtools 5 | virtual/pkg 6 | virtual/sub 7 | -------------------------------------------------------------------------------- /tests/qmanifest/manifest04.good: -------------------------------------------------------------------------------- 1 | qmanifest: cannot change directory to not_a_tree: No such file or directory 2 | -------------------------------------------------------------------------------- /tests/qxpak/list01.good: -------------------------------------------------------------------------------- 1 | a: 2 bytes 2 | b: 2 bytes 3 | c: 2 bytes 4 | d: 2 bytes 5 | e: 2 bytes 6 | f: 2 bytes 7 | -------------------------------------------------------------------------------- /tests/qxpak/list02.good: -------------------------------------------------------------------------------- 1 | f: 2 bytes 2 | e: 2 bytes 3 | d: 2 bytes 4 | c: 2 bytes 5 | b: 2 bytes 6 | a: 2 bytes 7 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/IUSE: -------------------------------------------------------------------------------- 1 | afs bashlogger examples mem-scramble +net nls plugins +readline 2 | -------------------------------------------------------------------------------- /tests/atom_explode/ebuildlist.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/portage-utils/HEAD/tests/atom_explode/ebuildlist.xz -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/USE: -------------------------------------------------------------------------------- 1 | abi_x86_64 amd64 elibc_glibc kernel_linux net nls readline userland_GNU 2 | -------------------------------------------------------------------------------- /tests/qlop/list01.good: -------------------------------------------------------------------------------- 1 | 2005-05-22T23:21:43 *** rsync://192.168.0.5/gentoo-portage 2 | 2015-05-16T08:20:02 *** gentoo 3 | -------------------------------------------------------------------------------- /tests/atom_explode/portageatoms.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/portage-utils/HEAD/tests/atom_explode/portageatoms.xz -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/DEFINED_PHASES: -------------------------------------------------------------------------------- 1 | compile configure install postinst preinst prepare setup unpack 2 | -------------------------------------------------------------------------------- /tests/qlist/list07.good: -------------------------------------------------------------------------------- 1 | a-b/a:a-0 2 | a-b/b:b-0 3 | app-arch/cpio:0 4 | sys-fs/mtools:0 5 | virtual/pkg:1 6 | virtual/sub:1 7 | -------------------------------------------------------------------------------- /tests/qlop/list06.good: -------------------------------------------------------------------------------- 1 | 2005-01-27T05:56:28 >>> sys-devel/gcc-config-1.3.9 2 | 2005-01-27T05:56:39 >>> sys-devel/gcc-3.4.3-r1 3 | -------------------------------------------------------------------------------- /tests/qlop/list07.good: -------------------------------------------------------------------------------- 1 | 2005-01-27T05:56:28 >>> sys-devel/gcc-config-1.3.9 2 | 2005-01-27T05:56:39 >>> sys-devel/gcc-3.4.3-r1 3 | -------------------------------------------------------------------------------- /tests/qlop/list08.good: -------------------------------------------------------------------------------- 1 | 2005-01-27T05:56:28 >>> sys-devel/gcc-config-1.3.9 2 | 2005-01-27T05:56:39 >>> sys-devel/gcc-3.4.3-r1 3 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/DEPEND: -------------------------------------------------------------------------------- 1 | >=sys-libs/ncurses-5.2-r2:0/6= >=sys-libs/readline-7.0:0/7= virtual/libintl 2 | -------------------------------------------------------------------------------- /tests/qlist/list14.good: -------------------------------------------------------------------------------- 1 | a-b/a:a-0 2 | a-b/b:b-0 3 | app-arch/cpio:0 4 | sys-fs/mtools:0 5 | virtual/pkg:1 6 | virtual/sub:1/1234 7 | -------------------------------------------------------------------------------- /man/include/qtbz2.desc: -------------------------------------------------------------------------------- 1 | \fIqtbz2\fR joins and splits combined xpak+tarbz2 files. Gentoo binary 2 | packages are such combined files. 3 | -------------------------------------------------------------------------------- /tests/qatom/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qatom 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qfile/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qfile 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qlist/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qlist 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qlop/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qlop 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qtbz2/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qtbz2 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qxpak/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qxpak 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/profile/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/profile 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qcheck/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qcheck 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qdepends/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qdepends 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qdepends/list05.good: -------------------------------------------------------------------------------- 1 | DEPEND=" 2 | || ( 3 | || ( 4 | || ( x ) 5 | a 6 | ) 7 | ) 8 | " 9 | -------------------------------------------------------------------------------- /tests/qmerge/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qmerge 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/source/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/source 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /tests/qlist/list11.good: -------------------------------------------------------------------------------- 1 | a-b/a::a 2 | a-b/b::b 3 | app-arch/cpio::gentoo 4 | sys-fs/mtools::gentoo 5 | virtual/pkg::repo 6 | virtual/sub::repo 7 | -------------------------------------------------------------------------------- /tests/qmanifest/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/qmanifest 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check-local: 5 | $(Q)$(s)/dotest 6 | -------------------------------------------------------------------------------- /man/include/qpkg.optdesc.yaml: -------------------------------------------------------------------------------- 1 | verbose: Check and report MD5 hash mismatches during install. 2 | quiet: Ignored for compatibility with other qapplets. 3 | -------------------------------------------------------------------------------- /man/include/qtbz2.optdesc.yaml: -------------------------------------------------------------------------------- 1 | verbose: Print some files and sizes while joining and splitting. 2 | quiet: Ignored for compatibility with other qapplets. 3 | -------------------------------------------------------------------------------- /man/include/quse.desc: -------------------------------------------------------------------------------- 1 | \fIquse\fR searches in ebuilds for a match in IUSE or LICENSE. 2 | It can also search for USE-flags and show their descriptions. 3 | -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/Manifest.files.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/portage-utils/HEAD/tests/qmanifest/root/simpletree/Manifest.files.gz -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/my-cat/Manifest.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/portage-utils/HEAD/tests/qmanifest/root/simpletree/my-cat/Manifest.gz -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/INHERITED: -------------------------------------------------------------------------------- 1 | desktop epatch estack toolchain-funcs multilib ltprune preserve-libs vcs-clean eutils flag-o-matic prefix 2 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/RDEPEND: -------------------------------------------------------------------------------- 1 | >=sys-libs/ncurses-5.2-r2:0/6= >=sys-libs/readline-7.0:0/7= virtual/libintl !>> dev-util/ccache-2.3 2 | 2005-01-27T05:56:28 >>> sys-devel/gcc-config-1.3.9 3 | 2005-01-27T05:56:39 >>> sys-devel/gcc-3.4.3-r1 4 | -------------------------------------------------------------------------------- /tests/atom_compare/static.q.good: -------------------------------------------------------------------------------- 1 | a/b == b 2 | a/b-1 == b 3 | a-1 != =a-1.0* 4 | a-1.0 == =a-1* 5 | a-1:1234 == a-1 6 | a-1:0 < a-2:0 7 | a-1:0 == a-1:0 8 | a-1_alpha1 != =a-1-r1* 9 | -------------------------------------------------------------------------------- /tests/qmanifest/root/etc/portage/repos.conf/qtest.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | main-repo = bad_tree 3 | 4 | [bad_tree] 5 | location = /simpletree 6 | 7 | [not_a_tree] 8 | location = /notatree 9 | -------------------------------------------------------------------------------- /man/include/qsearch.desc: -------------------------------------------------------------------------------- 1 | \fIqsearch\fR performs a search over the name and/or description of 2 | packages. By default, a search over all package names is performed over 3 | all ebuilds in the tree. 4 | -------------------------------------------------------------------------------- /tests/qlop/list09.good: -------------------------------------------------------------------------------- 1 | sys-devel/automake-1.11.6: 53 minutes, 52 seconds average for 1 merge 2 | sys-devel/automake-1.9.6-r3: 24 minutes, 7 seconds average for 1 merge 3 | total: 1 hour, 17 minutes, 59 seconds for 2 merges 4 | -------------------------------------------------------------------------------- /tests/qlop/list03.good: -------------------------------------------------------------------------------- 1 | 2005-01-27T05:56:38 <<< sys-devel/gcc-config-1.3.6-r3 2 | 2005-01-27T05:58:02 <<< sys-apps/pam-login-3.14 3 | 2005-01-27T05:58:04 <<< sys-libs/pam-0.77-r1 4 | 2005-01-27T05:58:15 <<< sys-fs/devfsd-1.3.25-r8 5 | -------------------------------------------------------------------------------- /tests/qlop/list10.good: -------------------------------------------------------------------------------- 1 | 1568996308 >>> net-analyzer/wireshark... (99 of 129) ETA: unknown 2 | 1568996270 >>> kde-frameworks/kxmlgui... (98 of 129) ETA: unknown 3 | 1568982460 >>> dev-qt/qtmultimedia... (96 of 129) ETA: unknown 4 | -------------------------------------------------------------------------------- /man/include/qsize.desc: -------------------------------------------------------------------------------- 1 | \fIqsize\fR calculates the storage size taken by an installed package. 2 | The reported sizes can be the recorded exact sizes of all files, or the 3 | storage space they consume given the underlying filesystem. 4 | -------------------------------------------------------------------------------- /man/include/qgrep.optdesc.yaml: -------------------------------------------------------------------------------- 1 | verbose: | 2 | Prefix each matching line with filename (like \fB-H\fR). When this 3 | option is given multiple times, also linenumbers are printed. 4 | quiet: Do not prefix each match with filename. 5 | -------------------------------------------------------------------------------- /tests/quse/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/quse 2 | b = $(abs_top_builddir)/$(this_subdir) 3 | s = $(abs_top_srcdir)/$(this_subdir) 4 | 5 | check-local: 6 | $(Q)$(s)/dotest 7 | 8 | clean-local: 9 | rm -f $(b)/PORTDIR-* $(b)/*.squashfs 10 | -------------------------------------------------------------------------------- /man/include/qpkg.desc: -------------------------------------------------------------------------------- 1 | \fIqpkg\fR creates or cleans up Gentoo binary packages. The default 2 | action is to create a new binpkg for the given package names and store 3 | them in pkgdir, which can be set explicitly using the \fB\-\-pkgdir\fR 4 | option. 5 | -------------------------------------------------------------------------------- /tests/install/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/install 2 | b = $(abs_top_builddir)/$(this_subdir) 3 | s = $(abs_top_srcdir)/$(this_subdir) 4 | 5 | check-local: 6 | $(Q)$(s)/dotest 7 | 8 | clean-local: 9 | rm -f $(b)/q `find $(b) -type l` 10 | -------------------------------------------------------------------------------- /tests/qdepends/root/x11-apps/xdm-1.1.11-r3/RDEPEND: -------------------------------------------------------------------------------- 1 | x11-apps/xrdb x11-libs/libXdmcp x11-libs/libXaw >=x11-apps/xinit-1.0.2-r3 x11-libs/libXinerama x11-libs/libXmu x11-libs/libX11 x11-libs/libXt x11-apps/sessreg x11-apps/xconsole ! 6 | */ 7 | 8 | #ifndef _XCHDIR_H 9 | #define _XCHDIR_H 1 10 | 11 | void xchdir(const char *path); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /tests/qlist/list04.good: -------------------------------------------------------------------------------- 1 | /usr/ 2 | /usr/bin/ 3 | /usr/share/ 4 | /usr/share/man/ 5 | /usr/share/man/man1/ 6 | /usr/share/man/man5/ 7 | /usr/share/doc/ 8 | /usr/share/doc/mtools-4.0.13/ 9 | /usr/share/info/ 10 | /usr/lib/ 11 | /usr/lib/debug/ 12 | /usr/lib/debug/usr/ 13 | /usr/lib/debug/usr/bin/ 14 | /etc/ 15 | /etc/mtools/ 16 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/FEATURES: -------------------------------------------------------------------------------- 1 | assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr 2 | -------------------------------------------------------------------------------- /libq/prelink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | */ 5 | 6 | #ifndef _PRELINK_H 7 | #define _PRELINK_H 1 8 | 9 | #include 10 | 11 | bool prelink_available(void); 12 | int hash_cb_prelink_undo(int fd, const char *filename); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /tests/qcheck/list01.good: -------------------------------------------------------------------------------- 1 | Checking a-b/pkg ... 2 | MD5-DIGEST: /bin/bad-md5 3 | MTIME: /bin/bad-mtime-obj 4 | SHA1-DIGEST: /bin/bad-sha1 5 | MTIME: /bin/bad-mtime-sym 6 | AFK: /bin/broken-sym 7 | AFK: /bin/missing-sym 8 | AFK: /missing-dir 9 | AFK: /missing-dir/missing-file 10 | AFK: /missing-dir/missing-sym 11 | * 4 out of 13 files are good 12 | -------------------------------------------------------------------------------- /man/include/qcheck.optdesc.yaml: -------------------------------------------------------------------------------- 1 | format: | 2 | Print matched atom using given format string. 3 | The default is \fI%[CATEGORY]%[PN]\fR or \fI%[CATEGORY]%[PF]\fR in 4 | verbose mode (\fB-v\fR|\fB--verbose\fR). 5 | Note that this only sets the format of the atom field, not the 6 | entire output line. 7 | For more information see \fBqatom\fR(1). 8 | -------------------------------------------------------------------------------- /libq/rmspace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | */ 5 | 6 | #ifndef _RMSPACE_H 7 | #define _RMSPACE_H 1 8 | 9 | #include 10 | 11 | char *rmspace_len(char *s, size_t len); 12 | char *rmspace(char *s); 13 | char *remove_extra_space(char *s); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/Manifest: -------------------------------------------------------------------------------- 1 | MANIFEST Manifest.files.gz 437 BLAKE2B 32dd239c7cc855c08a02c50b07970cc4df0af1a40e4be3c69c05d36e97ec8b611a45f2fdc773450fecd4d22253122f3978080cea595247e7891b66688ac45668 SHA512 85036ad84f245f8137591223c0db936ab80a21c363e06dae63e6e0f1f2c78715a733abc55b9707a89df39481dedcddd3887f66fd59d4ce8dcdf5e8ccf3c2a267 2 | TIMESTAMP 2018-03-01T10:58:37Z 3 | -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/my-cat/mypackage/mypackage-0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2018 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | EAPI=6 5 | 6 | DESCRIPTION="" 7 | HOMEPAGE="" 8 | SRC_URI="" 9 | 10 | LICENSE="" 11 | SLOT="0" 12 | KEYWORDS="~amd64 ~x86" 13 | IUSE="" 14 | 15 | DEPEND="" 16 | RDEPEND="${DEPEND}" 17 | -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/my-cat/mypackage/mypackage-2.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2018 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | EAPI=6 5 | 6 | HASH_MISMATCH_ 7 | HOMEPAGE="" 8 | SRC_URI="" 9 | 10 | LICENSE="" 11 | SLOT="0" 12 | KEYWORDS="~amd64 ~x86" 13 | IUSE="" 14 | 15 | DEPEND="" 16 | RDEPEND="${DEPEND}" 17 | -------------------------------------------------------------------------------- /libq/profile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | */ 5 | 6 | #ifndef _PROFILE_H 7 | #define _PROFILE_H 1 8 | 9 | typedef void *(q_profile_callback_t)(void *, char *); 10 | void *q_profile_walk( 11 | const char *file, q_profile_callback_t callback, 12 | void *data); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /tests/qcheck/list04.good: -------------------------------------------------------------------------------- 1 | Checking a-b/pkg ... 2 | MTIME: /bin/bad-mtime-obj 3 | MTIME: /bin/bad-mtime-sym 4 | AFK: /bin/broken-sym 5 | AFK: /bin/missing-sym 6 | AFK: /missing-dir 7 | AFK: /missing-dir/missing-file 8 | AFK: /missing-dir/missing-sym 9 | * 4 out of 11 files are good (2 files were ignored) 10 | Checking virtual/pkg ... 11 | * 0 out of 0 files are good 12 | -------------------------------------------------------------------------------- /tests/qcheck/list05.good: -------------------------------------------------------------------------------- 1 | Checking a-b/pkg ... 2 | MD5-DIGEST: /bin/bad-md5 3 | SHA1-DIGEST: /bin/bad-sha1 4 | AFK: /bin/broken-sym 5 | AFK: /bin/missing-sym 6 | AFK: /missing-dir 7 | AFK: /missing-dir/missing-file 8 | AFK: /missing-dir/missing-sym 9 | * 3 out of 10 files are good (3 files were ignored) 10 | Checking virtual/pkg ... 11 | * 0 out of 0 files are good 12 | -------------------------------------------------------------------------------- /tests/qcheck/list09.good: -------------------------------------------------------------------------------- 1 | Updating a-b/pkg ... 2 | MD5-DIGEST: /bin/bad-md5 3 | MTIME: /bin/bad-mtime-obj 4 | SHA1-DIGEST: /bin/bad-sha1 5 | MTIME: /bin/bad-mtime-sym 6 | AFK: /bin/broken-sym 7 | AFK: /bin/missing-sym 8 | AFK: /missing-dir 9 | AFK: /missing-dir/missing-file 10 | AFK: /missing-dir/missing-sym 11 | Checking a-b/pkg ... 12 | * 8 out of 8 files are good 13 | -------------------------------------------------------------------------------- /man/include/qmerge.desc: -------------------------------------------------------------------------------- 1 | \fIqmerge\fR retrieves and installs Gentoo binary packages. Simple 2 | dependency checking is performed, after which \fIqmerge\fR just unpacks 3 | the binpkg onto the filesystem and registers the package in the VDB. 4 | 5 | Retrieval of packages from a remote binhost is currently performed using 6 | \fBwget\fR(1). More specifically, \fIFETCHCOMMAND\fR is ignored. 7 | -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/my-cat/mypackage/metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | grobian@gentoo.org 6 | Fabian Groffen 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/qmanifest/root/simpletree/my-cat/mypackage/mypackage-1.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2018 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | #filesize mismatch 5 | 6 | EAPI=6 7 | 8 | DESCRIPTION="" 9 | HOMEPAGE="" 10 | SRC_URI="" 11 | 12 | LICENSE="" 13 | SLOT="0" 14 | KEYWORDS="~amd64 ~x86" 15 | IUSE="" 16 | 17 | DEPEND="" 18 | RDEPEND="${DEPEND}" 19 | -------------------------------------------------------------------------------- /libq/copy_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2011-2016 Mike Frysinger - 6 | */ 7 | 8 | #ifndef _COPY_FILE_H 9 | #define _COPY_FILE_H 1 10 | 11 | #include 12 | 13 | int copy_file_fd(int fd_src, int fd_dst); 14 | int copy_file(FILE *src, FILE *dst); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /autotools/m4/xalloc.m4: -------------------------------------------------------------------------------- 1 | # xalloc.m4 2 | # serial 18 3 | dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_XALLOC], [:]) 10 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = \ 2 | atom_compare atom_explode copy_file mkdir rmspace \ 3 | qatom qcheck qdepends qfile qlist qlop qmerge qtbz2 quse qxpak \ 4 | install profile 5 | 6 | if QMANIFEST_ENABLED 7 | SUBDIRS += qmanifest 8 | endif 9 | 10 | SUBDIRS += source 11 | 12 | %_subdir: 13 | $(Q)cd $(@:_subdir=) || exit 1; \ 14 | out=`$(MAKE) check 2>&1`; \ 15 | ret=$$?; \ 16 | echo "$$out"; \ 17 | exit $$ret 18 | -------------------------------------------------------------------------------- /tests/atom_compare/static.q.tests: -------------------------------------------------------------------------------- 1 | # Certain atom matching styles that portage does not support 2 | # but qatom accepts. Or I can't quite figure out how to get 3 | # portage to do the compare. Not a big deal either way. 4 | a/b b 5 | a/b-1 b 6 | a-1 =a-1.0* 7 | a-1.0 =a-1* 8 | a-1:1234 a-1 9 | a-1:0 a-2:0 10 | a-1:0 a-1:0 11 | 12 | # In this case, it's because portage gets it wrong. #467826 13 | a-1_alpha1 =a-1-r1* 14 | -------------------------------------------------------------------------------- /man/include/qgrep.desc: -------------------------------------------------------------------------------- 1 | \fIqgrep\fR searches for a given expression in all ebuilds of the 2 | current portage tree and defined additional overlays. Optionally the 3 | search is in all eclasses, or just in the ebuilds that are currently 4 | installed. To narrow the search, multiple targets can be given using 5 | atom syntax. In particular, the trailing slash (/) syntax can be used 6 | to match an entire category. See also \fBqatom\fR(1). 7 | -------------------------------------------------------------------------------- /libq/eat_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | */ 5 | 6 | #ifndef _EAT_FILE_H 7 | #define _EAT_FILE_H 1 8 | 9 | #include 10 | #include 11 | 12 | bool eat_file_fd(int, char **, size_t *); 13 | bool eat_file(const char *, char **, size_t *); 14 | bool eat_file_at(int, const char *, char **, size_t *); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /man/include/qmanifest.optdesc.yaml: -------------------------------------------------------------------------------- 1 | signas: | 2 | Sign generated Manifest using GPG key. This key must exist in your 3 | keyring and be valid for signing. 4 | passphrase: | 5 | Ask for GPG key password (instead of relying on gpg-agent). While 6 | this option is not very useful compared to gpg's ways of gathering a 7 | password, it is mainly intended for automated setups where the 8 | password is piped in using \fIstdin\fR. 9 | -------------------------------------------------------------------------------- /libq/xchdir.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2010-2016 Mike Frysinger - 6 | */ 7 | 8 | #include "main.h" 9 | 10 | #include 11 | #include 12 | 13 | #include "xchdir.h" 14 | 15 | void 16 | xchdir(const char *path) 17 | { 18 | if (unlikely(chdir(path) != 0)) 19 | errp("chdir(%s) failed", path); 20 | } 21 | -------------------------------------------------------------------------------- /man/include/qlist.desc: -------------------------------------------------------------------------------- 1 | \fIqlist\fR shows the contents, or a subset thereof, of an installed 2 | package. Alternatively, lists whether a package is installed, 3 | optionally with version, USE-flag, SLOT or REPO information. The 4 | \fIpkgname\fR to query for does not have to be an exact match, it may be 5 | part of it, e.g.\ an entire category, or any package with some string in 6 | its name. When no packages are given to match, \fIqlist\fR lists all 7 | installed packages. 8 | -------------------------------------------------------------------------------- /autotools/m4/msvc-nothrow.m4: -------------------------------------------------------------------------------- 1 | # msvc-nothrow.m4 2 | # serial 1 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_MSVC_NOTHROW], 10 | [ 11 | AC_REQUIRE([gl_MSVC_INVAL]) 12 | ]) 13 | -------------------------------------------------------------------------------- /tests/source/space: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Usage: space 3 | # Trim trailing whitespace and consecutive newlines. 4 | 5 | i=$1 6 | 7 | if [ $# != 1 ] ; then 8 | cat <<-EOF 9 | Usage: ${0##/*} 10 | Trim trailing whitespace and consecutive newlines. 11 | EOF 12 | fi 13 | 14 | sed -r '/[[:space:]]+$/s:[[:space:]]+$::' "$i" | \ 15 | awk '{ 16 | if (NF == 0) { 17 | while (NF == 0) 18 | if (getline == 0) 19 | exit 20 | print "" 21 | } 22 | print 23 | }' 24 | -------------------------------------------------------------------------------- /autotools/m4/timespec.m4: -------------------------------------------------------------------------------- 1 | # timespec.m4 2 | # serial 15 3 | dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software Foundation, 4 | dnl Inc. 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | dnl This file is offered as-is, without any warranty. 9 | 10 | dnl From Jim Meyering 11 | 12 | AC_DEFUN([gl_TIMESPEC], [:]) 13 | -------------------------------------------------------------------------------- /libq/basename.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2010-2014 Mike Frysinger - 6 | */ 7 | 8 | #ifndef _BASENAME_H 9 | #define _BASENAME_H 1 10 | 11 | #include 12 | 13 | const char *_basename(const char *filename); 14 | 15 | /* Avoid issues with clobbering C library def */ 16 | #undef basename 17 | #define basename(x) _basename(x) 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /tests/qdepends/list08.good: -------------------------------------------------------------------------------- 1 | x11-apps/xdm: !=media-fonts/font-util-1.2.0 >=sys-devel/autoconf-2.68 >=sys-devel/automake-1.12:1.12 >=sys-devel/automake-1.13:1.13 >=sys-devel/libtool-2.2.6a >=x11-apps/xinit-1.0.2-r3 >=x11-misc/util-macros-1.17 sys-devel/libtool sys-devel/m4 virtual/pkgconfig x11-apps/sessreg x11-apps/xconsole x11-apps/xrdb x11-libs/libX11 x11-libs/libXaw x11-libs/libXdmcp x11-libs/libXinerama x11-libs/libXmu x11-libs/libXt x11-proto/xineramaproto x11-proto/xproto 2 | -------------------------------------------------------------------------------- /libq/human_readable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | */ 5 | 6 | #ifndef _HUMAN_READABLE_H 7 | #define _HUMAN_READABLE_H 1 8 | 9 | enum { 10 | KILOBYTE = 1024, 11 | MEGABYTE = (KILOBYTE*1024), 12 | GIGABYTE = (MEGABYTE*1024) 13 | }; 14 | 15 | const char *make_human_readable_str( 16 | unsigned long long val, 17 | unsigned long block_size, 18 | unsigned long display_unit); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /libq/xregex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2011-2016 Mike Frysinger - 6 | */ 7 | 8 | #ifndef _XREGEX_H 9 | #define _XREGEX_H 1 10 | 11 | #include 12 | 13 | int wregcomp(regex_t *preg, const char *regex, int cflags); 14 | void xregcomp(regex_t *preg, const char *regex, int cflags); 15 | int rematch(const char *, const char *, int); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /tests/qdepends/list07.good: -------------------------------------------------------------------------------- 1 | x11-apps/xdm-1.1.11-r3: !=media-fonts/font-util-1.2.0 >=sys-devel/autoconf-2.68 >=sys-devel/automake-1.12:1.12 >=sys-devel/automake-1.13:1.13 >=sys-devel/libtool-2.2.6a >=x11-apps/xinit-1.0.2-r3 >=x11-misc/util-macros-1.17 sys-devel/libtool sys-devel/m4 virtual/pkgconfig x11-apps/sessreg x11-apps/xconsole x11-apps/xrdb x11-libs/libX11 x11-libs/libXaw x11-libs/libXdmcp x11-libs/libXinerama x11-libs/libXmu x11-libs/libXt x11-proto/xineramaproto x11-proto/xproto 2 | -------------------------------------------------------------------------------- /tests/qlist/list06.good: -------------------------------------------------------------------------------- 1 | /usr/bin/minfo 2 | /usr/bin/mpartition 3 | /usr/bin/mrd 4 | /usr/bin/mdir 5 | /usr/bin/mtoolstest 6 | /usr/bin/mdel 7 | /usr/bin/mbadblocks 8 | /usr/bin/mdeltree 9 | /usr/bin/mtype 10 | /usr/bin/mcat 11 | /usr/bin/mformat 12 | /usr/bin/mclasserase 13 | /usr/bin/mshowfat 14 | /usr/bin/mcopy 15 | /usr/bin/mmd 16 | /usr/bin/mmount 17 | /usr/bin/mren 18 | /usr/bin/mdu 19 | /usr/bin/mmove 20 | /usr/bin/mzip 21 | /usr/bin/mattrib 22 | /usr/bin/lz 23 | /usr/bin/mcd 24 | /usr/bin/mlabel 25 | -------------------------------------------------------------------------------- /man/include/q.desc: -------------------------------------------------------------------------------- 1 | .I q 2 | is a collection of utilities for use with Gentoo systems regarding 3 | installed and available packages. 4 | .P 5 | After version 0.74 of portage-utils, the cache functionality was removed 6 | in favour of using various trees directly, and optionally the caches 7 | therein. As such the \fB-r\fR and \fB-m\fR options were removed. It is 8 | no longer necessary to initialise the cache at any time. 9 | .P 10 | After version 0.82, the \fB-m\fR flag got repurposed for listing masks. 11 | -------------------------------------------------------------------------------- /libq/basename.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2010-2014 Mike Frysinger - 6 | */ 7 | 8 | #include "main.h" 9 | 10 | #include 11 | 12 | #include "basename.h" 13 | 14 | /* our own basename which does not modify its input */ 15 | const char *_basename(const char *filename) 16 | { 17 | const char *p = strrchr(filename, '/'); 18 | return p ? p + 1 : filename; 19 | } 20 | -------------------------------------------------------------------------------- /tests/mkdir/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/mkdir 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check_PROGRAMS = m 5 | m_SOURCES = test.c 6 | m_CPPFLAGS = -I$(top_srcdir) \ 7 | -I$(top_srcdir)/libq \ 8 | -I$(top_builddir)/autotools/gnulib \ 9 | -I$(top_srcdir)/autotools/gnulib 10 | m_LDADD = $(top_builddir)/libq/libq.a \ 11 | $(top_builddir)/autotools/gnulib/libgnu.a \ 12 | $(LIB_CLOCK_GETTIME) \ 13 | $(LIB_EACCESS) 14 | 15 | dotest: m 16 | $(s)/dotest 17 | 18 | check-local: dotest 19 | -------------------------------------------------------------------------------- /autotools/m4/save-cwd.m4: -------------------------------------------------------------------------------- 1 | # save-cwd.m4 2 | # serial 10 3 | dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl Prerequisites for lib/save-cwd.c. 10 | AC_DEFUN([gl_SAVE_CWD], 11 | [ 12 | AC_CHECK_FUNCS_ONCE([fchdir]) 13 | ]) 14 | -------------------------------------------------------------------------------- /tests/rmspace/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/rmspace 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check_PROGRAMS = m 5 | m_SOURCES = test.c 6 | m_CPPFLAGS = -I$(top_srcdir) \ 7 | -I$(top_srcdir)/libq \ 8 | -I$(top_builddir)/autotools/gnulib \ 9 | -I$(top_srcdir)/autotools/gnulib 10 | m_LDADD = $(top_builddir)/libq/libq.a \ 11 | $(top_builddir)/autotools/gnulib/libgnu.a \ 12 | $(LIB_CLOCK_GETTIME) \ 13 | $(LIB_EACCESS) 14 | 15 | dotest: m 16 | $(s)/dotest 17 | 18 | check-local: dotest 19 | -------------------------------------------------------------------------------- /tests/qdepends/root/x11-apps/xdm-1.1.11-r3/DEPEND: -------------------------------------------------------------------------------- 1 | x11-apps/xrdb x11-libs/libXdmcp x11-libs/libXaw >=x11-apps/xinit-1.0.2-r3 x11-libs/libXinerama x11-libs/libXmu x11-libs/libX11 x11-libs/libXt x11-apps/sessreg x11-apps/xconsole !=sys-devel/automake-1.12:1.12 >=sys-devel/automake-1.13:1.13 ) >=sys-devel/autoconf-2.68 sys-devel/libtool >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.17 >=media-fonts/font-util-1.2.0 virtual/pkgconfig virtual/pkgconfig 2 | -------------------------------------------------------------------------------- /libq/xsystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2022 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2010-2016 Mike Frysinger - 6 | * Copyright 2022 Fabian Groffen - 7 | */ 8 | 9 | #ifndef _XSYSTEM_H 10 | #define _XSYSTEM_H 1 11 | 12 | void xsystembash(const char *command, const char **argv, int cwd); 13 | #define xsystem(C,F) xsystembash(C, NULL, F) 14 | #define xsystemv(V,F) xsystembash(NULL, V, F) 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /tests/profile/profile1/etc/portage/make.conf: -------------------------------------------------------------------------------- 1 | ARCH=x86 # comment 2 | 3 | #395629 4 | CONFIG_PROTECT=-* #fkajdsf 5 | 6 | source this.level.conf 7 | 8 | source ../parent.conf 9 | 10 | source subdir/file.conf 11 | 12 | INSTALL_MASK=" imask " 13 | INSTALL_MASK="${INSTALL_MASK} x " 14 | INSTALL_MASK="$INSTALL_MASK 15 | b 16 | " #fj 17 | 18 | PORTAGE_BINHOST="http://someurl/" # this is a comment 19 | NOCOLOR=1 # this is a comment 20 | 21 | # Catch a bug with var parsing. 22 | PKGDIR="$PREFLIGHT_BINHOST $FULL_BINHOST" 23 | -------------------------------------------------------------------------------- /tests/atom_explode/dotest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ../init.sh || exit 1 4 | 5 | files=$(xzcat "${as}"/ebuildlist.xz) 6 | 7 | printf "atom_explode():" 8 | time echo "${files}" | "$b"/e > "$b"/me || exit $? 9 | echo 10 | 11 | if [[ -n ${QATOM_COMPARE_TO_PORTAGE} ]] ; then 12 | printf "portage:" 13 | time echo "${files}" | "$s"/atom-explode.py > "$b"/py 14 | echo 15 | else 16 | xzcat "${as}"/portageatoms.xz > "$b"/py 17 | fi 18 | 19 | diff -U 0 "$b"/me "$b"/py 20 | tend $? "portage-utils vs portage atom parsing" 21 | 22 | end 23 | -------------------------------------------------------------------------------- /autotools/m4/xsize.m4: -------------------------------------------------------------------------------- 1 | # xsize.m4 2 | # serial 5 3 | dnl Copyright (C) 2003-2004, 2008-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_XSIZE], 10 | [ 11 | dnl Prerequisites of lib/xsize.h. 12 | AC_REQUIRE([gl_SIZE_MAX]) 13 | AC_CHECK_HEADERS([stdint.h]) 14 | ]) 15 | -------------------------------------------------------------------------------- /autotools/m4/localcharset.m4: -------------------------------------------------------------------------------- 1 | # localcharset.m4 2 | # serial 8 3 | dnl Copyright (C) 2002, 2004, 2006, 2009-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_LOCALCHARSET], 10 | [ 11 | dnl Prerequisites of lib/localcharset.c. 12 | AC_REQUIRE([AM_LANGINFO_CODESET]) 13 | ]) 14 | -------------------------------------------------------------------------------- /libq/safe_io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | */ 5 | 6 | #ifndef _SAFE_IO_H 7 | #define _SAFE_IO_H 1 8 | 9 | #include 10 | #include 11 | 12 | size_t safe_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); 13 | #ifndef _IN_SAFE_IO 14 | # define fwrite safe_fwrite 15 | #endif 16 | 17 | ssize_t safe_read(int fd, void *buf, size_t len); 18 | ssize_t safe_write(int fd, const void *buf, size_t len); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /tests/copy_file/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/copy_file 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check_PROGRAMS = m 5 | m_SOURCES = test.c 6 | m_CPPFLAGS = -I$(top_srcdir) \ 7 | -I$(top_srcdir)/libq \ 8 | -I$(top_builddir)/autotools/gnulib \ 9 | -I$(top_srcdir)/autotools/gnulib 10 | m_LDADD = $(top_builddir)/libq/libq.a \ 11 | $(top_builddir)/autotools/gnulib/libgnu.a \ 12 | $(LIB_CLOCK_GETTIME) \ 13 | $(LIB_EACCESS) \ 14 | $(SENDFILE_LIBS) 15 | 16 | dotest: m 17 | $(s)/dotest 18 | 19 | check-local: dotest 20 | -------------------------------------------------------------------------------- /autotools/m4/mbiter.m4: -------------------------------------------------------------------------------- 1 | # mbiter.m4 2 | # serial 7 3 | dnl Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl autoconf tests required for use of mbiter.h 10 | dnl From Bruno Haible. 11 | 12 | AC_DEFUN([gl_MBITER], 13 | [ 14 | AC_REQUIRE([AC_TYPE_MBSTATE_T]) 15 | : 16 | ]) 17 | -------------------------------------------------------------------------------- /man/include/qsearch.optdesc.yaml: -------------------------------------------------------------------------------- 1 | verbose: Ignored for compatibility with other qapplets. 2 | quiet: Ignored for compatibility with other qapplets. 3 | format: | 4 | Print matched atom using given format string. 5 | The default is \fI%[CATEGORY]%[PN]\fR or \fI%[CATEGORY]%[PF]\fR in 6 | verbose mode (\fB-v\fR|\fB--verbose\fR). 7 | If \fB-R\fR|\fB--repo\fR is set, \fI%[REPO]\fR will be appended. 8 | Note that this only sets the format of the atom field, not the 9 | entire output line. 10 | For more information see \fBqatom\fR(1). 11 | -------------------------------------------------------------------------------- /autotools/m4/mbchar.m4: -------------------------------------------------------------------------------- 1 | # mbchar.m4 2 | # serial 9 3 | dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl autoconf tests required for use of mbchar.m4 10 | dnl From Bruno Haible. 11 | 12 | AC_DEFUN([gl_MBCHAR], 13 | [ 14 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 15 | ]) 16 | -------------------------------------------------------------------------------- /autotools/m4/md5.m4: -------------------------------------------------------------------------------- 1 | # md5.m4 2 | # serial 14 3 | dnl Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_MD5], 10 | [ 11 | dnl Prerequisites of lib/md5.c. 12 | AC_REQUIRE([gl_BIGENDIAN]) 13 | 14 | dnl Determine HAVE_OPENSSL_MD5 and LIB_CRYPTO 15 | gl_CRYPTO_CHECK([MD5]) 16 | ]) 17 | -------------------------------------------------------------------------------- /autotools/m4/sha1.m4: -------------------------------------------------------------------------------- 1 | # sha1.m4 2 | # serial 12 3 | dnl Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_SHA1], 10 | [ 11 | dnl Prerequisites of lib/sha1.c. 12 | AC_REQUIRE([gl_BIGENDIAN]) 13 | 14 | dnl Determine HAVE_OPENSSL_SHA1 and LIB_CRYPTO 15 | gl_CRYPTO_CHECK([SHA1]) 16 | ]) 17 | -------------------------------------------------------------------------------- /autotools/m4/sha256.m4: -------------------------------------------------------------------------------- 1 | # sha256.m4 2 | # serial 8 3 | dnl Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_SHA256], 10 | [ 11 | dnl Prerequisites of lib/sha256.c. 12 | AC_REQUIRE([gl_BIGENDIAN]) 13 | 14 | dnl Determine HAVE_OPENSSL_SHA256 and LIB_CRYPTO 15 | gl_CRYPTO_CHECK([SHA256]) 16 | ]) 17 | -------------------------------------------------------------------------------- /man/include/qtegrity.desc: -------------------------------------------------------------------------------- 1 | The default behavior of \fBqtegrity\fP is to verify digests of performed 2 | executables to a list of known good digests. This requires an IMA-enabled 3 | linux kernel, which records digests of performed executables and exports them 4 | through securityfs. Using \fB\-\-ignore-non-existent\fP suppresses messages 5 | about recorded files that can't be accessed (assuming they got removed). 6 | By using \fB\-\-add\fP, the program behaves differently. No verification is 7 | performed, instead a digest is made of the provided file and appended to 8 | the list of known good digests. 9 | -------------------------------------------------------------------------------- /autotools/m4/sha512.m4: -------------------------------------------------------------------------------- 1 | # sha512.m4 2 | # serial 9 3 | dnl Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_SHA512], 10 | [ 11 | dnl Prerequisites of lib/sha512.c. 12 | AC_REQUIRE([gl_BIGENDIAN]) 13 | 14 | dnl Determine HAVE_OPENSSL_SHA512 and LIB_CRYPTO 15 | gl_CRYPTO_CHECK([SHA512]) 16 | ]) 17 | -------------------------------------------------------------------------------- /libq/xpak.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | */ 5 | 6 | #ifndef _XPAK_H 7 | #define _XPAK_H 1 8 | 9 | typedef void (*xpak_callback_t)(void *, char *, int, int, int, char *); 10 | 11 | int xpak_process_fd(int, bool, void *, xpak_callback_t); 12 | int xpak_process(const char *, bool, void *, xpak_callback_t); 13 | #define xpak_list(A,B,C) xpak_process(A,false,B,C) 14 | #define xpak_extract(A,B,C) xpak_process(A,true,B,C) 15 | int xpak_create(int, const char *, int, char **, bool, int); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /man/include/qsize.optdesc.yaml: -------------------------------------------------------------------------------- 1 | ignore: | 2 | Filter out entries matching \fI\fR, which is a regular 3 | expression, before calculating size. 4 | verbose: Ignored for compatibility with other qapplets. 5 | quiet: Ignored for compatibility with other qapplets. 6 | format: | 7 | Print matched atom using given format string. 8 | The default is \fI%[CATEGORY]%[PN]\fR or \fI%[CATEGORY]%[PF]\fR in 9 | verbose mode (\fB-v\fR|\fB--verbose\fR). 10 | Note that this only sets the format of the atom field, not the 11 | entire output line. 12 | For more information see \fBqatom\fR(1). 13 | -------------------------------------------------------------------------------- /man/include/qwhich.optdesc.yaml: -------------------------------------------------------------------------------- 1 | format: | 2 | Print matched atom using given format string. 3 | 4 | Setting this option has the effect of also setting 5 | \fB-p\fR|\fB--pretty\fR. 6 | 7 | Note that this only sets the format of the atom field, not the 8 | entire output line. 9 | 10 | For more information see \fBqatom\fR(1). 11 | pretty: | 12 | Print (pretty) atom instead of path. 13 | 14 | The default print format is \fI%[CATEGORY]%[PN]\fR or 15 | \fI%[CATEGORY]%[PF]\fR in verbose mode (\fB-v\fR|\fB--verbose\fR). 16 | The format can be changed with \fB-F\fR|\fB--format\fR. 17 | -------------------------------------------------------------------------------- /libq/xmkdir.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2011-2016 Mike Frysinger - 6 | * Copyright 2017- Fabian Groffen - 7 | */ 8 | 9 | #ifndef _XMKDIR_H 10 | #define _XMKDIR_H 1 11 | 12 | int mkdir_p_at(int dfd, const char *path, mode_t mode); 13 | int mkdir_p(const char *path, mode_t mode); 14 | int rm_rf_at(int dfd, const char *path); 15 | int rm_rf(const char *path); 16 | int rmdir_r_at(int dfd, const char *path); 17 | int rmdir_r(const char *path); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libq/move_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2021 Gentoo Authors 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2005-2010 Ned Ludd - 6 | * Copyright 2005-2014 Mike Frysinger - 7 | * Copyright 2018- Fabian Groffen - 8 | */ 9 | 10 | #ifndef _MOVE_FILE_H 11 | 12 | #define _MOVE_FILE_H 1 13 | 14 | #include 15 | #include 16 | 17 | int move_file(int rootfd_src, const char *name_src, 18 | int rootfd_dst, const char *name_dst, 19 | struct stat *stat_src); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /tests/qcheck/list08.good: -------------------------------------------------------------------------------- 1 | Checking a-b/pkg-1.0 ... 2 | MD5-DIGEST: /bin/bad-md5 (recorded '2b00042f7481c7b056c4b410d28f33cf' != actual 'f873a43958ea3a2c7a21fb0beb91001a') 3 | MTIME: /bin/bad-mtime-obj (recorded '1' != actual '1398954900') 4 | SHA1-DIGEST: /bin/bad-sha1 (recorded '7d97e98f8af710c7e7fe703abc8f639e0ee507c4' != actual '93e53f957b54a6a5bb2891d998fda65719887f84') 5 | MTIME: /bin/bad-mtime-sym (recorded '1' != actual '1398954900') 6 | AFK: /bin/broken-sym 7 | AFK: /bin/missing-sym 8 | AFK: /missing-dir 9 | AFK: /missing-dir/missing-file 10 | AFK: /missing-dir/missing-sym 11 | * 4 out of 13 files are good 12 | -------------------------------------------------------------------------------- /tests/quse/portdir/profiles/arch.list: -------------------------------------------------------------------------------- 1 | alpha 2 | amd64 3 | amd64-fbsd 4 | arm 5 | hppa 6 | ia64 7 | m68k 8 | mips 9 | ppc 10 | ppc64 11 | s390 12 | sh 13 | sparc 14 | sparc-fbsd 15 | x86 16 | x86-fbsd 17 | 18 | # Prefix keywords 19 | ppc-aix 20 | x86-freebsd 21 | x64-freebsd 22 | sparc64-freebsd 23 | hppa-hpux 24 | ia64-hpux 25 | x86-interix 26 | mips-irix 27 | amd64-linux 28 | arm-linux 29 | ia64-linux 30 | x86-linux 31 | ppc-macos 32 | x86-macos 33 | x64-macos 34 | m68k-mint 35 | x86-netbsd 36 | ppc-openbsd 37 | x86-openbsd 38 | x64-openbsd 39 | sparc-solaris 40 | sparc64-solaris 41 | x64-solaris 42 | x86-solaris 43 | x86-winnt 44 | x86-cygwin 45 | -------------------------------------------------------------------------------- /tests/atom_explode/atom-explode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys,portage 4 | 5 | def doit(a): 6 | # ['x11-terms', 'wterm', '6.2.9', 'r2'] 7 | cpv = portage.catpkgsplit(a) 8 | if not cpv: 9 | print("Portage could not match " + a + " to a package") 10 | return 11 | # input -> CATEGORY / [P] PN - PVR [PV] [PR_int] 12 | CATEGORY = cpv[0] 13 | PN = cpv[1] 14 | PV = cpv[2] 15 | PR_int = cpv[3] 16 | P = PN + "-" + PV 17 | PVR = PV + "-" + cpv[3] 18 | print(a+" -> "+CATEGORY+" / ["+P+"] "+PN+" - "+PVR+" ["+PV+"] ["+PR_int+"]") 19 | 20 | for a in sys.argv[1:]: 21 | doit(a) 22 | 23 | for a in sys.stdin.readlines(): 24 | doit(a.strip()) 25 | -------------------------------------------------------------------------------- /autotools/m4/filenamecat.m4: -------------------------------------------------------------------------------- 1 | # filenamecat.m4 2 | # serial 12 3 | dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_FILE_NAME_CONCAT], 10 | [ 11 | AC_REQUIRE([gl_FILE_NAME_CONCAT_LGPL]) 12 | ]) 13 | 14 | AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL], 15 | [ 16 | dnl Prerequisites of lib/filenamecat-lgpl.c. 17 | gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include ]]) 18 | ]) 19 | -------------------------------------------------------------------------------- /autotools/m4/off_t.m4: -------------------------------------------------------------------------------- 1 | # off_t.m4 2 | # serial 1 3 | dnl Copyright (C) 2012-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl Check whether to override the 'off_t' type. 10 | dnl Set WINDOWS_64_BIT_OFF_T. 11 | 12 | AC_DEFUN([gl_TYPE_OFF_T], 13 | [ 14 | m4_ifdef([gl_LARGEFILE], [ 15 | AC_REQUIRE([gl_LARGEFILE]) 16 | ], [ 17 | WINDOWS_64_BIT_OFF_T=0 18 | ]) 19 | AC_SUBST([WINDOWS_64_BIT_OFF_T]) 20 | ]) 21 | -------------------------------------------------------------------------------- /tests/atom_explode/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/atom_explode 2 | s = $(abs_top_srcdir)/$(this_subdir) 3 | 4 | check_PROGRAMS = e 5 | e_SOURCES = test.c 6 | e_CPPFLAGS = -I$(top_srcdir) \ 7 | -I$(top_srcdir)/libq \ 8 | -I$(top_builddir)/autotools/gnulib \ 9 | -I$(top_srcdir)/autotools/gnulib 10 | e_LDADD = $(top_builddir)/libq/libq.a \ 11 | $(top_builddir)/autotools/gnulib/libgnu.a \ 12 | $(LIB_CLOCK_GETTIME) \ 13 | $(LIB_EACCESS) 14 | 15 | basic: e 16 | ./e < $(s)/basic.tests > basic 17 | diff -u $(s)/basic.good basic 18 | 19 | dotest: e 20 | $(s)/dotest 21 | 22 | check-local: dotest basic 23 | 24 | clean-local: 25 | rm -f me py q basic 26 | -------------------------------------------------------------------------------- /autotools/m4/malloca.m4: -------------------------------------------------------------------------------- 1 | # malloca.m4 2 | # serial 3 3 | dnl Copyright (C) 2003-2004, 2006-2007, 2009-2025 Free Software Foundation, 4 | dnl Inc. 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | dnl This file is offered as-is, without any warranty. 9 | 10 | AC_DEFUN([gl_MALLOCA], 11 | [ 12 | dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables 13 | dnl @ALLOCA@ and @LTALLOCA@. 14 | dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. 15 | AC_REQUIRE([gl_FUNC_MALLOC_GNU]) 16 | ]) 17 | -------------------------------------------------------------------------------- /tests/install/dotest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ../init.sh || exit 1 4 | 5 | rm -f q 6 | 7 | applets=$(q -h | \ 8 | sed -n '/^Currently defined applets:/,/^Options/p' | \ 9 | grep ' : ' | \ 10 | awk '{print $1}' 11 | ) 12 | rm -f ${applets} 13 | 14 | if ! cp `which q` . ; then 15 | skip "could not copy q" 16 | fi 17 | ./q -i || die "./q -i" 18 | 19 | for app in ${applets} ; do 20 | if [ ! -e $app ] ; then 21 | tfail "$app does not exist" 22 | elif [ "$app" != "q" ] ; then 23 | t=$(readlink $app) 24 | if [ "$t" != "q" ] ; then 25 | tfail "$app target is not 'q', it is '$t'" 26 | else 27 | tpass "${app}" 28 | fi 29 | fi 30 | done 31 | rm ${applets} 32 | 33 | end 34 | -------------------------------------------------------------------------------- /libq/colors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2021 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2019- Fabian Groffen - 6 | */ 7 | 8 | #ifndef _COLORS_H 9 | #define _COLORS_H 1 10 | 11 | extern const char *BOLD; 12 | extern const char *NORM; 13 | extern const char *BLUE; 14 | extern const char *DKBLUE; 15 | extern const char *CYAN; 16 | extern const char *GREEN; 17 | extern const char *DKGREEN; 18 | extern const char *MAGENTA; 19 | extern const char *RED; 20 | extern const char *YELLOW; 21 | extern const char *BRYELLOW; 22 | extern const char *WHITE; 23 | 24 | void color_remap(void); 25 | void color_clear(void); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /tests/qcheck/root/a-b/pkg-1.0/CONTENTS: -------------------------------------------------------------------------------- 1 | dir /bin 2 | obj /bin/good-md5 2b00042f7481c7b056c4b410d28f33cf 1398954900 3 | obj /bin/bad-md5 2b00042f7481c7b056c4b410d28f33cf 1398954900 4 | obj /bin/bad-mtime-obj 2b00042f7481c7b056c4b410d28f33cf 1 5 | obj /bin/good-sha1 7d97e98f8af710c7e7fe703abc8f639e0ee507c4 1398954900 6 | obj /bin/bad-sha1 7d97e98f8af710c7e7fe703abc8f639e0ee507c4 1398954900 7 | sym /bin/good-sym -> good-md5 1398954900 8 | sym /bin/bad-mtime-sym -> good-md5 1 9 | sym /bin/broken-sym -> broken 1398954900 10 | sym /bin/missing-sym -> noooooope 1398954900 11 | dir /missing-dir 12 | obj /missing-dir/missing-file 2b00042f7481c7b056c4b410d28f33cf 1398954900 13 | sym /missing-dir/missing-sym -> nowhere 1398954900 14 | -------------------------------------------------------------------------------- /HACKING.md: -------------------------------------------------------------------------------- 1 | # New applets 2 | 3 | Adding applets is easy using the q framework. 4 | 5 | Note: Please try to keep applet names under 8 chars. 6 | 7 | - cp template.c qmyapplet.c (all applets use the prefix of the letter 'q') 8 | - applets.h: add your prototype (see DECLARE_APPLET macro) 9 | - applets.h: add a new line to applets[] following the existing syntax 10 | - run `make depend` to auto regenerate dependent files 11 | 12 | When and where you can please try to use an existing applet and extend 13 | on its functionality by adding more options vs adding a bunch of new 14 | little applets. 15 | 16 | - Keep behavior consistent 17 | - matching: 18 | - default is sloppy match 19 | - -e exact match 20 | - -r regex match 21 | -------------------------------------------------------------------------------- /tests/valgrind-wrapper/qvalgrind: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # --errors-for-leak-kinds= drop possible due to Solaris libc/_findbuf 4 | valgrind \ 5 | --leak-check=full \ 6 | --track-fds=yes \ 7 | --track-origins=yes \ 8 | --malloc-fill=0xdb \ 9 | --free-fill=0xbd \ 10 | --log-file=q-valgrind.log \ 11 | --errors-for-leak-kinds=definite \ 12 | --error-exitcode=234 \ 13 | "${@}" 14 | ret=$? 15 | if [[ ${ret} == 234 ]] ; then 16 | mv q-valgrind.log q-valgrind.$$.log 17 | echo "valgrind log can be found at ${PWD}/q-valgrind.$$.log" > /dev/stderr 18 | # dump complaints in Travis' log, as we cannot retrieve them lateron 19 | [[ -n ${RUNNER_OS} ]] && cat q-valgrind.$$.log > /dev/stderr 20 | else 21 | rm q-valgrind.log 22 | fi 23 | 24 | exit ${ret} 25 | -------------------------------------------------------------------------------- /tests/qfile/root/app-shells/bash-4.4_p23-r1/IUSE_EFFECTIVE: -------------------------------------------------------------------------------- 1 | abi_x86_64 afs alpha amd64 amd64-fbsd amd64-linux arm arm64 bashlogger elibc_AIX elibc_Cygwin elibc_Darwin elibc_DragonFly elibc_FreeBSD elibc_HPUX elibc_Interix elibc_NetBSD elibc_OpenBSD elibc_SunOS elibc_Winnt elibc_bionic elibc_glibc elibc_mingw elibc_mintlib elibc_musl elibc_uclibc examples hppa ia64 kernel_AIX kernel_Darwin kernel_FreeBSD kernel_HPUX kernel_NetBSD kernel_OpenBSD kernel_SunOS kernel_Winnt kernel_freemint kernel_linux m68k m68k-mint mem-scramble mips net nls plugins ppc ppc-aix ppc-macos ppc64 ppc64-linux prefix prefix-chain prefix-guest readline s390 sh sparc sparc-solaris sparc64-solaris userland_BSD userland_GNU x64-cygwin x64-macos x64-solaris x86 x86-cygwin x86-fbsd x86-linux x86-macos x86-solaris x86-winnt 2 | -------------------------------------------------------------------------------- /autotools/m4/error.m4: -------------------------------------------------------------------------------- 1 | # error.m4 2 | # serial 16 3 | dnl Copyright (C) 1996-1998, 2001-2004, 2009-2025 Free Software Foundation, 4 | dnl Inc. 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | dnl This file is offered as-is, without any warranty. 9 | 10 | AC_DEFUN([gl_ERROR], 11 | [ 12 | ]) 13 | 14 | # Prerequisites of lib/error.c. 15 | AC_DEFUN([gl_PREREQ_ERROR], 16 | [ 17 | dnl Use system extensions on Android, so that AC_FUNC_STRERROR_R 18 | dnl discovers the GNU API for strerror_r on Android API level 23 and later. 19 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 20 | 21 | AC_REQUIRE([AC_FUNC_STRERROR_R]) 22 | : 23 | ]) 24 | -------------------------------------------------------------------------------- /autotools/m4/rawmemchr.m4: -------------------------------------------------------------------------------- 1 | # rawmemchr.m4 2 | # serial 3 3 | dnl Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_FUNC_RAWMEMCHR], 10 | [ 11 | dnl Persuade glibc to declare rawmemchr(). 12 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 13 | 14 | AC_REQUIRE([gl_STRING_H_DEFAULTS]) 15 | AC_CHECK_FUNCS([rawmemchr]) 16 | if test $ac_cv_func_rawmemchr = no; then 17 | HAVE_RAWMEMCHR=0 18 | fi 19 | ]) 20 | 21 | # Prerequisites of lib/strchrnul.c. 22 | AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:]) 23 | -------------------------------------------------------------------------------- /autotools/m4/mkdirat.m4: -------------------------------------------------------------------------------- 1 | # mkdirat.m4 2 | # serial 1 3 | dnl Copyright (C) 2004-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | # Written by Jim Meyering. 10 | 11 | AC_DEFUN([gl_FUNC_MKDIRAT], 12 | [ 13 | AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) 14 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 15 | AC_CHECK_FUNCS_ONCE([mkdirat]) 16 | if test $ac_cv_func_mkdirat != yes; then 17 | HAVE_MKDIRAT=0 18 | fi 19 | ]) 20 | 21 | # Prerequisite of mkdirat's declaration and of lib/mkdirat.c. 22 | AC_DEFUN([gl_PREREQ_MKDIRAT], 23 | [ 24 | AC_REQUIRE([AC_TYPE_MODE_T]) 25 | ]) 26 | -------------------------------------------------------------------------------- /autotools/m4/musl.m4: -------------------------------------------------------------------------------- 1 | # musl.m4 2 | # serial 4 3 | dnl Copyright (C) 2019-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | # Test for musl libc, despite the musl libc authors don't like it 10 | # 11 | # . 12 | # From Bruno Haible. 13 | 14 | AC_DEFUN_ONCE([gl_MUSL_LIBC], 15 | [ 16 | AC_REQUIRE([AC_CANONICAL_HOST]) 17 | case "$host_os" in 18 | *-musl* | midipix*) 19 | AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.]) 20 | ;; 21 | esac 22 | ]) 23 | -------------------------------------------------------------------------------- /man/include/qwhich.desc: -------------------------------------------------------------------------------- 1 | .I qwhich 2 | returns the paths to the ebuilds matching the given atoms. Searching is 3 | done by default over the main ebuild repository and all configured 4 | overlays. When requested, a search can be made over the repository of 5 | installed packages (VDB) or binpkg repos. 6 | .P 7 | The default action is to print the full path to the latest ebuild for 8 | each package. This can be changed using \fB-d\fR to print the directory 9 | the ebuild is in instead. E.g\. one could \fBcd\fR(1) to this 10 | directory. Alternatively, one can request to stop searching after the 11 | first match using \fB-f\fR, which means at most one match per repo is 12 | returned. 13 | .P 14 | \fIqwhich\fR accepts atoms to search for, which can be any valid atom, 15 | including e.g\. version specifications to narrow the search. 16 | -------------------------------------------------------------------------------- /libq/contents.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2024 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2005-2008 Ned Ludd - 6 | * Copyright 2005-2014 Mike Frysinger - 7 | * Copyright 2018- Fabian Groffen - 8 | */ 9 | 10 | #ifndef _CONTENTS_H 11 | #define _CONTENTS_H 1 12 | 13 | typedef enum { 14 | CONTENTS_DIR, CONTENTS_OBJ, CONTENTS_SYM 15 | } contents_type; 16 | 17 | typedef struct { 18 | contents_type type; 19 | char *_data; 20 | char *name; 21 | char *sym_target; 22 | char *digest; 23 | char *mtime_str; 24 | long mtime; 25 | } contents_entry; 26 | 27 | contents_entry *contents_parse_line_len(char *line, size_t len); 28 | #define contents_parse_line(L) contents_parse_line_len(L, strlen(L)) 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /autotools/m4/memrchr.m4: -------------------------------------------------------------------------------- 1 | # memrchr.m4 2 | # serial 11 3 | dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation, 4 | dnl Inc. 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | dnl This file is offered as-is, without any warranty. 9 | 10 | AC_DEFUN([gl_FUNC_MEMRCHR], 11 | [ 12 | dnl Persuade glibc to declare memrchr(). 13 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 14 | 15 | AC_REQUIRE([gl_STRING_H_DEFAULTS]) 16 | AC_CHECK_DECLS_ONCE([memrchr]) 17 | if test $ac_cv_have_decl_memrchr = no; then 18 | HAVE_DECL_MEMRCHR=0 19 | fi 20 | 21 | AC_CHECK_FUNCS([memrchr]) 22 | ]) 23 | 24 | # Prerequisites of lib/memrchr.c. 25 | AC_DEFUN([gl_PREREQ_MEMRCHR], [:]) 26 | -------------------------------------------------------------------------------- /tests/mkdir/test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2005-2008 Ned Ludd - 6 | * Copyright 2005-2014 Mike Frysinger - 7 | */ 8 | 9 | #include "main.h" 10 | #include "xmkdir.h" 11 | 12 | #include 13 | #include 14 | 15 | const char *argv0; 16 | FILE *warnout; 17 | 18 | int main(int argc, char *argv[]) 19 | { 20 | int i, ret; 21 | 22 | argv0 = argv[0]; 23 | warnout = stderr; 24 | 25 | if (argc <= 1) 26 | return 1; 27 | 28 | ret = 0; 29 | 30 | if (!strcmp(argv[1], "m")) { 31 | for (i = 2; i < argc; ++i) 32 | ret += mkdir_p(argv[i], 0755); 33 | } else if (!strcmp(argv[1], "rm")) { 34 | for (i = 2; i < argc; ++i) 35 | ret += rm_rf(argv[i]); 36 | } 37 | 38 | return ret; 39 | } 40 | -------------------------------------------------------------------------------- /autotools/m4/msvc-inval.m4: -------------------------------------------------------------------------------- 1 | # msvc-inval.m4 2 | # serial 1 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_MSVC_INVAL], 10 | [ 11 | AC_CHECK_FUNCS_ONCE([_set_invalid_parameter_handler]) 12 | if test $ac_cv_func__set_invalid_parameter_handler = yes; then 13 | HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 14 | AC_DEFINE([HAVE_MSVC_INVALID_PARAMETER_HANDLER], [1], 15 | [Define to 1 on MSVC platforms that have the "invalid parameter handler" 16 | concept.]) 17 | else 18 | HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 19 | fi 20 | AC_SUBST([HAVE_MSVC_INVALID_PARAMETER_HANDLER]) 21 | ]) 22 | -------------------------------------------------------------------------------- /man/include/qatom.desc: -------------------------------------------------------------------------------- 1 | \fIqatom\fR parses strings into atoms and optionally compares them. The 2 | parsing into atoms results in CATEGORY, PN (package name), PV (package 3 | version), PR (package revision), SLOT and REPO. Next to these version 4 | qualifiers (e.g.\ >, <, or =) and optional * suffix are extracted. All 5 | but PN are optional. 6 | 7 | Comparison of atoms returns the relationship between two parsed atoms. 8 | \fIqatom\fR does not allow to test conditions. It is possible to 9 | perform multiple comparisons by simply adding more arguments. 10 | Comparisons are, however, always performed two by two, so there must be 11 | an even count of arguments to the compare function. 12 | 13 | The \fIqatom\fR applet is a direct wrapper around the atom parsing 14 | functionalities used by various other applets. As such this applet 15 | allows easy testing or atom parsing and comparison behaviour. 16 | -------------------------------------------------------------------------------- /tests/rmspace/test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2024 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2005-2008 Ned Ludd - 6 | * Copyright 2005-2014 Mike Frysinger - 7 | */ 8 | 9 | #include "main.h" 10 | #include "rmspace.h" 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | const char *argv0; 17 | FILE *warnout; 18 | 19 | int main(int argc, char *argv[]) 20 | { 21 | int i; 22 | char *s; 23 | size_t len; 24 | 25 | argv0 = argv[0]; 26 | warnout = stderr; 27 | 28 | if (argc <= 1) 29 | return 1; 30 | 31 | for (i = 1; i < argc; ++i) { 32 | s = rmspace(argv[i]); 33 | len = strlen(s); 34 | if (isspace(s[0]) || (len && isspace(s[len - 1]))) { 35 | fprintf(stderr, "FAIL {%s}\n", s); 36 | return 1; 37 | } 38 | } 39 | 40 | return 0; 41 | } 42 | -------------------------------------------------------------------------------- /man/include/qmanifest-01-generation.include: -------------------------------------------------------------------------------- 1 | .SH "GENERATING A SIGNED TREE" 2 | .PP 3 | By default, \fBqmanifest\fR will not try to sign the top-level Manifest 4 | when it generating thick Manifests. A tree as such isn't completely 5 | valid (as it misses the final signature), but still correct. To sign 6 | the top-level Manifest, the \fB-s\fR flag needs to be used to provide 7 | the GPG keyid to sign with. The passphrase is requested by \fBgpg\fR(1) 8 | itself, unless the \fB-p\fR flag is given, in which case \fBqmanifest\fR 9 | attempts to read the passphrase from \fIstdin\fR and then pass that 10 | passphrase onto \fBgpg\fR. This is useful for scenarios in which the 11 | signing of a tree is scripted. 12 | .PP 13 | To generate a tree signed by GPG keyid \fI0x123567ABC\fR using 14 | passphrase \fImypasswd\fR, one could use: 15 | .nf\fI 16 | $ echo mypasswd | qmanifest -g -s 0x123567ABC -p /path/to/tree 17 | .fi 18 | -------------------------------------------------------------------------------- /autotools/m4/open-cloexec.m4: -------------------------------------------------------------------------------- 1 | # open-cloexec.m4 2 | # serial 1 3 | dnl Copyright 2017-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | # Test whether O_CLOEXEC is defined. 10 | 11 | AC_DEFUN([gl_PREPROC_O_CLOEXEC], 12 | [ 13 | AC_CACHE_CHECK([for O_CLOEXEC], 14 | [gl_cv_macro_O_CLOEXEC], 15 | [AC_COMPILE_IFELSE( 16 | [AC_LANG_PROGRAM([[#include 17 | #ifndef O_CLOEXEC 18 | choke me; 19 | #endif 20 | ]], 21 | [[return O_CLOEXEC;]])], 22 | [gl_cv_macro_O_CLOEXEC=yes], 23 | [gl_cv_macro_O_CLOEXEC=no])]) 24 | ]) 25 | -------------------------------------------------------------------------------- /autotools/gnulib/isnand.c: -------------------------------------------------------------------------------- 1 | /* Test for NaN that does not need libm. 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Bruno Haible , 2008. */ 18 | 19 | #include "isnan.c" 20 | -------------------------------------------------------------------------------- /autotools/gnulib/issymlinkat.c: -------------------------------------------------------------------------------- 1 | /* Test whether a file is a symbolic link. 2 | Copyright (C) 2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published 6 | by the Free Software Foundation, either version 3 of the License, 7 | or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define _GL_ISSYMLINKAT_INLINE _GL_EXTERN_INLINE 20 | #include "issymlink.h" 21 | -------------------------------------------------------------------------------- /libq/scandirat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2021 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2005-2010 Ned Ludd - 6 | * Copyright 2005-2014 Mike Frysinger - 7 | * Copyright 2021- Fabian Groffen - 8 | */ 9 | 10 | #ifndef _SCANDIRAT_H 11 | #define _SCANDIRAT_H 1 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #if !defined(HAVE_SCANDIRAT) 19 | int scandirat( 20 | int dir_fd, const char *dir, struct dirent ***dirlist, 21 | int (*filter)(const struct dirent *), 22 | int (*compar)(const struct dirent **, const struct dirent **)); 23 | #endif 24 | 25 | void scandir_free(struct dirent **de, int cnt); 26 | int filter_hidden(const struct dirent *de); 27 | int filter_self_parent(const struct dirent *de); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /template.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2018 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2005-2010 Ned Ludd - 6 | * Copyright 2005-2014 Mike Frysinger - 7 | */ 8 | 9 | #ifdef APPLET_qtemp 10 | 11 | #define QTEMP_FLAGS "" COMMON_FLAGS 12 | static struct option const qtemp_long_opts[] = { 13 | COMMON_LONG_OPTS 14 | }; 15 | static const char * const qtemp_opts_help[] = { 16 | COMMON_OPTS_HELP 17 | }; 18 | #define qtemp_usage(ret) usage(ret, QTEMP_FLAGS, qtemp_long_opts, qtemp_opts_help, NULL, lookup_applet_idx("qtemp")) 19 | 20 | int qtemp_main(int argc, char **argv) 21 | { 22 | int i; 23 | 24 | while ((i = GETOPT_LONG(QTEMP, qtemp, "")) != -1) { 25 | switch (i) { 26 | COMMON_GETOPTS_CASES(qtemp) 27 | } 28 | } 29 | 30 | return EXIT_SUCCESS; 31 | } 32 | 33 | #else 34 | DEFINE_APPLET_STUB(qtemp) 35 | #endif 36 | -------------------------------------------------------------------------------- /autotools/gnulib/xsize.c: -------------------------------------------------------------------------------- 1 | /* Checked size_t computations. 2 | 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #define XSIZE_INLINE _GL_EXTERN_INLINE 21 | #include "xsize.h" 22 | -------------------------------------------------------------------------------- /man/include/qfile-02-orphans.include: -------------------------------------------------------------------------------- 1 | .SH "FINDING ORPHAN FILES" 2 | .PP 3 | \fBqfile\fP can also, with the \fB\-\-orphans\fP option, find files 4 | which are not owned by any package. This behaviour is the opposite of 5 | the usual file owner search: the output is the list of query items for 6 | which no reference has been found in your installed packages database. 7 | As for \fB\-\-quiet\fP, it will completly turn off the output, leaving 8 | just a silent test command, which returns \fI0\fP if and only if there 9 | was no orphan in your query items. 10 | .PP 11 | Find the orphan libtool files of your system: 12 | .nf\fI 13 | $ qfile -o $(find /lib /usr/lib -name "*.la") 14 | /usr/lib/libGL.la 15 | .fi 16 | .PP 17 | Find the libraries needed by the binary "foo" which have not been installed by 18 | any package: 19 | .nf\fI 20 | $ qfile -o $(scanelf -nq -F%n#F /path/to/foo | tr , '\\n') 21 | libinstalledmanually.so.2 22 | .fi 23 | .PP 24 | -------------------------------------------------------------------------------- /autotools/gnulib/ialloc.c: -------------------------------------------------------------------------------- 1 | /* malloc with idx_t rather than size_t 2 | 3 | Copyright 2021-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #define IALLOC_INLINE _GL_EXTERN_INLINE 21 | #include "ialloc.h" 22 | -------------------------------------------------------------------------------- /man/include/q.optdesc.yaml: -------------------------------------------------------------------------------- 1 | overlays: | 2 | Print available overlays (read from repos.conf). Use \fI-v\fR to 3 | see the source (file) where the overlay was declared. 4 | envvar: | 5 | Print used environment variables and found values. Use \fI-v\fR to 6 | see the source (file, environment) where the variable was declared. 7 | Additional arguments are treated as variable names to print the 8 | values for. If just one name is given, only the value is printed if 9 | matched. When no arguments or more than one argument is given, the 10 | variable name and the value is printed as a shell-style declaration. 11 | masks: | 12 | Print the masks from package.mask files found. Use \fI-v\fR to see 13 | the source (file) where the mask was declared. Use multiple 14 | \fI-v\fR to print the comment right before the mask. Additional 15 | arguments are treated as atom selectors which must match the masks. 16 | -------------------------------------------------------------------------------- /autotools/gnulib/stdlib.c: -------------------------------------------------------------------------------- 1 | /* Inline functions for . 2 | 3 | Copyright (C) 2024-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #define _GL_STDLIB_INLINE _GL_EXTERN_INLINE 19 | #include 20 | 21 | #include 22 | -------------------------------------------------------------------------------- /libq/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | QFILES = \ 3 | atom.c atom.h \ 4 | basename.c basename.h \ 5 | busybox.h \ 6 | colors.c colors.h \ 7 | contents.c contents.h \ 8 | copy_file.c copy_file.h \ 9 | dep.c dep.h \ 10 | eat_file.c eat_file.h \ 11 | hash.c hash.h \ 12 | human_readable.c human_readable.h \ 13 | i18n.h \ 14 | move_file.c move_file.h \ 15 | prelink.c prelink.h \ 16 | profile.c profile.h \ 17 | rmspace.c rmspace.h \ 18 | safe_io.c safe_io.h \ 19 | scandirat.c scandirat.h \ 20 | set.c set.h \ 21 | tree.c tree.h \ 22 | xarray.c xarray.h \ 23 | xasprintf.h \ 24 | xchdir.c xchdir.h \ 25 | xmkdir.c xmkdir.h \ 26 | xpak.c xpak.h \ 27 | xregex.c xregex.h \ 28 | xsystem.c xsystem.h \ 29 | $(NULL) 30 | 31 | noinst_LIBRARIES = libq.a 32 | libq_a_SOURCES = $(QFILES) 33 | libq_a_CPPFLAGS = \ 34 | $(OPENMP_CFLAGS) \ 35 | -I$(top_builddir)/autotools/gnulib \ 36 | -I$(top_srcdir)/autotools/gnulib \ 37 | -I$(top_srcdir) \ 38 | $(CWFLAGS) 39 | -------------------------------------------------------------------------------- /tests/quse/portdir/profiles/use.desc: -------------------------------------------------------------------------------- 1 | 2 | # Keep them sorted 3 | 4 | 3dfx - Enable support for Voodoo chipsets, also called as 3DFX and TDFX 5 | Xaw3d - Adds support for the 3d athena widget set 6 | adabas - Adds support for the Adabas database engine 7 | cdinstall - Copies files from the CD rather than asking the user to copy them, mostly used with games 8 | evo - Adds support for mail-client/evolution 9 | libnotify - Enable desktop notification support 10 | lm_sensors - Adds linux lm_sensors (hardware sensors) support 11 | nas - Adds support for network audio sound 12 | oci8-instant-client - Use dev-db/oracle-instantclient-basic as Oracle provider instead of requiring a full Oracle server install 13 | prefix - Defines if a Gentoo Prefix offset installation is used 14 | sqlite3 - Adds support for sqlite3 - embedded sql database 15 | wmf - Adds support for the Windows Metafile vector image format 16 | zlib - Adds support for zlib (de)compression 17 | -------------------------------------------------------------------------------- /autotools/gnulib/byteswap.c: -------------------------------------------------------------------------------- 1 | /* Inline functions for . 2 | 3 | Copyright 2024-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #define _GL_BYTESWAP_INLINE _GL_EXTERN_INLINE 21 | #include 22 | -------------------------------------------------------------------------------- /autotools/gnulib/issymlink.c: -------------------------------------------------------------------------------- 1 | /* Test whether a file is a symbolic link. 2 | Copyright (C) 2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define _GL_ISSYMLINK_INLINE _GL_EXTERN_INLINE 20 | #include "issymlink.h" 21 | -------------------------------------------------------------------------------- /autotools/gnulib/mbchar.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001, 2006, 2009-2025 Free Software Foundation, Inc. 2 | 3 | This file is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU Lesser General Public License as 5 | published by the Free Software Foundation; either version 2.1 of the 6 | License, or (at your option) any later version. 7 | 8 | This file is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public License 14 | along with this program. If not, see . */ 15 | 16 | 17 | #include 18 | 19 | #define MBCHAR_INLINE _GL_EXTERN_INLINE 20 | 21 | #include 22 | 23 | #include "mbchar.h" 24 | -------------------------------------------------------------------------------- /autotools/gnulib/stat-time.c: -------------------------------------------------------------------------------- 1 | /* stat-related time functions. 2 | 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE 21 | #include "stat-time.h" 22 | -------------------------------------------------------------------------------- /autotools/gnulib/timespec.c: -------------------------------------------------------------------------------- 1 | /* Inline functions for . 2 | 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation, either version 3 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE 21 | #include "timespec.h" 22 | -------------------------------------------------------------------------------- /autotools/gnulib/isnanf.c: -------------------------------------------------------------------------------- 1 | /* Test for NaN that does not need libm. 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Bruno Haible , 2007. */ 18 | 19 | #define USE_FLOAT 20 | #include "isnan.c" 21 | -------------------------------------------------------------------------------- /autotools/gnulib/math.c: -------------------------------------------------------------------------------- 1 | /* Inline functions for . 2 | 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #define _GL_MATH_INLINE _GL_EXTERN_INLINE 19 | #include 20 | 21 | #include 22 | typedef int dummy; 23 | -------------------------------------------------------------------------------- /man/include/qkeyword-01-latest-testing.include: -------------------------------------------------------------------------------- 1 | .SH "RETRIEVING LATEST TESTING VERSION AVAILABLE" 2 | .PP 3 | To retrieve the latest available version in the ebuild tree marked as 4 | testing for the given ARCH, can be done with a combination of flags, 5 | mostly to restrict the search. For instance, to find the latest version 6 | of \fIsys-devel/gcc\fR available, one could use: 7 | .nf 8 | $ qkeyword -p sys-devel/gcc -T 9 | sys-devel/gcc-8.3.0 10 | .fi 11 | It may be that there is a newer version available, but masked for the 12 | configured profile (via package.mask). Using \fB-v\fR will inform about 13 | this scenario happening: 14 | .nf 15 | $ qkeyword -p dev-vcs/cvs -Tv 16 | masked by =dev-vcs/cvs-1.12.12*: dev-vcs/cvs-1.12.12-r12 17 | .fi 18 | Unrelated, but to locate the mask given, use verbose mode on \fIq\fR's 19 | mask listing: 20 | .nf 21 | $ q -mv dev-vcs/cvs 22 | =dev-vcs/cvs-1.12.12* [/repo/gentoo/profiles/prefix/sunos/solaris/package.mask] 23 | .fi 24 | -------------------------------------------------------------------------------- /autotools/gnulib/isnanl.c: -------------------------------------------------------------------------------- 1 | /* Test for NaN that does not need libm. 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Bruno Haible , 2007. */ 18 | 19 | #define USE_LONG_DOUBLE 20 | #include "isnan.c" 21 | -------------------------------------------------------------------------------- /autotools/gnulib/unistd.c: -------------------------------------------------------------------------------- 1 | /* Inline functions for . 2 | 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE 19 | #include 20 | 21 | #include 22 | typedef int dummy; 23 | -------------------------------------------------------------------------------- /autotools/gnulib/mbiterf.c: -------------------------------------------------------------------------------- 1 | /* Iterating through multibyte strings: macros for multi-byte encodings. 2 | 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #define MBITERF_INLINE _GL_EXTERN_INLINE 21 | #include "mbiterf.h" 22 | -------------------------------------------------------------------------------- /autotools/gnulib/same-inode.c: -------------------------------------------------------------------------------- 1 | /* Determine whether two stat buffers are known to refer to the same file. 2 | 3 | Copyright (C) 2023-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | #define SAME_INODE_INLINE _GL_EXTERN_INLINE 20 | #include "same-inode.h" 21 | -------------------------------------------------------------------------------- /autotools/m4/__inline.m4: -------------------------------------------------------------------------------- 1 | # __inline.m4 2 | # serial 1 3 | dnl Copyright 2017-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | # Test for __inline keyword 10 | 11 | AC_DEFUN([gl___INLINE], 12 | [ 13 | AC_CACHE_CHECK([whether the compiler supports the __inline keyword], 14 | [gl_cv_c___inline], 15 | [AC_COMPILE_IFELSE( 16 | [AC_LANG_PROGRAM( 17 | [[typedef int foo_t; 18 | static __inline foo_t foo (void) { return 0; }]], 19 | [[return foo ();]])], 20 | [gl_cv_c___inline=yes], 21 | [gl_cv_c___inline=no])]) 22 | if test $gl_cv_c___inline = yes; then 23 | AC_DEFINE([HAVE___INLINE], [1], 24 | [Define to 1 if the compiler supports the keyword '__inline'.]) 25 | fi 26 | ]) 27 | -------------------------------------------------------------------------------- /autotools/gnulib/exitfail.c: -------------------------------------------------------------------------------- 1 | /* Failure exit status 2 | 3 | Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #include "exitfail.h" 21 | 22 | #include 23 | 24 | int volatile exit_failure = EXIT_FAILURE; 25 | -------------------------------------------------------------------------------- /autotools/gnulib/exitfail.h: -------------------------------------------------------------------------------- 1 | /* Failure exit status 2 | 3 | Copyright (C) 2002, 2009-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | 23 | extern int volatile exit_failure; 24 | 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /autotools/gnulib/u64.c: -------------------------------------------------------------------------------- 1 | /* uint64_t-like operations that work even on hosts lacking uint64_t 2 | 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | #define _GL_U64_INLINE _GL_EXTERN_INLINE 21 | #include "u64.h" 22 | typedef int dummy; 23 | -------------------------------------------------------------------------------- /tests/qfile/dotest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ../init.sh || exit 1 4 | 5 | export ROOT=${as}/root 6 | export Q_VDB=/ 7 | 8 | tests=( 9 | "qfile -q /bin/bash /bin/XXXXX" 10 | "app-shells/bash" 11 | 12 | "qfile -o /bin/bash /bin/XXXXX" 13 | "/bin/XXXXX" 14 | 15 | "qfile -o -x bash /bin/bash" 16 | "/bin/bash" 17 | 18 | "qfile -o -x app-shells/bash /bin/bash" 19 | "/bin/bash" 20 | 21 | "qfile -o -x bash:0 /bin/bash" 22 | "/bin/bash" 23 | 24 | "qfile -o -x app-shells/bash:0 /bin/bash" 25 | "/bin/bash" 26 | 27 | "(cd ${ROOT}/bin; qfile -Rq bash)" 28 | "app-shells/bash" 29 | 30 | "(cd ${ROOT}/; qfile -o whatever)" 31 | "whatever" 32 | ) 33 | 34 | set -- "${tests[@]}" 35 | while [[ $# -gt 0 ]] ; do 36 | test=$1; shift 37 | exp=$1; shift 38 | 39 | res=$(eval ${test}) 40 | [[ "${res}" == "${exp}" ]] 41 | if ! tend $? "${test}" ; then 42 | ( 43 | echo " - expected result was: ${exp}" 44 | echo " - actual result was: ${res}" 45 | ) > /dev/stderr 46 | fi 47 | done 48 | 49 | end 50 | -------------------------------------------------------------------------------- /autotools/m4/group-member.m4: -------------------------------------------------------------------------------- 1 | # group-member.m4 2 | # serial 14 3 | dnl Copyright (C) 1999-2001, 2003-2007, 2009-2025 Free Software Foundation, 4 | dnl Inc. 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | dnl This file is offered as-is, without any warranty. 9 | 10 | dnl Written by Jim Meyering 11 | 12 | AC_DEFUN([gl_FUNC_GROUP_MEMBER], 13 | [ 14 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 15 | 16 | dnl Persuade glibc to declare group_member(). 17 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 18 | 19 | dnl Do this replacement check manually because I want the hyphen 20 | dnl (not the underscore) in the filename. 21 | AC_CHECK_FUNC([group_member], , [ 22 | HAVE_GROUP_MEMBER=0 23 | ]) 24 | ]) 25 | 26 | # Prerequisites of lib/group-member.c. 27 | AC_DEFUN([gl_PREREQ_GROUP_MEMBER], 28 | [ 29 | AC_REQUIRE([AC_FUNC_GETGROUPS]) 30 | ]) 31 | -------------------------------------------------------------------------------- /autotools/gnulib/iswblank.c: -------------------------------------------------------------------------------- 1 | /* Test wide character for being blank. 2 | Copyright (C) 2008-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | /* Specification. */ 20 | #include 21 | 22 | int 23 | iswblank (wint_t wc) 24 | { 25 | return wc == ' ' || wc == '\t'; 26 | } 27 | -------------------------------------------------------------------------------- /autotools/gnulib/iswdigit.c: -------------------------------------------------------------------------------- 1 | /* Test wide character for being a digit. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | /* Specification. */ 20 | #include 21 | 22 | int 23 | iswdigit (wint_t wc) 24 | { 25 | return wc >= '0' && wc <= '9'; 26 | } 27 | -------------------------------------------------------------------------------- /autotools/m4/zzgnulib.m4: -------------------------------------------------------------------------------- 1 | # zzgnulib.m4 2 | # serial 1 3 | dnl Copyright (C) 2020-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl This file must be named something that sorts after all other 10 | dnl package- or gnulib-provided .m4 files - at least for those packages 11 | dnl that redefine AC_PROG_CC. 12 | 13 | dnl Redefine AC_PROG_CC so that it ends with invocations of gl_COMPILER_CLANG 14 | dnl and gl_COMPILER_PREPARE_CHECK_DECL. 15 | m4_define([AC_PROG_CC], 16 | m4_defn([AC_PROG_CC])[ 17 | gl_COMPILER_CLANG 18 | gl_COMPILER_PREPARE_CHECK_DECL 19 | ]) 20 | 21 | # gl_ZZGNULIB 22 | # ----------- 23 | # Witness macro that this file has been included. Needed to force 24 | # Automake to include this file after all other gnulib .m4 files. 25 | AC_DEFUN([gl_ZZGNULIB]) 26 | -------------------------------------------------------------------------------- /tests/atom_compare/atom-compare.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function 4 | 5 | import sys 6 | try: 7 | import portage 8 | except ImportError: 9 | sys.exit(77) 10 | 11 | i = 1 12 | while i < len(sys.argv): 13 | atom1, atom2 = sys.argv[i:i + 2] 14 | if atom2[0] in ('>', '<', '=', '~'): 15 | if '/' not in atom1: 16 | # Portage really wants a category. 17 | a1 = 'c/' + atom1 18 | pfx = atom2[0] 19 | if atom2[1] == '=': 20 | pfx += atom2[1] 21 | a2 = '%sc/%s' % (pfx, atom2[len(pfx):]) 22 | else: 23 | a1, a2 = atom1, atom2 24 | ret = portage.dep.match_from_list(a2, [a1]) 25 | rel = '==' if ret else '!=' 26 | else: 27 | try: 28 | pkg1 = portage.pkgsplit(atom1) 29 | pkg2 = portage.pkgsplit(atom2) 30 | ret = portage.pkgcmp(pkg1, pkg2) 31 | if ret == 1: 32 | rel = '>' 33 | elif ret == -1: 34 | rel = '<' 35 | else: 36 | rel = '==' 37 | except Exception as e: 38 | rel = '!=' 39 | print('%s %s %s' % (atom1, rel, atom2)) 40 | i += 2 41 | -------------------------------------------------------------------------------- /autotools/gnulib/wctype-h.c: -------------------------------------------------------------------------------- 1 | /* Inline functions for . 2 | 3 | Copyright (C) 2012-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | /* Normally this would be wctype.c, but that name's already taken. */ 19 | 20 | #define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE 21 | #include 22 | 23 | #include 24 | -------------------------------------------------------------------------------- /autotools/m4/codeset.m4: -------------------------------------------------------------------------------- 1 | # codeset.m4 2 | # serial 5 (gettext-0.18.2) 3 | dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2025 Free Software 4 | dnl Foundation, Inc. 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | dnl This file is offered as-is, without any warranty. 9 | 10 | dnl From Bruno Haible. 11 | 12 | AC_DEFUN([AM_LANGINFO_CODESET], 13 | [ 14 | AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], 15 | [AC_LINK_IFELSE( 16 | [AC_LANG_PROGRAM( 17 | [[#include ]], 18 | [[char* cs = nl_langinfo(CODESET); return !cs;]])], 19 | [am_cv_langinfo_codeset=yes], 20 | [am_cv_langinfo_codeset=no]) 21 | ]) 22 | if test $am_cv_langinfo_codeset = yes; then 23 | AC_DEFINE([HAVE_LANGINFO_CODESET], [1], 24 | [Define if you have and nl_langinfo(CODESET).]) 25 | fi 26 | ]) 27 | -------------------------------------------------------------------------------- /autotools/m4/unitypes_h.m4: -------------------------------------------------------------------------------- 1 | # unitypes_h.m4 2 | # serial 1 3 | dnl Copyright (C) 2021-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN_ONCE([gl_UNITYPES_H], 10 | [ 11 | AH_VERBATIM([unitypes_restrict], [ 12 | /* This definition is a duplicate of the one in unitypes.h. 13 | It is here so that we can cope with an older version of unitypes.h 14 | that does not contain this definition and that is pre-installed among 15 | the public header files. */ 16 | # if defined __restrict \ 17 | || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ 18 | || __clang_major__ >= 3 19 | # define _UC_RESTRICT __restrict 20 | # elif 199901L <= __STDC_VERSION__ || defined restrict 21 | # define _UC_RESTRICT restrict 22 | # else 23 | # define _UC_RESTRICT 24 | # endif 25 | ]) 26 | ]) 27 | -------------------------------------------------------------------------------- /man/include/quse.optdesc.yaml: -------------------------------------------------------------------------------- 1 | exact: Search for exact string, e.g.\ do not use regular expression matching. 2 | verbose: | 3 | Show versions for packages that match the search. 4 | Also shows problems encountered during parsing. These are mostly 5 | diagnostic and indicate possible incorrectness in the results. 6 | quiet: Ignored for compatibility with other qapplets. 7 | describe: | 8 | Describe the USE flag, when no USE-flag given and combined with 9 | \fB-p\fR, lists all USE-flags with their descriptions (and enabled 10 | state prefixed with an asterisk when used with \fB-I\fR) per 11 | package. 12 | format: | 13 | Print matched atom using given format string. 14 | The default is \fI%[CATEGORY]%[PN]\fR or \fI%[CATEGORY]%[PF]\fR in 15 | verbose mode (\fB-v\fR|\fB--verbose\fR). 16 | If \fB-R\fR|\fB--repo\fR is set, \fI%[REPO]\fR will be appended. 17 | Note that this only sets the format of the atom field, not the 18 | entire output line. 19 | For more information see \fBqatom\fR(1). 20 | -------------------------------------------------------------------------------- /autotools/gnulib/mbszero.c: -------------------------------------------------------------------------------- 1 | /* Put an mbstate_t into an initial conversion state. 2 | Copyright (C) 2023-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Bruno Haible , 2023. */ 18 | 19 | #include 20 | 21 | #define IN_MBSZERO 22 | /* Specification and implementation. */ 23 | #include 24 | -------------------------------------------------------------------------------- /tests/qlist/root/app-arch/cpio-2.11/CONTENTS: -------------------------------------------------------------------------------- 1 | dir /bin 2 | obj /bin/cpio 2d0175bda0d523cb1866f2a86d5e1d36 1279420243 3 | dir /usr 4 | dir /usr/share 5 | dir /usr/share/man 6 | dir /usr/share/man/man1 7 | obj /usr/share/man/man1/cpio.1.lzma 59ce265e35d90956a01681a410321dca 1279420242 8 | dir /usr/share/doc 9 | dir /usr/share/doc/cpio-2.11 10 | obj /usr/share/doc/cpio-2.11/ChangeLog.lzma e4c19516c2281dcae742d629481963cf 1279420242 11 | obj /usr/share/doc/cpio-2.11/NEWS.lzma 65222bcc052d4493e2f686bea7b391b3 1279420242 12 | obj /usr/share/doc/cpio-2.11/README.lzma 78234895f4a2f4ffabf3454d7b09d3d7 1279420242 13 | dir /usr/share/locale 14 | dir /usr/share/locale/de 15 | dir /usr/share/locale/de/LC_MESSAGES 16 | obj /usr/share/locale/de/LC_MESSAGES/cpio.mo e70bf4aad229f9f5c491f525601631b7 1279420242 17 | dir /usr/share/info 18 | obj /usr/share/info/cpio.info.lzma ad50ca81ccb87d49e84a46fb6d3fbb7f 1279420242 19 | dir /usr/lib 20 | dir /usr/lib/debug 21 | dir /usr/lib/debug/bin 22 | obj /usr/lib/debug/bin/cpio.debug 9da741b0b5cd1d997623feb674301b08 1279420243 23 | -------------------------------------------------------------------------------- /autotools/gnulib/renameat.c: -------------------------------------------------------------------------------- 1 | /* Rename a file relative to open directories. 2 | Copyright 2017-2025 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | #include 19 | #include "renameatu.h" 20 | 21 | int 22 | renameat (int fd1, char const *src, int fd2, char const *dst) 23 | { 24 | return renameatu (fd1, src, fd2, dst, 0); 25 | } 26 | -------------------------------------------------------------------------------- /autotools/m4/strdup.m4: -------------------------------------------------------------------------------- 1 | # strdup.m4 2 | # serial 16 3 | 4 | dnl Copyright (C) 2002-2025 Free Software Foundation, Inc. 5 | 6 | dnl This file is free software; the Free Software Foundation 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | dnl This file is offered as-is, without any warranty. 10 | 11 | AC_DEFUN([gl_FUNC_STRDUP], 12 | [ 13 | AC_REQUIRE([gl_STRING_H_DEFAULTS]) 14 | AC_CHECK_DECLS_ONCE([strdup]) 15 | if test $ac_cv_have_decl_strdup = no; then 16 | HAVE_DECL_STRDUP=0 17 | fi 18 | ]) 19 | 20 | AC_DEFUN([gl_FUNC_STRDUP_POSIX], 21 | [ 22 | AC_REQUIRE([gl_STRING_H_DEFAULTS]) 23 | AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) 24 | case "$gl_cv_func_malloc_posix" in 25 | *yes) ;; 26 | *) REPLACE_STRDUP=1 ;; 27 | esac 28 | AC_CHECK_DECLS_ONCE([strdup]) 29 | if test $ac_cv_have_decl_strdup = no; then 30 | HAVE_DECL_STRDUP=0 31 | fi 32 | ]) 33 | 34 | # Prerequisites of lib/strdup.c. 35 | AC_DEFUN([gl_PREREQ_STRDUP], [:]) 36 | -------------------------------------------------------------------------------- /tests/qdepends/root/app-arch/cpio-2.11/CONTENTS: -------------------------------------------------------------------------------- 1 | dir /bin 2 | obj /bin/cpio 2d0175bda0d523cb1866f2a86d5e1d36 1279420243 3 | dir /usr 4 | dir /usr/share 5 | dir /usr/share/man 6 | dir /usr/share/man/man1 7 | obj /usr/share/man/man1/cpio.1.lzma 59ce265e35d90956a01681a410321dca 1279420242 8 | dir /usr/share/doc 9 | dir /usr/share/doc/cpio-2.11 10 | obj /usr/share/doc/cpio-2.11/ChangeLog.lzma e4c19516c2281dcae742d629481963cf 1279420242 11 | obj /usr/share/doc/cpio-2.11/NEWS.lzma 65222bcc052d4493e2f686bea7b391b3 1279420242 12 | obj /usr/share/doc/cpio-2.11/README.lzma 78234895f4a2f4ffabf3454d7b09d3d7 1279420242 13 | dir /usr/share/locale 14 | dir /usr/share/locale/de 15 | dir /usr/share/locale/de/LC_MESSAGES 16 | obj /usr/share/locale/de/LC_MESSAGES/cpio.mo e70bf4aad229f9f5c491f525601631b7 1279420242 17 | dir /usr/share/info 18 | obj /usr/share/info/cpio.info.lzma ad50ca81ccb87d49e84a46fb6d3fbb7f 1279420242 19 | dir /usr/lib 20 | dir /usr/lib/debug 21 | dir /usr/lib/debug/bin 22 | obj /usr/lib/debug/bin/cpio.debug 9da741b0b5cd1d997623feb674301b08 1279420243 23 | -------------------------------------------------------------------------------- /autotools/m4/sys_cdefs_h.m4: -------------------------------------------------------------------------------- 1 | # sys_cdefs_h.m4 - Is compatible enough with glibc? 2 | # serial 2 3 | dnl Copyright 2024-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl Written by Paul Eggert. 10 | 11 | AC_DEFUN_ONCE([gl_CHECK_HEADER_SYS_CDEFS_H], 12 | [AC_CACHE_CHECK([for glibc-compatible sys/cdefs.h], 13 | [gl_cv_header_sys_cdefs_h], 14 | [AC_COMPILE_IFELSE( 15 | [AC_LANG_DEFINES_PROVIDED 16 | [#include 17 | enum { foo = __GNUC_PREREQ (14, 1) } bar; 18 | ]], 19 | [gl_cv_header_sys_cdefs_h=yes], 20 | [gl_cv_header_sys_cdefs_h=no])]) 21 | if test "$gl_cv_header_sys_cdefs_h" = yes; then 22 | HAVE_SYS_CDEFS_H=1 23 | else 24 | HAVE_SYS_CDEFS_H=0 25 | fi 26 | AC_SUBST([HAVE_SYS_CDEFS_H])]) 27 | -------------------------------------------------------------------------------- /autotools/m4/mempcpy.m4: -------------------------------------------------------------------------------- 1 | # mempcpy.m4 2 | # serial 14 3 | dnl Copyright (C) 2003-2004, 2006-2007, 2009-2025 Free Software Foundation, 4 | dnl Inc. 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | dnl This file is offered as-is, without any warranty. 9 | 10 | AC_DEFUN([gl_FUNC_MEMPCPY], 11 | [ 12 | dnl Persuade glibc to declare mempcpy(). 13 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 14 | 15 | dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. 16 | AC_REQUIRE([AC_C_RESTRICT]) 17 | 18 | AC_REQUIRE([gl_STRING_H_DEFAULTS]) 19 | gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include ]]) 20 | if test $ac_cv_func_mempcpy = no; then 21 | HAVE_MEMPCPY=0 22 | case "$gl_cv_onwards_func_mempcpy" in 23 | future*) REPLACE_MEMPCPY=1 ;; 24 | esac 25 | fi 26 | ]) 27 | 28 | # Prerequisites of lib/mempcpy.c. 29 | AC_DEFUN([gl_PREREQ_MEMPCPY], [ 30 | : 31 | ]) 32 | -------------------------------------------------------------------------------- /autotools/m4/strncasecmp.m4: -------------------------------------------------------------------------------- 1 | # strncasecmp.m4 2 | # serial 2 3 | dnl Copyright (C) 2002-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_FUNC_STRNCASECMP], 10 | [ 11 | AC_REQUIRE([gl_STRINGS_H_DEFAULTS]) 12 | AC_CHECK_FUNCS([strncasecmp]) 13 | if test $ac_cv_func_strncasecmp = yes; then 14 | dnl Assume that strncasecmp and strcasecmp share the same bugs. 15 | gl_STRCASECMP_WORKS 16 | case "$gl_cv_func_strcasecmp_works" in 17 | *yes) ;; 18 | *) REPLACE_STRNCASECMP=1 ;; 19 | esac 20 | else 21 | HAVE_STRNCASECMP=0 22 | fi 23 | AC_CHECK_DECLS([strncasecmp]) 24 | if test $ac_cv_have_decl_strncasecmp = no; then 25 | HAVE_DECL_STRNCASECMP=0 26 | fi 27 | ]) 28 | 29 | # Prerequisites of lib/strncasecmp.c. 30 | AC_DEFUN([gl_PREREQ_STRNCASECMP], [ 31 | : 32 | ]) 33 | -------------------------------------------------------------------------------- /autotools/gnulib/c32tolower.c: -------------------------------------------------------------------------------- 1 | /* Map a 32-bit wide character to lowercase. 2 | Copyright (C) 2023-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32TOLOWER 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32tolower 24 | #define WCHAR_FUNC towlower 25 | #define UCS_FUNC uc_tolower 26 | #include "c32to-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isblank.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being blank. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISBLANK 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isblank 24 | #define WCHAR_FUNC iswblank 25 | #define UCS_FUNC uc_is_blank 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isdigit.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being a digit. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISDIGIT 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isdigit 24 | #define WCHAR_FUNC iswdigit 25 | #define UCS_FUNC uc_is_digit 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isgraph.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being graphic. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISGRAPH 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isgraph 24 | #define WCHAR_FUNC iswgraph 25 | #define UCS_FUNC uc_is_graph 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isalnum.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being alphanumeric. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISALNUM 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isalnum 24 | #define WCHAR_FUNC iswalnum 25 | #define UCS_FUNC uc_is_alnum 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isalpha.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being alphabetic. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISALPHA 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isalpha 24 | #define WCHAR_FUNC iswalpha 25 | #define UCS_FUNC uc_is_alpha 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32islower.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being lowercase. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISLOWER 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32islower 24 | #define WCHAR_FUNC iswlower 25 | #define UCS_FUNC uc_is_lower 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isprint.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being printable. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISPRINT 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isprint 24 | #define WCHAR_FUNC iswprint 25 | #define UCS_FUNC uc_is_print 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isspace.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being white-space. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISSPACE 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isspace 24 | #define WCHAR_FUNC iswspace 25 | #define UCS_FUNC uc_is_space 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isupper.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being uppercase. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISUPPER 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isupper 24 | #define WCHAR_FUNC iswupper 25 | #define UCS_FUNC uc_is_upper 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/getprogname.h: -------------------------------------------------------------------------------- 1 | /* Program name management. 2 | Copyright (C) 2016-2025 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as published by 6 | the Free Software Foundation; either version 2.1 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #ifndef _GL_GETPROGNAME_H 18 | #define _GL_GETPROGNAME_H 19 | 20 | #include 21 | 22 | #if __GNUC__ || (__clang_major__ >= 4) 23 | # warning "The include file getprogname.h is deprecated. Use instead." 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32iscntrl.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being a control character. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISCNTRL 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32iscntrl 24 | #define WCHAR_FUNC iswcntrl 25 | #define UCS_FUNC uc_is_cntrl 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/c32isxdigit.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being a hexadecimal digit. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISXDIGIT 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32isxdigit 24 | #define WCHAR_FUNC iswxdigit 25 | #define UCS_FUNC uc_is_xdigit 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /autotools/gnulib/getline.c: -------------------------------------------------------------------------------- 1 | /* getline.c --- Implementation of replacement getline function. 2 | Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Simon Josefsson. */ 18 | 19 | #include 20 | 21 | #include 22 | 23 | ssize_t 24 | getline (char **lineptr, size_t *n, FILE *stream) 25 | { 26 | return getdelim (lineptr, n, '\n', stream); 27 | } 28 | -------------------------------------------------------------------------------- /autotools/gnulib/rawmemchr.valgrind: -------------------------------------------------------------------------------- 1 | # Suppress a valgrind message about use of uninitialized memory in rawmemchr(). 2 | 3 | # Copyright (C) 2008-2025 Free Software Foundation, Inc. 4 | # 5 | # This file is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public License as 7 | # published by the Free Software Foundation; either version 2.1 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This file is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public License 16 | # along with this program. If not, see . 17 | 18 | # This use is OK because it provides only a speedup. 19 | { 20 | rawmemchr-value4 21 | Memcheck:Value4 22 | fun:rawmemchr 23 | } 24 | { 25 | rawmemchr-value8 26 | Memcheck:Value8 27 | fun:rawmemchr 28 | } 29 | -------------------------------------------------------------------------------- /autotools/gnulib/c32ispunct.c: -------------------------------------------------------------------------------- 1 | /* Test 32-bit wide character for being a punctuation or symbol character. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #define IN_C32ISPUNCT 20 | /* Specification. */ 21 | #include 22 | 23 | #define FUNC c32ispunct 24 | #define WCHAR_FUNC iswpunct 25 | #define UCS_FUNC uc_is_punct 26 | #include "c32is-impl.h" 27 | -------------------------------------------------------------------------------- /libq/xregex.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2019 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | * 5 | * Copyright 2011-2016 Mike Frysinger - 6 | */ 7 | 8 | #include "main.h" 9 | #include "xregex.h" 10 | 11 | #include 12 | 13 | int wregcomp(regex_t *preg, const char *regex, int cflags) 14 | { 15 | int ret = regcomp(preg, regex, cflags); 16 | if (unlikely(ret)) { 17 | char errbuf[256]; 18 | regerror(ret, preg, errbuf, sizeof(errbuf)); 19 | warn("invalid regexp: %s -- %s\n", regex, errbuf); 20 | } 21 | return ret; 22 | } 23 | 24 | void xregcomp(regex_t *preg, const char *regex, int cflags) 25 | { 26 | if (unlikely(wregcomp(preg, regex, cflags))) 27 | exit(EXIT_FAILURE); 28 | } 29 | 30 | int 31 | rematch(const char *re, const char *match, int cflags) 32 | { 33 | regex_t preg; 34 | int ret; 35 | 36 | if ((match == NULL) || (re == NULL)) 37 | return EXIT_FAILURE; 38 | 39 | if (wregcomp(&preg, re, cflags)) 40 | return EXIT_FAILURE; 41 | ret = regexec(&preg, match, 0, NULL, 0); 42 | regfree(&preg); 43 | 44 | return ret; 45 | } 46 | -------------------------------------------------------------------------------- /autotools/m4/off64_t.m4: -------------------------------------------------------------------------------- 1 | # off64_t.m4 2 | # serial 1 3 | dnl Copyright (C) 2024-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl Check whether defines the 'off64_t' type. 10 | dnl Set HAVE_OFF64_T. 11 | 12 | AC_DEFUN([gl_TYPE_OFF64_T], 13 | [ 14 | dnl Persuade glibc , , , , 15 | dnl to define off64_t. 16 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 17 | 18 | AC_CACHE_CHECK([for off64_t], [gl_cv_off64_t], 19 | [AC_COMPILE_IFELSE( 20 | [AC_LANG_PROGRAM( 21 | [[#include ]], 22 | [[int x = sizeof (off64_t *) + sizeof (off64_t); 23 | return !x;]])], 24 | [gl_cv_off64_t=yes], [gl_cv_off64_t=no])]) 25 | 26 | if test $gl_cv_off64_t != no; then 27 | HAVE_OFF64_T=1 28 | else 29 | HAVE_OFF64_T=0 30 | fi 31 | AC_SUBST([HAVE_OFF64_T]) 32 | ]) 33 | -------------------------------------------------------------------------------- /tests/mkdir/dotest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . ../init.sh || exit 1 4 | 5 | set -e 6 | 7 | _m=${ab}/m 8 | mktmpdir 9 | 10 | # check mkdir 11 | m="${_m} m" 12 | for d in a a/ a/b a/b/ a/b/c a/b/c/ ; do 13 | _d=${d} 14 | $m ${d} 15 | 16 | rmdir ${d} 17 | d=${d%/} 18 | while [[ ${d} == */* ]] ; do 19 | d=${d%/*} 20 | rmdir ${d} 21 | done 22 | 23 | tpass "empty ${_d}" 24 | done 25 | 26 | for d in a a/ a/b a/b/ a/b/c a/b/c/ ; do 27 | _d=${d} 28 | mkdir -p ${d} 29 | $m ${d} 30 | 31 | rmdir ${d} 32 | d=${d%/} 33 | while [[ ${d} == */* ]] ; do 34 | d=${d%/*} 35 | rmdir ${d} 36 | done 37 | 38 | tpass "exist ${_d}" 39 | done 40 | 41 | # check rm_rf 42 | m="${_m} rm" 43 | 44 | mkdir -p a/b/c/d 45 | $m a/b/ 46 | tpass "rm a/b/" 47 | 48 | mkdir -p a/b/c/d 49 | $m a/b 50 | tpass "rm a/b" 51 | 52 | mkdir -p a/b/c/d 53 | cd a 54 | $m . || : # ignore EBUSY failure 55 | cd .. 56 | rmdir a 57 | tpass "rm ." 58 | 59 | mkdir -p a/b/c/d 60 | ln -s . a/b/d 61 | ln -s c a/b/cc 62 | ln -s .. a/b/dd 63 | ln -s x a/b/x 64 | touch a/b/f 65 | ln -s ../f a/b/c/f 66 | $m a 67 | [ ! -e a ] 68 | tpass "rm a tree" 69 | 70 | cleantmpdir 71 | 72 | end 73 | -------------------------------------------------------------------------------- /tests/quse/portdir/profiles/desc/elibc.desc: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2014 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # This file contains descriptions of ELIBC USE_EXPAND flags. 5 | 6 | # Keep it sorted. 7 | 8 | AIX - ELIBC setting for systems that use the AIX C library 9 | Darwin - ELIBC setting for systems that use the Darwin C library 10 | DragonFly - ELIBC setting for systems that use the DragonFly C library 11 | FreeBSD - ELIBC setting for systems that use the FreeBSD C library 12 | glibc - ELIBC setting for systems that use the GNU C library 13 | HPUX - ELIBC setting for systems that use the HP-UX C library 14 | Interix - ELIBC setting for systems that use the Interix C library 15 | IRIX - ELIBC setting for systems that use the SGI IRIX C library 16 | mintlib - ELIBC setting for systems that use the FreeMiNT C library 17 | NetBSD - ELIBC setting for systems that use the NetBSD C library 18 | OpenBSD - ELIBC setting for systems that use the OpenBSD C library 19 | SunOS - ELIBC setting for systems that use the Sun Solaris C library 20 | uclibc - ELIBC setting for systems that use the uClibc C library 21 | -------------------------------------------------------------------------------- /tests/atom_compare/static.tests: -------------------------------------------------------------------------------- 1 | a-1 a-1 2 | a-1.0 a-2.0 3 | a-1.1.1 a-1.1.1.1 4 | a-20004 a-20004a 5 | a-2.0_pre a-2.0 6 | a-2.0_pre a-2.0_beta 7 | a-2.0_pre a-2.0_alpha 8 | a-2.0_pre a-2.0_pre1 9 | a-2.0_pre a-2.0_rc 10 | a-2.0_pre a-2.0_p1234 11 | a-2.0_rc a-2.0 12 | a-1z a-1b 13 | a-1 a-1-r1 14 | a-1d_p1-r12 a-1d_p1-r50 15 | a-1.034 a-1.1 16 | a-1.0.1 a-1.002 17 | a-1.000 a-1.0 18 | a-0.0.1 a-0.0.2 19 | a-1_alpha_beta a-1_alpha1 20 | a-1_alpha_beta a-1_beta 21 | a-1_alpha_beta a-1_alpha_beta1 22 | a-1_alpha1_beta2_pre3_rc4_p5 a-1_alpha1_beta2_pre3_rc4_p5 23 | a-1.2.3.200702020000 a-1.2.3.200702020000 24 | a-1.2.3.200702020000 a-1.2.3.200702020001 25 | a-1 >a-0 26 | a-1 >a-1 27 | a-1 >a-2 28 | a-1 >=a-0 29 | a-1 >=a-1 30 | a-1 >=a-2 31 | a-1 =a-0 32 | a-1 =a-1 33 | a-1 =a-2 34 | a-1 =a-3.10.0_p1_r1 56 | -------------------------------------------------------------------------------- /autotools/gnulib/root-uid.h: -------------------------------------------------------------------------------- 1 | /* The user ID that always has appropriate privileges in the POSIX sense. 2 | 3 | Copyright 2012-2025 Free Software Foundation, Inc. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | /* Written by Paul Eggert. */ 19 | 20 | #ifndef ROOT_UID_H_ 21 | #define ROOT_UID_H_ 22 | 23 | /* The user ID that always has appropriate privileges in the POSIX sense. */ 24 | #ifdef __TANDEM 25 | # define ROOT_UID 65535 26 | #else 27 | # define ROOT_UID 0 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /autotools/gnulib/unicase/tolower.c: -------------------------------------------------------------------------------- 1 | /* Lowercase mapping for Unicode characters (locale and context independent). 2 | Copyright (C) 2002, 2006, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2009. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unicase.h" 22 | 23 | /* Define u_mapping table. */ 24 | #include "tolower.h" 25 | 26 | #define FUNC uc_tolower 27 | #include "simple-mapping.h" 28 | -------------------------------------------------------------------------------- /autotools/m4/opendir.m4: -------------------------------------------------------------------------------- 1 | # opendir.m4 2 | # serial 7 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_FUNC_OPENDIR], 10 | [ 11 | AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) 12 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 13 | 14 | AC_CHECK_FUNCS([opendir]) 15 | if test $ac_cv_func_opendir = no; then 16 | HAVE_OPENDIR=0 17 | else 18 | dnl Replace opendir() on native Windows and OS/2 kLIBC, 19 | dnl to support fdopendir(). 20 | AC_REQUIRE([gl_DIRENT_DIR]) 21 | if test $DIR_HAS_FD_MEMBER = 0; then 22 | REPLACE_OPENDIR=1 23 | fi 24 | dnl Replace opendir() for supporting the gnulib-defined fchdir() function, 25 | dnl to keep fchdir's bookkeeping up-to-date. 26 | m4_ifdef([gl_FUNC_FCHDIR], [ 27 | gl_TEST_FCHDIR 28 | if test $HAVE_FCHDIR = 0; then 29 | REPLACE_OPENDIR=1 30 | fi 31 | ]) 32 | fi 33 | ]) 34 | -------------------------------------------------------------------------------- /autotools/gnulib/assert.in.h: -------------------------------------------------------------------------------- 1 | /* Substitute for and wrapper around 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Do not guard the include, since is supposed to define 18 | the assert macro each time it is included. */ 19 | 20 | #if __GNUC__ >= 3 21 | @PRAGMA_SYSTEM_HEADER@ 22 | #endif 23 | @PRAGMA_COLUMNS@ 24 | 25 | #@INCLUDE_NEXT@ @NEXT_ASSERT_H@ 26 | 27 | /* The definition of static_assert is copied here. */ 28 | -------------------------------------------------------------------------------- /tests/quse/portdir/profiles/use.local.desc: -------------------------------------------------------------------------------- 1 | # * generated automatically using egencache * 2 | 3 | app-accessibility/brltty:api - build brltty's application program interface 4 | app-admin/collectd:collectd_plugins_swap - Build the swap input plugin (amount of memory currently written to swap) 5 | app-editors/tea:enchant - Enable spell checking using enchant 6 | dev-db/mysql-connector-c++:gcov - Build coverage support 7 | dev-lang/php:xmlwriter - Enable XMLWriter support 8 | kde-base/kttsd:flite - Build a plugin for app-accessibility/flite 9 | media-video/ffmpeg:dirac - Enable Dirac video support (an advanced royalty-free video compression format) via the reference library: dirac. 10 | net-misc/asterisk-moh-opsound:wav - Install the sounds files for the wav codec. 11 | sys-devel/gcc:objc++ - Build support for the Objective C++ language 12 | sys-devel/llvm:llvm-gcc - Build LLVM with sys-devel/llvm-gcc 13 | sys-freebsd/boot0:tftp - Enable PXE/TFTP boot support. 14 | sys-fs/aufs2:kernel-patch - Patch the current kernel for aufs2 support 15 | x11-libs/qt-gui:glib - Enable dev-libs/glib eventloop support 16 | xfce-extra/xfce4-playercontrol-plugin:audacious - Enable Audacious support 17 | -------------------------------------------------------------------------------- /autotools/gnulib/itold.c: -------------------------------------------------------------------------------- 1 | /* Replacement for 'int' to 'long double' conversion routine. 2 | Copyright (C) 2011-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2011. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include 22 | 23 | void 24 | _Qp_itoq (long double *result, int a) 25 | { 26 | /* Convert from 'int' to 'double', then from 'double' to 'long double'. */ 27 | *result = (double) a; 28 | } 29 | -------------------------------------------------------------------------------- /autotools/m4/closedir.m4: -------------------------------------------------------------------------------- 1 | # closedir.m4 2 | # serial 8 3 | dnl Copyright (C) 2011-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_FUNC_CLOSEDIR], 10 | [ 11 | AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) 12 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 13 | 14 | AC_CHECK_FUNCS([closedir]) 15 | if test $ac_cv_func_closedir = no; then 16 | HAVE_CLOSEDIR=0 17 | else 18 | dnl Replace closedir() on native Windows and OS/2 kLIBC, 19 | dnl to support fdopendir(). 20 | AC_REQUIRE([gl_DIRENT_DIR]) 21 | if test $DIR_HAS_FD_MEMBER = 0; then 22 | REPLACE_CLOSEDIR=1 23 | fi 24 | dnl Replace closedir() for supporting the gnulib-defined fchdir() function, 25 | dnl to keep fchdir's bookkeeping up-to-date. 26 | m4_ifdef([gl_FUNC_FCHDIR], [ 27 | gl_TEST_FCHDIR 28 | if test $HAVE_FCHDIR = 0; then 29 | REPLACE_CLOSEDIR=1 30 | fi 31 | ]) 32 | fi 33 | ]) 34 | -------------------------------------------------------------------------------- /autotools/m4/stdint_h.m4: -------------------------------------------------------------------------------- 1 | # stdint_h.m4 2 | # serial 9 3 | dnl Copyright (C) 1997-2004, 2006, 2008-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl From Paul Eggert. 10 | 11 | # Define HAVE_STDINT_H_WITH_UINTMAX if exists, 12 | # doesn't clash with , and declares uintmax_t. 13 | 14 | AC_DEFUN([gl_AC_HEADER_STDINT_H], 15 | [ 16 | AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], 17 | [AC_COMPILE_IFELSE( 18 | [AC_LANG_PROGRAM( 19 | [[#include 20 | #include ]], 21 | [[uintmax_t i = (uintmax_t) -1; return !i;]])], 22 | [gl_cv_header_stdint_h=yes], 23 | [gl_cv_header_stdint_h=no])]) 24 | if test $gl_cv_header_stdint_h = yes; then 25 | AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], 26 | [Define if exists, doesn't clash with , 27 | and declares uintmax_t. ]) 28 | fi 29 | ]) 30 | -------------------------------------------------------------------------------- /autotools/gnulib/frexpl.c: -------------------------------------------------------------------------------- 1 | /* Split a 'long double' into fraction and mantissa. 2 | Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | #if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 20 | 21 | /* Specification. */ 22 | # include 23 | 24 | long double 25 | frexpl (long double x, int *expptr) 26 | { 27 | return frexp (x, expptr); 28 | } 29 | 30 | #else 31 | 32 | # define USE_LONG_DOUBLE 33 | # include "frexp.c" 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libq/set.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005-2023 Gentoo Foundation 3 | * Distributed under the terms of the GNU General Public License v2 4 | */ 5 | 6 | #ifndef _SET_H 7 | #define _SET_H 1 8 | 9 | #include 10 | #include 11 | 12 | #include "xarray.h" 13 | 14 | typedef struct elem_t set_elem; 15 | typedef struct set_t set; 16 | 17 | struct elem_t { 18 | char *name; 19 | unsigned int hash; /* FNV1a32 */ 20 | void *val; 21 | set_elem *next; 22 | }; 23 | 24 | #define _SET_HASH_SIZE 128 25 | struct set_t { 26 | set_elem *buckets[_SET_HASH_SIZE]; 27 | size_t len; 28 | }; 29 | 30 | set *create_set(void); 31 | set *add_set(const char *name, set *q); 32 | set *add_set_unique(const char *name, set *q, bool *unique); 33 | set *add_set_value(const char *name, void *ptr, void **prevptr, set *q); 34 | const char *contains_set(const char *name, set *q); 35 | void *get_set(const char *name, set *q); 36 | void *del_set(const char *s, set *q, bool *removed); 37 | size_t list_set(set *q, char ***l); 38 | size_t array_set(set *q, array_t *ret); 39 | size_t values_set(set *q, array_t *ret); 40 | size_t cnt_set(set *q); 41 | void free_set(set *q); 42 | void clear_set(set *q); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /tests/atom_compare/Makefile.am: -------------------------------------------------------------------------------- 1 | this_subdir = tests/atom_compare 2 | b = $(abs_top_builddir)/$(this_subdir) 3 | s = $(abs_top_srcdir)/$(this_subdir) 4 | atb = $(abs_top_builddir) 5 | mkdir = $(if $(wildcard $(dir $(1))),:,mkdir -p "$(dir $(1))") 6 | 7 | check-local: static static.q 8 | 9 | t = \ 10 | @set -f && \ 11 | $(call mkdir,$(b)) && \ 12 | good=`echo $< | sed 's:.tests$$:.good:'`; \ 13 | out=$(@:.tests=); \ 14 | ret=0; \ 15 | $(realpath $(lastword $^)) $(1) `sed 's:\#.*::' $<` > $$out || ret=$$?; \ 16 | case $$ret in \ 17 | 0) \ 18 | if diff -u $$good $$out; then \ 19 | echo "PASS atom_compare $$out"; \ 20 | else \ 21 | echo "FAIL atom_compare $$out"; \ 22 | ret=1; \ 23 | fi;; \ 24 | 77) echo "SKIP atom_compare $$out"; ret=0;; \ 25 | *) echo "FAIL atom_compare $$out";; \ 26 | esac; \ 27 | [ $$ret -eq 0 ] && rm -f $$out; \ 28 | exit $$ret 29 | 30 | static: $(s)/static.tests $(atb)/q 31 | $(call t,atom -c) 32 | 33 | static.q: $(s)/static.q.tests $(atb)/q 34 | $(call t,atom -c) 35 | 36 | portage: $(s)/static.tests $(s)/atom-compare.py 37 | $(call t) 38 | 39 | clean-local: 40 | rm -f $(b)/static $(b)/static.q $(b)/portage 41 | 42 | .PHONY: all check clean test 43 | -------------------------------------------------------------------------------- /autotools/gnulib/iswpunct.c: -------------------------------------------------------------------------------- 1 | /* Test wide character for being a punctuation or symbol character. 2 | Copyright (C) 2023-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | /* Specification. */ 20 | #include 21 | 22 | #include 23 | 24 | int 25 | iswpunct (wint_t wc) 26 | #undef iswpunct 27 | { 28 | #if defined __ANDROID__ 29 | if ((unsigned int) wc < 128) 30 | return ispunct ((unsigned int) wc); 31 | #endif 32 | return iswpunct (wc); 33 | } 34 | -------------------------------------------------------------------------------- /autotools/m4/inttypes_h.m4: -------------------------------------------------------------------------------- 1 | # inttypes_h.m4 2 | # serial 10 3 | dnl Copyright (C) 1997-2004, 2006, 2008-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | dnl From Paul Eggert. 10 | 11 | # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, 12 | # doesn't clash with , and declares uintmax_t. 13 | 14 | AC_DEFUN([gl_AC_HEADER_INTTYPES_H], 15 | [ 16 | AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], 17 | [AC_COMPILE_IFELSE( 18 | [AC_LANG_PROGRAM( 19 | [[ 20 | #include 21 | #include 22 | ]], 23 | [[uintmax_t i = (uintmax_t) -1; return !i;]])], 24 | [gl_cv_header_inttypes_h=yes], 25 | [gl_cv_header_inttypes_h=no])]) 26 | if test $gl_cv_header_inttypes_h = yes; then 27 | AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], 28 | [Define if exists, doesn't clash with , 29 | and declares uintmax_t. ]) 30 | fi 31 | ]) 32 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_alnum.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_alnum table. */ 26 | #include "ctype_alnum.h" 27 | 28 | bool 29 | uc_is_alnum (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_alnum, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_alpha.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_alpha table. */ 26 | #include "ctype_alpha.h" 27 | 28 | bool 29 | uc_is_alpha (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_alpha, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_blank.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_blank table. */ 26 | #include "ctype_blank.h" 27 | 28 | bool 29 | uc_is_blank (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_blank, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_cntrl.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_cntrl table. */ 26 | #include "ctype_cntrl.h" 27 | 28 | bool 29 | uc_is_cntrl (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_cntrl, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_digit.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_digit table. */ 26 | #include "ctype_digit.h" 27 | 28 | bool 29 | uc_is_digit (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_digit, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_graph.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_graph table. */ 26 | #include "ctype_graph.h" 27 | 28 | bool 29 | uc_is_graph (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_graph, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_lower.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_lower table. */ 26 | #include "ctype_lower.h" 27 | 28 | bool 29 | uc_is_lower (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_lower, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_print.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_print table. */ 26 | #include "ctype_print.h" 27 | 28 | bool 29 | uc_is_print (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_print, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_punct.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_punct table. */ 26 | #include "ctype_punct.h" 27 | 28 | bool 29 | uc_is_punct (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_punct, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_space.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_space table. */ 26 | #include "ctype_space.h" 27 | 28 | bool 29 | uc_is_space (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_space, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_upper.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_upper table. */ 26 | #include "ctype_upper.h" 27 | 28 | bool 29 | uc_is_upper (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_upper, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/gnulib/unictype/ctype_xdigit.c: -------------------------------------------------------------------------------- 1 | /* ISO C like properties of Unicode characters. 2 | Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include "unictype.h" 22 | 23 | #include "bitmap.h" 24 | 25 | /* Define u_is_xdigit table. */ 26 | #include "ctype_xdigit.h" 27 | 28 | bool 29 | uc_is_xdigit (ucs4_t uc) 30 | { 31 | return bitmap_lookup (&u_is_xdigit, uc); 32 | } 33 | -------------------------------------------------------------------------------- /autotools/m4/openat.m4: -------------------------------------------------------------------------------- 1 | # openat.m4 2 | # serial 47 3 | dnl Copyright (C) 2004-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | # See if we need to use our replacement for Solaris' openat et al functions. 10 | 11 | # Written by Jim Meyering. 12 | 13 | AC_DEFUN([gl_FUNC_OPENAT], 14 | [ 15 | AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) 16 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 17 | AC_CHECK_FUNCS_ONCE([openat]) 18 | AC_REQUIRE([gl_FCNTL_O_FLAGS]) 19 | AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) 20 | AC_REQUIRE([gl_PREPROC_O_CLOEXEC]) 21 | AS_CASE([$ac_cv_func_openat+$gl_cv_header_working_fcntl_h+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC], 22 | [yes+*O_DIRECTORY*+*+* | yes+*no+*+*], [REPLACE_OPENAT=1], 23 | [yes+*+*yes+yes], [], 24 | [yes+*], [REPLACE_OPENAT=1], 25 | [HAVE_OPENAT=0]) 26 | ]) 27 | 28 | # Prerequisites of lib/openat.c. 29 | AC_DEFUN([gl_PREREQ_OPENAT], 30 | [ 31 | AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) 32 | : 33 | ]) 34 | -------------------------------------------------------------------------------- /tests/qmanifest/manifest01.good: -------------------------------------------------------------------------------- 1 | verifying /simpletree... 2 | Manifest timestamp: 2018-03-01T10:58:37Z 3 | Manifest: 4 | - failed to verify signature 5 | my-cat/mypackage/Manifest::mypackage-1.ebuild: 6 | - file size mismatch 7 | got: 257 8 | expected: 237 9 | my-cat/mypackage/Manifest::mypackage-2.ebuild: 10 | - BLAKE2B hash mismatch 11 | computed: '2bcad0952735a0a5bf631fe1c65bc6eb96eb5511f52850e55a8ad9b80480a37ea4a4b01fc6f4f7ccd94942536be3cea81babd2a90f3076daa1e6e62ecf042a0b' 12 | Manifest: '2410d545e7441e6402c32ca3ce7e80d6eda82306db1c7d9732ed35d273a20f0983a4a40b02492fbad4145cc776f249fb575bd6f74e7cd92e125181af722500a3' 13 | my-cat/mypackage/Manifest::mypackage-2.ebuild: 14 | - SHA512 hash mismatch 15 | computed: 'baf9a3bf09b590997d77db13d171e9b104e8acd3687b5be9a8734f0d4680bc4c34f5d0612ba11c6f5d2d34e9b659f548c3403ac9b2dc22cb78a3112305a68889' 16 | Manifest: 'b22f73bd10773a7b01456a237b5224226c4178cc0755d0e84c8b8597071683b148f3b9f56d8b5c7fb8e58f7e618fd62307fba13d8b04988c5aeb417f2e286d61' 17 | my-cat/mypackage/Manifest::mypackage-3.ebuild: 18 | - DATA file listed in Manifest, but not found 19 | my-cat/mypackage/Manifest: 20 | - file not listed: unrecorded-file 21 | checked 5 Manifests, 9 files, 4 failures 22 | manifest verification failed 23 | -------------------------------------------------------------------------------- /autotools/gnulib/asnprintf.c: -------------------------------------------------------------------------------- 1 | /* Formatted output to strings. 2 | Copyright (C) 1999, 2002, 2006, 2009-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | /* Specification. */ 20 | #include "vasnprintf.h" 21 | 22 | #include 23 | 24 | char * 25 | asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) 26 | { 27 | va_list args; 28 | char *result; 29 | 30 | va_start (args, format); 31 | result = vasnprintf (resultbuf, lengthp, format, args); 32 | va_end (args); 33 | return result; 34 | } 35 | -------------------------------------------------------------------------------- /autotools/gnulib/strncat.c: -------------------------------------------------------------------------------- 1 | /* Concatenate strings. 2 | Copyright (C) 1999, 2002, 2006, 2010-2025 Free Software Foundation, Inc. 3 | Written by Bruno Haible , 2002. 4 | 5 | This file is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU Lesser General Public License as 7 | published by the Free Software Foundation; either version 2.1 of the 8 | License, or (at your option) any later version. 9 | 10 | This file is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public License 16 | along with this program. If not, see . */ 17 | 18 | #include 19 | 20 | /* Specification. */ 21 | #include 22 | 23 | char * 24 | strncat (char *dest, const char *src, size_t n) 25 | { 26 | char *destptr = dest + strlen (dest); 27 | 28 | for (; n > 0 && (*destptr = *src) != '\0'; src++, destptr++, n--) 29 | ; 30 | if (n == 0) 31 | *destptr = '\0'; 32 | return dest; 33 | } 34 | -------------------------------------------------------------------------------- /autotools/gnulib/strtoll.c: -------------------------------------------------------------------------------- 1 | /* Function to parse a 'long long int' from text. 2 | Copyright (C) 1995-1997, 1999, 2001, 2009-2025 Free Software Foundation, 3 | Inc. 4 | This file is part of the GNU C Library. 5 | 6 | This file is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU Lesser General Public License as 8 | published by the Free Software Foundation, either version 3 of the 9 | License, or (at your option) any later version. 10 | 11 | This file is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public License 17 | along with this program. If not, see . */ 18 | 19 | #define QUAD 1 20 | 21 | #include 22 | 23 | #ifdef _LIBC 24 | # ifdef SHARED 25 | # include 26 | 27 | # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2) 28 | compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0); 29 | # endif 30 | 31 | # endif 32 | weak_alias (strtoll, strtoq) 33 | #endif 34 | -------------------------------------------------------------------------------- /autotools/m4/faccessat.m4: -------------------------------------------------------------------------------- 1 | # faccessat.m4 2 | # serial 12 3 | dnl Copyright (C) 2009-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | # See if we need to provide faccessat replacement. 10 | 11 | # Written by Eric Blake. 12 | 13 | AC_DEFUN([gl_FUNC_FACCESSAT], 14 | [ 15 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 16 | AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) 17 | 18 | dnl Persuade glibc to declare faccessat(). 19 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 20 | 21 | gl_CHECK_FUNCS_ANDROID([faccessat], [[#include ]]) 22 | if test $ac_cv_func_faccessat = no; then 23 | HAVE_FACCESSAT=0 24 | case "$gl_cv_onwards_func_faccessat" in 25 | future*) REPLACE_FACCESSAT=1 ;; 26 | esac 27 | else 28 | case $gl_cv_func_lstat_dereferences_slashed_symlink in 29 | *yes) ;; 30 | *) REPLACE_FACCESSAT=1 ;; 31 | esac 32 | fi 33 | ]) 34 | 35 | # Prerequisites of lib/faccessat.c. 36 | AC_DEFUN([gl_PREREQ_FACCESSAT], 37 | [ 38 | AC_CHECK_FUNCS([access]) 39 | ]) 40 | -------------------------------------------------------------------------------- /autotools/m4/reallocarray.m4: -------------------------------------------------------------------------------- 1 | # reallocarray.m4 2 | # serial 7 3 | dnl Copyright (C) 2017-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | AC_DEFUN([gl_FUNC_REALLOCARRAY], 10 | [ 11 | dnl Persuade glibc to declare reallocarray. 12 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 13 | 14 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 15 | AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF]) 16 | AC_REQUIRE([gl_FUNC_REALLOC_0_NONNULL]) 17 | gl_CHECK_FUNCS_ANDROID([reallocarray], [[#include ]]) 18 | if test "$ac_cv_func_reallocarray" = no; then 19 | HAVE_REALLOCARRAY=0 20 | case "$gl_cv_onwards_func_reallocarray" in 21 | future*) REPLACE_REALLOCARRAY=1 ;; 22 | esac 23 | else 24 | if test "$gl_cv_malloc_ptrdiff" = no; then 25 | REPLACE_REALLOCARRAY=1 26 | fi 27 | case "$gl_cv_func_realloc_0_nonnull" in 28 | *yes) ;; 29 | *) REPLACE_REALLOCARRAY=1 ;; 30 | esac 31 | fi 32 | ]) 33 | 34 | # Prerequisites of lib/reallocarray.c. 35 | AC_DEFUN([gl_PREREQ_REALLOCARRAY], [:]) 36 | -------------------------------------------------------------------------------- /libq/xasprintf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Utility routines. 3 | * 4 | * Copyright (C) 1999-2004 by Erik Andersen 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 | */ 20 | 21 | #ifndef _XASPRINTF_H 22 | #define _XASPRINTF_H 1 23 | 24 | #include 25 | #include "main.h" 26 | 27 | /* asprintf(char **strp, const char *fmt, ...); */ 28 | #define xasprintf(strp, fmt, args...) \ 29 | ({ \ 30 | int _ret = asprintf(strp, fmt , ## args); \ 31 | if (unlikely(_ret == -1)) \ 32 | err("Out of memory"); \ 33 | _ret; \ 34 | }) 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /man/include/qkeyword.desc: -------------------------------------------------------------------------------- 1 | \fIqkeyword\fR allows various searches based on KEYWORDS. Some uses are 2 | aimed at Gentoo developers, to allow querying which packages would be 3 | available, or are candidate for keywording. 4 | .P 5 | By default, the entire tree is traversed. Since this process can be 6 | slow, or result in too many results, the match arguments can be used to 7 | reduce the set of packages evaluated. \fB-p\fR and \fB-c\fR match 8 | package name and category respectively. They can both be used at the 9 | same time, but \fB-p\fR accepts regular atom format, including version 10 | and/or range. Hence, \fB-p\fR can be used to set both category as well 11 | as package in one go. The \fB-m\fR maintainer match, while reducing the 12 | resulting set, is likely to slow down the query processing since the 13 | metadata.xml file has to be read for each package examined. It is best 14 | used in combination with \fB-p\fR or \fB-c\fR. 15 | .P 16 | \fIqkeyword\fR uses the keyword found in the configured profile (ARCH) 17 | for its queries. This keyword can be overridden by giving the desired 18 | keyword as argument. Note that this does not change the profile in use, 19 | which most notably can result in incorrect masks being applied for the 20 | \fB-T\fR and \fB-S\fR options. 21 | -------------------------------------------------------------------------------- /autotools/gnulib/memchr.valgrind: -------------------------------------------------------------------------------- 1 | # Suppress a valgrind message about use of uninitialized memory in memchr(). 2 | 3 | # Copyright (C) 2009-2025 Free Software Foundation, Inc. 4 | # 5 | # This file is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU Lesser General Public License as 7 | # published by the Free Software Foundation; either version 2.1 of the 8 | # License, or (at your option) any later version. 9 | # 10 | # This file is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public License 16 | # along with this program. If not, see . 17 | 18 | # POSIX states that when the character is found, memchr must not read extra 19 | # bytes in an overestimated length (for example, where memchr is used to 20 | # implement strnlen). However, we use a safe word read to provide a speedup. 21 | { 22 | memchr-value4 23 | Memcheck:Value4 24 | fun:rpl_memchr 25 | } 26 | { 27 | memchr-value8 28 | Memcheck:Value8 29 | fun:rpl_memchr 30 | } 31 | -------------------------------------------------------------------------------- /autotools/m4/chdir-long.m4: -------------------------------------------------------------------------------- 1 | # chdir-long.m4 2 | # serial 17 3 | dnl Copyright (C) 2004-2007, 2009-2025 Free Software Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl This file is offered as-is, without any warranty. 8 | 9 | # Use Gnulib's robust chdir function. 10 | # It can handle arbitrarily long directory names, which means 11 | # that when it is given the name of an existing directory, it 12 | # never fails with ENAMETOOLONG. 13 | # Arrange to compile chdir-long.c only on systems that define PATH_MAX. 14 | 15 | # Written by Jim Meyering. 16 | 17 | AC_DEFUN([gl_FUNC_CHDIR_LONG], 18 | [ 19 | AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) 20 | AC_CACHE_CHECK([whether this system supports file names of any length], 21 | [gl_cv_have_unlimited_file_name_length], 22 | [AC_EGREP_CPP([have_arbitrary_file_name_length_limit], 23 | gl_PATHMAX_SNIPPET[ 24 | #ifdef PATH_MAX 25 | have_arbitrary_file_name_length_limit 26 | #endif], 27 | [gl_cv_have_unlimited_file_name_length=no], 28 | [gl_cv_have_unlimited_file_name_length=yes])]) 29 | ]) 30 | 31 | AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:]) 32 | -------------------------------------------------------------------------------- /tests/atom_explode/basic.tests: -------------------------------------------------------------------------------- 1 | pkg 2 | pkg:slot 3 | pkg-1 4 | pkg-1:slot 5 | pkg-1_beta 6 | pkg-1_beta:slot 7 | pkg-1-r123 8 | pkg-1-r123:slot 9 | pkg-1_alpha_rc50_p1-r5 10 | pkg-1_alpha_rc50_p1-r5:slot 11 | cat/pkg 12 | cat/pkg:slot 13 | cat/pkg-1 14 | cat/pkg-1:slot 15 | cat/pkg-1_beta 16 | cat/pkg-1_beta:slot 17 | cat/pkg-1-r123 18 | cat/pkg-1-r123:slot 19 | cat/pkg-1_alpha_rc50_p1-r5 20 | cat/pkg-1_alpha_rc50_p1-r5:slot 21 | pkg8 22 | pkg8:slot 23 | pkg8-1 24 | pkg8-1:slot 25 | pkg8-1_beta 26 | pkg8-1_beta:slot 27 | pkg8-1-r123 28 | pkg8-1-r123:slot 29 | pkg8-1_alpha_rc50_p1-r5 30 | pkg8-1_alpha_rc50_p1-r5:slot 31 | cat/pkg8 32 | cat/pkg8:slot 33 | cat/pkg8-1 34 | cat/pkg8-1:slot 35 | cat/pkg8-1_beta 36 | cat/pkg8-1_beta:slot 37 | cat/pkg8-1-r123 38 | cat/pkg8-1-r123:slot 39 | cat/pkg8-1_alpha_rc50_p1-r5 40 | cat/pkg8-1_alpha_rc50_p1-r5:slot 41 | pkg8x 42 | pkg8x:slot 43 | pkg8x-1 44 | pkg8x-1:slot 45 | pkg8x-1_beta 46 | pkg8x-1_beta:slot 47 | pkg8x-1-r123 48 | pkg8x-1-r123:slot 49 | pkg8x-1_alpha_rc50_p1-r5 50 | pkg8x-1_alpha_rc50_p1-r5:slot 51 | cat/pkg8x 52 | cat/pkg8x:slot 53 | cat/pkg8x-1 54 | cat/pkg8x-1:slot 55 | cat/pkg8x-1_beta 56 | cat/pkg8x-1_beta:slot 57 | cat/pkg8x-1-r123 58 | cat/pkg8x-1-r123:slot 59 | cat/pkg8x-1_alpha_rc50_p1-r5 60 | cat/pkg8x-1_alpha_rc50_p1-r5:slot 61 | -------------------------------------------------------------------------------- /autotools/gnulib/iswxdigit.c: -------------------------------------------------------------------------------- 1 | /* Test wide character for being a hexadecimal digit. 2 | Copyright (C) 2020-2025 Free Software Foundation, Inc. 3 | 4 | This file is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU Lesser General Public License as 6 | published by the Free Software Foundation; either version 2.1 of the 7 | License, or (at your option) any later version. 8 | 9 | This file is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public License 15 | along with this program. If not, see . */ 16 | 17 | #include 18 | 19 | /* Specification. */ 20 | #include 21 | 22 | int 23 | iswxdigit (wint_t wc) 24 | { 25 | return ((wc >= '0' && wc <= '9') 26 | #if 'A' == 0x41 && 'a' == 0x61 27 | /* Optimization, assuming ASCII */ 28 | || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F') 29 | #else 30 | || (wc >= 'A' && wc <= 'F') || (wc >= 'a' && wc <= 'f') 31 | #endif 32 | ); 33 | } 34 | --------------------------------------------------------------------------------