/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1982-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* David Korn <[email protected]> *17* *18***********************************************************************/19#pragma prototyped20#ifndef TEST_ARITH21/*22* UNIX shell23* David Korn24* AT&T Labs25*26*/2728#include "FEATURE/options"29#include "defs.h"30#include "shtable.h"31/*32* These are the valid test operators33*/3435#define TEST_ARITH 040 /* arithmetic operators */36#define TEST_BINOP 0200 /* binary operator */37#define TEST_PATTERN 0100 /* turn off bit for pattern compares */3839#define TEST_NE (TEST_ARITH|9)40#define TEST_EQ (TEST_ARITH|4)41#define TEST_GE (TEST_ARITH|5)42#define TEST_GT (TEST_ARITH|6)43#define TEST_LE (TEST_ARITH|7)44#define TEST_LT (TEST_ARITH|8)45#define TEST_OR (TEST_BINOP|1)46#define TEST_AND (TEST_BINOP|2)47#define TEST_SNE (TEST_PATTERN|1)48#define TEST_SEQ (TEST_PATTERN|14)49#define TEST_PNE 150#define TEST_PEQ 1451#define TEST_EF 352#define TEST_NT 1053#define TEST_OT 1254#define TEST_SLT 1655#define TEST_SGT 1756#define TEST_END 857#define TEST_REP 205859extern int test_unop(Shell_t*,int, const char*);60extern int test_inode(const char*, const char*);61extern int test_binop(Shell_t*,int, const char*, const char*);6263extern const char sh_opttest[];64extern const char test_opchars[];65extern const char e_argument[];66extern const char e_missing[];67extern const char e_badop[];68extern const char e_tstbegin[];69extern const char e_tstend[];7071#endif /* TEST_ARITH */727374