diff options
author | Bernhard R. Link <brlink@debian.org> | 2008-06-10 15:40:50 +0200 |
---|---|---|
committer | Shawn <sabetts@juicebox.(none)> | 2008-10-22 14:23:55 -0700 |
commit | 3737db1e6072c557748ba0ffcdca1e810b15009f (patch) | |
tree | 086728bed62b01cf799732dc43a75d78de13dbc7 /src/history.c | |
parent | d11f0735321bc725441fbc1dec04e363d07c987a (diff) | |
download | ratpoison-3737db1e6072c557748ba0ffcdca1e810b15009f.zip |
move all HAVE_HISTORY into history.c
Diffstat (limited to 'src/history.c')
-rw-r--r-- | src/history.c | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/src/history.c b/src/history.c index 4178cf9..9f9b7d1 100644 --- a/src/history.c +++ b/src/history.c @@ -25,8 +25,8 @@ #include "ratpoison.h" #ifdef HAVE_HISTORY - #include "readline/history.h" +#endif static char * get_history_filename (void) @@ -47,6 +47,7 @@ get_history_filename (void) return filename; } +#ifdef HAVE_HISTORY void history_load (void) { @@ -97,6 +98,7 @@ history_add (int history_id, char *item) PRINT_DEBUG (("Adding item: %s\n", item)); add_history (item); } +#endif /* HAVE_HISTORY */ static const char * extract_shell_part (const char *p) @@ -113,6 +115,7 @@ extract_shell_part (const char *p) return NULL; } +#ifdef HAVE_HISTORY const char * history_previous (int history_id) { @@ -158,5 +161,49 @@ int history_expand_line (int history_id, char *string, char **output) { return history_expand (string, output); } +#else /* HAVE_HISTORY */ + +void +history_add (int history_id, char *item) +{ +} + +void +history_load (void) +{ +} + +void +history_save (void) +{ +} + +void +history_reset (void) +{ +} + +void +history_resize (int size) +{ +} + +const char * +history_previous (int history_id) +{ + return NULL; +} + +const char * +history_next (int history_id) +{ + return NULL; +} + +int history_expand_line (int history_id, char *string, char **output) +{ + *output = xstrdup(string); + return 0; +} #endif /* HAVE_HISTORY */ |