diff --git a/argued/argued.1 b/argued/argued.1 index c365df8..ba9267d 100644 --- a/argued/argued.1 +++ b/argued/argued.1 @@ -8,11 +8,10 @@ argued \(en check for arguments Argued exits successfully if any arguments are provided, and unsuccessfully otherwise. -.SH STANDARDS - -Argued is not described in POSIX.1-2017. -Argued's function may be performed on a purely POSIX system with test(1). - .SH COPYRIGHT Public domain. + +.SH SEE ALSO + +str(1), test(1) diff --git a/manual/manual b/manual/manual index 8b5c1bc..5eebc01 100755 --- a/manual/manual +++ b/manual/manual @@ -5,33 +5,29 @@ set -e str isvalue "$MANUAL_DIR" \ || MANUAL_DIR=/usr/manual -argv0="$0" - +# normalization ! str isvalue "$1" || str isvalue "$3" \ && printf "Usage: %s [name] (section)\n" "$argv0" 1>&2 \ && exit 1 \ - || true - + || \ str isvalue "$2" && ! test -e "$MANUAL_DIR/$2/$1" \ && printf "%s: %s: No manual entry in section %s\n" "$0" "$1" "$2" \ 1>&2 \ && exit 1 \ - || true - + || \ str isvalue "$2" \ && PAGE="$MANUAL_DIR/$2/$1" \ || for d in "$MANUAL_DIR"/* do test -e "$d/$1" && PAGE="$d/$1" done +# lookup + execution ! str isvalue "$PAGE" \ && printf "%s: %s: No manual entry\n" "$0" "$1" 1>&2 \ && exit 1 \ - || true - + || \ ! str isvalue "$SECTION_DIR" \ && printf "%s: %s: No manual entry\n" "$argv0" "$1" 1>&2 \ && exit 1 \ - || true - + || \ <"$PAGE" groff -t -e -mandoc -Tascii diff --git a/str/Makefile b/str/Makefile index 031e407..e9fface 100644 --- a/str/Makefile +++ b/str/Makefile @@ -3,13 +3,10 @@ TARGETS = str all: $(TARGETS) -str: %.c - $(CC) -o $@ $@.c +str: str.c + $(CC) -DINCLUDE_ISVALUE=1 -o $@ $@.c clean: $(RM) $(TARGETS) -sane: str.c ../include/sysexits.h - $(CC) -DDONT_USE_SYSTEM_SYSEXITS -o str str.c - -.PHONY: all clean sane +.PHONY: all clean