/* @(#)utilitys.h	1.3	2/10/93 */
/*******************************************************************************

This code was written and designed by 
Andrew Gene HALL of I.N. Services Pty. Ltd., Scarborough WA, Australia,
for the 
University of Western Australia, Crawley WA, Australia.

*******************************************************************************/
#ifndef UTILITYS_H
#define UTILITYS_H
#include "diagmesg.h"
#ifndef FLEX_SCANNER
/* there is a problem with flex definining malloc and free */
/* #include <malloc.h>    CHANGE 11/3 */
#include <stdlib.h> /* CHANGE 11/3 */
#endif

/* global types */
typedef enum { FALSE, TRUE } Boolean;

/* global macros */

/* malloc, with a test for success.
 */
#define Malloc( t, v ) \
if( ( v = ( t *)malloc( sizeof( t ))) == NULL) \
   ERROR_MSG( "Out of Memory.")
/* these need to be expaned */
#define free_Data_Seq(t)   free(t)
#define free_Block_Seq(t)  free(t)

/* Test for Equivalent strings.
 */
#define equiv_string( s1, s2 )	\
( ! strcmp( s1, s2 ) )
#endif

