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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
$NetBSD: patch-ad,v 1.1 2000/01/19 00:42:43 jlam Exp $
--- client/client.c.orig Wed Nov 10 21:35:59 1999
+++ client/client.c Tue Jan 18 15:27:27 2000
@@ -1588,22 +1588,19 @@
return True;
}
-#if defined(HAVE_LIBREADLINE)
+#if defined(HAVE_READLINE)
# if defined(HAVE_READLINE_HISTORY_H) || defined(HAVE_HISTORY_H)
/****************************************************************************
history
****************************************************************************/
static void cmd_history(void)
{
- HIST_ENTRY **hlist;
register int i;
- hlist = history_list (); /* Get pointer to history list */
-
- if (hlist) /* If list not empty */
+ if (history_length) /* If history is not empty */
{
- for (i = 0; hlist[i]; i++) /* then display it */
- DEBUG(0, ("%d: %s\n", i, hlist[i]->line));
+ for (i = 1; i <= history_length; i++) /* then display it */
+ DEBUG(0, ("%d: %s\n", i, history_get(i)->line));
}
}
# endif
@@ -1664,7 +1661,7 @@
{"setmode",cmd_setmode,"filename <setmode string> change modes of file",{COMPL_REMOTE,COMPL_NONE}},
{"help",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}},
{"?",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}},
-#ifdef HAVE_LIBREADLINE
+#ifdef HAVE_READLINE
{"history",cmd_history,"displays the command history",{COMPL_NONE,COMPL_NONE}},
#endif
{"!",NULL,"run a shell command on the local system",{COMPL_NONE,COMPL_NONE}},
@@ -1724,7 +1721,7 @@
}
}
-#ifndef HAVE_LIBREADLINE
+#ifndef HAVE_READLINE
/****************************************************************************
wait for keyboard activity, swallowing network packets
****************************************************************************/
@@ -1806,7 +1803,7 @@
pstring line;
char *ptr;
-#ifdef HAVE_LIBREADLINE
+#ifdef HAVE_READLINE
/* Minimal readline support, 29Jun1999, s.xenitellis@rhbnc.ac.uk */
const int PromptSize = 2048;
char prompt_str[PromptSize]; /* This holds the buffer "smb: \dir1\> " */
@@ -1817,7 +1814,7 @@
while (!feof(stdin)) {
fstring tok;
int i;
-#ifdef HAVE_LIBREADLINE
+#ifdef HAVE_READLINE
if ( temp != (char *)NULL )
{
free( temp ); /* Free memory allocated every time by readline() */
@@ -2197,7 +2194,7 @@
DEBUGLEVEL = 2;
-#ifdef HAVE_LIBREADLINE
+#ifdef HAVE_READLINE
/* Allow conditional parsing of the ~/.inputrc file. */
rl_readline_name = "smbclient";
#endif
|