diff options
author | QC <qball@gmpclient.org> | 2014-06-05 21:55:47 +0200 |
---|---|---|
committer | QC <qball@gmpclient.org> | 2014-06-05 21:55:47 +0200 |
commit | f9149b5bdb2a9f03ad9d48880f7e12db7828c0c6 (patch) | |
tree | 19f13c6c7e82809f644316d766e47a4986c82503 /source/history.c | |
parent | a2bbc65ff8407bfb928ebbf835ab42e4545a5ce9 (diff) |
Add option to disable history.
Diffstat (limited to 'source/history.c')
-rw-r--r-- | source/history.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/history.c b/source/history.c index e5693ac8..9de9f18e 100644 --- a/source/history.c +++ b/source/history.c @@ -113,6 +113,9 @@ static _element ** __history_get_element_list ( FILE *fd, unsigned int *length ) void history_set ( const char *filename, const char *entry ) { + if ( config.disable_history ) { + return; + } int found = 0; unsigned int curr = 0; unsigned int length = 0; @@ -179,6 +182,9 @@ void history_set ( const char *filename, const char *entry ) void history_remove ( const char *filename, const char *entry ) { + if ( config.disable_history ) { + return; + } _element ** list = NULL; int found = 0; unsigned int curr = 0; @@ -235,6 +241,9 @@ void history_remove ( const char *filename, const char *entry ) char ** history_get_list ( const char *filename, unsigned int *length ) { + if ( config.disable_history ) { + return NULL; + } _element **list = NULL; char **retv = NULL; // Open file. |