New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / workbench / c / shellcommands / EndIf.c
blob10fcf7a222a8475015e3b2da389f56a8a43b1468
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 /******************************************************************************
11 NAME
13 EndIf
15 SYNOPSIS
17 LOCATION
19 Workbench:C
21 FUNCTION
23 Ends an If block. If the condition of the If command is false,
24 execution will skip to the corresponding EndIf command, in case there
25 isn't an Else command present.
27 INPUTS
29 RESULT
31 NOTES
33 EXAMPLE
35 BUGS
37 SEE ALSO
39 If, Else
41 INTERNALS
43 HISTORY
45 10.01.2000 SDuvan implemented
47 ******************************************************************************/
49 #include <proto/dos.h>
50 #include <dos/dos.h>
51 #include <dos/dosextens.h>
52 #include <dos_commanderrors.h>
54 #include <aros/shcommands.h>
56 AROS_SH0(EndIf,41.1)
58 AROS_SHCOMMAND_INIT
60 struct CommandLineInterface *cli = Cli();
63 if ((cli != NULL) && (cli->cli_CurrentInput != cli->cli_StandardInput))
65 return RETURN_OK; /* Normal operation: do nothing! */
67 else
69 PrintFault(ERROR_SCRIPT_ONLY, "EndIf");
71 return RETURN_ERROR;
74 AROS_SHCOMMAND_EXIT