Import the complete OpenBSD source tree (base system)
as of CTM delta 3496 (roughly 1200 UTC today) into the vendor branch. Attention: this is a big update. Don't even try to build this system, OpenBSD 3.4-beta, yet on your own.
This commit is contained in:
parent
ea72216cc5
commit
1a61c10126
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
|
||||
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
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.
|
||||
*
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
8
emacs.c
8
emacs.c
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: emacs.c,v 1.20 2003/06/26 00:09:45 deraadt Exp $ */
|
||||
/* $OpenBSD: emacs.c,v 1.22 2003/08/02 19:44:12 fgsch Exp $ */
|
||||
|
||||
/*
|
||||
* Emacs-like command line editing and history
|
||||
|
@ -554,7 +554,7 @@ x_delete(nc, force_push)
|
|||
/*
|
||||
* This lets us yank a word we have deleted.
|
||||
*/
|
||||
if (nc > 1 || force_push)
|
||||
if (force_push)
|
||||
x_push(nc);
|
||||
|
||||
xep -= nc;
|
||||
|
@ -1264,7 +1264,9 @@ x_meta_yank(c)
|
|||
int c;
|
||||
{
|
||||
int len;
|
||||
if (x_last_command != XFUNC_yank && x_last_command != XFUNC_meta_yank) {
|
||||
if ((x_last_command != XFUNC_yank && x_last_command != XFUNC_meta_yank)
|
||||
|| killstack[killtp] == 0) {
|
||||
killtp = killsp;
|
||||
x_e_puts("\nyank something first");
|
||||
x_redraw(-1);
|
||||
return KSTD;
|
||||
|
|
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
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
8
misc.c
8
misc.c
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: misc.c,v 1.16 2003/04/16 23:11:52 tdeval Exp $ */
|
||||
/* $OpenBSD: misc.c,v 1.18 2003/08/06 21:08:05 millert Exp $ */
|
||||
|
||||
/*
|
||||
* Miscellaneous functions
|
||||
|
@ -90,8 +90,6 @@ str_save(s, ap)
|
|||
return NULL;
|
||||
len = strlen(s)+1;
|
||||
p = alloc(len, ap);
|
||||
if (!p)
|
||||
return NULL;
|
||||
strlcpy(p, s, len+1);
|
||||
return (p);
|
||||
}
|
||||
|
@ -1051,13 +1049,13 @@ ksh_getopt(argv, go, options)
|
|||
go->optarg = argv[go->optind - 1] + go->p;
|
||||
go->p = 0;
|
||||
} else
|
||||
go->optarg = (char *) 0;;
|
||||
go->optarg = (char *) 0;
|
||||
} else {
|
||||
if (argv[go->optind] && digit(argv[go->optind][0])) {
|
||||
go->optarg = argv[go->optind++];
|
||||
go->p = 0;
|
||||
} else
|
||||
go->optarg = (char *) 0;;
|
||||
go->optarg = (char *) 0;
|
||||
}
|
||||
}
|
||||
return c;
|
||||
|
|
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 "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))
|
||||
|
|
Loading…
Reference in New Issue