common_defs.h 1.89 KB
Newer Older
Rafaela Meissner's avatar
Rafaela Meissner committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/***********************************************************************************************
* MODULE:     common_defs.h
* PURPOSE:    common definitions
* WRITTEN BY: NDA
* COPYRIGHT:  CAEN S.p.A. all rights reserved
* USAGE:      compiled with gcc ?!?!
************************************************************************************************/
#ifndef __COMMON_DEFS_DEF_H
#define __COMMON_DEFS_DEF_H

////////////////////////////////////////////
// File includes
////////////////////////////////////////////
#include <stdio.h>
#include "keyb.h"


////////////////////////////////////////////
// Global defines
////////////////////////////////////////////

//
// Data tyes
typedef int BOOL;
#define TRUE	-1
#define FALSE	0

typedef unsigned char      UINT8;
typedef unsigned short     UINT16;
typedef unsigned int       UINT32;
typedef unsigned long long UINT64;
typedef          char      INT8;
typedef          short     INT16;
typedef          int       INT32;
typedef          long long INT64;

typedef const char*    PCSTR;
//
// Debugging macros
#define TRACE( format)								printf( format)
#define TRACE1( format, p1)							printf( format, p1)
#define TRACE2( format, p1, p2)						printf( format, p1, p2)
#define TRACE3( format, p1, p2, p3)					printf( format, p1, p2, p3)
#define TRACE4( format, p1, p2, p3, p4)				printf( format, p1, p2, p3, p4)
#define TRACE5( format, p1, p2, p3, p4, p5)			printf( format, p1, p2, p3, p4, p5)


//
// Helper functions
#ifdef LINUX
	#define stricmp( str1, str2)		strcasecmp( str1, str2)
	#define strnicmp( str1, str2, n)	strncasecmp( str1, str2, n)
#endif
////////////////////////////////////////////
// Global variables declaration
////////////////////////////////////////////

////////////////////////////////////////////
// Global methods declaration
////////////////////////////////////////////




#endif