author | nemo |
Wed, 23 May 2012 16:51:37 -0400 | |
changeset 7122 | fa2d09868ac6 |
parent 7073 | 26f960656cc9 |
child 7134 | beb16926ae5c |
permissions | -rw-r--r-- |
6512 | 1 |
system; |
2 |
||
3 |
type |
|
6635
c2fa29fe2a58
Some progress, still can't find the source of bad behavior
unc0rr
parents:
6552
diff
changeset
|
4 |
Integer = integer; |
6512 | 5 |
LongInt = integer; |
6 |
LongWord = integer; |
|
6516 | 7 |
Cardinal = integer; |
8 |
PtrInt = integer; |
|
6520 | 9 |
Word = integer; |
10 |
Byte = integer; |
|
11 |
SmallInt = integer; |
|
12 |
ShortInt = integer; |
|
6653 | 13 |
QWord = integer; |
6891
ab9843957664
Improve rendering of function types, ranges, and more
unc0rr
parents:
6873
diff
changeset
|
14 |
GLint = integer; |
ab9843957664
Improve rendering of function types, ranges, and more
unc0rr
parents:
6873
diff
changeset
|
15 |
GLuint = integer; |
7044 | 16 |
int = integer; |
7073 | 17 |
size_t = integer; |
6516 | 18 |
|
19 |
pointer = pointer; |
|
20 |
||
6649
7f78e8a6db69
Fix a bug with type declaration trying to resolve type being declared
unc0rr
parents:
6635
diff
changeset
|
21 |
float = float; |
6838 | 22 |
single = float; |
6516 | 23 |
double = float; |
24 |
real = float; |
|
6653 | 25 |
extended = float; |
6891
ab9843957664
Improve rendering of function types, ranges, and more
unc0rr
parents:
6873
diff
changeset
|
26 |
GLfloat = float; |
6516 | 27 |
|
28 |
boolean = boolean; |
|
29 |
LongBool = boolean; |
|
30 |
||
31 |
string = string; |
|
32 |
shortstring = string; |
|
33 |
ansistring = string; |
|
6838 | 34 |
widechar = string; |
6516 | 35 |
|
36 |
char = char; |
|
6873 | 37 |
PChar = ^char; |
6926
6e832f8f4d8e
Make adler32 friendlier for pas2c - this should work the same (needs testing ofc)
nemo
parents:
6902
diff
changeset
|
38 |
PPChar = ^Pchar; |
6520 | 39 |
|
40 |
PByte = ^Byte; |
|
41 |
PLongInt = ^LongInt; |
|
42 |
PLongWord = ^LongWord; |
|
43 |
PInteger = ^Integer; |
|
6663 | 44 |
|
45 |
Handle = integer; |
|
46 |
stderr = Handle; |
|
6838 | 47 |
|
6893 | 48 |
png_structp = pointer; |
49 |
png_size_t = integer; |
|
50 |
||
6512 | 51 |
var |
52 |
false, true: boolean; |
|
6855
807156c01475
Finish the toughest part of the converter. Now it knows types of everything, so could correctly recognize bitwise operators and type convertions.
unc0rr
parents:
6854
diff
changeset
|
53 |
|
6838 | 54 |
write, writeLn, read, readLn: procedure; |
6855
807156c01475
Finish the toughest part of the converter. Now it knows types of everything, so could correctly recognize bitwise operators and type convertions.
unc0rr
parents:
6854
diff
changeset
|
55 |
|
6520 | 56 |
StrLen, ord, Succ, Pred : function : integer; |
6838 | 57 |
inc, dec, Low, High, Lo, Hi : function : integer; |
58 |
odd, even : function : boolean; |
|
59 |
||
6520 | 60 |
Now : function : integer; |
6838 | 61 |
|
62 |
new, dispose, FillChar, Move : procedure; |
|
63 |
||
64 |
trunc, round : function : integer; |
|
7041 | 65 |
abs, sqr : function : integer; |
6838 | 66 |
|
6967
1224c6fb36c3
Support recurrent function calls. The code is kinda hackish and ugly, but I really spent a few hours thinking on a good solution.
unc0rr
parents:
6926
diff
changeset
|
67 |
StrPas, FormatDateTime, copy, delete, str, pos, trim, LowerCase : function : shortstring; |
6856 | 68 |
Length, StrToInt : function : integer; |
69 |
SetLength, val : procedure; |
|
6898 | 70 |
_pchar : function : PChar; |
7066
12cc2bd84b0b
Make pas2c even more happier with uGears.c, allow assigning arrays in some cases
unc0rr
parents:
7065
diff
changeset
|
71 |
memcpy : procedure; |
6838 | 72 |
|
6855
807156c01475
Finish the toughest part of the converter. Now it knows types of everything, so could correctly recognize bitwise operators and type convertions.
unc0rr
parents:
6854
diff
changeset
|
73 |
assign, rewrite, reset, flush, BlockWrite, BlockRead, close : procedure; |
6902
7d4e5ce73b98
Make pas2c even smarter. Now uIO.c compiles fine, and only 1 warning when compiled with -Wall (clang).
unc0rr
parents:
6898
diff
changeset
|
74 |
IOResult : integer; |
6853 | 75 |
exit, break, halt, continue : procedure; |
6843
59da15acb2f2
Finally fix the bug with pointer declarations polluting namespace with bad records
unc0rr
parents:
6838
diff
changeset
|
76 |
TextFile, file : Handle; |
6853 | 77 |
FileMode : integer; |
6855
807156c01475
Finish the toughest part of the converter. Now it knows types of everything, so could correctly recognize bitwise operators and type convertions.
unc0rr
parents:
6854
diff
changeset
|
78 |
FileExists, DirectoryExists, eof : function : boolean; |
807156c01475
Finish the toughest part of the converter. Now it knows types of everything, so could correctly recognize bitwise operators and type convertions.
unc0rr
parents:
6854
diff
changeset
|
79 |
ExtractFileName : function : string; |
807156c01475
Finish the toughest part of the converter. Now it knows types of everything, so could correctly recognize bitwise operators and type convertions.
unc0rr
parents:
6854
diff
changeset
|
80 |
exitcode : integer; |
6853 | 81 |
|
82 |
ParamCount : function : integer; |
|
83 |
ParamStr : function : string; |
|
6838 | 84 |
|
7062 | 85 |
sqrt, arctan2, cos, sin, power : function : float; |
86 |
pi : float; |
|
6838 | 87 |
|
88 |
TypeInfo, GetEnumName : function : shortstring; |
|
89 |
||
90 |
UTF8ToUnicode, WrapText: function : shortstring; |
|
91 |
||
92 |
sizeof : function : integer; |
|
93 |
||
94 |
GetMem : function : pointer; |
|
95 |
FreeMem : procedure; |
|
7064 | 96 |
|
97 |
glGetString : function : pchar; |
|
98 |
||
99 |
glBegin, glBindTexture, glBlendFunc, glClear, glClearColor, |
|
100 |
glColor4ub, glColorMask, glColorPointer, glDeleteTextures, |
|
101 |
glDisable, glDisableClientState, glDrawArrays, glEnable, |
|
102 |
glEnableClientState, glEnd, glGenTextures, glGetIntegerv, |
|
103 |
glHint, glLineWidth, glLoadIdentity, glMatrixMode, glPopMatrix, |
|
104 |
glPushMatrix, glReadPixels, glRotatef, glScalef, glTexCoord2f, |
|
105 |
glTexCoordPointer, glTexImage2D, glTexParameterf, |
|
106 |
glTexParameteri, glTranslatef, glVertex2d, glVertexPointer, |
|
7065 | 107 |
glViewport, glext_LoadExtension, glDeleteRenderbuffersEXT, |
108 |
glDeleteFramebuffersEXT, glGenFramebuffersEXT, |
|
109 |
glGenRenderbuffersEXT, glBindFramebufferEXT, |
|
110 |
glBindRenderbufferEXT, glRenderbufferStorageEXT, |
|
111 |
glFramebufferRenderbufferEXT, glFramebufferTexture2DEXT : procedure; |
|
7064 | 112 |
|
113 |
GL_BGRA, GL_BLEND, GL_CLAMP_TO_EDGE, GL_COLOR_ARRAY, |
|
114 |
GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_DEPTH_COMPONENT, |
|
115 |
GL_DITHER, GL_EXTENSIONS, GL_FALSE, GL_FASTEST, GL_LINEAR, |
|
116 |
GL_LINE_LOOP, GL_LINES, GL_LINE_SMOOTH, GL_LINE_STRIP, |
|
117 |
GL_MAX_TEXTURE_SIZE, GL_MODELVIEW, GL_ONE_MINUS_SRC_ALPHA, |
|
118 |
GL_PERSPECTIVE_CORRECTION_HINT, GL_PROJECTION, GL_QUADS, |
|
119 |
GL_RENDERER, GL_RGBA, GL_RGBA8, GL_SRC_ALPHA, GL_TEXTURE_2D, |
|
120 |
GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_MAG_FILTER, |
|
121 |
GL_TEXTURE_MIN_FILTER, GL_TEXTURE_PRIORITY, GL_TEXTURE_WRAP_S, |
|
122 |
GL_TEXTURE_WRAP_T, GL_TRIANGLE_FAN, GL_TRUE, GL_VENDOR, |
|
7065 | 123 |
GL_VERSION, GL_VERTEX_ARRAY, GLenum, GL_FRAMEBUFFER_EXT, |
124 |
GL_RENDERBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, |
|
7069 | 125 |
GL_COLOR_ATTACHMENT0_EXT, GL_FLOAT, GL_UNSIGNED_BYTE : integer; |
6838 | 126 |
|
127 |
TThreadId : function : integer; |
|
6854
873929cbd54b
Normalize RecordFields before conversion. Helps with namespaces problem.
unc0rr
parents:
6853
diff
changeset
|
128 |
BeginThread, ThreadSwitch : procedure; |
873929cbd54b
Normalize RecordFields before conversion. Helps with namespaces problem.
unc0rr
parents:
6853
diff
changeset
|
129 |
InterlockedIncrement, InterlockedDecrement : procedure; |
6853 | 130 |
|
131 |
random : function : integer; |
|
6855
807156c01475
Finish the toughest part of the converter. Now it knows types of everything, so could correctly recognize bitwise operators and type convertions.
unc0rr
parents:
6854
diff
changeset
|
132 |
randomize : procedure; |
6853 | 133 |
|
134 |
Assigned : function : boolean; |
|
6854
873929cbd54b
Normalize RecordFields before conversion. Helps with namespaces problem.
unc0rr
parents:
6853
diff
changeset
|
135 |
|
6898 | 136 |
_strconcat, _strappend, _strprepend : function : string; |
7054 | 137 |
_strcompare, _strncompare, _strcomparec : function : boolean; |
6893 | 138 |
|
139 |
png_structp, png_set_write_fn, png_get_io_ptr, |
|
140 |
png_get_libpng_ver, png_create_write_struct, |
|
141 |
png_create_info_struct, png_destroy_write_struct, |
|
142 |
png_write_row, png_set_ihdr, png_write_info, |
|
143 |
png_write_end : procedure; |
|
6894 | 144 |
|
145 |
EnumToStr : function : string; |
|
7066
12cc2bd84b0b
Make pas2c even more happier with uGears.c, allow assigning arrays in some cases
unc0rr
parents:
7065
diff
changeset
|
146 |