1N/A/***********************************************************************
1N/A* *
1N/A* This software is part of the ast package *
1N/A* Copyright (c) 1982-2011 AT&T Intellectual Property *
1N/A* and is licensed under the *
1N/A* Common Public License, Version 1.0 *
1N/A* by AT&T Intellectual Property *
1N/A* *
1N/A* A copy of the License is available at *
1N/A* http://www.opensource.org/licenses/cpl1.0.txt *
1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
1N/A* *
1N/A* Information and Software Systems Research *
1N/A* AT&T Research *
1N/A* Florham Park NJ *
1N/A* *
1N/A* David Korn <dgk@research.att.com> *
1N/A* *
1N/A***********************************************************************/
1N/A#pragma prototyped
1N/A#ifndef TEST_ARITH
1N/A/*
1N/A * UNIX shell
1N/A * David Korn
1N/A * AT&T Labs
1N/A *
1N/A */
1N/A
1N/A#include "FEATURE/options"
1N/A#include "defs.h"
1N/A#include "shtable.h"
1N/A/*
1N/A * These are the valid test operators
1N/A */
1N/A
1N/A#define TEST_ARITH 040 /* arithmetic operators */
1N/A#define TEST_BINOP 0200 /* binary operator */
1N/A#define TEST_PATTERN 0100 /* turn off bit for pattern compares */
1N/A
1N/A#define TEST_NE (TEST_ARITH|9)
1N/A#define TEST_EQ (TEST_ARITH|4)
1N/A#define TEST_GE (TEST_ARITH|5)
1N/A#define TEST_GT (TEST_ARITH|6)
1N/A#define TEST_LE (TEST_ARITH|7)
1N/A#define TEST_LT (TEST_ARITH|8)
1N/A#define TEST_OR (TEST_BINOP|1)
1N/A#define TEST_AND (TEST_BINOP|2)
1N/A#define TEST_SNE (TEST_PATTERN|1)
1N/A#define TEST_SEQ (TEST_PATTERN|14)
1N/A#define TEST_PNE 1
1N/A#define TEST_PEQ 14
1N/A#define TEST_EF 3
1N/A#define TEST_NT 10
1N/A#define TEST_OT 12
1N/A#define TEST_SLT 16
1N/A#define TEST_SGT 17
1N/A#define TEST_END 8
1N/A#define TEST_REP 20
1N/A
1N/Aextern int test_unop(Shell_t*,int, const char*);
1N/Aextern int test_inode(const char*, const char*);
1N/Aextern int test_binop(Shell_t*,int, const char*, const char*);
1N/A
1N/Aextern const char sh_opttest[];
1N/Aextern const char test_opchars[];
1N/Aextern const char e_argument[];
1N/Aextern const char e_missing[];
1N/Aextern const char e_badop[];
1N/Aextern const char e_tstbegin[];
1N/Aextern const char e_tstend[];
1N/A
1N/A#endif /* TEST_ARITH */