Debian Codegraph @

project_files/hwc/rtl/pas2c.h

raw
1 #pragma once
2
3 #include <stddef.h>
4 #include <stdint.h>
5 #include <stdbool.h>
6 #include <wchar.h>
7 #include <math.h>
8
9 #define MAX_PARAMS 64
10 #define MAX_ANSISTRING_LENGTH 16382
11
12 typedef union string255_
13 {
14 struct {
15 unsigned char s[256];
16 };
17 struct {
18 unsigned char len;
19 unsigned char str[255];
20 };
21 } string255;
22
23 typedef union astring_
24 {
25 struct {
26 uint16_t len;
27 unsigned char str[MAX_ANSISTRING_LENGTH];
28 };
29 struct {
30 unsigned char _dummy2;
31 unsigned char s[MAX_ANSISTRING_LENGTH + 1];
32 };
33 struct {
34 unsigned char _dummy1;
35 string255 str255;
36 };
37 } astring;
38
39 typedef string255 shortstring;
40
41 typedef uint8_t Byte;
42 typedef int8_t ShortInt;
43 typedef uint16_t Word;
44 typedef int16_t SmallInt;
45 typedef uint32_t LongWord;
46 typedef int32_t LongInt;
47 typedef uint64_t QWord;
48 typedef int64_t Int64;
49 typedef LongWord Cardinal;
50
51 typedef LongInt Integer;
52 typedef long double extended;
53 typedef double real;
54 typedef float single;
55
56 typedef bool boolean;
57 typedef int LongBool;
58
59 typedef void * pointer;
60 typedef Byte * PByte;
61 typedef char * PChar;
62 typedef LongInt * PLongInt;
63 typedef LongWord * PLongWord;
64 typedef Integer * PInteger;
65 typedef ptrdiff_t PtrInt;
66 typedef wchar_t widechar;
67 typedef wchar_t* PWideChar;
68 typedef char Char;
69 typedef PtrInt SizeInt;
70 typedef char ** PPChar;
71 typedef Word* PWord;
72
73 string255 _strconcat(string255 a, string255 b);
74 string255 _strappend(string255 s, unsigned char c);
75 string255 _strprepend(unsigned char c, string255 s);
76 string255 _chrconcat(unsigned char a, unsigned char b);
77 bool _strcompare(string255 a, string255 b);
78 bool _strcomparec(string255 a, unsigned char b);
79 bool _strncompare(string255 a, string255 b);
80 bool _strncompareA(astring a, astring b);
81
82
83 #define STRINIT(a) {.len = sizeof(a) - 1, .str = a}
84 #define UNUSED(x) (void)(x)
85