1
0
forked from GitHub/gf-core

do the cyrilic trick for Windows in gf3 also

This commit is contained in:
kr.angelov
2008-06-04 07:52:12 +00:00
parent 2db5cddc33
commit ea0ff19423

View File

@@ -1,3 +1,4 @@
{-# OPTIONS -cpp #-}
module Main where
import GFC
@@ -11,15 +12,24 @@ import Data.Version
import System.Environment (getArgs)
import System.Exit
import System.IO
#ifdef mingw32_HOST_OS
import System.Win32.Console
import System.Win32.NLS
#endif
main :: IO ()
main =
do args <- getArgs
case parseOptions args of
Ok (opts,files) -> mainOpts opts files
Bad err -> do hPutStrLn stderr err
hPutStrLn stderr "You may want to try --help."
exitFailure
main = do
#ifdef mingw32_HOST_OS
codepage <- getACP
setConsoleCP codepage
setConsoleOutputCP codepage
#endif
args <- getArgs
case parseOptions args of
Ok (opts,files) -> mainOpts opts files
Bad err -> do hPutStrLn stderr err
hPutStrLn stderr "You may want to try --help."
exitFailure
mainOpts :: Options -> [FilePath] -> IO ()
mainOpts opts files =