peter a54a8634aa Merged revisions 375,2257,2261-2262,2271,2296,2376,2443 via svnmerge from 19 ani în urmă
..
Makefile a54a8634aa Merged revisions 375,2257,2261-2262,2271,2296,2376,2443 via svnmerge from 19 ani în urmă
Makefile.fpc 293d6a1671 * Makefile fixes 24 ani în urmă
README 3a56cae749 * moved 26 ani în urmă
converu.pas 7a7d910592 Merged revisions 948 via svnmerge from 20 ani în urmă
h2pas.pas dce34b10b8 Merged revisions 960 via svnmerge from 20 ani în urmă
h2pas.y dce34b10b8 Merged revisions 960 via svnmerge from 20 ani în urmă
h2paspp.pas 6434db35c2 * mime-type property in fixes branch set 20 ani în urmă
lexlib.pas 164e1c25e6 + -S, -T, -c modes added 25 ani în urmă
options.pas 6434db35c2 * mime-type property in fixes branch set 20 ani în urmă
scan.l 7a7d910592 Merged revisions 948 via svnmerge from 20 ani în urmă
scan.pas 7a7d910592 Merged revisions 948 via svnmerge from 20 ani în urmă
testit.h f86c568373 * support for enum enumtype enumvar; fixed 24 ani în urmă
yacclib.pas 50778076c3 initial import 20 ani în urmă
yylex.cod 3a56cae749 * moved 26 ani în urmă
yyparse.cod 3a56cae749 * moved 26 ani în urmă

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 !