NAME

C::Scan - scan C language files for easily recognized constructs.

DESCRIPTION

Service

includes

Arguments: filename, optional string with "defines" to use, and optional reference to a list of include directories.

Output: list of included files.

defines_maybe

Argument: filename.

Output: reference to a list containing reference to hash of macros without arguments, and reference to hash of macros with arguments. The values of the second hash are references to an array of length 2, the first element is a reference to the list of arguments, the second one being the expansion. Both have newlines unescaped, thus

#define A B
#define C(x,y) E\
               F

will finish with the first hash being ("A" => "B"), the second one with ("C" => [ ["x", "y"], "E\nF"]).