📄 sctpred.h
字号:
#else
#define xDef_SDL_Null(V) *(V) = (SDL_Null)0
#endif
#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */
#define yDef_SDL_Null(V) xDef_SDL_Null(V)
#define yAssF_SDL_Null(V,E,A) (V = E)
#define yEqF_SDL_Null(E1,E2) ((E1) == (E2))
#define yNEqF_SDL_Null(E1,E2) ((E1) != (E2))
#define ySrtN_SDL_Null xSrtN_SDL_Null
#define SDL_NullValue 0
/*---+---------------------------------------------------------------
Object_Identifier
-------------------------------------------------------------------*/
/* see sctpredg.h */
/*---+---------------------------------------------------------------
PId
-------------------------------------------------------------------*/
#define ySrtN_SDL_PId xSrtN_SDL_PId
/* see sctsdl.c and scttypes.h for implementation of PId */
#ifndef XNOUSEOFREAL
/*---+---------------------------------------------------------------
Real
-------------------------------------------------------------------*/
#if !defined(X_SHORT_REAL)
typedef double SDL_Real;
typedef double SDL_real;
#else
typedef float SDL_Real;
typedef float SDL_real;
#endif
#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)
#define xDef_SDL_Real(V) *(V) = 0.0
#else /* then XSCT_CMICRO */
#ifdef XMK_USE_KERNEL_INIT
/* Cmicro Kernel does initialization */
#define xDef_SDL_Real(V)
#else
#define xDef_SDL_Real(V) *(V) = 0.0
#endif
#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */
#define yDef_SDL_Real(V) xDef_SDL_Real(V)
#define yAssF_SDL_Real(V,E,A) (V = E)
#define yEqF_SDL_Real(E1,E2) ((E1) == (E2))
#define yNEqF_SDL_Real(E1,E2) ((E1) != (E2))
#define ySrtN_SDL_Real xSrtN_SDL_Real
#define SDL_REAL_LIT(R,I,D) R
/* Literals as in C */
#ifndef PLUS_INFINITY
#define PLUS_INFINITY 1.79769313486231570e+308
#endif
/* #include <values.h> */
/* #define PLUS_INFINITY MAXDOUBLE */
/* #define MINUS_INFINITY -MAXDOUBLE */
#ifndef MINUS_INFINITY
#define MINUS_INFINITY -PLUS_INFINITY
#endif
#endif /* ... XNOUSEOFREAL */
/*---+---------------------------------------------------------------
Time
-------------------------------------------------------------------*/
typedef SDL_Duration SDL_Time;
typedef SDL_Time SDL_time;
#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)
#define xDef_SDL_Time(V) *(V) = SDL_Time_Lit(0, 0)
#define yDef_SDL_Time(V) xDef_SDL_Time(V)
#define yAssF_SDL_Time(V,E,A) (V = E)
#define yEqF_SDL_Time(E1,E2) xEq_SDL_Time(E1,E2)
#define yNEqF_SDL_Time(E1,E2) (! xEq_SDL_Time(E1,E2))
#define ySrtN_SDL_Time xSrtN_SDL_Time
#define SDL_TIME_LIT(R,I,D) SDL_Duration_Lit((xint32)(I),(xint32)(D))
#define SDL_Time_Lit(I,D) SDL_Duration_Lit(I,D)
#ifdef XVALIDATOR_LIB
extern SDL_Time xMaxTime;
#endif
#else /* then XSCT_CMICRO */
#ifndef XMK_USE_STANDARD_TIME
#ifdef XMK_USE_KERNEL_INIT
/*
** Cmicro Kernel does initialization ...
*/
#define xDef_SDL_Time(V)
#else
#define xDef_SDL_Time(V) *(V) = 0
#endif
#define yDef_SDL_Time(V) xDef_SDL_Time(V)
#define yAssF_SDL_Time(V,E,A) V = E
#define yEqF_SDL_Time(E1,E2) xEq_SDL_Time(E1,E2)
#define yNEqF_SDL_Time(E1,E2) (! xEq_SDL_Time(E1,E2))
#define ySrtN_SDL_Time xSrtN_SDL_Time
#define SDL_TIME_LIT(R,I,D) I
#define SDL_Time_Lit(I,D) I
#define xGT_SDL_Time(P1, P2) (P1 > P2)
#define xGE_SDL_Time(P1, P2) (P1 >= P2)
#define xLT_SDL_Time(P1, P2) (P1 < P2)
#define xLE_SDL_Time(P1, P2) (P1 <= P2)
#define xEq_SDL_Time(P1, P2) (P1 == P2)
#else
/*
** This is SDT standard implementation
** which cannot be used without implementing
** new timer model in Cmicro, so its not useful.
** It is contained to ease some integrations.
*/
#define xDef_SDL_Time(V) *(V) = SDL_Time_Lit(0, 0)
#define yDef_SDL_Time(V) xDef_SDL_Time(V)
#define yAssF_SDL_Time(V,E,A) V = E
#define yEqF_SDL_Time(E1,E2) xEq_SDL_Time(E1,E2)
#define yNEqF_SDL_Time(E1,E2) (! xEq_SDL_Time(E1,E2))
#define ySrtN_SDL_Time xSrtN_SDL_Time
#define SDL_TIME_LIT(R,I,D) SDL_Duration_Lit(I,D)
#define SDL_Time_Lit(I,D) SDL_Duration_Lit(I,D)
#endif
#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */
/****+***************************************************************
02 Prototypes and macros for the operators of the data types
********************************************************************/
/*---+---------------------------------------------------------------
yInit_Predefined
-------------------------------------------------------------------*/
#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)
#ifndef XOPTSORT
extern void yInit_Predefined XPP((void));
#endif
#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */
/*---+---------------------------------------------------------------
Boolean
-------------------------------------------------------------------*/
#define xNot_SDL_Boolean(B) (!(B))
#define xAnd_SDL_Boolean(B1,B2) ((B1)&&(B2))
#define xOr_SDL_Boolean(B1,B2) ((B1)||(B2))
#define xXor_SDL_Boolean(B1,B2) ((B1)!=(B2))
#define xImpl_SDL_Boolean(B1,B2) ((B1)<=(B2))
#define ANY_SDL_Boolean (SDL_Boolean)(GETINTRAND % 2)
/*---+---------------------------------------------------------------
Bit
-------------------------------------------------------------------*/
#define xNot_SDL_Bit(B) (!(B))
#define xAnd_SDL_Bit(B1,B2) ((B1)&(B2))
#define xOr_SDL_Bit(B1,B2) ((B1)|(B2))
#define xXor_SDL_Bit(B1,B2) ((B1)^(B2))
#define xImpl_SDL_Bit(B1,B2) ((B1)<=(B2))
#define ANY_SDL_Bit (SDL_Bit)(GETINTRAND % 2)
/*---+---------------------------------------------------------------
Bit_String
-------------------------------------------------------------------*/
#ifndef XNOUSEOFOCTETBITSTRING
/*-- yFree_SDL_Bit_String -----------------------------------------*/
#define yFree_SDL_Bit_String(P) xFree_SDL_Bit_String(P)
/* function in sctos.c */
/*-- xAss_SDL_Bit_String ------------------------------------------*/
extern void xAss_SDL_Bit_String XPP((
SDL_Bit_String *,
SDL_Bit_String,
int ));
/*-- xEq_SDL_Bit_String -------------------------------------------*/
extern SDL_Boolean xEq_SDL_Bit_String XPP((
SDL_Bit_String,
SDL_Bit_String ));
/*-- yAddr_SDL_Bit_String -----------------------------------------*/
extern SDL_Bit * yAddr_SDL_Bit_String XPP((
SDL_Bit_String *,
SDL_Integer ));
/*-- xExtr_SDL_Bit_String -----------------------------------------*/
extern SDL_Bit xExtr_SDL_Bit_String XPP((
SDL_Bit_String,
SDL_Integer ));
/*-- xNot_SDL_Bit_String ------------------------------------------*/
extern SDL_Bit_String xNot_SDL_Bit_String XPP((
SDL_Bit_String ));
/*-- xAnd_SDL_Bit_String ------------------------------------------*/
extern SDL_Bit_String xAnd_SDL_Bit_String XPP((
SDL_Bit_String,
SDL_Bit_String ));
/*-- xOr_SDL_Bit_String -------------------------------------------*/
extern SDL_Bit_String xOr_SDL_Bit_String XPP((
SDL_Bit_String,
SDL_Bit_String ));
/*-- xXor_SDL_Bit_String ------------------------------------------*/
extern SDL_Bit_String xXor_SDL_Bit_String XPP((
SDL_Bit_String,
SDL_Bit_String ));
/*-- xImpl_SDL_Bit_String -----------------------------------------*/
extern SDL_Bit_String xImpl_SDL_Bit_String XPP((
SDL_Bit_String,
SDL_Bit_String ));
/*-- xMkString_SDL_Bit_String -------------------------------------*/
extern SDL_Bit_String xMkString_SDL_Bit_String XPP((
SDL_Bit ));
/*-- xLength_SDL_Bit_String ---------------------------------------*/
extern SDL_Integer xLength_SDL_Bit_String XPP((
SDL_Bit_String ));
/*-- xFirst_SDL_Bit_String ----------------------------------------*/
extern SDL_Bit xFirst_SDL_Bit_String XPP((
SDL_Bit_String ));
/*-- xLast_SDL_Bit_String -----------------------------------------*/
extern SDL_Bit xLast_SDL_Bit_String XPP((
SDL_Bit_String ));
/*-- xConcat_SDL_Bit_String ---------------------------------------*/
extern SDL_Bit_String xConcat_SDL_Bit_String XPP((
SDL_Bit_String,
SDL_Bit_String ));
/*-- xSubString_SDL_Bit_String ------------------------------------*/
extern SDL_Bit_String xSubString_SDL_Bit_String XPP((
SDL_Bit_String,
SDL_Integer,
SDL_Integer ));
/*-- xBitStr_SDL_Bit_String ---------------------------------------*/
extern SDL_Bit_String xBitStr_SDL_Bit_String XPP((
SDL_Charstring ));
/*-- xHexStr_SDL_Bit_String ---------------------------------------*/
extern SDL_Bit_String xHexStr_SDL_Bit_String XPP((
SDL_Charstring ));
#ifndef ANY_SDL_Bit_String
#define ANY_SDL_Bit_String \
xConcat_SDL_Bit_String \
(xMkString_SDL_Bit_String( ((unsigned char)(GETINTRAND%2)) ), \
xMkString_SDL_Bit_String( ((unsigned char)(GETINTRAND%2)) ) \
)
#endif
#endif
/* XNOUSEOFOCTETBITSTRING */
/*---+---------------------------------------------------------------
Octet
-------------------------------------------------------------------*/
#ifndef XNOUSEOFOCTETBITSTRING
/*-- yAddr_SDL_Octet ----------------------------------------------*/
extern SDL_Bit * yAddr_SDL_Octet XPP((
SDL_Octet *,
SDL_Integer ));
/*-- xExtr_SDL_Octet ----------------------------------------------*/
extern SDL_Bit xExtr_SDL_Octet XPP((
SDL_Octet,
SDL_Integer ));
#define xLT_SDL_Octet(B1,B2) ((B1)<(B2))
#define xLE_SDL_Octet(B1,B2) ((B1)<=(B2))
#define xGT_SDL_Octet(B1,B2) ((B1)>(B2))
#define xGE_SDL_Octet(B1,B2) ((B1)>=(B2))
#define xNot_SDL_Octet(B) (SDL_Octet)(~(B))
#define xAnd_SDL_Octet(B1,B2) ((B1)&(B2))
#define xOr_SDL_Octet(B1,B2) ((B1)|(B2))
#define xXor_SDL_Octet(B1,B2) ((B1)^(B2))
#define xImpl_SDL_Octet(B1,B2) xNot_SDL_Octet(xAnd_SDL_Octet((B1),xNot_SDL_Octet(B2)))
#define xShiftL_SDL_Octet(B,I) (SDL_Octet)(((B)<<(I)) & 0xFF)
#define xShiftR_SDL_Octet(B,I) ((B)>>(I))
#define xPlus_SDL_Octet(B1,B2) (SDL_Octet)(((B1)+(B2)) & 0xFF )
#define xMinus_SDL_Octet(B1,B2) ((B1)-(B2))
#define xMult_SDL_Octet(B1,B2) (SDL_Octet)(((B1)*(B2)) & 0xFF )
#define xI2O_SDL_Octet(I) (SDL_Octet)(I)
#define xO2I_SDL_Octet(B) (SDL_Integer)(B)
#define ANY_SDL_Octet (SDL_Octet)(GETINTRAND % 256)
#ifndef XEINTDIV
#define xDiv_SDL_Octet(B1,B2) ((B1)/(B2))
#define xMod_SDL_Octet(B1,B2) ((B1)%(B2))
#define xRem_SDL_Octet(B1,B2) ((B1)%(B2))
#else
extern SDL_Octet xDiv_SDL_Octet XPP((SDL_Octet, SDL_Octet));
extern SDL_Octet xMod_SDL_Octet XPP((SDL_Octet, SDL_Octet));
extern SDL_Octet xRem_SDL_Octet XPP((SDL_Octet, SDL_Octet));
#endif
/*-- xBitStr_SDL_Octet ----------------------------------------------*/
extern SDL_Octet xBitStr_SDL_Octet XPP((
SDL_Charstring ));
/*-- xHexStr_SDL_Octet ----------------------------------------------*/
extern SDL_Octet xHexStr_SDL_Octet XPP((
SDL_Charstring ));
#endif
/* XNOUSEOFOCTETBITSTRING */
/*---+---------------------------------------------------------------
Octet_String
-------------------------------------------------------------------*/
#ifndef XNOUSEOFOCTETBITSTRING
/*-- yFree_SDL_Octet_String ---------------------------------------*/
#define yFree_SDL_Octet_String(P) xFree_SDL_Bit_String(P)
#define xFree_SDL_Octet_String(P) xFree_SDL_Bit_String(P)
/* function in sctos.c */
/*-- xAss_SDL_Octet_String ----------------------------------------*/
#define xAss_SDL_Octet_String(V,E,A) xAss_SDL_Bit_String(V,E,A)
/*-- xEq_SDL_Octet_String -----------------------------------------*/
#define xEq_SDL_Octet_String(V,E,A) xEq_SDL_Bit_String(V,E,A)
/*-- yAddr_SDL_Octet_String ---------------------------------------*/
extern SDL_Octet * yAddr_SDL_Octet_String XPP((
SDL_Octet_String *,
SDL_Integer ));
/*-- xExtr_SDL_Octet_String ---------------------------------------*/
extern SDL_Octet xExtr_SDL_Octet_String XPP((
SDL_Octet_String,
SDL_Integer ));
/*-- xMkString_SDL_Octet_String -----------------------------------*/
#define xMkString_SDL_Octet_String(B) xMkString_SDL_Bit_String(B)
/*-- xLength_SDL_Octet_String ---------------------------------------*/
#define xLength_SDL_Octet_String(B) xLength_SDL_Bit_String(B)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -