/*$no list*//*$no trace <<< mtc_defs.h >>> */ /* * mtc_defs.h - global Multi-C declarations * Multi-C (c) Copyright 1992 Mix Software, Inc. & Creative C Corporation * All rights reserved. */ #ifndef MTC_DEFS_H #define MTC_DEFS_H #include #include #include #include #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif typedef int MTCBOOL; typedef struct { unsigned message:1; unsigned abort:1; unsigned assert:1; } MTC_ABEND_FLAG; #ifdef __cplusplus extern "C" { #endif extern MTC_ABEND_FLAG MtCAbendFlag; #ifdef __cplusplus } #endif /* multi-c scheduling priority classes */ typedef enum { MTC_LOW, /* low scheduling priority */ MTC_MED, /* medium scheduling priority */ MTC_HI, /* high scheduling priority */ } MTCPRI; typedef enum { SUCCESS, /* no error detected */ MALLOC, /* bad malloc */ EMPTY_LIST, /* empty list */ LIST_NOT_EMPTY, /* list is not empty */ END_OF_LIST, /* end of list */ IMPOSSIBLE, /* error cause unknown */ SCHEDULE, /* scheduling pseudo SUCCESS */ ILLPARAM, /* invalid argument value */ NULLPOINTER, /* invalid NULL pointer */ BADMAGIC, /* invalid handle for this operation */ CANTRESUME, /* attempted wait with empty list */ NOMESSAGE, /* no message for attempted operation */ /* add user errors after this line */ MTC_LASTERROR /* last error */ } ECODE; typedef ECODE (*TRAVERSE_FUNC)(void*,void*,int,int,void*); #ifdef __cplusplus extern "C" { #endif ECODE mtc_abend(ECODE err, char *msg, char *file, int line); #ifdef __cplusplus } #endif #define MtCAbend(err,msg) return(mtc_abend(err,msg,__FILE__,__LINE__)) #define MAX(x,y) ((x) > (y) ? (x) : (y)) #define MIN(x,y) ((x) < (y) ? (x) : (y)) #define PTR_TEST(p,msg) if (p == NULL) MtCAbend(NULLPOINTER,msg) #endif /* MTC_DEFS_H */ /*$list*//*$trace <<< mtc_defs.h >>> */