summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-11-03 03:17:51 +0000
committersabetts <sabetts>2003-11-03 03:17:51 +0000
commitc1c11da66b23e72c0820be0eb47fdd864eea8f53 (patch)
treec8b2f1cf0407e53174a9c81364ec376cb4956afc /src/main.c
parentcafd2e3f092ee5d694520c31cfbd33abcf1af843 (diff)
downloadratpoison-c1c11da66b23e72c0820be0eb47fdd864eea8f53.zip
* configure.in: Add "--disable-history" handling.
Conditionalize libhistory checks accordingly. * README: Mention "--disable history". * src/history.c: Surround most of the code with "#ifdef HAVE_READLINE_HISTORY_H". * src/ratpoison.h: Only #include history.h when "#ifdef HAVE_READLINE_HISTORY_H". * src/main.c (main, clean_up): Only load and save history, respectively, when "#ifdef HAVE_READLINE_HISTORY_H". * src/editor.c (editor_history_previous, editor_history_next): Return EDIT_NO_OP when not "#ifdef HAVE_READLINE_HISTORY_H". (editor_enter): Do not do line expansion or history add when not "#ifdef HAVE_READLINE_HISTORY_H". * doc/ratpoison.texi: Mention that history cycling and processing is not available when ratpoison is configured with the "--disable-history" option.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index d944292..e44ee62 100644
--- a/src/main.c
+++ b/src/main.c
@@ -618,7 +618,9 @@ main (int argc, char *argv[])
init_frame_lists ();
update_modifier_map ();
initialize_default_keybindings ();
+#ifdef HAVE_READLINE_HISTORY_H
history_load ();
+#endif /* HAVE_READLINE_HISTORY_H */
/* Scan for windows */
if (screen_arg)
@@ -771,7 +773,9 @@ clean_up ()
{
int i;
+#ifdef HAVE_READLINE_HISTORY_H
history_save ();
+#endif /* HAVE_READLINE_HISTORY_H */
free_keymaps ();
free_aliases ();