1 /* c_history.h 2 * 3 * Copyright (c) 1994-1996, Marko Macek 4 * You may distribute under the terms of either the GNU General Public 5 * License or the Artistic License, as specified in the README file. 6 * 7 */ 8 9 #ifndef C_HISTORY_H 10 #define C_HISTORY_H 11 12 #include "fte.h" 13 14 #ifdef CONFIG_HISTORY 15 16 #ifdef UNIX 17 #define HISTORY_NAME ".fte-history" 18 #else 19 #define HISTORY_NAME "fte.his" 20 #endif 21 22 extern char HistoryFileName[256]; 23 24 void ClearHistory(); 25 int SaveHistory(const char *FileName); 26 int LoadHistory(const char *FileName); 27 28 int UpdateFPos(const char *FileName, int Row, int Col); 29 int RetrieveFPos(const char *FileName, int &Row, int &Col); 30 31 int AddInputHistory(int Id, const char *String); 32 int CountInputHistory(int Id); 33 int GetInputHistory(int Id, char *String, int maxlen, int Nth); 34 35 // some platforms don't know about EBuffer yet 36 class EBuffer; 37 /* 38 * Get bookmarks for given Buffer (file) from history. 39 */ 40 int RetrieveBookmarks(EBuffer *buf); 41 /* 42 * Store given Buffer's bookmarks to history. 43 */ 44 int StoreBookmarks(EBuffer *buf); 45 46 /* history values */ 47 #define HIST_DEFAULT 0 48 #define HIST_PATH 1 49 #define HIST_SEARCH 2 50 #define HIST_POSITION 3 51 #define HIST_SETUP 4 52 #define HIST_SHELL 5 53 #define HIST_COMPILE 6 54 #define HIST_SEARCHOPT 7 55 #define HIST_BOOKMARK 8 56 #define HIST_REGEXP 9 57 #define HIST_TRANS 10 58 #define HIST_TAGFILES 11 59 #define HIST_CVS 12 60 #define HIST_CVSDIFF 13 61 #define HIST_CVSCOMMIT 14 62 #define HIST_SVN 15 63 #define HIST_SVNDIFF 16 64 #define HIST_SVNCOMMIT 17 65 66 #endif // CONFIG_HISTORY 67 68 #endif // C_HISTORY_H 69