1 /* need copyright assignment from Daniel Risacher */
4 #ifdef HAVE_LIBREADLINE
7 #include <readline/readline.h>
8 #include <readline/history.h>
10 SCM_PROC (s_readline
, "readline", 0, 1, 0, scm_readline
);
12 scm_readline (SCM txt
)
18 if (! SCM_UNBNDP (txt
))
20 SCM_ASSERT ((SCM_NIMP(txt
) && SCM_STRINGP(txt
)), txt
, SCM_ARG1
,
22 SCM_COERCE_SUBSTR (txt
);
26 prompt
= SCM_UNBNDP (txt
) ? "" : SCM_CHARS (txt
);
40 SCM_PROC (s_add_history
, "add-history", 1, 0, 0, scm_add_history
);
42 scm_add_history (SCM txt
)
45 SCM_ASSERT ((SCM_NIMP(txt
) && SCM_STRINGP(txt
)), txt
, SCM_ARG1
,
47 SCM_COERCE_SUBSTR (txt
);
54 return SCM_UNSPECIFIED
;
61 scm_add_feature ("readline");