kill two others, saves 55t 8d 2i

This commit is contained in:
tg 2006-11-10 06:40:05 +00:00
parent 251243b253
commit ca2b1d88ca
3 changed files with 11 additions and 8 deletions

6
edit.c
View File

@ -5,7 +5,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.67 2006/11/10 04:31:04 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.68 2006/11/10 06:40:04 tg Exp $");
/* tty driver characters we are interested in */
typedef struct {
@ -3070,7 +3070,7 @@ x_version(int c __attribute__((unused)))
char *o_xbuf = xbuf, *o_xend = xend;
char *o_xbp = xbp, *o_xep = xep, *o_xcp = xcp;
int lim = x_lastcp() - xbp;
char *v = strdup(KSH_VERSION);
char *v = str_save(KSH_VERSION, ATEMP);
int vlen;
xbuf = xbp = xcp = v;
@ -3092,7 +3092,7 @@ x_version(int c __attribute__((unused)))
if (c != ' ')
x_e_ungetc(c);
free(v);
afree(v, ATEMP);
return KSTD;
}

5
eval.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.16 2006/11/10 03:23:49 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.17 2006/11/10 06:40:05 tg Exp $");
/*
* string expansion
@ -565,7 +565,8 @@ expand(char *cp, /* input word */
Xlength(ds, dp) == 0) {
char *p;
if ((p = strdup("")) == NULL)
if ((p = str_nsave(null, 0, ATEMP))
== NULL)
internal_errorf(1, "unable "
"to allocate memory");
XPput(*wp, p);

View File

@ -3,7 +3,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.31 2006/11/10 05:23:12 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.32 2006/11/10 06:40:05 tg Exp $");
#ifndef mksh_siglist
#if defined(BSD) || defined(__APPLE__)
@ -1068,8 +1068,10 @@ gettrap(const char *name, int igncase)
if (p->name) {
if (igncase) {
if (p->name && (!strcasecmp(p->name, name) ||
(strlen(name) > 3 && !strncasecmp("SIG",
p->name, 3) &&
(strlen(name) > 3 &&
(p->name[0] == 's' || p->name[0] == 'S') &&
(p->name[1] == 'i' || p->name[1] == 'I') &&
(p->name[2] == 'g' || p->name[2] == 'G') &&
!strcasecmp(p->name, name + 3))))
return p;
} else {