Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit/TEST add history testing code.
details: https://anonhg.NetBSD.org/src/rev/30d8b89f1ad6
branches: trunk
changeset: 767678:30d8b89f1ad6
user: christos <christos%NetBSD.org@localhost>
date: Wed Jul 27 02:18:00 2011 +0000
description:
add history testing code.
diffstat:
lib/libedit/TEST/wtc1.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (27 lines):
diff -r 32cb5bd24d7a -r 30d8b89f1ad6 lib/libedit/TEST/wtc1.c
--- a/lib/libedit/TEST/wtc1.c Tue Jul 26 22:52:47 2011 +0000
+++ b/lib/libedit/TEST/wtc1.c Wed Jul 27 02:18:00 2011 +0000
@@ -14,6 +14,7 @@
static int continuation;
volatile sig_atomic_t gotsig;
+static const char hfile[] = ".whistory";
static wchar_t *
prompt(EditLine *el)
@@ -119,6 +120,7 @@
hist = history_winit(); /* Init built-in history */
history_w(hist, &ev, H_SETSIZE, 100); /* Remember 100 events */
+ history_w(hist, &ev, H_LOAD, hfile);
tok = tok_winit(NULL); /* Init the tokenizer */
@@ -260,6 +262,7 @@
el_end(el);
tok_wend(tok);
+ history_w(hist, &ev, H_SAVE, hfile);
history_wend(hist);
fprintf(stdout, "\n");
Home |
Main Index |
Thread Index |
Old Index