This commit was generated by cvs2svn to compensate for changes in r57, which

included commits to RCS files with non-trunk default branches.
This commit is contained in:
tg 2003-08-11 17:45:54 +00:00
commit 22b94d64fa
4 changed files with 21 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.13 2002/04/22 21:44:58 miod Exp $
# $OpenBSD: Makefile,v 1.14 2003/08/08 22:32:10 miod Exp $
PROG= ksh
SRCS= alloc.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c emacs.c \
@ -31,3 +31,7 @@ check test:
/bin/sh ${.CURDIR}/tests/th.sh ${.CURDIR}/tests/th -s ${.CURDIR}/tests -p ./ksh -C pdksh,sh,ksh,posix,posix-upu
.include <bsd.prog.mk>
.if (${MACHINE_ARCH} == "m88k")
CFLAGS+= -O0
.endif

23
alloc.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: alloc.c,v 1.5 2002/03/01 13:06:18 espie Exp $ */
/* $OpenBSD: alloc.c,v 1.6 2003/08/05 20:52:27 millert Exp $ */
/*
* Copyright (c) 2002 Marc Espie.
*
@ -63,8 +63,8 @@ alloc(size_t size, Area *ap)
struct link *l;
l = malloc(size + sizeof(struct link));
if (!l)
return NULL;
if (l == NULL)
internal_errorf(1, "unable to allocate memory");
l->next = ap->freelist;
l->prev = NULL;
if (ap->freelist)
@ -87,14 +87,15 @@ aresize(void *ptr, size_t size, Area *ap)
lnext = l->next;
l2 = realloc(l, size+sizeof(struct link));
if (l2) {
if (lprev)
lprev->next = l2;
else
ap->freelist = l2;
if (lnext)
lnext->prev = l2;
}
if (l2 == NULL)
internal_errorf(1, "unable to allocate memory");
if (lprev)
lprev->next = l2;
else
ap->freelist = l2;
if (lnext)
lnext->prev = l2;
return L2P(l2);
}

4
lex.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: lex.c,v 1.17 2003/02/28 09:45:09 jmc Exp $ */
/* $OpenBSD: lex.c,v 1.18 2003/08/06 21:08:05 millert Exp $ */
/*
* lexical analysis and source input
@ -1394,5 +1394,5 @@ pop_state_(si, old_end)
afree(old_base, ATEMP);
return si->base + STATE_BSIZE - 1;;
return si->base + STATE_BSIZE - 1;
}

5
var.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: var.c,v 1.15 2003/06/26 00:09:45 deraadt Exp $ */
/* $OpenBSD: var.c,v 1.16 2003/08/05 20:52:27 millert Exp $ */
#include "sh.h"
#include "ksh_time.h"
@ -385,8 +385,7 @@ setstr(vq, s, error_ok)
export(vq, s);
else {
vq->val.s = str_save(s, vq->areap);
if (vq->val.s) /* <sjg> don't lie */
vq->flag |= ALLOC;
vq->flag |= ALLOC;
}
} else /* integer dest */
if (!v_evaluate(vq, s, error_ok))