00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 00036 /* ==================================================================== 00037 * ==================================================================== 00038 * 00039 * Module: cwh_stk.h 00040 * $Revision$ 00041 * $Date$ 00042 * $Author$ 00043 * $Source$ 00044 * 00045 * Revision history: 00046 * dd-mmm-95 - Original Version 00047 * 00048 * Description: Exports global functions in cwh_stk.c and the 00049 * definition of stack items. 00050 * 00051 * ==================================================================== 00052 * ==================================================================== 00053 */ 00054 00055 #ifndef CWH_STK_INCLUDED 00056 #define CWH_STK_INCLUDED 00057 00058 #ifdef _KEEP_RCS_ID 00059 static char *rcs_id = "$Source$ $Revision$"; 00060 #endif /* _KEEP_RCS_ID */ 00061 00062 enum item_class { 00063 UNDEF, 00064 ST_item, /* item is an ST* */ 00065 ST_item_whole_array, /* item is an ST* and represents a whole array */ 00066 WN_item, /* item is a WN* */ 00067 WN_item_whole_array, /* item is a WN* and represents a whole array */ 00068 FLD_item, /* item is a FLD* */ 00069 STR_item, /* marker for string length and address */ 00070 ADDR_item, /* item is WN, address */ 00071 DEREF_item, /* item is an address, which must be deref'ed */ 00072 PCONST_item, /* item is the address (in the compiler's world) of a byte string */ 00073 LB_item /* item is a label IDX */ 00074 } ; 00075 00076 00077 extern void cwh_stk_push( void * item, enum item_class); 00078 extern void cwh_stk_push_STR(void * len,void * addr, TY_IDX ty, enum item_class addr_class) ; 00079 extern void cwh_stk_push_typed( void * item, enum item_class Class, TY_IDX ty) ; 00080 00081 extern WN * cwh_stk_pop_WHIRL(void) ; 00082 extern WN * cwh_stk_pop_WN(void) ; 00083 extern ST * cwh_stk_pop_ST(void) ; 00084 extern FLD_IDX cwh_stk_pop_FLD(void) ; 00085 extern LABEL_IDX cwh_stk_pop_LB(void) ; 00086 extern void cwh_stk_pop_STR(void) ; 00087 extern WN * cwh_stk_pop_ADDR(void) ; 00088 extern WN * cwh_stk_pop_DEREF(void) ; 00089 extern ST * cwh_stk_pop_PCONST(void) ; 00090 extern WN *cwh_stk_pop_iostmt(IOSTATEMENT, INT32); 00091 extern void cwh_stk_pop_whatever(void) ; 00092 00093 extern TY_IDX cwh_stk_get_TY(void); 00094 extern TY_IDX cwh_stk_get_FLD_TY(void); 00095 extern enum item_class cwh_stk_get_class(void) ; 00096 extern void cwh_stk_dump(void) ; 00097 extern INT32 cwh_stk_count_STRs(INT32 n) ; 00098 extern INT32 cwh_stk_get_num_inquire_items(void); 00099 extern void cwh_stk_push_top_item_again(void); 00100 extern void cwh_stk_verify_empty(void) ; 00101 extern char * cwh_stk_fld_name(void); /* return a string for the field on top of the stack */ 00102 extern BOOL cwh_stk_is_byte_STR(INT32 n); /* is STR n, a byte? */ 00103 00104 00105 #endif /* CWH_STK_INCLUDED */ 00106
1.5.6