micha 08c3d44cea use the ctypes unit in h2pas (from jpetermugaas) hace 19 años
..
Makefile 705033284e + regenerated makefiles to support powerpc-amiga target hace 19 años
Makefile.fpc 293d6a1671 * Makefile fixes hace 25 años
README 3a56cae749 * moved hace 27 años
converu.pas d94fa751e0 * basic parsing for bodies of C programs hace 20 años
h2pas.pas 08c3d44cea use the ctypes unit in h2pas (from jpetermugaas) hace 19 años
h2pas.y 08c3d44cea use the ctypes unit in h2pas (from jpetermugaas) hace 19 años
h2paspp.pas 790a4fe2d3 * log and id tags removed hace 20 años
lexlib.pas 164e1c25e6 + -S, -T, -c modes added hace 26 años
options.pas 08c3d44cea use the ctypes unit in h2pas (from jpetermugaas) hace 19 años
scan.l d94fa751e0 * basic parsing for bodies of C programs hace 20 años
scan.pas d94fa751e0 * basic parsing for bodies of C programs hace 20 años
testit.h f86c568373 * support for enum enumtype enumvar; fixed hace 24 años
yacclib.pas 50778076c3 initial import hace 21 años
yylex.cod 3a56cae749 * moved hace 27 años
yyparse.cod 3a56cae749 * moved hace 27 años

README

This is the h2pas program, a utility to convert C header files to pascal
units. It is part of the Free Pascal distribution.

COMPILING

To compile the program, a simple
'make'
should be sufficient; you need GNU make for this. When using TP, a simple
tpc h2pas.pas
should also be possible.

USAGE

h2pas [-p] [-t] [-o outputfilename] [-l libname] [-u unitname] filename

-t : Prepend 'T' to all type names in typedef definitions. This may help
when the C header use uppercase types and lowercase variables of the
same name.

-p : Use 'P' instead of ^ as a pointer symbol;
This will convert
^char to pchar
^longint to plongint
etc. It will also define a PSOMETYPE pointer for each SOMETYPE struct type
definition in the header file.
Thus
typedef struct somestruct {
...
}
Will be converted to
somestruct = record
...
end;
PSomestruct = ^Somestruct;
If the -t options is used, the -p option takes care of that too.

-l : In the implementation part, the external functions will be
written with 'external libname;' behind it.
If you omit this option, all functions will be declared as
cdecl; external;

-o : specify the outputname. By default, the inputname is used, with
extension '.pp'.

-u : Specify the unit name. By default, the outputname is used, without
extension.

-v : Replaces pointer types in parameter list by call by reference
parameters:
void p(int *i) => procedure p(var i : longint);

Enjoy !