init version.
[bush.git] / builtins / colon.def
blob78432393f7a262c796d96bd1f2603394c24ece75
1 This file is colon.def, from which is created colon.c.
2 It implements the builtin ":" in Bush.
4 Copyright (C) 1987-2019 Free Software Foundation, Inc.
6 This file is part of GNU Bush, the Bourne Again SHell.
8 Bush is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 Bush is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with Bush. If not, see <http://www.gnu.org/licenses/>.
21 $PRODUCES colon.c
23 $BUILTIN :
24 $DOCNAME colon
25 $FUNCTION colon_builtin
26 $SHORT_DOC :
27 Null command.
29 No effect; the command does nothing.
31 Exit Status:
32 Always succeeds.
33 $END
35 $BUILTIN true
36 $FUNCTION colon_builtin
37 $SHORT_DOC true
38 Return a successful result.
40 Exit Status:
41 Always succeeds.
42 $END
44 $BUILTIN false
45 $FUNCTION false_builtin
46 $SHORT_DOC false
47 Return an unsuccessful result.
49 Exit Status:
50 Always fails.
51 $END
53 #include <config.h>
55 #if defined (HAVE_UNISTD_H)
56 # include <unistd.h>
57 #endif
59 #include "../src/bushansi.h"
60 #include "../src/shell.h"
62 /* Return a successful result. */
63 int
64 colon_builtin (ignore)
65 WORD_LIST *ignore;
67 return (0);
70 /* Return an unsuccessful result. */
71 int
72 false_builtin (ignore)
73 WORD_LIST *ignore;
75 return (1);