⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sctpred.h

📁 是一个手机功能的模拟程序
💻 H
📖 第 1 页 / 共 5 页
字号:

  #ifndef XMK_STRINGS_IN_WRITE_MEM
    /*
    ** Caution :
    ** ===========
    ** Charstrings only can be handled in the same physical address range
    */
    #define yAddr_SDL_Charstring       Addr_SDL_Charstring_NotImplemented
  #endif /* ... XMK_STRINGS_IN_WRITE_MEM */


#else /* then ! XRESTUSEOFCHARSTRING */
  /* 
  ** Standard Charstring Implementation !
  **
  ** Implementation of charstrings as most conform to SDL.
  ** This is the master library implementation for SDL charstrings.
  ** Each Charstring is represented by a pointer. Memory
  ** is allocated dynamically.
  ** This methodology should be used, when SDL Charstrings
  ** are used frequently on SDL level and where the upper limits
  ** of Charstrings cannot be calculated by the user. This is
  ** the implementation with the most conformity to SDL.
  ** On the other hand, it requires full dynamic memory management
  ** on target. Also, a lot of function calls are generated
  ** which results in more executable code.
  ** Also take care of the defines XFREEFUNCS and XFREEVARS, which are
  ** used in generated code to free a previously allocated
  ** memory block with a SDL charstring, after it is not
  ** longer wanted.
  */
  typedef char   *SDL_Charstring;
  typedef char   *SDL_charstring;
 
  /*
  ** The following is the older definition of xDef_SDL_Charstring
  ** which has lead to the problem of free on uninitialized
  ** charstring variable. Do not use this !
  ** #define xDef_SDL_Charstring(V) \
  **         xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)
  */
  #define xDef_SDL_Charstring(V)       *(V)=(SDL_Charstring)0;
  #define yDef_SDL_Charstring(V)       xDef_SDL_Charstring(V)
 
  #if defined(XMK_USE_GC)
    #define yAssF_SDL_Charstring(V,E,ASG) xAss_SDL_Charstring(&(V),E,(ASG|xmk_NotInProcess))
  #else
    #define yAssF_SDL_Charstring(V,E,ASG) xAss_SDL_Charstring(&(V),E,ASG)
  #endif
   
  #define yEqF_SDL_Charstring(E1,E2)   xEq_SDL_Charstring(E1,E2)
  #define yNEqF_SDL_Charstring(E1,E2)  (! xEq_SDL_Charstring(E1,E2))
  #define ySrtN_SDL_Charstring         xSrtN_SDL_Charstring
 
  #define SDL_CHARSTRING_LIT(P1, P2)   P1
 
#endif /* ... XRESTUSEOFCHARSTRING */

#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */

#else

  /* 
  ** Dummy definition if charstrings are not used, but ASN.1 types 
  */
  typedef char   *SDL_Charstring;
  typedef char   *SDL_charstring;
#endif
   /* XNOUSEOFCHARSTRING */


/*---+---------------------------------------------------------------
     Duration
-------------------------------------------------------------------*/

#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)

typedef struct { 
    xint32  s, ns;
  }  SDL_Duration;
typedef SDL_Duration  SDL_duration;
 
#define xDef_SDL_Duration(V)       *(V) = SDL_Duration_Lit(0, 0)   
#define yDef_SDL_Duration(V)       xDef_SDL_Duration(V)
#define yAssF_SDL_Duration(V,E,A)  (V = E)
#define yEqF_SDL_Duration(E1,E2)   xEq_SDL_Duration(E1,E2)
#define yNEqF_SDL_Duration(E1,E2)  (! xEq_SDL_Duration(E1,E2))
#define ySrtN_SDL_Duration         xSrtN_SDL_Duration
 
#define SDL_DURATION_LIT(R,I,D)    SDL_Duration_Lit((xint32)(I),(xint32)(D))
extern SDL_Duration SDL_Duration_Lit  XPP((
  xint32 s,
  xint32 ns ));
 
#else /* then XSCT_CMICRO */


#ifndef XMK_USE_STANDARD_DURATION
  /*
  ** This is the central point, where the representation of
  ** time in the Cmicro Library is fixed up.
  **
  ** Modifications in the following typedef cause changes
  ** in all defines and functions which are explicitely or
  ** implicitely using SDL_Duration and the types depending
  ** on it.
  **
  ** Time is represented as "long" in C.
  ** The resolution is normally then 2^32.
  ** For one tick = 10 msec, the maximum time for the execution of
  ** the SDL System, before the value overruns, is then about 490 day`s.
  */
  typedef long SDL_Duration;

  /*
  ** Internal typedef
  */
  typedef SDL_Duration  SDL_duration;

  #ifdef XMK_USE_KERNEL_INIT
    /*
    ** Cmicro Kernel does initialization ...
    */
    #define xDef_SDL_Duration(V)
  #else
    #define xDef_SDL_Duration(V)       *(V) = 0 ;
  #endif

  #define yDef_SDL_Duration(V)       xDef_SDL_Duration(V)
  #define yAssF_SDL_Duration(V,E,A)  V = E
  #define yEqF_SDL_Duration(E1,E2)   xEq_SDL_Duration(E1,E2)
  #define yNEqF_SDL_Duration(E1,E2)  (! xEq_SDL_Duration(E1,E2))
  #define ySrtN_SDL_Duration         xSrtN_SDL_Duration

  #define SDL_DURATION_LIT(R,I,D)    I

