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:
commit
22b94d64fa
6
Makefile
6
Makefile
@ -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
|
PROG= ksh
|
||||||
SRCS= alloc.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c emacs.c \
|
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
|
/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>
|
.include <bsd.prog.mk>
|
||||||
|
|
||||||
|
.if (${MACHINE_ARCH} == "m88k")
|
||||||
|
CFLAGS+= -O0
|
||||||
|
.endif
|
||||||
|
23
alloc.c
23
alloc.c
@ -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.
|
* Copyright (c) 2002 Marc Espie.
|
||||||
*
|
*
|
||||||
@ -63,8 +63,8 @@ alloc(size_t size, Area *ap)
|
|||||||
struct link *l;
|
struct link *l;
|
||||||
|
|
||||||
l = malloc(size + sizeof(struct link));
|
l = malloc(size + sizeof(struct link));
|
||||||
if (!l)
|
if (l == NULL)
|
||||||
return NULL;
|
internal_errorf(1, "unable to allocate memory");
|
||||||
l->next = ap->freelist;
|
l->next = ap->freelist;
|
||||||
l->prev = NULL;
|
l->prev = NULL;
|
||||||
if (ap->freelist)
|
if (ap->freelist)
|
||||||
@ -87,14 +87,15 @@ aresize(void *ptr, size_t size, Area *ap)
|
|||||||
lnext = l->next;
|
lnext = l->next;
|
||||||
|
|
||||||
l2 = realloc(l, size+sizeof(struct link));
|
l2 = realloc(l, size+sizeof(struct link));
|
||||||
if (l2) {
|
if (l2 == NULL)
|
||||||
if (lprev)
|
internal_errorf(1, "unable to allocate memory");
|
||||||
lprev->next = l2;
|
if (lprev)
|
||||||
else
|
lprev->next = l2;
|
||||||
ap->freelist = l2;
|
else
|
||||||
if (lnext)
|
ap->freelist = l2;
|
||||||
lnext->prev = l2;
|
if (lnext)
|
||||||
}
|
lnext->prev = l2;
|
||||||
|
|
||||||
return L2P(l2);
|
return L2P(l2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
lex.c
4
lex.c
@ -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
|
* lexical analysis and source input
|
||||||
@ -1394,5 +1394,5 @@ pop_state_(si, old_end)
|
|||||||
|
|
||||||
afree(old_base, ATEMP);
|
afree(old_base, ATEMP);
|
||||||
|
|
||||||
return si->base + STATE_BSIZE - 1;;
|
return si->base + STATE_BSIZE - 1;
|
||||||
}
|
}
|
||||||
|
5
var.c
5
var.c
@ -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 "sh.h"
|
||||||
#include "ksh_time.h"
|
#include "ksh_time.h"
|
||||||
@ -385,8 +385,7 @@ setstr(vq, s, error_ok)
|
|||||||
export(vq, s);
|
export(vq, s);
|
||||||
else {
|
else {
|
||||||
vq->val.s = str_save(s, vq->areap);
|
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 */
|
} else /* integer dest */
|
||||||
if (!v_evaluate(vq, s, error_ok))
|
if (!v_evaluate(vq, s, error_ok))
|
||||||
|
Loading…
Reference in New Issue
Block a user