diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-11-25 20:12:40 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-11-25 20:12:40 +0000 |
commit | 8dec545c586449d9e5f4a74c285ae295727a6e6d (patch) | |
tree | 24ede7fd8fd6d4bfc330f35ece0d823d276f1a3f /lib/libedit/history.c | |
parent | 735da5f8c0917e2182e8f693897d286fe0456ef8 (diff) |
Sync libedit to NetBSD libedit as of Nov 8, 2003.
Tested by jmc@ djm@ and myself
Diffstat (limited to 'lib/libedit/history.c')
-rw-r--r-- | lib/libedit/history.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libedit/history.c b/lib/libedit/history.c index c9d440b8736..fafdc325a41 100644 --- a/lib/libedit/history.c +++ b/lib/libedit/history.c @@ -1,5 +1,5 @@ -/* $OpenBSD: history.c,v 1.11 2003/10/31 08:42:24 otto Exp $ */ -/* $NetBSD: history.c,v 1.24 2003/08/07 16:44:31 agc Exp $ */ +/* $OpenBSD: history.c,v 1.12 2003/11/25 20:12:38 otto Exp $ */ +/* $NetBSD: history.c,v 1.25 2003/10/18 23:48:42 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93"; #else -static const char rcsid[] = "$OpenBSD: history.c,v 1.11 2003/10/31 08:42:24 otto Exp $"; +static const char rcsid[] = "$OpenBSD: history.c,v 1.12 2003/11/25 20:12:38 otto Exp $"; #endif #endif /* not lint && not SCCSID */ @@ -88,6 +88,7 @@ struct history { #define HENTER(h, ev, str) (*(h)->h_enter)((h)->h_ref, ev, str) #define HADD(h, ev, str) (*(h)->h_add)((h)->h_ref, ev, str) +#define h_strdup(a) strdup(a) #define h_malloc(a) malloc(a) #define h_realloc(a, b) realloc((a), (b)) #define h_free(a) free(a) @@ -395,7 +396,7 @@ history_def_insert(history_t *h, HistEvent *ev, const char *str) h->cursor = (hentry_t *) h_malloc(sizeof(hentry_t)); if (h->cursor == NULL) goto oomem; - if ((h->cursor->ev.str = strdup(str)) == NULL) { + if ((h->cursor->ev.str = h_strdup(str)) == NULL) { h_free((ptr_t)h->cursor); goto oomem; } |