add history commands
[CleanReadLine.git] / ReadLine.icl
index b8c3053..8807f4f 100644 (file)
@@ -9,3 +9,27 @@ readLine s h e = code {
                        ccall cleanReadLine "SI:S:A"
        }
 
+readHistory :: !String !*env -> (!Bool, !*env)
+readHistory s e = code {
+                       ccall cleanReadHistory "S:I:A"
+       }
+
+readHistoryRange :: !String !Int !Int !*env -> (!Bool, !*env)
+readHistoryRange s i1 i2 e = code {
+                       ccall cleanReadHistoryRange "SII:I:A"
+       }
+
+writeHistory :: !String !*env -> (!Bool, !*env)
+writeHistory s e = code {
+                       ccall cleanWriteHistory "S:I:A"
+       }
+
+appendHistory :: !Int !String !*env -> (!Bool, !*env)
+appendHistory i s e = code {
+                       ccall cleanWriteHistory "IS:I:A"
+       }
+               
+historyTruncateFile :: !String !Int !*env -> (!Bool, !*env)
+historyTruncateFile i s e = code {
+                       ccall cleanWriteHistory "SI:I:A"
+       }