*flags = history_get_history_state()->flags;
}
-void cleanGetHistoryItem(int num, CleanString *line, CleanString *timestamp){
+void cleanSetState(int offset, int num, int flags){
;
+}
+
+void cleanGetHistoryItem(int num, CleanString *line, CleanString *timestamp){
char *cs_line = history_get_history_state()->entries[num]->line;
char *cs_stamp = history_get_history_state()->entries[num]->timestamp;
definition module ReadLine
:: HistoryItem = {line :: String, timestamp :: String}
-
:: HistoryState = {entries :: [HistoryItem], offset :: Int, flags :: Int}
+//Non-library functions
+setReadLineName :: !String !*env -> !*env
+
//Readline
readLine :: !String !Bool !*env -> (!String, !*env)
-setReadLineName :: !String !*env -> !*env
//Initializing History and State Management
//Note that this HAS to be executed when you want to add entries when the
}
setReadLineName :: !String !*env -> !*env
-setReadLineName s e = code inline {
- ccall cleanSetReadLineName "S-"
+setReadLineName s e = code {
+ ccall cleanSetReadLineName "S:V:A"
}
//Initializing History and State Management
usingHistory :: !*env -> !*env
-usingHistory e = code inline {
- ccall cleanUsingHistory "-"
+usingHistory e = code {
+ ccall cleanUsingHistory ":V:A"
}
historyGetHistoryState :: !*env -> (!HistoryState, !*env)
= ({HistoryState | entries=entries, offset=offset, flags=flags}, e)
where
getState :: !*env -> (!Int, !Int, !Int, !*env)
- getState e= code inline {
- ccall cleanGetState "-III"
+ getState e= code {
+ ccall cleanGetState ":VIII:A"
}
getItems :: !Int !*env -> (![HistoryItem], !*env)
getItems 0 e = ([], e)
= ([{line=line,timestamp=timestamp}:rest], e)
getItem :: !Int !*env -> (!String, !String, !*env)
- getItem i e = code inline {
- ccall cleanGetHistoryItem "I-SS"
+ getItem i e = code {
+ ccall cleanGetHistoryItem "I:VSS:A"
}
//History List Management
addHistory :: !String !*env -> !*env
-addHistory s e = code inline {
- ccall cleanAddHistory "S-"
+addHistory s e = code {
+ ccall cleanAddHistory "S:V:A"
}
clearHistory :: !*env -> !*env
-clearHistory e = code inline{
- ccall cleanClearHistory "-"
+clearHistory e = code {
+ ccall cleanClearHistory ":V:A"
}
//Information About the History List