projects
/
haskell-directory.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2006-01-10 10:23:16 by simonmar]
[haskell-directory.git]
/
System
/
Cmd.hs
diff --git
a/System/Cmd.hs
b/System/Cmd.hs
index
730b0ca
..
2d8635f
100644
(file)
--- 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
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))
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)))
rawSystem cmd args = system (unwords (map translate (cmd:args)))
+#endif
-- copied from System.Process (qv)
translate :: String -> String
-- copied from System.Process (qv)
translate :: String -> String