c-scan-conditionals

c-scan-conditionals is a compiled Lisp function in `cc-cmds.el'.

(c-scan-conditionals COUNT &optional TARGET-DEPTH WITH-ELSE)

Scan forward across COUNT preprocessor conditionals.
With a negative argument, scan backward across preprocessor
conditionals. Return the end position. Point is not moved.

If there aren't enough preprocessor conditionals, throw an error.

"#elif" is treated like "#else" followed by "#if", except that
the nesting level isn't changed when tracking subconditionals.

The optional argument TARGET-DEPTH specifies the wanted nesting depth
after each scan. E.g. if TARGET-DEPTH is -1, the end position will be
outside the enclosing conditional. A non-integer non-nil TARGET-DEPTH
counts as -1.

If the optional argument WITH-ELSE is non-nil, "#else" directives
are treated as conditional clause limits. Normally they are ignored.