2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /******************************************************************************
25 Exits a script with the given return code. It's recommended that you
26 use the standard return codes 5, 10 and 20.
30 RC -- the return code. Defaults to 0.
46 21.01.2000 SDuvan implemented
48 ******************************************************************************/
50 #include <proto/dos.h>
52 #include <dos/dosextens.h>
53 #include <dos/rdargs.h>
54 #include "dos_commanderrors.h"
56 #include <aros/shcommands.h>
59 AROS_SHA(LONG
*, ,RC
,/N
,NULL
))
63 struct CommandLineInterface
*cli
= Cli();
64 int retval
= RETURN_OK
;
67 if(cli
&& !cli
->cli_Interactive
)
69 struct FileHandle
*fh
= BADDR(cli
->cli_CurrentInput
);
71 fh
->fh_Pos
= fh
->fh_End
+ 1; /* Simulate an EOF */
74 retval
= (int)*SHArg(RC
);
79 PrintFault(ERROR_SCRIPT_ONLY
, "Quit");