Penguin
Annotated edit history of h2ph(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 H2PH
2 !!!H2PH
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 ENVIRONMENT
8 FILES
9 AUTHOR
10 SEE ALSO
11 DIAGNOSTICS
12 BUGS
13 ----
14 !!NAME
15
16
17 h2ph - convert .h C header files to .ph Perl header files
18 !!SYNOPSIS
19
20
21 __h2ph [[-d destination directory] [[-r -a] [[-l]
22 [[headerfiles]__
23 !!DESCRIPTION
24
25
26 ''h2ph'' converts any C header files specified to the
27 corresponding Perl header file format. It is most easily run
28 while in /usr/include:
29
30
31 cd /usr/include; h2ph * sys/*
32 or
33
34
35 cd /usr/include; h2ph -r -l .
36 The output files are placed in the hierarchy rooted at Perl's architecture dependent library directory. You can specify a different hierarchy with a __-d__ switch.
37
38
39 If run with no arguments, filters standard input to standard
40 output.
41 !!OPTIONS
42
43
44 -d destination_dir
45
46
47 Put the resulting __.ph__ files beneath
48 __destination_dir__, instead of beneath the default Perl
49 library location
50 ($Config{'installsitsearch'}).
51
52
53 -r
54
55
56 Run recursively; if any of __headerfiles__ are
57 directories, then run ''h2ph'' on all files in those
58 directories (and their subdirectories, etc.). __-r__ and
59 __-a__ are mutually exclusive.
60
61
62 -a
63
64
65 Run automagically; convert __headerfiles__, as well as
66 any __.h__ files which they include. This option will
67 search for __.h__ files in all directories which your C
68 compiler ordinarily uses. __-a__ and __-r__ are
69 mutually exclusive.
70
71
72 -l
73
74
75 Symbolic links will be replicated in the destination
76 directory. If __-l__ is not specified, then links are
77 skipped over.
78
79
80 -h
81
82
83 Put ``hints'' in the .ph files which will help in locating
84 problems with ''h2ph''. In those cases when you
85 __require__ a __.ph__ file containing syntax errors,
86 instead of the cryptic
87
88
89 [[ some error condition ] at (eval mmm) line nnn
90 you will see the slightly more helpful
91
92
93 [[ some error condition ] at filename.ph line nnn
94 However, the __.ph__ files almost double in size when built using __-h__.
95
96
97 -D
98
99
100 Include the code from the __.h__ file as a comment in the
101 __.ph__ file. This is primarily used for debugging
102 ''h2ph''.
103
104
105 -Q
106
107
108 ``Quiet'' mode; don't print out the names of the files being
109 converted.
110 !!ENVIRONMENT
111
112
113 No environment variables are used.
114 !!FILES
115
116
117 /usr/include/*.h
118 /usr/include/sys/*.h
119 etc.
120 !!AUTHOR
121
122
123 Larry Wall
124 !!SEE ALSO
125
126
127 perl(1)
128 !!DIAGNOSTICS
129
130
131 The usual warnings if it can't read or write the files
132 involved.
133 !!BUGS
134
135
136 Doesn't construct the %sizeof array for
137 you.
138
139
140 It doesn't handle all C constructs, but it does attempt to
141 isolate definitions inside evals so that you can get at the
142 definitions that it can translate.
143
144
145 It's only intended as a rough tool. You may need to dicker
146 with the files produced.
147
148
149 You have to run this program by hand; it's not run as part
150 of the Perl installation.
151
152
153 Doesn't handle complicated expressions built piecemeal, a
154 la:
155
156
157 enum {
158 FIRST_VALUE,
159 SECOND_VALUE,
160 #ifdef ABC
161 THIRD_VALUE
162 #endif
163 };
164 Doesn't necessarily locate all of your C compiler's internally-defined symbols.
165 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.