history state added
[CleanReadLine.git] / ReadLine.dcl
index ecc58bf..5e529c1 100644 (file)
@@ -1,5 +1,9 @@
 definition module ReadLine
 
+:: HistoryItem = {line :: String, timestamp :: String}
+
+:: HistoryState = {entries :: [HistoryItem], offset :: Int, flags :: Int}
+
 //Readline
 readLine :: !String !Bool !*env -> (!String, !*env)
 setReadLineName :: !String !*env -> !*env
@@ -8,6 +12,8 @@ setReadLineName :: !String !*env -> !*env
 //Note that this HAS to be executed when you want to add entries when the
 //history has not been used
 usingHistory :: !*env -> !*env
+historyGetHistoryState :: !*env -> (!HistoryState, !*env)
+historySetHistoryState :: !HistoryState !*env -> !*env
 
 //History List Management
 addHistory :: !String !*env -> !*env