You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
998 B
C
50 lines
998 B
C
|
5 years ago
|
/******************************************************************************
|
||
|
|
Copyright(C):2015~2018 hzleaper
|
||
|
|
FileName:zdefines.h
|
||
|
|
Author:zhikun wu
|
||
|
|
Email:zk.wu@hzleaper.com
|
||
|
|
Tools:vs2010 pc on company
|
||
|
|
Created:2015/05/18
|
||
|
|
History:18:5:2015 15:07
|
||
|
|
*******************************************************************************/
|
||
|
|
#ifndef _Z_DEFINES_H
|
||
|
|
#define _Z_DEFINES_H
|
||
|
|
|
||
|
|
#if defined(WIN32) || defined(WIN64)
|
||
|
|
#include "syswin/zsystem.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
|
||
|
|
#ifndef BYTE
|
||
|
|
typedef unsigned char BYTE;
|
||
|
|
#endif
|
||
|
|
#ifndef WORD
|
||
|
|
typedef unsigned short WORD;
|
||
|
|
#endif
|
||
|
|
#ifndef DWORD
|
||
|
|
typedef unsigned long DWORD;
|
||
|
|
#endif
|
||
|
|
//#ifndef size_t
|
||
|
|
//typedef unsigned int size_t;
|
||
|
|
//#endif
|
||
|
|
|
||
|
|
#ifndef MAX
|
||
|
|
#define MAX(a, b) (a) > (b) ? (a) : (b)
|
||
|
|
#endif
|
||
|
|
#ifndef MIN
|
||
|
|
#define MIN(a, b) (a) > (b) ? (b) : (a)
|
||
|
|
#endif
|
||
|
|
#ifndef ABS
|
||
|
|
#define ABS(a) (a) < 0 ? (-(a)) : (a)
|
||
|
|
#endif
|
||
|
|
#define SELF_ABS(a) if( a < 0 ) a = -a
|
||
|
|
|
||
|
|
#ifndef PI
|
||
|
|
#define PI 3.1415927
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#define BIT(v) (v) ? 1 : 0
|
||
|
|
|
||
|
|
#define SWAP_WORD(w) (((w&0xFF)<<8)|((w&0xFF00)>>8))
|
||
|
|
|
||
|
|
#endif
|