#else /* then XMK_USE_STANDARD_DURATION */
  /* 
  ** 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.
  */
  typedef struct {
      xint32  s, ns;
    }  SDL_Duration;

  typedef SDL_Duration  SDL_duration;

  #define xDef_SDL_Duration(V)       *(V) = SDL_Duration_Lit(0, 0)
  #define yDef_SDL_Duration(V)       xDef_SDL_Duration(V)
  #define yAssF_SDL_Duration(V,E,A)  V = E
  #define yEqF_SDL_Duration(E1,E2)   xEq_SDL_Duration(E1,E2)
  #define yNEqF_SDL_Duration(E1,E2)  (! xEq_SDL_Duration(E1,E2))
  #define ySrtN_SDL_Duration         xSrtN_SDL_Duration

  #define SDL_DURATION_LIT(R,I,D)    SDL_Duration_Lit(I,D)

#endif /* ... XMK_USE_STANDARD_DURATION */
 
#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */


/*---+---------------------------------------------------------------
     IA5String
-------------------------------------------------------------------*/

typedef SDL_Charstring  SDL_IA5String;

#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)

#define xDef_SDL_IA5String(V) \
   xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)

#else /* then XSCT_CMICRO */
  /*
  ** The following is the older definition of xDef_SDL_IA5String
  ** which has lead to the problem of free on uninitialized
  ** charstring variable. Do not use this !
  ** #define xDef_SDL_IA5String(V) \
  **   xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)
  */
#define xDef_SDL_IA5String(V)       *(V)=(SDL_IA5String)0;

#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */

#define yDef_SDL_IA5String(V)       xDef_SDL_IA5String(V)
#define yAssF_SDL_IA5String(V,E,A)  xAss_SDL_Charstring(&(V),E,A)
#define yEqF_SDL_IA5String(E1,E2)   xEq_SDL_Charstring(E1,E2)
#define yNEqF_SDL_IA5String(E1,E2)  (! xEq_SDL_Charstring(E1,E2))
#define ySrtN_SDL_IA5String         xSrtN_SDL_IA5String


/*---+---------------------------------------------------------------
     NumericString
-------------------------------------------------------------------*/

typedef SDL_Charstring  SDL_NumericString;

#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) 

#define xDef_SDL_NumericString(V) \
   xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)

#else /* then XSCT_CMICRO */
  /*
  ** The following is the older definition of xDef_SDL_NumericString
  ** which has lead to the problem of free on uninitialized
  ** charstring variable. Do not use this !
  ** #define xDef_SDL_NumericString(V) \
  **   xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)
  */
#define xDef_SDL_NumericString(V)       *(V)=(SDL_NumericString)0;
 
#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */ 

#define yDef_SDL_NumericString(V)       xDef_SDL_NumericString(V)
#define yAssF_SDL_NumericString(V,E,A)  xAss_SDL_Charstring(&(V),E,A)
#define yEqF_SDL_NumericString(E1,E2)   xEq_SDL_Charstring(E1,E2)
#define yNEqF_SDL_NumericString(E1,E2)  (! xEq_SDL_Charstring(E1,E2))
#define ySrtN_SDL_NumericString         xSrtN_SDL_NumericString


/*---+---------------------------------------------------------------
     PrintableString
-------------------------------------------------------------------*/

typedef SDL_Charstring  SDL_PrintableString;

#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) 

#define xDef_SDL_PrintableString(V) \
   xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)

#else /* then XSCT_CMICRO */
  /*
  ** The following is the older definition of xDef_SDL_PrintableString
  ** which has lead to the problem of free on uninitialized
  ** charstring variable. Do not use this !
  ** #define xDef_SDL_PrintableString(V) \
  **    xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)
  */
#define xDef_SDL_PrintableString(V)       *(V)=(SDL_Charstring)0;
 
#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */ 

