Clean up the signal mess, saves 172 Bytes:
* 'sigseen' in Build.sh goes away * Signal name existence is checked in this order: have our own¹ -> sys_signame[] -> _sys_signame[] -> build our own² * Signal description existence is checked in this order: sys_siglist[] -> _sys_siglist[] -> strsignal() -> NULL³ ¹ Predefined list of items, for operating systems where we cannot build² them, i.e. Plan 9 and Minix 3 (e.g. no $CPP -dD) ² The usual cpp(1) stuff ³ Changed later, see below * Make $CPP test dependent on $NEED_MKSH_SIGNAME (others can be added here, this is not absolute) * Make signal name list generation² dependent on $NEED_MKSH_SIGNAME * Fix check if the generation worked * Guarantee that sigtraps[*].name and sigtraps[*].mess are valid C strings; this makes the code shorter *and* removes a few pos- sible nil pointer dereferences * Embed autoconf'd usages of sys_sig* / strsignal / mksh_sigpairs into inittraps() * Check for each signal 0<=i<=NSIG that name is not NULL or "" -> replace with ("%d", i) mess is not NULL or "" -> replace with ("Signal %d", i) name does not start (case-insensitive) with "SIG" -> name += 3 * In gettrap(), fix check if signal name starts, case-sensitive or case-insensitive, depending on need, with "SIG" (bug from millert@) Other changes: * Build.sh: ac_test[n]() are documented * Build.sh: ac_test[n]() can have negative prereqs as well now * Build.sh: use <<-'EOF' consistently * bump patchlevel to today
This commit is contained in:
4
sh.h
4
sh.h
@ -8,8 +8,8 @@
|
||||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
||||
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
||||
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.92 2007/01/11 00:32:31 tg Exp $"
|
||||
#define MKSH_VERSION "R29 2007/01/11"
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.93 2007/01/12 00:25:40 tg Exp $"
|
||||
#define MKSH_VERSION "R29 2007/01/12"
|
||||
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
|
Reference in New Issue
Block a user