Sign in Join
FPDoc Onlineexperiment

h2paspp - preprocessor for h2pas

h2paspp can be used as a simple preprocessor for h2pas. It removes some of the constructs that h2pas has difficulties with. h2paspp reads one or more C header files and preprocesses them, writing the result to files with the same name as the originals as it goes along. It does not accept all preprocessed tokens of C, but takes care of the following preprocessor directives:

#define symbol

Defines the new symbol symbol. Note that macros are not supported.

#if symbol

The text following this directive is included if symbol is defined.

#ifdef symbol

The text following this directive is included if symbol is defined.

#ifndef symbol

The text following this directive is included if symbol is not defined.

#include filename

Include directives are removed, unless the -I option was given, in which case the include file is included and written to the output file.

#undef symbol

The symbol symbol is undefined.

Usage

h2paspp accepts one or more filenames and preprocessed them. It will read the input, and write the output to a file with the same name unless the -o option is given, in which case the file is written to the specified file. Note that only one output filename can be given.

Options

h2paspp has a small number of options to control its behavior:

-dsymbol

Define the symbol symbol before processing is started.

-h

Emit a small helptext.

-I

Include include files instead of dropping the include statement.

-ooutfile

If this option is given, the output will be written to a file named outfile. Note that only one output file can be given.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.