mazen b127fc154a * Fixed spell error revealed by lintian. 15 年 前
..
Makefile 8b0301409a + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and 15 年 前
Makefile.fpc dc92aceef7 * more naming duplicate unit names solved, reason is that COMPILER_UNITTARGETDIR used with make all requires this (all units end in one directory) 17 年 前
README.txt 4bf254bc32 * added .txt extensions to all README, TODO and COPYING files 16 年 前
converu.pas c91498ed65 * better support of float, resolves #11426 17 年 前
h2pas.pas b127fc154a * Fixed spell error revealed by lintian. 15 年 前
h2pas.y 782643789b * convert array declarations without size into pointers (as even the comment in the code says), resolves #10156 15 年 前
h2paspp.pas 790a4fe2d3 * log and id tags removed 20 年 前
h2plexlib.pas e01e1c9476 * renamed lexlib and yacclib units to avoid name clashes with that ones from tply 17 年 前
h2poptions.pas dc92aceef7 * more naming duplicate unit names solved, reason is that COMPILER_UNITTARGETDIR used with make all requires this (all units end in one directory) 17 年 前
h2pyacclib.pas e01e1c9476 * renamed lexlib and yacclib units to avoid name clashes with that ones from tply 17 年 前
scan.l 48e259876b * support LL as int number postfix 16 年 前
scan.pas 48e259876b * support LL as int number postfix 16 年 前
testit.h 782643789b * convert array declarations without size into pointers (as even the comment in the code says), resolves #10156 15 年 前
yylex.cod 989f5eb367 * changed yywrap into a procedure variable so it can be overriden 17 年 前
yyparse.cod 3a56cae749 * moved 26 年 前

README.txt

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 !