~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to utils/h2pas/README

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
3
 
 
4
 
COMPILING
5
 
 
6
 
To compile the program, a simple
7
 
 'make' 
8
 
should be sufficient; you need GNU make for this. When using TP, a simple
9
 
  tpc h2pas.pas
10
 
should also be possible. 
11
 
 
12
 
USAGE
13
 
 
14
 
h2pas [-p] [-t] [-o outputfilename] [-l libname] [-u unitname] filename
15
 
 
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
18
 
     same name.
19
 
 
20
 
-p : Use 'P' instead of ^ as a pointer symbol;
21
 
     This will convert 
22
 
        ^char to pchar
23
 
        ^longint to plongint 
24
 
     etc. It will also define a PSOMETYPE pointer for each SOMETYPE struct type 
25
 
     definition in the header file.
26
 
     Thus 
27
 
     typedef struct somestruct {
28
 
       ...
29
 
     }
30
 
     Will be converted to
31
 
     somestruct = record
32
 
       ...
33
 
     end;
34
 
     PSomestruct = ^Somestruct;
35
 
     If the -t options is used, the -p option takes care of that too.
36
 
 
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 
40
 
     cdecl; external; 
41
 
 
42
 
-o : specify the outputname. By default, the inputname is used, with
43
 
     extension '.pp'.
44
 
 
45
 
-u : Specify the unit name. By default, the outputname is used, without
46
 
     extension.
47
 
 
48
 
-v : Replaces pointer types in parameter list by call by reference
49
 
     parameters:
50
 
        void p(int *i)  =>   procedure p(var i : longint);
51
 
 
52
 
Enjoy !