/* Copyright Yann Weber This file is part of asmsh. asmsh is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. asmsh is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with asmsh. If not, see . */ #ifndef ASMSH_HISTORY_H #define ASMSH_HISTORY_H #include "config.h" #include #include #include #include #include #include #include static const char ASMSH_HISTORY_FILE[] = "asmsh.history"; typedef void(add_history_f)(const char*); /** Return the history filename and create the directory if needed * @note the returned string should be freed after use * @param const char * if NULL use $HOME */ char * history_filename_init(const char *homedir); int save_history(const char *history_path, const char* const* hists); int load_history(const char *history_path, add_history_f *add_h); #endif