8.4.2 Constructs

The following C declarations and statements are recognized:

denes
Denes are changed into Pascal constants if they are simple denes. Macros are changed - wherever possible - to functions; however the arguments are all integers, so these must be changed manually. Simple expressions in dene staments are recognized, as are most arithmetic operators: addition, substraction, multiplication, division, logical operators, comparison operators, shift operators. The C construct ( A ? B : C) is also recognized and translated to a Pascal construct with an IF statement. (This is buggy, however).
preprocessor statements
The conditional preprocessing commands are recognized and translated into equivalent Pascal compiler directives. The special
#ifdef __cplusplus

is also recognized and removed.

typedef
A typedef statement is changed into a Pascal type statement. The following basic types are recognized:

These types are also changed if they appear in the arguments of a function or procedure.

functions and procedures
Functions and procedures are translated as well. Pointer types may be changed to call by reference arguments (using the var argument) by using the -p command line argument. Functions that have a variable number of arguments are changed to a function with a cvar modier. (This used to be the array of const argument.)
speciers
The extern specier is recognized; however it is ignored. The packed specier is also recognised and changed with the PACKRECORDS directive. The const specier is also recognized, but is ignored.
modiers
If the -w option is specied, then the following modiers are recognized:
STDCALL  
CDECL  
CALLBACK  
PASCAL  
WINAPI  
APIENTRY  
WINGDIAPI

as dened in the win32 headers. If additionally the -x option is specied then the

SYS_TRAP

specier is also recognized.

enums
Enum constructs are changed into enumeration types. Bear in mind that, in C, enumeration types can have values assigned to them. Free Pascal also allows this to a certain degree. If you know that values are assigned to enums, it is best to use the -e option to change the enumerations to a series of integer constants.
unions
Unions are changed to variant records.
structs
Structs are changed to Pascal records, with C packing.