1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

resolve/remove USAGE_LICENSE macros; remove repetitive (c) strings

This takes another small step towards disentangling the build
system from the old AT&T environment. The USAGE_LICENSE macros with
author and copyright information, which was formerly generated
dynamically for each file from a database, are eliminated and the
copyright/author information is instead inserted into the AST
getopt usage strings directly.

Repetitive license/copyright information is also removed from the
getopt strings in the builtin commands (src/lib/libcmd/*.c and
src/cmd/ksh93/data/builtins.c). There's no need to include 55
identical license/copyright strings in the ksh binary; one (in the
main ksh getopt string, shown by ksh --man) ought to be enough!
This makes the ksh binary about 10k smaller.

It does mean that something like 'enum --author', 'typeset
--license' or 'shift --copyright' will now not show those notices
for those builtins, but I doubt anyone will care.
This commit is contained in:
Martijn Dekker 2021-01-31 10:41:11 +00:00
parent 66e1d44642
commit ede479967f
65 changed files with 236 additions and 223 deletions

View file

@ -41,6 +41,7 @@ setv NMAKE nmake
setv NMAKEFLAGS
setv PR pr
setv PRFLAGS
setv SH_DICT \"libshell\"
setv SHELL /bin/sh
setv SILENT
setv TAR tar
@ -373,7 +374,7 @@ make install
done bltins/enum.c
meta enum.o %.c>%.o bltins/enum.c enum
prev bltins/enum.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""libshell"\" -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/enum.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=${SH_DICT} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/enum.c
prev SHOPT.sh
done enum.o generated
make getopts.o
@ -680,7 +681,7 @@ make install
meta main.o %.c>%.o sh/main.c main
prev sh/main.c
prev SHOPT.sh
exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_TIMEOUT+-DSHOPT_TIMEOUT=${SHOPT_TIMEOUT}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_REMOTE+-DSHOPT_REMOTE=${SHOPT_REMOTE}} ${SHOPT_OLDTERMIO+-DSHOPT_OLDTERMIO=${SHOPT_OLDTERMIO}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}}${SH_DICT+-DSH_DICT=${SH_DICT}} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/main.c
exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_TIMEOUT+-DSHOPT_TIMEOUT=${SHOPT_TIMEOUT}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_REMOTE+-DSHOPT_REMOTE=${SHOPT_REMOTE}} ${SHOPT_OLDTERMIO+-DSHOPT_OLDTERMIO=${SHOPT_OLDTERMIO}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -DSH_DICT=${SH_DICT} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/main.c
done main.o generated
make nvdisc.o
make sh/nvdisc.c
@ -703,7 +704,7 @@ make install
meta nvtype.o %.c>%.o sh/nvtype.c nvtype
prev sh/nvtype.c
prev SHOPT.sh
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/nvtype.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/nvtype.c
done nvtype.o generated
make arith.o
make sh/arith.c
@ -841,7 +842,7 @@ make install
meta regress.o %.c>%.o bltins/regress.c regress
prev bltins/regress.c
prev SHOPT.sh
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c bltins/regress.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c bltins/regress.c
done regress.o generated
make fault.o
make sh/fault.c
@ -1165,7 +1166,7 @@ make install
meta trestore.o %.c>%.o sh/trestore.c trestore
prev sh/trestore.c
prev SHOPT.sh
exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} ${SH_DICT+-DSH_DICT=${SH_DICT}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/trestore.c
exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/trestore.c
done trestore.o generated
make waitevent.o
make sh/waitevent.c
@ -1248,7 +1249,7 @@ make install
meta strdata.o %.c>%.o data/strdata.c strdata
prev data/strdata.c
prev SHOPT.sh
exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} ${SH_DICT+-DSH_DICT=${SH_DICT}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/strdata.c
exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/strdata.c
done strdata.o generated
make testops.o
make data/testops.c
@ -1259,7 +1260,7 @@ make install
meta testops.o %.c>%.o data/testops.c testops
prev data/testops.c
prev SHOPT.sh
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/testops.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/testops.c
done testops.o generated
make keywords.o
make data/keywords.c
@ -1317,7 +1318,7 @@ make install
meta builtins.o %.c>%.o data/builtins.c builtins
prev data/builtins.c
prev SHOPT.sh
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c data/builtins.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c data/builtins.c
done builtins.o generated
make variables.o
make data/variables.c
@ -1412,10 +1413,9 @@ make install
prev sh/shcomp.c
prev SHOPT.sh
setv CC.DLL -UCC.DLL
setv SH_DICT -DSH_DICT="\"libshell\""
setv _BLD_shell -U_BLD_shell
setv _BLD_DLL -U_BLD_DLL
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSH_DICT=\""libshell"\" -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DUSAGE_LICENSE=\""[-author?David Korn <dgk@research.att.com>][-copyright?Copyright (c) 1982-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html][--catalog?libshell]"\" -c sh/shcomp.c
exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSH_DICT=${SH_DICT} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/shcomp.c
done shcomp.o generated
prev libshell.a archive
prev +ljobs
@ -1423,7 +1423,6 @@ make install
prev ${mam_libsocket}
prev ${mam_libsecdb}
setv CC.DLL -UCC.DLL
setv SH_DICT -DSH_DICT="\"libshell\""
exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o shcomp shcomp.o ${mam_libshell} ${mam_libnsl} ${mam_libast}
done shcomp generated
make suid_exec

View file

@ -22,7 +22,7 @@
static const char enum_usage[] =
"[-?@(#)$Id: enum (AT&T Research) 2008-01-08 $\n]"
USAGE_LICENSE
"[--catalog?" ERROR_CATALOG "]"
"[+NAME?enum - create an enumeration type]"
"[+DESCRIPTION?\benum\b is a declaration command that creates an enumeration "
"type \atypename\a that can only store any one of the values in the indexed "
@ -43,7 +43,7 @@ USAGE_LICENSE
static const char enum_type[] =
"[-1c?\n@(#)$Id: type (AT&T Labs Research) 2008-01-08 $\n]"
USAGE_LICENSE
"[--catalog?" ERROR_CATALOG "]"
"[+NAME?\f?\f - create an instance of type \b\f?\f\b]"
"[+DESCRIPTION?\b\f?\f\b creates a variable for each \aname\a with "
"enumeration type \b\f?\f\b where \b\f?\f\b is a type that has been "

View file

@ -27,7 +27,7 @@
static const char mkservice_usage[] =
"[-?\n@(#)$Id: mkservice (AT&T Research) 2001-06-13 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME? mkservice - create a shell server ]"
"[+DESCRIPTION?\bmkservice\b creates a tcp or udp server that is "
"implemented by shell functions.]"
@ -68,7 +68,7 @@ USAGE_LICENSE
static const char eloop_usage[] =
"[-?\n@(#)$Id: eloop (AT&T Research) 2001-06-13 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME? eloop - process event loop]"
"[+DESCRIPTION?\beloop\b causes the shell to block waiting for events "
"to process. By default, \beloop\b does not return.]"

View file

@ -45,7 +45,7 @@
static const char usage[] =
"[-1p0?\n@(#)$Id: __regress__ (AT&T Research) 2009-03-29 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?__regress__ - shell regression test intercept control]"
"[+DESCRIPTION?\b__regress__\b controls the regression test intercepts "
"for shells compiled with SHOPT_REGRESS==1. Shells compiled this way are "

View file

@ -282,7 +282,7 @@ const char sh_set[] =
const char sh_optbreak[] =
"[-1c?\n@(#)$Id: break (AT&T Research) 1999-04-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?break - break out of loop ]"
"[+DESCRIPTION?\bbreak\b is a shell special built-in that exits the "
"smallest enclosing \bfor\b, \bselect\b, \bwhile\b, or \buntil\b loop, "
@ -300,7 +300,7 @@ USAGE_LICENSE
const char sh_optcont[] =
"[-1c?\n@(#)$Id: continue (AT&T Research) 1999-04-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?continue - continue execution at top of the loop]"
"[+DESCRIPTION?\bcontinue\b is a shell special built-in that continues "
"execution at the top of smallest enclosing enclosing \bfor\b, "
@ -318,8 +318,8 @@ USAGE_LICENSE
const char sh_optalarm[] = "r [varname seconds]";
const char sh_optalias[] =
"[-1c?\n@(#)$Id: alias (AT&T Research/ksh93) 2020-06-10 $\n]"
USAGE_LICENSE
"[-1c?\n@(#)$Id: alias (ksh 93u+m) 2020-06-10 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?alias - define or display aliases]"
"[+DESCRIPTION?\balias\b creates or redefines alias definitions "
"or writes the existing alias definitions to standard output. "
@ -359,7 +359,7 @@ USAGE_LICENSE
const char sh_optbuiltin[] =
"[-1c?\n@(#)$Id: builtin (AT&T Research) 2010-08-04 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?builtin - add, delete, or display shell built-ins]"
"[+DESCRIPTION?\bbuiltin\b can be used to add, delete, or display "
"built-in commands in the current shell environment. A built-in command "
@ -414,8 +414,8 @@ USAGE_LICENSE
;
const char sh_optcd[] =
"[-1c?\n@(#)$Id: cd (AT&T Research/ksh93) 2021-01-19 $\n]"
USAGE_LICENSE
"[-1c?\n@(#)$Id: cd (ksh 93u+m) 2021-01-19 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?cd - change working directory ]"
"[+DESCRIPTION?\bcd\b changes the current working directory of the "
"current shell environment.]"
@ -467,8 +467,8 @@ USAGE_LICENSE
;
const char sh_optcommand[] =
"[-1c?\n@(#)$Id: command (AT&T Research/ksh93) 2021-01-30 $\n]"
USAGE_LICENSE
"[-1c?\n@(#)$Id: command (ksh 93u+m) 2021-01-30 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?command - execute a simple command disabling special properties]"
"[+DESCRIPTION?Without \b-v\b or \b-V\b, \bcommand\b executes \acmd\a "
"with arguments given by \aarg\a, suppressing the shell function lookup "
@ -514,8 +514,8 @@ USAGE_LICENSE
;
const char sh_optdot[] =
"[-1c?@(#)$Id: \b.\b (AT&T Research/ksh93) 2020-06-15 $\n]"
USAGE_LICENSE
"[-1c?@(#)$Id: \b.\b (ksh 93u+m) 2020-06-15 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?\f?\f - execute commands in the current environment]"
"[+DESCRIPTION?\b.\b and \bsource\b are built-in commands that execute "
"commands from a function or a file in the current environment. \b.\b "
@ -551,7 +551,7 @@ USAGE_LICENSE
const char sh_opteval[] =
"[-1c?\n@(#)$Id: eval (AT&T Research) 1999-07-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?eval - create a shell command and process it]"
"[+DESCRIPTION?\beval\b is a shell special built-in command that constructs "
"a command by concatenating the \aarg\as together, separating each "
@ -570,8 +570,8 @@ USAGE_LICENSE
;
const char sh_optexec[] =
"[-1c?\n@(#)$Id: exec (AT&T Research/ksh93) 2020-06-11 $\n]"
USAGE_LICENSE
"[-1c?\n@(#)$Id: exec (ksh 93u+m) 2020-06-11 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?exec - execute command, open/close and duplicate file descriptors]"
"[+DESCRIPTION?\bexec\b is a special built-in command that can be used to "
"manipulate file descriptors or to replace the current shell "
@ -602,7 +602,7 @@ USAGE_LICENSE
const char sh_optexit[] =
"[-1c?\n@(#)$Id: exit (AT&T Research) 1999-07-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?exit - exit the current shell]"
"[+DESCRIPTION?\bexit\b is shell special built-in that causes the "
"shell that invokes it to exit. Before exiting the shell, if the "
@ -620,7 +620,7 @@ USAGE_LICENSE
const char sh_optexport[] =
"[-1c?\n@(#)$Id: export (AT&T Research) 1999-07-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?export - set export attribute on variables]"
"[+DESCRIPTION?\bexport\b sets the export attribute on each of "
"the variables specified by \aname\a which causes them "
@ -648,7 +648,7 @@ USAGE_LICENSE
const char sh_optgetopts[] =
":[-1c?\n@(#)$Id: getopts (AT&T Research) 2005-01-01 $\n]"
"[-author?Glenn Fowler <gsf@research.att.com>]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?\f?\f - parse utility options]"
"[+DESCRIPTION?The \bgetopts\b utility can be used to retrieve options and "
"arguments from a list of arguments given by \aargs\a or the positional "
@ -817,7 +817,7 @@ USAGE_LICENSE
const char sh_optbg[] =
"[-1c?@(#)$Id: bg (AT&T Research) 2000-04-02 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?bg - resume jobs in the background]"
"[+DESCRIPTION?\bbg\b places the given \ajob\as into the background "
"and sends them a \bCONT\b signal to start them running.]"
@ -838,7 +838,7 @@ _JOB_
const char sh_optfg[] =
"[-1c?@(#)$Id: fg (AT&T Research) 2000-04-02 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?fg - move jobs to the foreground]"
"[+DESCRIPTION?\bfg\b places the given \ajob\as into the foreground "
"in sequence and sends them a \bCONT\b signal to start each running.]"
@ -859,7 +859,7 @@ _JOB_
const char sh_optdisown[] =
"[-1c?@(#)$Id: disown (AT&T Research) 2000-04-02 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?disown - disassociate a job with the current shell]"
"[+DESCRIPTION?\bdisown\b prevents the current shell from sending "
"a \bHUP\b signal to each of the given \ajob\as when "
@ -880,7 +880,7 @@ _JOB_
const char sh_optjobs[] =
"[-1c?@(#)$Id: jobs (AT&T Research) 2000-04-02 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?jobs - display status of jobs]"
"[+DESCRIPTION?\bjobs\b displays information about specified \ajob\as "
"that were started by the current shell environment on standard "
@ -910,7 +910,8 @@ _JOB_
;
const char sh_opthash[] =
"[-1c?\n@(#)$Id: hash (ksh93) 2021-01-07 $\n]"
"[-1c?\n@(#)$Id: hash (ksh 93u+m) 2021-01-07 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?hash - display the locations of recently used programs]"
"[+DESCRIPTION?\bhash\b displays or modifies the hash table with the "
"locations of recently used programs. If given no arguments, it lists "
@ -930,7 +931,7 @@ const char sh_opthash[] =
const char sh_opthist[] =
"[-1cn?@(#)$Id: hist (AT&T Research) 2000-04-02 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?\f?\f - process command history list]"
"[+DESCRIPTION?\b\f?\f\b lists, edits, or re-executes, commands "
"previously entered into the current shell environment.]"
@ -998,7 +999,7 @@ USAGE_LICENSE
const char sh_optkill[] =
"[-1c?\n@(#)$Id: kill (AT&T Research) 2012-04-13 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?kill - terminate or signal process]"
"[+DESCRIPTION?With the first form in which \b-l\b is not specified, "
"\bkill\b sends a signal to one or more processes specified by "
@ -1049,7 +1050,8 @@ _JOB_
#if defined(JOBS) && defined(SIGSTOP)
const char sh_optstop[] =
"[-1c?\n@(#)$Id: stop (ksh93) 2020-06-22 $\n]"
"[-1c?\n@(#)$Id: stop (ksh 93u+m) 2020-06-22 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?stop - suspend a process]"
"[+DESCRIPTION?\bstop\b sends a \bSIGSTOP\b signal to one or more processes "
"specified by \ajob\a, suspending them until they receive \bSIGCONT\b.]"
@ -1067,7 +1069,8 @@ _JOB_
;
const char sh_optsuspend[] =
"[-1c?\n@(#)$Id: suspend (ksh93) 2020-06-22 $\n]"
"[-1c?\n@(#)$Id: suspend (ksh 93u+m) 2020-06-22 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?suspend - stop the shell]"
"[+DESCRIPTION?\bsuspend\b sends a \bSIGSTOP\b signal to the main shell "
"process, suspending the script or child shell session until it "
@ -1085,7 +1088,7 @@ const char sh_optsuspend[] =
const char sh_optlet[] =
"[-1c?@(#)$Id: let (AT&T Research) 2000-04-02 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?let - evaluate arithmetic expressions]"
"[+DESCRIPTION?\blet\b evaluates each \aexpr\a in the current "
"shell environment as an arithmetic expression using ANSI C "
@ -1108,7 +1111,7 @@ USAGE_LICENSE
const char sh_optprint[] =
"[-1c?\n@(#)$Id: print (AT&T Research) 2008-11-26 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?print - write arguments to standard output]"
"[+DESCRIPTION?By default, \bprint\b writes each \astring\a operand to "
"standard output and appends a newline character.]"
@ -1162,8 +1165,8 @@ USAGE_LICENSE
;
const char sh_optprintf[] =
"[-1c?\n@(#)$Id: printf (AT&T Research/ksh93) 2020-08-10 $\n]"
USAGE_LICENSE
"[-1c?\n@(#)$Id: printf (ksh 93u+m) 2020-08-10 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?printf - write formatted output]"
"[+DESCRIPTION?\bprintf\b writes each \astring\a operand to "
"standard output using \aformat\a to control the output format.]"
@ -1336,7 +1339,7 @@ USAGE_LICENSE
const char sh_optpwd[] =
"[-1c?\n@(#)$Id: pwd (AT&T Research) 1999-06-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?pwd - write working directory name]"
"[+DESCRIPTION?\bpwd\b writes an absolute pathname of the current working "
"directory to standard output. An absolute pathname is a "
@ -1360,7 +1363,7 @@ USAGE_LICENSE
const char sh_optread[] =
"[-1c?\n@(#)$Id: read (AT&T Research) 2006-12-19 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?read - read a line from standard input]"
"[+DESCRIPTION?\bread\b reads a line from standard input and breaks it "
"into fields using the characters in value of the \bIFS\b variable "
@ -1409,8 +1412,8 @@ USAGE_LICENSE
;
const char sh_optreadonly[] =
"[-1c?\n@(#)$Id: readonly (AT&T Research/ksh93) 2020-06-28 $\n]"
USAGE_LICENSE
"[-1c?\n@(#)$Id: readonly (ksh 93u+m) 2020-06-28 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?readonly - set readonly attribute on variables]"
"[+DESCRIPTION?\breadonly\b sets the readonly attribute on each of "
"the variables specified by \aname\a which prevents their "
@ -1443,7 +1446,8 @@ USAGE_LICENSE
;
const char sh_optredirect[] =
"[-1c?\n@(#)$Id: redirect (ksh93) 2020-08-08 $\n]"
"[-1c?\n@(#)$Id: redirect (ksh 93u+m) 2020-08-08 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?redirect - open/close and duplicate file descriptors]"
"[+DESCRIPTION?This command only accepts input/output redirections. "
"It can open and close files and modify file descriptors from \b0\b "
@ -1469,7 +1473,7 @@ const char sh_optredirect[] =
const char sh_optreturn[] =
"[-1c?\n@(#)$Id: return (AT&T Research) 1999-07-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?return - return from a function or dot script ]"
"[+DESCRIPTION?\breturn\b is a shell special built-in that causes the "
"function or dot script that invokes it to exit. "
@ -1492,8 +1496,12 @@ USAGE_LICENSE
const char sh_optksh[] =
"+[-1?\n@(#)$Id: sh (AT&T Research) "SH_RELEASE" $\n]"
USAGE_LICENSE
"[-author?David Korn <dgk@research.att.com>]"
"[-author?Contributors to https://github.com/ksh93/ksh]"
"[-copyright?(c) 1982-2014 AT&T Intellectual Property]"
"[-copyright?" SH_RELEASE_CPYR "]"
"[-license?http://www.eclipse.org/org/documents/epl-v10.html]"
"[--catalog?" SH_DICT "]"
"[+NAME?\b\f?\f\b - Shell, the standard command language interpreter]"
"[+DESCRIPTION?\b\f?\f\b is a command language interpreter that "
"executes commands read from a command line string, the "
@ -1575,7 +1583,7 @@ USAGE_LICENSE
;
const char sh_optset[] =
"+[-1c?\n@(#)$Id: set (AT&T Research) 1999-09-28 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?set - set/unset options and positional parameters]"
"[+DESCRIPTION?\bset\b sets or unsets options and positional parameters. "
"Options that are specified with a \b-\b cause the options to "
@ -1616,7 +1624,7 @@ USAGE_LICENSE
const char sh_optshift[] =
"[-1c?\n@(#)$Id: shift (AT&T Research) 1999-07-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?shift - shift positional parameters]"
"[+DESCRIPTION?\bshift\b is a shell special built-in that shifts the "
"positional parameters to the left by the number of places "
@ -1639,7 +1647,7 @@ USAGE_LICENSE
const char sh_optsleep[] =
"[-1c?\n@(#)$Id: sleep (AT&T Research) 2009-03-12 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?sleep - suspend execution for an interval]"
"[+DESCRIPTION?\bsleep\b suspends execution for at least the time specified "
"by \aduration\a or until a \bSIGALRM\b signal is received. "
@ -1673,7 +1681,7 @@ USAGE_LICENSE
const char sh_opttrap[] =
"[-1c?\n@(#)$Id: trap (AT&T Research) 1999-07-17 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?trap - trap signals and conditions]"
"[+DESCRIPTION?\btrap\b is a special built-in that defines actions to be "
"taken when conditions such as receiving a signal occur. Also, "
@ -1725,8 +1733,8 @@ USAGE_LICENSE
;
const char sh_opttypeset[] =
"+[-1c?\n@(#)$Id: typeset (AT&T Research/ksh93) 2021-01-20 $\n]"
USAGE_LICENSE
"+[-1c?\n@(#)$Id: typeset (ksh 93u+m) 2021-01-20 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?typeset - declare or display variables with attributes]"
"[+DESCRIPTION?Without the \b-f\b option, \btypeset\b sets, unsets, "
"or displays attributes of variables as specified with the "
@ -1849,7 +1857,7 @@ USAGE_LICENSE
const char sh_optulimit[] =
"[-1c?@(#)$Id: ulimit (AT&T Research) 2003-06-21 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?ulimit - set or display resource limits]"
"[+DESCRIPTION?\bulimit\b sets or displays resource limits. These "
"limits apply to the current process and to each child process "
@ -1884,7 +1892,8 @@ USAGE_LICENSE
;
const char sh_opttimes[] =
"[-1c?@(#)$Id: times (ksh93) 2020-07-14 $\n]"
"[-1c?@(#)$Id: times (ksh 93u+m) 2020-07-14 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?times - display CPU usage by the shell and child processes]"
"[+DESCRIPTION?\btimes\b displays the accumulated user and system CPU times, "
"one line with the times used by the shell and another with those used by "
@ -1894,7 +1903,7 @@ const char sh_opttimes[] =
const char sh_optumask[] =
"[-1c?\n@(#)$Id: umask (AT&T Research) 1999-04-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?umask - get or set the file creation mask]"
"[+DESCRIPTION?\bumask\b sets the file creation mask of the current "
"shell execution environment to the value specified by the "
@ -1921,7 +1930,7 @@ USAGE_LICENSE
const char sh_optuniverse[] = " [name]";
const char sh_optunset[] =
"[-1c?\n@(#)$Id: unset (AT&T Research) 1999-07-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?unset - unset values and attributes of variables and functions]"
"[+DESCRIPTION?For each \aname\a specified, \bunset\b unsets the variable, "
"or function if \b-f\b is specified, from the current shell "
@ -1947,7 +1956,7 @@ USAGE_LICENSE
const char sh_optunalias[] =
"[-1c?\n@(#)$Id: unalias (AT&T Research) 1999-07-07 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?unalias - remove alias definitions]"
"[+DESCRIPTION?\bunalias\b removes the definition of each named alias "
"from the current shell execution environment, or all aliases if "
@ -1969,7 +1978,7 @@ USAGE_LICENSE
const char sh_optwait[] =
"[-1c?\n@(#)$Id: wait (AT&T Research) 1999-06-17 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?wait - wait for process or job completion]"
"[+DESCRIPTION?\bwait\b with no operands, waits until all jobs "
"known to the invoking shell have terminated. If one or more "
@ -1996,8 +2005,8 @@ _JOB_
;
const char sh_optwhence[] =
"[-1c?\n@(#)$Id: whence (AT&T Research/ksh93) 2020-09-25 $\n]"
USAGE_LICENSE
"[-1c?\n@(#)$Id: whence (ksh 93u+m) 2020-09-25 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?whence, type - locate a command and describe its type]"
"[+DESCRIPTION?Without \b-v\b, \bwhence\b writes on standard output an "
"absolute pathname, if any, corresponding to \aname\a based "

View file

@ -56,8 +56,8 @@ const Shtable_t shtab_testops[] =
};
const char sh_opttest[] =
"[-1c?\n@(#)$Id: test (AT&T Research/ksh93) 2020-08-31 $\n]"
USAGE_LICENSE
"[-1c?\n@(#)$Id: test (ksh 93u+m) 2020-08-31 $\n]"
"[--catalog?" SH_DICT "]"
"[+NAME?test, [ - evaluate expression]"
"[+DESCRIPTION?\btest\b evaluates expressions and returns its result using the "
"exit status. Option parsing is not performed; all arguments, "

View file

@ -29,7 +29,7 @@
static const char sh_opttype[] =
"[-1c?\n@(#)$Id: type (AT&T Labs Research) 2008-07-01 $\n]"
USAGE_LICENSE
"[--catalog?" SH_DICT "]"
"[+NAME?\f?\f - set the type of variables to \b\f?\f\b]"
"[+DESCRIPTION?\b\f?\f\b sets the type on each of the variables specified "
"by \aname\a to \b\f?\f\b. If \b=\b\avalue\a is specified, "

View file

@ -29,9 +29,12 @@
#include "version.h"
static const char usage[] =
"[-?\n@(#)$Id: shcomp (AT&T Research/ksh93) " SH_RELEASE " $\n]"
USAGE_LICENSE
"[-?\n@(#)$Id: shcomp (AT&T Research) " SH_RELEASE " $\n]"
"[-author?David Korn <dgk@research.att.com>]"
"[-copyright?(c) 1982-2012 AT&T Intellectual Property]"
"[-copyright?" SH_RELEASE_CPYR "]"
"[-license?http://www.eclipse.org/org/documents/epl-v10.html]"
"[--catalog?" SH_DICT "]"
"[+NAME?shcomp - compile a shell script]"
"[+DESCRIPTION?Unless \b-D\b is specified, \bshcomp\b takes a shell script, "
"\ainfile\a, and creates a binary format file, \aoutfile\a, that "

View file

@ -1,7 +1,5 @@
: ksh regression test harness :
USAGE_LICENSE="[-author?David Korn <dgk@research.att.com>][-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
command=shtests
setslocale='*@(locale).sh'
@ -10,9 +8,13 @@ valgrindflags='--xml=yes --log-file=/dev/null --track-origins=yes --read-var-inf
USAGE=$'
[-s8?
@(#)$Id: shtests (AT&T Research/ksh93) 2020-09-02 $
@(#)$Id: shtests (ksh 93u+m) 2020-09-02 $
]
'$USAGE_LICENSE$'
[-author?David Korn <dgk@research.att.com>]
[-author?Glenn Fowler <gsf@research.att.com>]
[-copyright?(c) 2000-2012 AT&T Intellectual Property]
[-copyright?(c) 2020-2021 Contributors to https://github.com/ksh93/ksh]
[-license?http://www.eclipse.org/org/documents/epl-v10.html]
[+NAME?shtests - ksh regression test harness]
[+DESCRIPTION?\bshtests\b is the \bksh\b(1) regression test harness for
\b$SHELL\b or \bksh\b if \bSHELL\b is not defined and exported. If