blob: 51654a8c78548f85681e157841fa35e7d56823af (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
*** sim/spice/common/src/lib/fte/misccoms.c.orig Wed Mar 9 04:15:44 1994
--- sim/spice/common/src/lib/fte/misccoms.c Sun Dec 12 14:56:44 1999
***************
*** 11,16 ****
--- 11,24 ----
#include "hlpdefs.h"
#include "suffix.h"
+ #ifdef HAS_GNUREADLINE
+ #include <readline/readline.h>
+ #include <readline/history.h>
+
+ extern int gnu_history_lines;
+ extern char gnu_history_file[];
+ #endif
+
static void byemesg();
void
***************
*** 299,304 ****
--- 307,320 ----
byemesg();
} else
byemesg();
+
+ #ifdef HAS_GNUREADLINE
+ /* Added GNU Readline Support -- Andrew Veliath <veliaa@rpi.edu> */
+ if (cp_interactive && (cp_maxhistlength > 0)) {
+ stifle_history(cp_maxhistlength);
+ write_history(gnu_history_file);
+ }
+ #endif /* HAS_GNUREADLINE */
exit(EXIT_NORMAL);
/* NOTREACHED */
|