回复 1#lxyscls作者: 狗蛋 时间: 2011-11-11 12:52
C's offsetof() macro is an ANSI C library feature found in stddef.h. It evaluates to the offset (in bytes) of a given member within a struct or union type, an expression of type size_t. The offsetof() macro takes two parameters, the first being a structure name, and the second being the name of a member within the structure. It can not be described as a C prototype.
/*****************************************************
* define extend data type for net_pack()
*****************************************************/
#define CH_DATE CH_CHAR|0x80
#define CH_CNUM CH_CHAR|0x100
#define CH_JUL CH_INT4|0X80
#define CH_MINUTS CH_INT4|0x100
#define CH_TIME CH_INT64|0x80
#define CH_USEC CH_INT64|0x200
/* used by varchar2 as date(year to day),default format is "YYYYMMDD" */
#define CH_CJUL CH_INT4|0x200
#define CH_CMINUTS CH_INT4|0x400
/* used by varchar2 as date(year to sec),default format is "YYYYMMDDHH24MISS" */
#define CH_CTIME CH_INT64|0x100