1
This is the h2pas program, a utility to convert C header files to pascal
2
units. It is part of the Free Pascal distribution.
6
To compile the program, a simple
8
should be sufficient; you need GNU make for this. When using TP, a simple
10
should also be possible.
14
h2pas [-p] [-t] [-o outputfilename] [-l libname] [-u unitname] filename
16
-t : Prepend 'T' to all type names in typedef definitions. This may help
17
when the C header use uppercase types and lowercase variables of the
20
-p : Use 'P' instead of ^ as a pointer symbol;
24
etc. It will also define a PSOMETYPE pointer for each SOMETYPE struct type
25
definition in the header file.
27
typedef struct somestruct {
34
PSomestruct = ^Somestruct;
35
If the -t options is used, the -p option takes care of that too.
37
-l : In the implementation part, the external functions will be
38
written with 'external libname;' behind it.
39
If you omit this option, all functions will be declared as
42
-o : specify the outputname. By default, the inputname is used, with
45
-u : Specify the unit name. By default, the outputname is used, without
48
-v : Replaces pointer types in parameter list by call by reference
50
void p(int *i) => procedure p(var i : longint);