some spacing; move array into function
This commit is contained in:
parent
f158d4d0df
commit
13afe3c10c
@ -1,11 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $MirOS: src/bin/mksh/gensigs.sh,v 1.1 2005/05/23 12:01:09 tg Exp $
|
# $MirOS: src/bin/mksh/gensigs.sh,v 1.2 2005/05/23 12:06:39 tg Exp $
|
||||||
|
|
||||||
echo '#include <signal.h>' | $CC -E -dD -D_ANSI_SOURCE - \
|
echo '#include <signal.h>' | $CC -E -dD -D_ANSI_SOURCE - \
|
||||||
| grep '[ ]SIG[A-Z0-9]*[ ]' \
|
| grep '[ ]SIG[A-Z0-9]*[ ]' \
|
||||||
| sed 's/^\(.*[ ]SIG\)\([A-Z0-9]*\)\([ ].*\)$/\2/' \
|
| sed 's/^\(.*[ ]SIG\)\([A-Z0-9]*\)\([ ].*\)$/\2/' \
|
||||||
| while read name; do
|
| while read name; do
|
||||||
( echo '#include <signal.h>'; echo "__mksh_test: SIG$name" ) \
|
( echo '#include <signal.h>'; echo "__mksh_test: SIG$name" ) \
|
||||||
| $CC -E - | fgrep __mksh_test: \
|
| $CC -E - | fgrep __mksh_test: | sed \
|
||||||
| sed 's/^__mksh_test: \([0-9]*\).*$/ { \1, "'$name'" },/'
|
's/^__mksh_test: \([0-9]*\).*$/ { \1, "'$name'" },/'
|
||||||
done | fgrep -v '{ ,' >signames.inc
|
done | fgrep -v '{ ,' >signames.inc
|
||||||
|
20
histrap.c
20
histrap.c
@ -1,4 +1,4 @@
|
|||||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.2 2005/05/23 12:01:09 tg Exp $ */
|
/** $MirOS: src/bin/mksh/histrap.c,v 1.3 2005/05/23 12:06:39 tg Exp $ */
|
||||||
/* $OpenBSD: history.c,v 1.30 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: history.c,v 1.30 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
/* $OpenBSD: trap.c,v 1.22 2005/03/30 17:16:37 deraadt Exp $ */
|
/* $OpenBSD: trap.c,v 1.22 2005/03/30 17:16:37 deraadt Exp $ */
|
||||||
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.2 2005/05/23 12:01:09 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.3 2005/05/23 12:06:39 tg Exp $");
|
||||||
|
|
||||||
static int histfd;
|
static int histfd;
|
||||||
static int hsize;
|
static int hsize;
|
||||||
@ -968,19 +968,17 @@ sprinkle(int fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEED_MKSH_SIGNAME
|
#ifdef NEED_MKSH_SIGNAME
|
||||||
|
|
||||||
struct _mksh_sigpair {
|
|
||||||
int nr;
|
|
||||||
const char *name;
|
|
||||||
} mksh_sigpair[] = {
|
|
||||||
#include "signames.inc"
|
|
||||||
{ 0, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char * const
|
static const char * const
|
||||||
mksh_signame(int s)
|
mksh_signame(int s)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
static const struct _mksh_sigpair {
|
||||||
|
int nr;
|
||||||
|
const char *name;
|
||||||
|
} const mksh_sigpair[] = {
|
||||||
|
#include "signames.inc"
|
||||||
|
{ 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
while (mksh_sigpair[i].name != NULL) {
|
while (mksh_sigpair[i].name != NULL) {
|
||||||
if (mksh_sigpair[i].nr == s)
|
if (mksh_sigpair[i].nr == s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user