From: ross Date: Wed, 27 Jul 2005 00:52:33 +0000 (+0000) Subject: [project @ 2005-07-27 00:52:33 by ross] X-Git-Tag: cmm-merge2~39 X-Git-Url: http://git.megacz.com/?p=haskell-directory.git;a=commitdiff_plain;h=125d2c6be8edb21dc42354e2cc51e60f38fc45d4 [project @ 2005-07-27 00:52:33 by ross] Hugs only: no longer need backslash fiddle now that Hugs leaves them alone. --- diff --git a/System/Cmd.hs b/System/Cmd.hs index 730b0ca..2d8635f 100644 --- a/System/Cmd.hs +++ b/System/Cmd.hs @@ -123,16 +123,12 @@ translate :: String -> String translate str = '\'' : foldr escape "'" str where escape '\'' = showString "'\\''" escape c = showChar c -#elif __HUGS__ +#else /* mingw32_HOST_OS && ! __GLASGOW_HASKELL__ */ +# if __HUGS__ rawSystem cmd args = system (unwords (cmd : map translate args)) - -translate :: String -> String -translate str = '"' : foldr escape "\"" str - where escape '"' = showString "\\\"" - escape '\\' = showString "\\\\" - escape c = showChar c -#else /* mingw32_HOST_OS && ! __GLASGOW_HASKELL__ && ! __HUGS__ */ +# else rawSystem cmd args = system (unwords (map translate (cmd:args))) +#endif -- copied from System.Process (qv) translate :: String -> String