NetBSD/bin/sh
kre 21f0086877 Introduce a new macro JNUM to replace the idiom jp-jobtab+1
(the job number, given jp a pointer to a jobs table entry)
used open coded previously in many places (mostly in DEBUG mode
trace messages, so not included in most shells, but there are
a few others).

Make the type of JNUM() be int rather than the ptrdiff_t the
open coded version became ... which when used in some printf()
type function arg list was cast to some other arbitrary (but not
consistent) int type for which there is a standard %Xd type
format conversion.   Now we can (and do) just use %d for this.

If the number of jobs ever exceeds the range of an int, we would
have far more serious problems than the broken output this would
cause.

While here improve a comment or two, and use JOBRUNNING instead
of 0 where the intent is the former (JOBRUNNING is #defined as 0).

NFCI.
2022-04-18 06:02:27 +00:00
..
USD.doc
bltin Fix a bug in the built-in echo in /bin/sh reported in private mail by 2021-05-18 21:39:06 +00:00
funcs
Makefile sh: remove no-op 'continue' from do-while-0 loop 2021-10-10 08:35:34 +00:00
TOUR
alias.c
alias.h
arith_token.c
arith_tokens.h
arithmetic.c
arithmetic.h
builtins.def Ensure that all of the POSIX standard utilities are correctly 2021-11-10 18:25:52 +00:00
cd.c Add some comments explaining accesses to the environment via 2022-01-31 16:54:28 +00:00
cd.h
error.c DEBUG mode changes only. NFC (NC) for any normally compiled shell. 2021-11-10 15:26:34 +00:00
error.h
eval.c Use a volative local shadow of a field in an (on-stack) non-volatile struct 2022-01-05 15:25:44 +00:00
eval.h
exec.c PR bin/56491 2021-11-16 11:28:29 +00:00
exec.h
expand.c PR bin/53550 2021-11-22 05:17:43 +00:00
expand.h PR bin/53550 2021-11-22 05:17:43 +00:00
histedit.c sh: fix typo in comment 2022-02-08 20:39:59 +00:00
init.h
input.c PR bin/55979 2021-02-16 15:30:26 +00:00
input.h
jobs.c Introduce a new macro JNUM to replace the idiom jp-jobtab+1 2022-04-18 06:02:27 +00:00
jobs.h Add jobs -Z (like in zsh(1)) to setproctitle(3). 2021-09-11 20:43:32 +00:00
machdep.h
mail.c
mail.h
main.c Use a type-correct end marker for strstrcat() rather than NULL, as 2021-10-26 10:07:20 +00:00
main.h
memalloc.c fix various typos in comments and output/log messages. 2022-04-10 09:50:44 +00:00
memalloc.h Use a type-correct end marker for strstrcat() rather than NULL, as 2021-10-26 10:07:20 +00:00
miscbltin.c Redo the way the builtin cmd 'ulimit' getopt() (nextopt() really, but it 2022-04-16 14:26:26 +00:00
miscbltin.h
mkbuiltins
mkinit.sh
mknodenames.sh
mknodes.sh
mkoptions.sh
mktokens
myhistedit.h - Add command completion (from FreeBSD) 2021-08-15 10:17:55 +00:00
mystring.c Avoid generating error messages implying that user errors are illegal. 2022-04-16 14:20:45 +00:00
mystring.h
nodes.c.pat
nodetypes PR bin/53550 2021-11-22 05:17:43 +00:00
option.list
options.c Avoid generating error messages implying that user errors are illegal. 2022-04-16 14:20:45 +00:00
options.h
output.c
output.h Add a couple of macro definitions for dealing with shell I/O errors. 2021-11-10 15:58:38 +00:00
parser.c fix various typos in comments. 2022-04-17 21:24:52 +00:00
parser.h
redir.c PR bin/53550 2021-11-22 05:17:43 +00:00
redir.h Improve the solution for the 2nd access to a fd which shouldn't 2021-09-15 18:29:45 +00:00
sh.1 sh(1): improve getopts docs for optstring leading : 2022-01-07 05:30:30 +00:00
shell.h PR bin/56464 2021-10-26 00:05:38 +00:00
show.c bin: remove unnecessary lint comment CONSTCOND 2021-09-10 22:11:03 +00:00
show.h
syntax.c
syntax.h
trap.c DEBUG mode changes only. NFC (NC) for any normally compiled shell. 2021-11-10 15:26:34 +00:00
trap.h
var.c Fix the fix to a typo in one of the comments. 2021-08-09 11:29:30 +00:00
var.h
version.h After 3 and a bit years, it is time... 2022-01-22 22:53:58 +00:00