Merge OpenBSD

This commit is contained in:
tg 2003-08-16 15:19:49 +00:00
parent 22b94d64fa
commit 906c968df7
2 changed files with 10 additions and 10 deletions

10
emacs.c
View File

@ -1,5 +1,5 @@
/* $MirBSD: emacs.c,v 1.3 2003/06/29 19:45:40 tg Exp $ */
/* $OpenBSD: emacs.c,v 1.20 2003/06/26 00:09:45 deraadt Exp $ */
/* $MirBSD: emacs.c,v 1.4 2003/08/16 15:19:48 tg 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;

10
misc.c
View File

@ -1,5 +1,5 @@
/* $MirBSD: misc.c,v 1.2 2003/06/26 18:26:21 tg Exp $ */
/* $OpenBSD: misc.c,v 1.16 2003/04/16 23:11:52 tdeval Exp $ */
/* $MirBSD: misc.c,v 1.3 2003/08/16 15:19:49 tg Exp $ */
/* $OpenBSD: misc.c,v 1.18 2003/08/06 21:08:05 millert Exp $ */
/*
* Miscellaneous functions
@ -91,8 +91,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);
}
@ -1053,13 +1051,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;