From: Mart Lubbers Date: Tue, 26 Jan 2016 15:47:53 +0000 (+0100) Subject: nothing is inline anymore X-Git-Tag: v0.3^2~15 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=b5a37e9821e01208e7186c1f4b660892027e806f;p=CleanReadLine.git nothing is inline anymore --- diff --git a/Clean System Files/readLine.c b/Clean System Files/readLine.c index c81e7db..4836bcb 100644 --- a/Clean System Files/readLine.c +++ b/Clean System Files/readLine.c @@ -62,8 +62,11 @@ void cleanGetState(int *offset, int *num, int *flags){ *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; diff --git a/README.md b/README.md index f02d3f9..7f51018 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,6 @@ functions as close as possible ###Todo -- Access to the history datastructure -- Access to the current location - Complete history api implementation - Embed the readline library in the object files in such a way that no special compiler flag is needed. diff --git a/ReadLine.dcl b/ReadLine.dcl index 5e529c1..d66e37e 100644 --- a/ReadLine.dcl +++ b/ReadLine.dcl @@ -1,12 +1,13 @@ 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 diff --git a/ReadLine.icl b/ReadLine.icl index cb4cfbb..b377371 100644 --- a/ReadLine.icl +++ b/ReadLine.icl @@ -11,14 +11,14 @@ readLine s h e = code { } 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) @@ -28,8 +28,8 @@ historyGetHistoryState e = ({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) @@ -39,8 +39,8 @@ historyGetHistoryState 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" } @@ -49,13 +49,13 @@ historySetHistoryState hs e = abort "Not Implemented" //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