diff -r 97f41bdf0770 -r 497ec84e0c21 tools/pas2c.hs --- a/tools/pas2c.hs Sun Nov 04 02:13:25 2012 +0100 +++ b/tools/pas2c.hs Sun Nov 04 02:35:17 2012 +0100 @@ -96,7 +96,6 @@ pas2C :: String -> String -> String -> IO () pas2C fn inputPath outputPath = do - setCurrentDirectory inputPath s <- flip execStateT initState $ f fn renderCFiles s outputPath where @@ -110,7 +109,7 @@ print ("Preprocessing '" ++ fileName ++ ".pas'... ") fc' <- liftIO $ tryJust (guard . isDoesNotExistError) - $ preprocess (fileName ++ ".pas") + $ preprocess inputPath (fileName ++ ".pas") case fc' of (Left a) -> do modify (Map.insert fileName (System []))