hedgewars/pas2c.h
changeset 6971 b7b38e051b5f
parent 6967 1224c6fb36c3
child 7002 5d817ba976f7
equal deleted inserted replaced
6970:59f33a6a4814 6971:b7b38e051b5f
     1 #pragma once
     1 #pragma once
     2 
     2 
       
     3 #include <stdint.h>
     3 #include <stdbool.h>
     4 #include <stdbool.h>
     4 
     5 
     5 typedef union string255_
     6 typedef union string255_
     6     {
     7     {
     7         struct {
     8         struct {
    23 typedef struct string15_
    24 typedef struct string15_
    24     {
    25     {
    25         char s[16];
    26         char s[16];
    26     } string15;
    27     } string15;
    27 
    28 
    28 typedef int SmallInt;
    29 typedef uint8_t Byte;
    29 typedef int Word;
    30 typedef int8_t ShortInt;
    30 typedef int LongInt;
    31 typedef uint16_t Word;
    31 typedef int LongWord;
    32 typedef int16_t SmallInt;
    32 typedef int Byte;
    33 typedef uint32_t LongWord;
    33 typedef int Integer;
    34 typedef int32_t LongInt;
    34 typedef long long int QWord;
    35 typedef uint64_t QWord;
       
    36 typedef int64_t Int64;
    35 
    37 
       
    38 typedef LongInt Integer;
    36 typedef float extended;
    39 typedef float extended;
    37 typedef float real;
    40 typedef float real;
    38 
    41 
    39 typedef bool boolean;
    42 typedef bool boolean;
    40 
    43 
    41 typedef void * pointer;
    44 typedef void * pointer;
    42 typedef Byte * PByte;
    45 typedef Byte * PByte;
    43 typedef char * PChar;
    46 typedef char * PChar;
    44 typedef LongInt * PLongInt;
    47 typedef LongInt * PLongInt;
    45 typedef Integer * PInteger;
    48 typedef Integer * PInteger;
       
    49 
       
    50 #ifdef __GNUG__
       
    51 #define NULL __null
       
    52 #else   /* G++ */
       
    53 /* shield NULL definition for non-gnu parsers */
       
    54 #ifndef __cplusplus
       
    55 #define NULL ((void *)0)
       
    56 #else
       
    57 #define NULL 0
       
    58 #endif  /* __cplusplus */
       
    59 #endif  /* G++ */
    46 
    60 
    47 #define new(a) __new((void **)&a, sizeof(*(a)))
    61 #define new(a) __new((void **)&a, sizeof(*(a)))
    48 void __new(void ** p, int size);
    62 void __new(void ** p, int size);
    49 
    63 
    50 #define dispose(a) __dispose(a, sizeof(*(a)))
    64 #define dispose(a) __dispose(a, sizeof(*(a)))