diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-06-24 22:28:35 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-06-24 22:28:35 +0000 |
commit | 3950ffe2a485479f6561c27364d3d7df5a21d124 (patch) | |
tree | 468c6e14449d1b1e279222ec32f676b0311917d2 /src/cmd/ksh93/include/test.h | |
download | ksh-upstream.tar.gz |
Imported Upstream version 93u+upstream
Diffstat (limited to 'src/cmd/ksh93/include/test.h')
-rw-r--r-- | src/cmd/ksh93/include/test.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/src/cmd/ksh93/include/test.h b/src/cmd/ksh93/include/test.h new file mode 100644 index 0000000..a9ed37b --- /dev/null +++ b/src/cmd/ksh93/include/test.h @@ -0,0 +1,72 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1982-2011 AT&T Intellectual Property * +* and is licensed under the * +* Eclipse Public License, Version 1.0 * +* by AT&T Intellectual Property * +* * +* A copy of the License is available at * +* http://www.eclipse.org/org/documents/epl-v10.html * +* (with md5 checksum b35adb5213ca9657e911e9befb180842) * +* * +* Information and Software Systems Research * +* AT&T Research * +* Florham Park NJ * +* * +* David Korn <dgk@research.att.com> * +* * +***********************************************************************/ +#pragma prototyped +#ifndef TEST_ARITH +/* + * UNIX shell + * David Korn + * AT&T Labs + * + */ + +#include "FEATURE/options" +#include "defs.h" +#include "shtable.h" +/* + * These are the valid test operators + */ + +#define TEST_ARITH 040 /* arithmetic operators */ +#define TEST_BINOP 0200 /* binary operator */ +#define TEST_PATTERN 0100 /* turn off bit for pattern compares */ + +#define TEST_NE (TEST_ARITH|9) +#define TEST_EQ (TEST_ARITH|4) +#define TEST_GE (TEST_ARITH|5) +#define TEST_GT (TEST_ARITH|6) +#define TEST_LE (TEST_ARITH|7) +#define TEST_LT (TEST_ARITH|8) +#define TEST_OR (TEST_BINOP|1) +#define TEST_AND (TEST_BINOP|2) +#define TEST_SNE (TEST_PATTERN|1) +#define TEST_SEQ (TEST_PATTERN|14) +#define TEST_PNE 1 +#define TEST_PEQ 14 +#define TEST_EF 3 +#define TEST_NT 10 +#define TEST_OT 12 +#define TEST_SLT 16 +#define TEST_SGT 17 +#define TEST_END 8 +#define TEST_REP 20 + +extern int test_unop(Shell_t*,int, const char*); +extern int test_inode(const char*, const char*); +extern int test_binop(Shell_t*,int, const char*, const char*); + +extern const char sh_opttest[]; +extern const char test_opchars[]; +extern const char e_argument[]; +extern const char e_missing[]; +extern const char e_badop[]; +extern const char e_tstbegin[]; +extern const char e_tstend[]; + +#endif /* TEST_ARITH */ |