diff options
| author | aarne <unknown> | 2003-09-22 13:16:55 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-09-22 13:16:55 +0000 |
| commit | b1402e8bd6a68a891b00a214d6cf184d66defe19 (patch) | |
| tree | 90372ac4e53dce91cf949dbf8e93be06f1d9e8bd /src/GF/Shell/SubShell.hs | |
Founding the newly structured GF2.0 cvs archive.
Diffstat (limited to 'src/GF/Shell/SubShell.hs')
| -rw-r--r-- | src/GF/Shell/SubShell.hs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/GF/Shell/SubShell.hs b/src/GF/Shell/SubShell.hs new file mode 100644 index 000000000..c910d3dd0 --- /dev/null +++ b/src/GF/Shell/SubShell.hs @@ -0,0 +1,43 @@ +module SubShell where + +import Operations +import UseIO +import ShellState +import Option +import API + +import CommandL +import ArchEdit + +-- AR 20/4/2000 -- 12/11/2001 + +editSession :: Options -> ShellState -> IO () +editSession opts st + | oElem makeFudget opts = fudlogueEdit font st' + | otherwise = initEditLoop st' (return ()) + where + st' = addGlobalOptions opts st + font = maybe myUniFont mkOptFont $ getOptVal opts useFont + +myUniFont = "-mutt-clearlyu-medium-r-normal--0-0-100-100-p-0-iso10646-1" +mkOptFont = id +{- ---- +translateSession :: Options -> ShellState -> IO () +translateSession opts st = do + let grs = allStateGrammars st + cat = firstCatOpts opts (firstStateGrammar st) + trans = unlines . translateBetweenAll grs cat + translateLoop opts trans + +translateLoop opts trans = do + let fud = oElem makeFudget opts + font = maybe myUniFont mkOptFont $ getOptVal opts useFont + if fud then fudlogueWrite font trans else loopLine + where + loopLine = do + putStrFlush "trans> " + s <- getLine + if s == "." then return () else do + putStrLnFlush $ trans s + loopLine +-} |
