X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsStartup.c;h=17b194f6e3b039a1946c8b2bcbe51940bb356877;hb=674ad01f5f5edcc20e3fee4e5f39a2d8388120a3;hp=75102f473a46f7e256b420d1a3c9235b4eaed8ca;hpb=7d446f085a1e5ce22b3a54b718e79a3da1bd8091;p=ghc-hetmet.git diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c index 75102f4..17b194f 100644 --- a/ghc/rts/RtsStartup.c +++ b/ghc/rts/RtsStartup.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsStartup.c,v 1.39 2000/04/03 16:28:08 simonmar Exp $ + * $Id: RtsStartup.c,v 1.40 2000/04/10 14:28:14 sewardj Exp $ * * (c) The GHC Team, 1998-2000 * @@ -53,6 +53,26 @@ EXTFUN(__init_Prelude); static void initModules ( void * ); void +setProgArgv(int argc, char *argv[]) +{ + /* Usually this is done by startupHaskell, so we don't need to call this. + However, sometimes Hugs wants to change the arguments which Haskell + getArgs >>= ... will be fed. So you can do that by calling here + _after_ calling startupHaskell. + */ + prog_argc = argc; + prog_argv = argv; +} + +void +getProgArgv(int *argc, char **argv[]) +{ + *argc = prog_argc; + *argv = prog_argv; +} + + +void startupHaskell(int argc, char *argv[], void *init_root) { /* To avoid repeated initialisations of the RTS */