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

📄 mcoquad.h

📁 PB 熟悉的哥们希望大家可以互相学习一下
💻 H
字号:
/*******************************************************************
 *                                                                 *
 *  mcoquad.h                                                      *
 *                                                                 *
 *  This file is a part of the eXtremeDB source code               *
 *  Copyright (c) 2001-2007 McObject LLC                           * 
 *  All Rights Reserved                                            *
 *                                                                 *
 *  eXtremeDB runtime 64 bit integers definitions                  *
 *                                                                 *
 ***************************************************************** */

#ifndef MCO_QUAD_H__
    #define MCO_QUAD_H__


    #ifdef __cplusplus
        extern "C"
        {
        #endif 

        /* 64 bit integer arithmetic emulated 
        - replace by native where it is possible.
        Here defined only those methods that are used by DB runtime 
         */

        #ifdef MCO_CFG_QUAD_STRUCT

            typedef struct mco_uquad_t
            {
                unsigned int lo;
                unsigned int hi;
            } mco_uquad;

            typedef struct mco_iquad_t
            {
                unsigned int lo;
                int hi;
            } mco_iquad;

            void mco_uquad_increment(mco_uquad* u8); /* (*u8) ++ */
            short mco_uquad_compare(const mco_uquad* a, const mco_uquad* b); /*
            a<b ? -1 : (a>b ? 1 : 0) */
            short mco_iquad_compare(const mco_iquad* a, const mco_iquad* b); /*
            a<b ? -1 : (a>b ? 1 : 0) */

            #define mco_quad_eq(a,b) (((a).lo==(b).lo) && ((a).hi==(b).hi))

        #else /* MCO_CFG_QUAD_STRUCT */

            #if defined _MSC_VER
                typedef __int64 mco_iquad;
                typedef unsigned __int64 mco_uquad;
            #else 
                typedef long long mco_iquad;
                typedef unsigned long long mco_uquad;
            #endif 

            #define mco_uquad_increment(u8) {(*u8)++;}

            #define mco_uquad_compare(a,b) ((*a)<(*b)?-1:((*a)>(*b)?1:0))
            #define mco_iquad_compare(a,b) ((*a)<(*b)?-1:((*a)>(*b)?1:0))

            #define mco_quad_eq(a,b) (a==b)

        #endif /* MCO_CFG_QUAD_STRUCT */

        #ifdef __cplusplus
        }
    #endif 

#endif

⌨️ 快捷键说明

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