Subversion Repositories Games.Rick Dangerous

Rev

Rev 5 | Rev 9 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 7
Line 12... Line 12...
12
 */
12
 */
13
 
13
 
14
#ifndef _SYSTEM_H
14
#ifndef _SYSTEM_H
15
#define _SYSTEM_H
15
#define _SYSTEM_H
16
 
16
 
17
#ifdef WIN32
-
 
18
 /* there are true at least on x86 platforms */
-
 
19
typedef unsigned char U8; // 8 bits unsigned
-
 
20
typedef unsigned short U16; // 16 bits unsigned
-
 
21
typedef unsigned long U32; // 32 bits unsigned
-
 
22
typedef signed char S8; // 8 bits signed
-
 
23
typedef signed short S16; // 16 bits signed
-
 
24
typedef signed long S32; // 32 bits signed
-
 
25
#else // !WIN32
-
 
26
#include <stdint.h>
17
#include <stdint.h>
27
typedef uint8_t U8;
18
typedef uint8_t U8;
28
typedef uint16_t U16;
19
typedef uint16_t U16;
29
typedef uint32_t U32;
20
typedef uint32_t U32;
30
typedef int8_t S8;
21
typedef int8_t S8;
31
typedef int16_t S16;
22
typedef int16_t S16;
32
typedef int32_t S32;
23
typedef int32_t S32;
-
 
24
#ifdef WIN32
-
 
25
#include <stdio.h> // for sprintf_s() and the likes
-
 
26
#else // !WIN32
33
#define strcpy_s(dest,size,source) strcpy (dest, source)
27
#define strcpy_s(dest,size,source) strcpy (dest, source)
34
#define strcat_s(dest,size,source) strcat (dest, source)
28
#define strcat_s(dest,size,source) strcat (dest, source)
35
#define sprintf_s(dest,size,format,...) sprintf (dest, format, __VA_ARGS__)
29
#define sprintf_s(dest,size,format,...) sprintf (dest, format, __VA_ARGS__)
36
#define strncpy_s(dest,size,source,count) strncpy (dest, source, count)
30
#define strncpy_s(dest,size,source,count) strncpy (dest, source, count)
37
#define vsprintf_s(buffer,maxsize,format,...) vsprintf(buffer,format, ##__VA_ARGS__)
31
#define vsprintf_s(buffer,maxsize,format,...) vsprintf(buffer,format, ##__VA_ARGS__)