📄 ml_typw.h
字号:
********************************************************************/
/*---+---------------------------------------------------------------
UNIX: GNU C COMPILER
-------------------------------------------------------------------*/
#if defined(_GCC_)
#error _GCC__removed_by_GBU_990512
/* ... defined(_GCC_) */
/*---+---------------------------------------------------------------
Windows: Microsoft C++ compiler
-------------------------------------------------------------------*/
#elif defined(MICROSOFT_C)
#error MICROSOFT_C_removed_by_GBU_990512
/* ... MICROSOFT_C */
/*---+---------------------------------------------------------------
Windows: BORLAND C++ compiler
-------------------------------------------------------------------*/
#elif defined(BORLAND_C)
#error BORLAND_C_removed_by_GBU_990512
/* ... BORLAND_C */
/*---+---------------------------------------------------------------
DOS: MSP58C80
-------------------------------------------------------------------*/
#elif defined(MSP58C80)
#error MSP58C80_removed_by_GBU_990512
/* ... MSP58C80 */
/*---+---------------------------------------------------------------
UNIX/DOS: IARC51
-------------------------------------------------------------------*/
#elif defined(IARC51)
#error IARC51_removed_by_GBU_990512
/* ... IARC51 */
/*---+---------------------------------------------------------------
DOS: KEIL_C51
-------------------------------------------------------------------*/
#elif defined(KEIL_C51)
#error KEIL_C51_removed_by_GBU_990512
/* ... KEIL_C51 */
/*---+---------------------------------------------------------------
DOS: KEIL_C166
-------------------------------------------------------------------*/
#elif defined(KEIL_C166)
#error KEIL_C166_removed_by_GBU_990512
/* ... KEIL_C166 */
/*---+---------------------------------------------------------------
UNIX: GNU 80166
-------------------------------------------------------------------*/
#elif defined(GNU80166)
#error GNU80166_removed_by_GBU_990512
/* ... GNU80166 */
/*---+---------------------------------------------------------------
MS-DOS: MCC68K
-------------------------------------------------------------------*/
#elif defined(MCC68K)
#error MCC68K_removed_by_GBU_990512
/* ... MCC68K */
/*---+---------------------------------------------------------------
DOS: Tasking 80166
-------------------------------------------------------------------*/
#elif defined(TCC80166)
#error TCC80166_removed_by_GBU_990512
/* ... TCC80166 */
/*-------------------------------------------------------------------
DOS: BSO/TASKING 80196
-------------------------------------------------------------------*/
#elif defined(TCC80C196)
#error TCC80C196_removed_by_GBU_990512
/* ... TCC80C196 */
/*---+---------------------------------------------------------------
DOS: IAR Compiler for Melps 7700
-------------------------------------------------------------------*/
#elif defined(IARC7700)
#error IARC7700_removed_by_GBU_990512
/* ... IARC7700 */
/*---+---------------------------------------------------------------
DOS: HYPERSTONE
-------------------------------------------------------------------*/
#elif defined(HYPERSTONE)
#error HYPERSTONE_removed_by_GBU_990512
/* ... HYPERSTONE */
/*---+---------------------------------------------------------------
DOS: IAR C Compiler for Hitachi 6301 MPU family types
-------------------------------------------------------------------*/
#elif defined(IARC6301)
#error IARC6301_removed_by_GBU_990512
/* ... IARC6301 */
/*---+---------------------------------------------------------------
DOS: Thumb C Compiler for the ARM Processor
-------------------------------------------------------------------*/
#elif defined(ARM_THUMB)
#error ARM_THUMB_removed_by_GBU_990512
/* ... ARM_THUMB */
/*---+---------------------------------------------------------------
GREEN_HILLS
-------------------------------------------------------------------*/
#elif defined (GREEN_HILLS)
#error GREEN_HILLS_removed_by_GBU_990512
/* ... GREEN_HILLS */
/*---+---------------------------------------------------------------
Any User defined C Compiler
-------------------------------------------------------------------*/
#else
/*
** If no C compiler is defined from the above list , then users
** may add their own C compiler in their own description file
** user_cc.h. The file should contain
**
** #ifdef C_compiler_abbreviation
** ...user definitions (use any compiler above as a template) ...
** #endif
*/
/* Removed by GBU,000215 The filer "user_cc.h" is not used any longer. The code is inserted below.
#include "user_cc.h"
*/
#include "ansilibs.h"
#include "tapicmmn.h"
#undef X_REGISTER
/* Define X_REGISTER register, if the compiler in use has good support
** for register ...
*/
#define X_REGISTER register
#undef X_STATIC
/*
** Define X_STATIC as static, if the compiler / target in use
** has more static RAM than stack memory ...
*/
#define X_STATIC static
#undef xmk_OPT_INT
/*
** Loop counters, result values and some other variables within the
** Cmicro Kernel can be defined as char, or as int. It depends just on
** the machine in use, what should be defined behind this macro.
** For instance, a 8051
** produces a lot of overhead for int, long and pointer variables.
** On the other hand, some machines, like 68xxx produce more code, if
** they should handle char, instead of int. Define xmk_OPT_INT as what
** you want to in your compiler section or on the compiler command line
** or whatever.
*/
#define xmk_OPT_INT int
#undef xmk_ROM_ptr
#undef xmk_RAM_ptr
/*
** For Controllers in Harvard architecture (e.g. Intel 8051) several
** variables can be stored in internal or external RAM/ROM.
** For controllers in 'von Neumann' architecture the following macros
** have to be defines as follows:
*/
#define xmk_ROM_ptr *
#define xmk_RAM_ptr *
/*---+---------------------------------------------------------------
** Timer implementation is now done in timers.c.
** Certain macros in ml_typ.h must therefore be redefined
**-----------------------------------------------------------------*/
#undef XMK_USE_TIMER_MODEL1
#define DEF_TIMER_VAR(NAME)
#define INIT_TIMER_VAR(TIMER_VAR)
#define INPUT_TIMER_VAR(TIMER_VAR)
#define RELEASE_TIMER_VAR(TIMER_VAR)
#define SDL_NOW 0
#define SDL_SET(TIME_EXPR, TIMER_NAME, TIMER_IDNODE, TIMER_VAR, TIMER_NAME_STRING) \
xmk_TimerSet(TIME_EXPR,TIMER_IDNODE);
#define SDL_SET_DUR(TIME_EXPR, DUR_EXPR, TIMER_NAME, TIMER_IDNODE, TIMER_VAR, TIMER_NAME_STRING) \
xmk_TimerSet(TIME_EXPR,TIMER_IDNODE);
#define SDL_SET_TICKS(TIME_EXPR, DUR_EXPR, TIMER_NAME, TIMER_IDNODE, TIMER_VAR, TIMER_NAME_STRING) \
xmk_TimerSet(TIME_EXPR,TIMER_IDNODE);
#define SDL_RESET(TIMER_NAME, TIMER_IDNODE, TIMER_VAR, TIMER_NAME_STRING) \
xmk_TimerReset(TIMER_IDNODE);
void xmk_TimerSet( long, unsigned int);
#define SET_TIMER_WITH_PARAM(TIME_EXPR, TIMER_IDNODE, TIMER_ID) \
TimerWithParamSet(TIME_EXPR,TIMER_IDNODE, TIMER_ID);
#define RESET_TIMER_WITH_PARAM(TIMER_IDNODE, TIMER_ID) \
TimerWithParamReset(TIMER_IDNODE, TIMER_ID);
/*---+---------------------------------------------------------------
** Misc
**-----------------------------------------------------------------*/
#undef XMK_KERNEL_EXIT
#define XMK_KERNEL_EXIT(x)
#define XPP(x) x
#define INT_MAX 2147483647 /* INT32 */
#define xptrint UINT32
#define xint32 INT32
#endif /* ... of all C compiler - defines */
/****+***************************************************************
C Compilersection ends
********************************************************************/
/*---+---------------------------------------------------------------
03b Final setting
-------------------------------------------------------------------*/
/*
** Define PROTO as XPP is defined, for
** compatibility with previous releases
*/
#undef PROTO
#define PROTO(x) XPP(x)
#ifdef XMK_ADD_STDIO
/*
** If Cmicro is used on a host machine (or a machine which
** is like a host, e.g. supports printf, argc/argv when calling main)
** then use the template xmk_printf function
*/
extern int xmk_printf ( char* format, ...);
#endif /* ... XMK_ADD_STDIO */
/*
** Size of an integer value. It is assumed to have 32 Bits in integers.
** If this is not true, the users should redefine the INT_MAX value
** depending on the C compiler by using
** #ifdef INT_MAX
** #undef INT_MAX
** #endif
** In the following, a max value of an "int" for 16 Bit is shown
** #define INT_MAX 32767
** In the following, a max value of an "int" for 32 Bit is shown
** #define INT_MAX 2147483647
*/
#ifndef INT_MAX
#define INT_MAX 2147483647 /* max value of an "int" for 32 Bit */
#endif
/*
** The max.value of an integer usually is defined in the limits.h
** header file from the C compiler.
**
** In the following, a max value of an "int" for 16 Bit is shown
** #define xMax_SDL_Integer 32767
** In the following, a max value of an "int" for 32 Bit is shown
** #define xMax_SDL_Integer 2147483647
*/
#ifdef INT_MAX
#define xMax_SDL_Integer INT_MAX
#else
#define xMax_SDL_Integer 2147483647
#endif
/****+***************************************************************
04 SDL Model macro expansions
********************************************************************/
/* General defines */
#ifndef xmk_T_BOOL
#if !defined(X_COMPACT_BOOL)
#define xmk_T_BOOL int
#define xbool int
#else
#define xmk_T_BOOL char
#define xbool char
#endif
#define XMK_TRUE 1
#define XMK_FALSE 0
#define XMK_WAIT 2
#define XMK_IGNORE 3
#define XMK_REQUEST_FROM_UI 4
#define XMK_RECOVERY 5
#define XMK_START_BATCH 6
#define XMK_NO_CONFIRMATION 7
#endif /* ... xmk_T_BOOL */
#ifndef NULL
#define NULL ((void*)0)
#endif
#if !defined(SDTMT)
#include "sctpred.h"
#endif
#define XMK_EOF -1
#define XMK_CTRL_C 0x03 /* ctrl-c */
#define XMK_CTRL_D 0x04 /* ctrl-d */
#define XMK_CTRL_H 0x08 /* ctrl-h */
#define XMK_CTRL_Q 0x11 /* ctrl-q */
#define XMK_CTRL_U 0x15 /* ctrl-u */
#define XMK_LF 0x0a /* Line feed */
#define XMK_CR 0x0d /* Carriage return */
#define XMK_ESC 0x1b /* Escape */
#define XMK_XON 0x11 /* Start */
#define XMK_XOFF 0x13 /* Stop */
#define XMK_CTRL_BACKSP XMK_CTRL_H /* backspace */
#define XMK_TERMINATION_CHAR(chr) ((c==XMK_CTRL_D) || (c==XMK_CTRL_Q))
#define XMK_IS_PRINTABLE_CHAR(chr) ((c>=0x20) || (c==XMK_CTRL_H))
#ifdef XMK_CREATE_SIGNALID
#undef XMK_CREATE_SIGNALID
#endif
#if !defined(XMK_USE_MORE_THAN_250_SIGNALS) && !defined(SDTMT)
#define XMK_CREATE_SIGNALID 255
typedef unsigned char xmk_T_SIGNAL ;/* Type of signal-id's */
#else
#define XMK_CREATE_SIGNALID 32767
typedef unsigned int xmk_T_SIGNAL ;/* Type of signal-id's */
#endif
typedef unsigned char xmk_T_PROCESS ;/* Type f.processtypes */
typedef unsigned char xmk_T_INSTANCE ;/* Type f.processinst. */
#if defined(XMK_USE_HUGE_TRANSITIONTABLES) || defined(SDTMT)
#define XMK_NO_ASTERISK 32767
typedef int xmk_T_OFFSET ;/* State index table for huge systems */
typedef unsigned int xSYMBOLNR ;/* Symbol-Number for */
/* yPAD-Function for huge */
typedef unsigned int xSTATE ;/* Process-State */
typedef unsigned int xmk_T_STATE ;/* SDL-Process state !! Same as xSTATE !! */
#else
#define XMK_NO_ASTERISK 255
typedef unsigned char xmk_T_OFFSET ;/* State index table for tiny systems */
typedef unsigned char xSYMBOLNR ;/* Symbol-Number for */
/* yPAD-Function for tiny */
typedef unsigned char xSTATE ;/* Process-State */
typedef unsigned char xmk_T_STATE ;/* SDL-Process state !! Same as xSTATE !! */
#endif /* ... XMK_USE_HUGE_TRANSITIONTABLES */
typedef unsigned char xmk_T_PRIO ;/* Type for priority */
typedef unsigned char xmk_T_PRIOLEVEL ;/* Type for priolevel */
typedef unsigned long xmk_T_TIME ;/* Type for SDL time */
#if !defined(XMK_USE_PAR_GREATER_THAN_250) && !defined(SDTMT)
typedef unsigned char xmk_T_MESS_LENGTH ;/* Signal.par.length */
#else
typedef unsigned int xmk_T_MESS_LENGTH ;/* Signal.par.length */
#endif
#ifdef XMK_USE_PREEMPTIVE
typedef xSTATE ( *xmk_T_TRANS_ADDRESS ) XPP(( xSYMBOLNR )) ;
#else
typedef xSTATE ( *xmk_T_TRANS_ADDRESS ) XPP(( void )) ;
#endif
/* ---------------- Variables in the PAD function ---------------- */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -