T168_Debug222\appl\Barcode\Two\DataMatrix文件:IDMCMPAT.H

#ifndef IDMCMPAT_H

/******************************************************************************
 *                                                                            *
 *                         M O D U L E   D E F I N E                          *
 *                                                                            *
 ******************************************************************************/

#define IDMCMPAT_H

/******************************************************************************
 *                                                                            *
 *        C O M P I L E R   D E F I N E D   I N C L U D E   F I L E S         *
 *                                                                            *
 ******************************************************************************/

/* None */

/******************************************************************************
 *                                                                            *
 *            U S E R   D E F I N E D   I N C L U D E   F I L E S             *
 *                                                                            *
 ******************************************************************************/

#ifdef __cplusplus
extern "C" {            /* Assume C declarations for C++ */
#endif    /* __cplusplus */

/******************************************************************************
 *                                                                            *
 *                        G L O B A L   D E F I N E S                         *
 *                                                                            *
 ******************************************************************************/
 
  #define ANSI
  #define SGN_INT_8_BITS            signed char
  #define SGN_INT_16_BITS           signed short int
  #define SGN_INT_32_BITS           signed long int
  #define UNS_INT_8_BITS            unsigned char
  #define UNS_INT_16_BITS           unsigned short int
  #define UNS_INT_32_BITS           unsigned long  int

  #define SGN_FST_8_BITS            signed char
  #define SGN_FST_16_BITS           signed short int
  #define SGN_FST_32_BITS           signed long int
  #define UNS_FST_8_BITS            unsigned char
  #define UNS_FST_16_BITS           unsigned short int
  #define UNS_FST_32_BITS           unsigned long int

  #define U8CONST(  x )             ((UNS_INT_8_BITS)  x ## U  )
  #define U16CONST( x )             ((UNS_INT_16_BITS) x ## U  )
  #define U32CONST( x )             ((UNS_INT_32_BITS) x ## UL )

  #define S8CONST(  x )             ((SGN_INT_8_BITS)  x       )
  #define S16CONST( x )             ((SGN_INT_16_BITS) x       )
  #define S32CONST( x )             ((SGN_INT_32_BITS) x ##  L )

  #define  UINT16MAX ( U16CONST( 0xFFFF ) )

  #if defined ( _TMS320C30 )
    #define FORCE_8_BITS(  x )      ((UNS_INT_8_BITS) (U8CONST ( 0xFF )   & (x)))
    #define FORCE_16_BITS( x )      ((UNS_INT_16_BITS)(U16CONST( 0xFFFF ) & (x)))
    typedef UNS_INT_32_BITS            Storage_Unit ;
    #define BITS_PER_STORAGE_UNIT      32
  #else
    #define FORCE_8_BITS(  x )      ((UNS_INT_8_BITS) (U8CONST ( 0xFF )   & (x)))
    #define FORCE_16_BITS( x )      ((UNS_INT_16_BITS)(U16CONST( 0xFFFF ) & (x)))
/*
    #define FORCE_8_BITS(  x )      ( x )
    #define FORCE_16_BITS( x )      ( x )
*/
    typedef UNS_INT_8_BITS             Storage_Unit ;
    #define BITS_PER_STORAGE_UNIT      8
  #endif

  #ifndef   BOOLEAN_DEFINED
    #define BOOLEAN_DEFINED
    typedef enum
    {
      IDM_FALSE = ( 0 == 1 )    ,
      IDM_TRUE  = ( ! IDM_FALSE )
    } Boolean ;
  #endif

  #define     INTEL_BYTE_ORDERING         1
  #define     MOTOROLA_BYTE_ORDERING      2
  #define     TEXAS_INST_C30_BYTES        3

  /*****************************************/
  /*                                       */
  /*     I.D. Matrix  Compiler Generic     */
  /*             Types Used                */
  /*                                       */
  /*****************************************/
  #if defined(_MSC_VER)
    #if ( _MSC_VER >= 700 )
      #define _BYTE_ORDERING_     INTEL_BYTE_ORDERING
      /* NOTE: These Asm Macro Defs Needs to be fixed. */
      /*       File affected:serialnm.c                */
      #define _ASM_START_         _asm
      #define _ASM_               _asm
      #define _AEND_
      #define __ALIGN_CODE
      #define __fastcall
      /* MC70 compiler specific define of NULL taken from MC70 stdlib.h */
      #ifndef IDM_NULL
        #ifdef __cplusplus
          #define IDM_NULL      0
        #else
          #define IDM_NULL ((void *)0)
        #endif
      #else
        #error IDM_NULL is defined before IDMCMPAT.H!
      #endif
    #elif ( _MSC_VER < 700 )
      #define _BYTE_ORDERING_     INTEL_BYTE_ORDERING
      #define __cdecl             _cdecl
      #define __fastcall          _fastcall
      #define __far               _far
      #define __huge              _huge
      #define __near              _near
      #define __interrupt          _interrupt
      #define _outp               outp
      #define _inp                inp
      #define _kbhit              kbhit
      #define _find_t             find_t
      #define _itoa               itoa
      #define _ultoa              ultoa
      #define _REGS               REGS
      #define _int86              int86
      #define _getch              getch
      #define _spawnl             spawnl
      #define _P_WAIT             P_WAIT
      #define __ALIGN_CODE
    #else
      #error Unrecognized MSC Compiler!
    #endif
  #elif defined(__BORLANDC__)
    #if ( __BORLANDC__ < 0x0400 )
      /* Borland C/C++ 2.0 and back       */
      #define _BYTE_ORDERING_     INTEL_BYTE_ORDERING
      #define __cdecl             cdecl
      #define __fastcall          cdecl
      #define __far               far
      #define __huge              huge
      #define __near              near
      #define __interrupt         interrupt
      #define _outp               outp
      #define _inp                inp
      #define _kbhit              kbhit
      #define _find_t             find_t
      #define _itoa               itoa
      #define _ultoa              ultoa
      #define _strnicmp           strncmpi
      #define _strupr             strupr
      #define _getcwd             getcwd
      #define _O_RDONLY           O_RDONLY
      #define _O_TEXT             O_TEXT
      #define __ALIGN_CODE
    #elif ( __BORLANDC__ >= 0x0400 )
      /* Borland C/C++ 3.0 is 0x0400      */
      /* Borland C/C++ 3.1 is 0x0410      */
      #define _BYTE_ORDERING_     INTEL_BYTE_ORDERING
      #define _cdecl              __cdecl
      /* #define __fastcall         _fastcall */
      /* Above line a bug fix for Borland C 3.1 */
      #define __fastcall          _cdecl
      #define __far               _far
      #define __huge              _huge
      #define __near              _near
      #define __interrupt         _interrupt
      #define __ALIGN_CODE
      #define _fdopen             fdopen
      #define _find_t             find_t
      #define _getch              getch
      #define _inp                inp
      #define _int86              int86
      #define _itoa               itoa
      #define _kbhit              kbhit
      #define _memicmp            memicmp
      #define _open               open
      #define _outp               outp
      #define _ultoa              ultoa
      #define _stat               stat
      #define _fstat              fstat
      #define _setmode            setmode
      #define _strnicmp           strncmpi
      #define _strupr             strupr
      #define _getcwd             getcwd
      #define _O_BINARY           O_BINARY
      #define _O_CREAT            O_CREAT
      #define _O_EXCL             O_EXCL
      #define _O_RDONLY           O_RDONLY
      #define _O_RDWR             O_RDWR
      #define _O_TEXT             O_TEXT
      #define _O_TRUNC            O_TRUNC
      #define _S_IREAD            S_IREAD
      #define _S_IWRITE           S_IWRITE
      #define _REGS               REGS
      #define _P_WAIT             P_WAIT
      #define _spawnl             spawnl

      /* BC31 compiler specific define of NULL taken from BC31 stdlib.h */
//      #ifndef IDM_NULL
//        #if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
//          #define IDM_NULL    0
//        #else
//          #define IDM_NULL    0L
//        #endif
//      #else
//        #error IDM_NULL is defined before IDMCMPAT.H!
//      #endif
    #else
      #error Unrecognized Borland C Compiler!
    #endif
  #elif defined ( _TMS320C30 )
    #define _BYTE_ORDERING_     TEXAS_INST_C30_BYTES
    #define __cdecl
    #define __fastcall
    #define __far
    #define __huge
    #define __near
    #define __ALIGN_CODE        asm(" .align");
  #elif defined( I370 ) && defined( __SASC__ )
    /*  SASC is 0x0500                  */
    #define _BYTE_ORDERING_     MOTOROLA_BYTE_ORDERING
    #define __cdecl
    #define __fastcall
    #define __far
    #define __huge
    #define __near
    #define __interrupt
    #define _outp
    #define _inp
    #define _kbhit
    #define _find_t
    #define _itoa
    #define _ultoa
    #define __ALIGN_CODE
  #elif defined( __WATCOMC__ )
    #define _BYTE_ORDERING_     INTEL_BYTE_ORDERING
    #define __cdecl
    #define __fastcall
    #define __far
    #define __huge
    #define __near
    #define __interrupt
    #define __ALIGN_CODE
    #define _fdopen             fdopen
    #define _find_t             find_t
    #define _getch              getch
    #define _inp                inp
    #define _int86              int86
    #define _itoa               itoa
    #define _kbhit              kbhit
    #define _open               open
    #define _outp               outp
    #define _ultoa              ultoa
    #define _stat               stat
    #define _fstat              fstat
    #define _fmemcpy            memcpy
    #define _setmode            setmode
    #define _strnicmp           strncmpi
    #define _strupr             strupr
    #define _getcwd             getcwd
    #define _O_BINARY           O_BINARY
    #define _O_CREAT            O_CREAT
    #define _O_EXCL             O_EXCL
    #define _O_RDONLY           O_RDONLY
    #define _O_RDWR             O_RDWR
    #define _O_TEXT             O_TEXT
    #define _O_TRUNC            O_TRUNC
    #define _S_IREAD            S_IREAD
    #define _S_IWRITE           S_IWRITE
    #ifndef IDM_NULL
      #if defined(__SMALL__) || defined(__MEDIUM__) || defined(__386__)
        #define IDM_NULL   0
      #else
        #define IDM_NULL   0L
      #endif
    #else
      #error IDM_NULL is defined before IDMCMPAT.H!
    #endif

    #if   ( __WATCOMC__ == 901 )
      /* Watcom C/386 Compiler version 9.01 */
    #elif ( __WATCOMC__ == 950 )
      /* Watcom C/386 Compiler version 9.5 */
    #elif ( __WATCOMC__ == 1000 )
      /* Watcom C/386 Compiler version 10.0 */
    #else
     /*  #error    Unknown Watcom Compiler Version */
    #endif
   /* Hc29 compiler specific define of NULL taken from Hc29 stdlib.h */
  #elif defined( _AM29K )
    #define __cdecl
    #define __fastcall
    #define __far
    #define _far
    #define far
    #define _fmemcpy   memcpy
    #define __huge
    #define __near
    #define __inline
    #define _interrupt
    #define __ALIGN_CODE
    #define _BYTE_ORDERING_     INTEL_BYTE_ORDERING
    #ifndef IDM_NULL
      #define IDM_NULL            ((void *)0)
    #else
      #error IDM_NULL is defined before IDMCMPAT.H!
    #endif
  #elif defined( _TLCS )
    #define __cdecl
    #define __fastcall
    #define __far
    #define _far
    #define far
    #define _fmemcpy   memcpy
    #define __huge
    #define __near
    #define __inline
    #define _interrupt
    #define __ALIGN_CODE
    #define _BYTE_ORDERING_     INTEL_BYTE_ORDERING
    #define IDM_NULL            ((void *)0)
  #endif

  #if defined( __WATCOMC__ )
    #define     ONEMB_SEGMENT_ADDRESS(segment)          \
                                             ( ( volatile UNS_INT_8_BITS * ) \
                                  ( ( ( UNS_INT_32_BITS ) segment ) <<  4 ) )
  #else
    #define     ONEMB_SEGMENT_ADDRESS(segment)          \
                                             ( ( volatile UNS_INT_8_BITS * ) \
                                  ( ( ( UNS_INT_32_BITS ) segment ) << 16 ) )
  #endif

  #if defined(_lint)
    #undef  __cdecl
    #undef  __fastcall
    #undef  __far
    #undef  __huge
    #undef  __near

    #define __cdecl
    #define __fastcall
    #define __far
    #define __huge
    #define __near
  #endif

  #if   ( _BYTE_ORDERING_ == INTEL_BYTE_ORDERING    )

  #elif ( _BYTE_ORDERING_ == MOTOROLA_BYTE_ORDERING )

  #elif ( _BYTE_ORDERING_ == TEXAS_INST_C30_BYTES   )

  #else
    #error _BYTE_ORDERING_ was not defined!!!!!
  #endif

  #ifdef WINDOWS_DLL
    #define __fastcall
    #define _fastcall
    #define fastcall
  #endif

/******************************************************************************
 *                                                                            *
 *                 S T R U C T U R E   D E F I N I T I O N S                  *
 *                                                                            *
 ******************************************************************************/

/* None */

/******************************************************************************
 *                                                                            *
 *    G L O B A L   V A R I A B L E S   -   N O   I N I T I A L I Z E R S     *
 *                                                                            *
 ******************************************************************************/

/* None */

/******************************************************************************
 *                                                                            *
 *       G L O B A L   V A R I A B L E S   -   I N I T I A L I Z E R S        *
 *                                                                            *
 ******************************************************************************/

/* None */

/******************************************************************************
 *                                                                            *
 *                   F U N C T I O N   P R O T O T Y P E S                    *
 *                                                                            *
 ******************************************************************************/

#ifdef __cplusplus
}                       /* End of extern "C" { */
#endif    /* __cplusplus */

#endif

  • 20
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值