IEEE 1003.2 (D11.2.2.3) requires that the system's true and false be accessed
instead of searching $PATH. The best way to satisfy this requirement is to make them builtins. True was allready builtin, this patch adds false.
This commit is contained in:
parent
d670635e8b
commit
67893cfee5
|
@ -36,7 +36,7 @@
|
|||
#
|
||||
# @(#)builtins 5.1 (Berkeley) 3/7/91
|
||||
#
|
||||
# $Header: /cvsroot/src/bin/sh/Attic/builtins,v 1.3 1993/03/23 00:27:35 cgd Exp $
|
||||
# $Header: /cvsroot/src/bin/sh/Attic/builtins,v 1.4 1993/07/07 01:11:56 jtc Exp $
|
||||
|
||||
#
|
||||
# This file lists all the builtin commands. The first column is the name
|
||||
|
@ -63,6 +63,7 @@ execcmd exec
|
|||
exitcmd exit
|
||||
exportcmd export readonly
|
||||
#exprcmd expr test [
|
||||
falsecmd false
|
||||
fgcmd -j fg
|
||||
getoptscmd getopts
|
||||
hashcmd hash
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#
|
||||
# @(#)builtins 5.1 (Berkeley) 3/7/91
|
||||
#
|
||||
# $Header: /cvsroot/src/bin/sh/builtins.def,v 1.3 1993/03/23 00:27:35 cgd Exp $
|
||||
# $Header: /cvsroot/src/bin/sh/builtins.def,v 1.4 1993/07/07 01:11:56 jtc Exp $
|
||||
|
||||
#
|
||||
# This file lists all the builtin commands. The first column is the name
|
||||
|
@ -63,6 +63,7 @@ execcmd exec
|
|||
exitcmd exit
|
||||
exportcmd export readonly
|
||||
#exprcmd expr test [
|
||||
falsecmd false
|
||||
fgcmd -j fg
|
||||
getoptscmd getopts
|
||||
hashcmd hash
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)eval.c 5.3 (Berkeley) 4/12/91";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/bin/sh/eval.c,v 1.3 1993/03/23 00:27:50 cgd Exp $";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/bin/sh/eval.c,v 1.4 1993/07/07 01:11:57 jtc Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
|
@ -900,6 +900,9 @@ returncmd(argc, argv) char **argv; {
|
|||
return ret;
|
||||
}
|
||||
|
||||
falsecmd(argc, argv) char **argv; {
|
||||
return 1;
|
||||
}
|
||||
|
||||
truecmd(argc, argv) char **argv; {
|
||||
return 0;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)parser.c 5.3 (Berkeley) 4/12/91";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/bin/sh/parser.c,v 1.5 1993/05/02 01:28:43 sef Exp $";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/bin/sh/parser.c,v 1.6 1993/07/07 01:11:59 jtc Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "shell.h"
|
||||
|
@ -631,7 +631,7 @@ readtoken() {
|
|||
* check for keywords
|
||||
*/
|
||||
if (t == TWORD && !quoteflag) {
|
||||
register char **pp;
|
||||
register char *const *pp;
|
||||
|
||||
for (pp = parsekwd; *pp; pp++) {
|
||||
if (**pp == *wordtext && equal(*pp, wordtext)) {
|
||||
|
|
Loading…
Reference in New Issue