From: Ian Abbott Date: Wed, 12 Dec 2007 12:27:00 +0000 (+0000) Subject: Use typedef instead of #define to define MS-Windows types. Add a few more X-Git-Tag: v0_7_76~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=575dac074d5b8be0032bbc6764434b0dc1ae4af1;p=comedi.git Use typedef instead of #define to define MS-Windows types. Add a few more pointer types. --- diff --git a/comedi/drivers/addi-data/addi_common.h b/comedi/drivers/addi-data/addi_common.h index 70b4fd63..e7ccf846 100644 --- a/comedi/drivers/addi-data/addi_common.h +++ b/comedi/drivers/addi-data/addi_common.h @@ -64,19 +64,20 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc // variable type definition -#define VOID void -#define UINT unsigned int -#define ULONG unsigned int /* 32-bit */ -#define USHORT unsigned short -#define PUSHORT unsigned short * -#define INT int -#define BYTE unsigned char -#define PBYTE unsigned char * -#define PINT int * -#define PUINT unsigned int * -#define CHAR char -#define PCHAR char * -#define PRANGE comedi_lrange * +typedef void VOID, *PVOID; +typedef char CHAR, *PCHAR; +typedef unsigned char BYTE, *PBYTE; +typedef short SHORT, *PSHORT; +typedef unsigned short USHORT, *PUSHORT; +typedef unsigned short WORD, *PWORD; +typedef int INT, *PINT;; +typedef unsigned int UINT, *PUINT; +typedef int LONG, *PLONG; /* 32-bit */ +typedef unsigned int ULONG, *PULONG; /* 32-bit */ +typedef unsigned int DWORD, *PDWORD; /* 32-bit */ +typedef unsigned long ULONG_PTR; + +typedef comedi_lrange *PRANGE; #define LOBYTE(W) (BYTE )((W)&0xFF) #define HIBYTE(W) (BYTE )(((W)>>8)&0xFF) #define MAKEWORD(H,L) (USHORT )((L)|( (H)<<8) ) @@ -84,10 +85,6 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc #define HIWORD(W) (USHORT )(((W)>>16)&0xFFFF) #define MAKEDWORD(H,L) (UINT )((L)|( (H)<<16) ) -#define ULONG_PTR unsigned long -#define DWORD unsigned int /* 32-bit */ -#define WORD unsigned short - #define ADDI_ENABLE 1 #define ADDI_DISABLE 0 #define APCI1710_SAVE_INTERRUPT 1