#define yDef_SDL_PrintableString(V)       xDef_SDL_PrintableString(V)
#define yAssF_SDL_PrintableString(V,E,A)  xAss_SDL_Charstring(&(V),E,A)
#define yEqF_SDL_PrintableString(E1,E2)   xEq_SDL_Charstring(E1,E2)
#define yNEqF_SDL_PrintableString(E1,E2)  (! xEq_SDL_Charstring(E1,E2))
#define ySrtN_SDL_PrintableString         xSrtN_SDL_PrintableString


/*---+---------------------------------------------------------------
     VisibleString
-------------------------------------------------------------------*/

typedef SDL_Charstring  SDL_VisibleString;

#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)  

#define xDef_SDL_VisibleString(V) \
   xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)

#else /* then XSCT_CMICRO */
  /*
  ** The following is the older definition of xDef_SDL_VisibleString
  ** which has lead to the problem of free on uninitialized
  ** charstring variable. Do not use this !
  ** #define xDef_SDL_VisibleString(V) \
  **    xAss_SDL_Charstring(V, (SDL_Charstring)0, XASS)
  */
#define xDef_SDL_VisibleString(V)       *(V)=(SDL_Charstring)0;

#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */  

#define yDef_SDL_VisibleString(V)       xDef_SDL_VisibleString(V)
#define yAssF_SDL_VisibleString(V,E,A)  xAss_SDL_Charstring(&(V),E,A)
#define yEqF_SDL_VisibleString(E1,E2)   xEq_SDL_Charstring(E1,E2)
#define yNEqF_SDL_VisibleString(E1,E2)  (! xEq_SDL_Charstring(E1,E2))
#define ySrtN_SDL_VisibleString         xSrtN_SDL_VisibleString


/*---+---------------------------------------------------------------
     Integer
-------------------------------------------------------------------*/

#if !defined(X_LONG_INT)
typedef int  SDL_Integer;
typedef int  SDL_integer;
#else
typedef long  SDL_Integer;
typedef long  SDL_integer;
#endif

#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)
 
#define xDef_SDL_Integer(V)       *(V) = (SDL_Integer)0
 
#ifdef XVALIDATOR_LIB
#define xMax_SDL_Integer 2147483647
#endif

#else /* then XSCT_CMICRO */ 
 
#ifdef XMK_USE_KERNEL_INIT
  /* Cmicro Kernel does initialization */
#define xDef_SDL_Integer(V)
#else
#define xDef_SDL_Integer(V)       *(V) = (SDL_Integer)0
#endif
 
#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */

#define yDef_SDL_Integer(V)       xDef_SDL_Integer(V)
#define yAssF_SDL_Integer(V,E,A)  (V = E)
#define yEqF_SDL_Integer(E1,E2)   ((E1) == (E2))
#define yNEqF_SDL_Integer(E1,E2)  ((E1) != (E2))
#define ySrtN_SDL_Integer         xSrtN_SDL_Integer

#define SDL_INTEGER_LIT(I)        I
/* Literals as in C */

#ifdef XVALIDATOR_LIB
#define xMax_SDL_Integer 2147483647
#endif


/*---+---------------------------------------------------------------
     Natural
-------------------------------------------------------------------*/

/*  Modified by GBU,990617 */
/*  natural is >= 0, i.e. unsigned int/long. */
/*
#if !defined(X_LONG_INT)
typedef int  SDL_Natural;
typedef int  SDL_natural;
#else
typedef long  SDL_Natural;
typedef long  SDL_natural;
#endif
*/
typedef UINT32  SDL_Natural;

#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)
 
#define xDef_SDL_Natural(V)       *(V) = (SDL_Natural)0

#else /* then XSCT_CMICRO */ 
 
#ifdef XMK_USE_KERNEL_INIT
  /* Cmicro Kernel does initialization */
  #define xDef_SDL_Natural(V)
#else
  #define xDef_SDL_Natural(V)       *(V) = (SDL_Natural)0
#endif

#endif /* ... defined(XSCT_CADVANCED) || defined(XSCT_CBASIC) */

#define yDef_SDL_Natural(V)       xDef_SDL_Natural(V)
#define yAssF_SDL_Natural(V,E,A)  (V = E)
#define yEqF_SDL_Natural(E1,E2)   ((E1) == (E2))
#define yNEqF_SDL_Natural(E1,E2)  ((E1) != (E2))
#define ySrtN_SDL_Natural         xSrtN_SDL_Natural


/*---+---------------------------------------------------------------
     Null
-------------------------------------------------------------------*/

typedef int     SDL_Null;

#if defined(XSCT_CADVANCED) || defined(XSCT_CBASIC)

#define xDef_SDL_Null(V)       *(V) = (SDL_Null)0

#else /* then XSCT_CMICRO */

#ifdef XMK_USE_KERNEL_INIT
  /* Cmicro Kernel does initialization */
#define xDef_SDL_Null(V)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -