Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

708 lines
19 KiB

  1. @rem = '--*-Perl-*--
  2. @echo off
  3. if "%OS%" == "Windows_NT" goto WinNT
  4. perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
  5. goto endofperl
  6. :WinNT
  7. perl -x -S "%0" %*
  8. if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
  9. if %errorlevel% == 9009 echo You do not have Perl in your PATH.
  10. goto endofperl
  11. @rem ';
  12. #!perl
  13. #line 14
  14. eval 'exec P:\Apps\ActivePerl\temp\bin\MSWin32-x86-object\perl.exe -S $0 ${1+"$@"}'
  15. if $running_under_some_shell;
  16. use Config;
  17. use File::Path qw(mkpath);
  18. use Getopt::Std;
  19. getopts('Dd:rlhaQ');
  20. die "-r and -a options are mutually exclusive\n" if ($opt_r and $opt_a);
  21. @inc_dirs = inc_dirs() if $opt_a;
  22. my $Exit = 0;
  23. my $Dest_dir = $opt_d || $Config{installsitearch};
  24. die "Destination directory $Dest_dir doesn't exist or isn't a directory\n"
  25. unless -d $Dest_dir;
  26. @isatype = split(' ',<<END);
  27. char uchar u_char
  28. short ushort u_short
  29. int uint u_int
  30. long ulong u_long
  31. FILE key_t caddr_t
  32. END
  33. @isatype{@isatype} = (1) x @isatype;
  34. $inif = 0;
  35. @ARGV = ('-') unless @ARGV;
  36. build_preamble_if_necessary();
  37. while (defined ($file = next_file())) {
  38. if (-l $file and -d $file) {
  39. link_if_possible($file) if ($opt_l);
  40. next;
  41. }
  42. # Recover from header files with unbalanced cpp directives
  43. $t = '';
  44. $tab = 0;
  45. # $eval_index goes into ``#line'' directives, to help locate syntax errors:
  46. $eval_index = 1;
  47. if ($file eq '-') {
  48. open(IN, "-");
  49. open(OUT, ">-");
  50. } else {
  51. ($outfile = $file) =~ s/\.h$/.ph/ || next;
  52. print "$file -> $outfile\n" unless $opt_Q;
  53. if ($file =~ m|^(.*)/|) {
  54. $dir = $1;
  55. mkpath "$Dest_dir/$dir";
  56. }
  57. if ($opt_a) { # automagic mode: locate header file in @inc_dirs
  58. foreach (@inc_dirs) {
  59. chdir $_;
  60. last if -f $file;
  61. }
  62. }
  63. open(IN,"$file") || (($Exit = 1),(warn "Can't open $file: $!\n"),next);
  64. open(OUT,">$Dest_dir/$outfile") || die "Can't create $outfile: $!\n";
  65. }
  66. print OUT "require '_h2ph_pre.ph';\n\n";
  67. while (<IN>) {
  68. chop;
  69. while (/\\$/) {
  70. chop;
  71. $_ .= <IN>;
  72. chop;
  73. }
  74. print OUT "# $_\n" if $opt_D;
  75. if (s:/\*:\200:g) {
  76. s:\*/:\201:g;
  77. s/\200[^\201]*\201//g; # delete single line comments
  78. if (s/\200.*//) { # begin multi-line comment?
  79. $_ .= '/*';
  80. $_ .= <IN>;
  81. redo;
  82. }
  83. }
  84. if (s/^\s*\#\s*//) {
  85. if (s/^define\s+(\w+)//) {
  86. $name = $1;
  87. $new = '';
  88. s/\s+$//;
  89. if (s/^\(([\w,\s]*)\)//) {
  90. $args = $1;
  91. my $proto = '() ';
  92. if ($args ne '') {
  93. $proto = '';
  94. foreach $arg (split(/,\s*/,$args)) {
  95. $arg =~ s/^\s*([^\s].*[^\s])\s*$/$1/;
  96. $curargs{$arg} = 1;
  97. }
  98. $args =~ s/\b(\w)/\$$1/g;
  99. $args = "local($args) = \@_;\n$t ";
  100. }
  101. s/^\s+//;
  102. expr();
  103. $new =~ s/(["\\])/\\$1/g; #"]);
  104. $new = reindent($new);
  105. $args = reindent($args);
  106. if ($t ne '') {
  107. $new =~ s/(['\\])/\\$1/g; #']);
  108. if ($opt_h) {
  109. print OUT $t,
  110. "eval \"\\n#line $eval_index $outfile\\n\" . 'sub $name $proto\{\n$t ${args}eval q($new);\n$t}' unless defined(\&$name);\n";
  111. $eval_index++;
  112. } else {
  113. print OUT $t,
  114. "eval 'sub $name $proto\{\n$t ${args}eval q($new);\n$t}' unless defined(\&$name);\n";
  115. }
  116. } else {
  117. print OUT "unless(defined(\&$name)) {\n sub $name $proto\{\n\t${args}eval q($new);\n }\n}\n";
  118. }
  119. %curargs = ();
  120. } else {
  121. s/^\s+//;
  122. expr();
  123. $new = 1 if $new eq '';
  124. $new = reindent($new);
  125. $args = reindent($args);
  126. if ($t ne '') {
  127. $new =~ s/(['\\])/\\$1/g; #']);
  128. if ($opt_h) {
  129. print OUT $t,"eval \"\\n#line $eval_index $outfile\\n\" . 'sub $name () {",$new,";}' unless defined(\&$name);\n";
  130. $eval_index++;
  131. } else {
  132. print OUT $t,"eval 'sub $name () {",$new,";}' unless defined(\&$name);\n";
  133. }
  134. } else {
  135. # Shunt around such directives as `#define FOO FOO':
  136. next if " \&$name" eq $new;
  137. print OUT $t,"unless(defined(\&$name)) {\n sub $name () {\t",$new,";}\n}\n";
  138. }
  139. }
  140. } elsif (/^(include|import)\s*[<"](.*)[>"]/) {
  141. ($incl = $2) =~ s/\.h$/.ph/;
  142. print OUT $t,"require '$incl';\n";
  143. } elsif(/^include_next\s*[<"](.*)[>"]/) {
  144. ($incl = $1) =~ s/\.h$/.ph/;
  145. print OUT ($t,
  146. "eval {\n");
  147. $tab += 4;
  148. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  149. print OUT ($t,
  150. "my(\%INCD) = map { \$INC{\$_} => 1 } ",
  151. "(grep { \$_ eq \"$incl\" } keys(\%INC));\n");
  152. print OUT ($t,
  153. "my(\@REM) = map { \"\$_/$incl\" } ",
  154. "(grep { not exists(\$INCD{\"\$_/$incl\"})",
  155. "and -f \"\$_/$incl\" } \@INC);\n");
  156. print OUT ($t,
  157. "require \"\$REM[0]\" if \@REM;\n");
  158. $tab -= 4;
  159. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  160. print OUT ($t,
  161. "};\n");
  162. print OUT ($t,
  163. "warn(\$\@) if \$\@;\n");
  164. } elsif (/^ifdef\s+(\w+)/) {
  165. print OUT $t,"if(defined(&$1)) {\n";
  166. $tab += 4;
  167. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  168. } elsif (/^ifndef\s+(\w+)/) {
  169. print OUT $t,"unless(defined(&$1)) {\n";
  170. $tab += 4;
  171. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  172. } elsif (s/^if\s+//) {
  173. $new = '';
  174. $inif = 1;
  175. expr();
  176. $inif = 0;
  177. print OUT $t,"if($new) {\n";
  178. $tab += 4;
  179. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  180. } elsif (s/^elif\s+//) {
  181. $new = '';
  182. $inif = 1;
  183. expr();
  184. $inif = 0;
  185. $tab -= 4;
  186. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  187. print OUT $t,"}\n elsif($new) {\n";
  188. $tab += 4;
  189. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  190. } elsif (/^else/) {
  191. $tab -= 4;
  192. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  193. print OUT $t,"} else {\n";
  194. $tab += 4;
  195. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  196. } elsif (/^endif/) {
  197. $tab -= 4;
  198. $t = "\t" x ($tab / 8) . ' ' x ($tab % 8);
  199. print OUT $t,"}\n";
  200. } elsif(/^undef\s+(\w+)/) {
  201. print OUT $t, "undef(&$1) if defined(&$1);\n";
  202. } elsif(/^error\s+(".*")/) {
  203. print OUT $t, "die($1);\n";
  204. } elsif(/^error\s+(.*)/) {
  205. print OUT $t, "die(\"", quotemeta($1), "\");\n";
  206. } elsif(/^warning\s+(.*)/) {
  207. print OUT $t, "warn(\"", quotemeta($1), "\");\n";
  208. } elsif(/^ident\s+(.*)/) {
  209. print OUT $t, "# $1\n";
  210. }
  211. } elsif(/^\s*(typedef\s*)?enum\s*(\s+[a-zA-Z_]\w*\s*)?\{/) {
  212. until(/\}.*?;/) {
  213. chomp($next = <IN>);
  214. $_ .= $next;
  215. print OUT "# $next\n" if $opt_D;
  216. }
  217. s@/\*.*?\*/@@g;
  218. s/\s+/ /g;
  219. /^\s?(typedef\s?)?enum\s?([a-zA-Z_]\w*)?\s?\{(.*)\}\s?([a-zA-Z_]\w*)?\s?;/;
  220. ($enum_subs = $3) =~ s/\s//g;
  221. @enum_subs = split(/,/, $enum_subs);
  222. $enum_val = -1;
  223. for $enum (@enum_subs) {
  224. ($enum_name, $enum_value) = $enum =~ /^([a-zA-Z_]\w*)(=.+)?$/;
  225. $enum_value =~ s/^=//;
  226. $enum_val = (length($enum_value) ? $enum_value : $enum_val + 1);
  227. if ($opt_h) {
  228. print OUT ($t,
  229. "eval(\"\\n#line $eval_index $outfile\\n",
  230. "sub $enum_name () \{ $enum_val; \}\") ",
  231. "unless defined(\&$enum_name);\n");
  232. ++ $eval_index;
  233. } else {
  234. print OUT ($t,
  235. "eval(\"sub $enum_name () \{ $enum_val; \}\") ",
  236. "unless defined(\&$enum_name);\n");
  237. }
  238. }
  239. }
  240. }
  241. print OUT "1;\n";
  242. $is_converted{$file} = 1;
  243. queue_includes_from($file) if ($opt_a);
  244. }
  245. exit $Exit;
  246. sub reindent($) {
  247. my($text) = shift;
  248. $text =~ s/\n/\n /g;
  249. $text =~ s/ /\t/g;
  250. $text;
  251. }
  252. sub expr {
  253. if(keys(%curargs)) {
  254. my($joined_args) = join('|', keys(%curargs));
  255. }
  256. while ($_ ne '') {
  257. s/^\&\&// && do { $new .= " &&"; next;}; # handle && operator
  258. s/^\&([\(a-z\)]+)/$1/i; # hack for things that take the address of
  259. s/^(\s+)// && do {$new .= ' '; next;};
  260. s/^(0X[0-9A-F]+)[UL]*//i && do {$new .= lc($1); next;};
  261. s/^(-?\d+\.\d+E[-+]\d+)F?//i && do {$new .= $1; next;};
  262. s/^(\d+)\s*[LU]*//i && do {$new .= $1; next;};
  263. s/^("(\\"|[^"])*")// && do {$new .= $1; next;};
  264. s/^'((\\"|[^"])*)'// && do {
  265. if ($curargs{$1}) {
  266. $new .= "ord('\$$1')";
  267. } else {
  268. $new .= "ord('$1')";
  269. }
  270. next;
  271. };
  272. # replace "sizeof(foo)" with "{foo}"
  273. # also, remove * (C dereference operator) to avoid perl syntax
  274. # problems. Where the %sizeof array comes from is anyone's
  275. # guess (c2ph?), but this at least avoids fatal syntax errors.
  276. # Behavior is undefined if sizeof() delimiters are unbalanced.
  277. # This code was modified to able to handle constructs like this:
  278. # sizeof(*(p)), which appear in the HP-UX 10.01 header files.
  279. s/^sizeof\s*\(// && do {
  280. $new .= '$sizeof';
  281. my $lvl = 1; # already saw one open paren
  282. # tack { on the front, and skip it in the loop
  283. $_ = "{" . "$_";
  284. my $index = 1;
  285. # find balanced closing paren
  286. while ($index <= length($_) && $lvl > 0) {
  287. $lvl++ if substr($_, $index, 1) eq "(";
  288. $lvl-- if substr($_, $index, 1) eq ")";
  289. $index++;
  290. }
  291. # tack } on the end, replacing )
  292. substr($_, $index - 1, 1) = "}";
  293. # remove pesky * operators within the sizeof argument
  294. substr($_, 0, $index - 1) =~ s/\*//g;
  295. next;
  296. };
  297. # Eliminate typedefs
  298. /\(([\w\s]+)[\*\s]*\)\s*[\w\(]/ && do {
  299. foreach (split /\s+/, $1) { # Make sure all the words are types,
  300. last unless ($isatype{$_} or $_ eq 'struct');
  301. }
  302. s/\([\w\s]+[\*\s]*\)// && next; # then eliminate them.
  303. };
  304. # struct/union member, including arrays:
  305. s/^([_A-Z]\w*(\[[^\]]+\])?((\.|->)[_A-Z]\w*(\[[^\]]+\])?)+)//i && do {
  306. $id = $1;
  307. $id =~ s/(\.|(->))([^\.\-]*)/->\{$3\}/g;
  308. $id =~ s/\b([^\$])($joined_args)/$1\$$2/g if length($joined_args);
  309. while($id =~ /\[\s*([^\$\&\d\]]+)\]/) {
  310. my($index) = $1;
  311. $index =~ s/\s//g;
  312. if(exists($curargs{$index})) {
  313. $index = "\$$index";
  314. } else {
  315. $index = "&$index";
  316. }
  317. $id =~ s/\[\s*([^\$\&\d\]]+)\]/[$index]/;
  318. }
  319. $new .= " (\$$id)";
  320. };
  321. s/^([_a-zA-Z]\w*)// && do {
  322. $id = $1;
  323. if ($id eq 'struct') {
  324. s/^\s+(\w+)//;
  325. $id .= ' ' . $1;
  326. $isatype{$id} = 1;
  327. } elsif ($id =~ /^((un)?signed)|(long)|(short)$/) {
  328. while (s/^\s+(\w+)//) { $id .= ' ' . $1; }
  329. $isatype{$id} = 1;
  330. }
  331. if ($curargs{$id}) {
  332. $new .= "\$$id";
  333. $new .= '->' if /^[\[\{]/;
  334. } elsif ($id eq 'defined') {
  335. $new .= 'defined';
  336. } elsif (/^\(/) {
  337. s/^\((\w),/("$1",/ if $id =~ /^_IO[WR]*$/i; # cheat
  338. $new .= " &$id";
  339. } elsif ($isatype{$id}) {
  340. if ($new =~ /{\s*$/) {
  341. $new .= "'$id'";
  342. } elsif ($new =~ /\(\s*$/ && /^[\s*]*\)/) {
  343. $new =~ s/\(\s*$//;
  344. s/^[\s*]*\)//;
  345. } else {
  346. $new .= q(').$id.q(');
  347. }
  348. } else {
  349. if ($inif && $new !~ /defined\s*\($/) {
  350. $new .= '(defined(&' . $id . ') ? &' . $id . ' : 0)';
  351. } elsif (/^\[/) {
  352. $new .= " \$$id";
  353. } else {
  354. $new .= ' &' . $id;
  355. }
  356. }
  357. next;
  358. };
  359. s/^(.)// && do { if ($1 ne '#') { $new .= $1; } next;};
  360. }
  361. }
  362. # Handle recursive subdirectories without getting a grotesquely big stack.
  363. # Could this be implemented using File::Find?
  364. sub next_file
  365. {
  366. my $file;
  367. while (@ARGV) {
  368. $file = shift @ARGV;
  369. if ($file eq '-' or -f $file or -l $file) {
  370. return $file;
  371. } elsif (-d $file) {
  372. if ($opt_r) {
  373. expand_glob($file);
  374. } else {
  375. print STDERR "Skipping directory `$file'\n";
  376. }
  377. } elsif ($opt_a) {
  378. return $file;
  379. } else {
  380. print STDERR "Skipping `$file': not a file or directory\n";
  381. }
  382. }
  383. return undef;
  384. }
  385. # Put all the files in $directory into @ARGV for processing.
  386. sub expand_glob
  387. {
  388. my ($directory) = @_;
  389. $directory =~ s:/$::;
  390. opendir DIR, $directory;
  391. foreach (readdir DIR) {
  392. next if ($_ eq '.' or $_ eq '..');
  393. # expand_glob() is going to be called until $ARGV[0] isn't a
  394. # directory; so push directories, and unshift everything else.
  395. if (-d "$directory/$_") { push @ARGV, "$directory/$_" }
  396. else { unshift @ARGV, "$directory/$_" }
  397. }
  398. closedir DIR;
  399. }
  400. # Given $file, a symbolic link to a directory in the C include directory,
  401. # make an equivalent symbolic link in $Dest_dir, if we can figure out how.
  402. # Otherwise, just duplicate the file or directory.
  403. sub link_if_possible
  404. {
  405. my ($dirlink) = @_;
  406. my $target = eval 'readlink($dirlink)';
  407. if ($target =~ m:^\.\./: or $target =~ m:^/:) {
  408. # The target of a parent or absolute link could leave the $Dest_dir
  409. # hierarchy, so let's put all of the contents of $dirlink (actually,
  410. # the contents of $target) into @ARGV; as a side effect down the
  411. # line, $dirlink will get created as an _actual_ directory.
  412. expand_glob($dirlink);
  413. } else {
  414. if (-l "$Dest_dir/$dirlink") {
  415. unlink "$Dest_dir/$dirlink" or
  416. print STDERR "Could not remove link $Dest_dir/$dirlink: $!\n";
  417. }
  418. if (eval 'symlink($target, "$Dest_dir/$dirlink")') {
  419. print "Linking $target -> $Dest_dir/$dirlink\n";
  420. # Make sure that the link _links_ to something:
  421. if (! -e "$Dest_dir/$target") {
  422. mkpath("$Dest_dir/$target", 0755) or
  423. print STDERR "Could not create $Dest_dir/$target/\n";
  424. }
  425. } else {
  426. print STDERR "Could not symlink $target -> $Dest_dir/$dirlink: $!\n";
  427. }
  428. }
  429. }
  430. # Push all #included files in $file onto our stack, except for STDIN
  431. # and files we've already processed.
  432. sub queue_includes_from
  433. {
  434. my ($file) = @_;
  435. my $line;
  436. return if ($file eq "-");
  437. open HEADER, $file or return;
  438. while (defined($line = <HEADER>)) {
  439. while (/\\$/) { # Handle continuation lines
  440. chop $line;
  441. $line .= <HEADER>;
  442. }
  443. if ($line =~ /^#\s*include\s+<(.*?)>/) {
  444. push(@ARGV, $1) unless $is_converted{$1};
  445. }
  446. }
  447. close HEADER;
  448. }
  449. # Determine include directories; $Config{usrinc} should be enough for (all
  450. # non-GCC?) C compilers, but gcc uses an additional include directory.
  451. sub inc_dirs
  452. {
  453. my $from_gcc = `$Config{cc} -v 2>&1`;
  454. $from_gcc =~ s:^Reading specs from (.*?)/specs\b.*:$1/include:s;
  455. length($from_gcc) ? ($from_gcc, $Config{usrinc}) : ($Config{usrinc});
  456. }
  457. # Create "_h2ph_pre.ph", if it doesn't exist or was built by a different
  458. # version of h2ph.
  459. sub build_preamble_if_necessary
  460. {
  461. # Increment $VERSION every time this function is modified:
  462. my $VERSION = 1;
  463. my $preamble = "$Dest_dir/_h2ph_pre.ph";
  464. # Can we skip building the preamble file?
  465. if (-r $preamble) {
  466. # Extract version number from first line of preamble:
  467. open PREAMBLE, $preamble or die "Cannot open $preamble: $!";
  468. my $line = <PREAMBLE>;
  469. $line =~ /(\b\d+\b)/;
  470. close PREAMBLE or die "Cannot close $preamble: $!";
  471. # Don't build preamble if a compatible preamble exists:
  472. return if $1 == $VERSION;
  473. }
  474. my (%define) = _extract_cc_defines();
  475. open PREAMBLE, ">$preamble" or die "Cannot open $preamble: $!";
  476. print PREAMBLE "# This file was created by h2ph version $VERSION\n";
  477. foreach (sort keys %define) {
  478. if ($opt_D) {
  479. print PREAMBLE "# $_=$define{$_}\n";
  480. }
  481. if ($define{$_} =~ /^\d+$/) {
  482. print PREAMBLE
  483. "unless (defined &$_) { sub $_() { $define{$_} } }\n\n";
  484. } else {
  485. print PREAMBLE
  486. "unless (defined &$_) { sub $_() { \"",
  487. quotemeta($define{$_}), "\" } }\n\n";
  488. }
  489. }
  490. close PREAMBLE or die "Cannot close $preamble: $!";
  491. }
  492. # %Config contains information on macros that are pre-defined by the
  493. # system's compiler. We need this information to make the .ph files
  494. # function with perl as the .h files do with cc.
  495. sub _extract_cc_defines
  496. {
  497. my %define;
  498. my $allsymbols = join " ", @Config{ccsymbols, cppsymbols, cppccsymbols};
  499. # Split compiler pre-definitions into `key=value' pairs:
  500. foreach (split /\s+/, $allsymbols) {
  501. /(.*?)=(.*)/;
  502. $define{$1} = $2;
  503. if ($opt_D) {
  504. print STDERR "$_: $1 -> $2\n";
  505. }
  506. }
  507. return %define;
  508. }
  509. 1;
  510. ##############################################################################
  511. __END__
  512. =head1 NAME
  513. h2ph - convert .h C header files to .ph Perl header files
  514. =head1 SYNOPSIS
  515. B<h2ph [-d destination directory] [-r | -a] [-l] [headerfiles]>
  516. =head1 DESCRIPTION
  517. I<h2ph>
  518. converts any C header files specified to the corresponding Perl header file
  519. format.
  520. It is most easily run while in /usr/include:
  521. cd /usr/include; h2ph * sys/*
  522. or
  523. cd /usr/include; h2ph -r -l .
  524. The output files are placed in the hierarchy rooted at Perl's
  525. architecture dependent library directory. You can specify a different
  526. hierarchy with a B<-d> switch.
  527. If run with no arguments, filters standard input to standard output.
  528. =head1 OPTIONS
  529. =over 4
  530. =item -d destination_dir
  531. Put the resulting B<.ph> files beneath B<destination_dir>, instead of
  532. beneath the default Perl library location (C<$Config{'installsitsearch'}>).
  533. =item -r
  534. Run recursively; if any of B<headerfiles> are directories, then run I<h2ph>
  535. on all files in those directories (and their subdirectories, etc.). B<-r>
  536. and B<-a> are mutually exclusive.
  537. =item -a
  538. Run automagically; convert B<headerfiles>, as well as any B<.h> files
  539. which they include. This option will search for B<.h> files in all
  540. directories which your C compiler ordinarily uses. B<-a> and B<-r> are
  541. mutually exclusive.
  542. =item -l
  543. Symbolic links will be replicated in the destination directory. If B<-l>
  544. is not specified, then links are skipped over.
  545. =item -h
  546. Put ``hints'' in the .ph files which will help in locating problems with
  547. I<h2ph>. In those cases when you B<require> a B<.ph> file containing syntax
  548. errors, instead of the cryptic
  549. [ some error condition ] at (eval mmm) line nnn
  550. you will see the slightly more helpful
  551. [ some error condition ] at filename.ph line nnn
  552. However, the B<.ph> files almost double in size when built using B<-h>.
  553. =item -D
  554. Include the code from the B<.h> file as a comment in the B<.ph> file.
  555. This is primarily used for debugging I<h2ph>.
  556. =item -Q
  557. ``Quiet'' mode; don't print out the names of the files being converted.
  558. =back
  559. =head1 ENVIRONMENT
  560. No environment variables are used.
  561. =head1 FILES
  562. /usr/include/*.h
  563. /usr/include/sys/*.h
  564. etc.
  565. =head1 AUTHOR
  566. Larry Wall
  567. =head1 SEE ALSO
  568. perl(1)
  569. =head1 DIAGNOSTICS
  570. The usual warnings if it can't read or write the files involved.
  571. =head1 BUGS
  572. Doesn't construct the %sizeof array for you.
  573. It doesn't handle all C constructs, but it does attempt to isolate
  574. definitions inside evals so that you can get at the definitions
  575. that it can translate.
  576. It's only intended as a rough tool.
  577. You may need to dicker with the files produced.
  578. Doesn't run with C<use strict>
  579. You have to run this program by hand; it's not run as part of the Perl
  580. installation.
  581. Doesn't handle complicated expressions built piecemeal, a la:
  582. enum {
  583. FIRST_VALUE,
  584. SECOND_VALUE,
  585. #ifdef ABC
  586. THIRD_VALUE
  587. #endif
  588. };
  589. Doesn't necessarily locate all of your C compiler's internally-defined
  590. symbols.
  591. =cut
  592. __END__
  593. :endofperl