teach the abi check scripts to skip the DOXYGEN sections
fix the header to use #ifdef DOXYGEN and not #if DOXYGEN
use warnings;
my $in_comment = 0;
+my $in_doxygen = 0;
my $extern_C_block = 0;
while (my $LINE = <>) {
}
}
+ # find end of DOXYGEN section
+ if ($in_doxygen) {
+ if ($LINE =~ /^#\s*else(?:\s+.*)?$/) {
+ $in_doxygen = 0;
+ }
+ next;
+ }
+
# strip C++-style comments
$LINE =~ s/^(.*?)\/\/.*$/$1/;
$LINE .= " " . $LINE2;
}
+ # remove DOXYGEN sections
+ if ($LINE =~ /^#\s*ifdef\s+DOXYGEN(?:\s+.*)?$/) {
+ $in_doxygen = 1;
+ next;
+ }
+
+
# remove all preprocessor directives
next if ($LINE =~ /^#/);
#
BEGIN {
inheader=0;
+ indoxygen=0;
}
END {
}
next;
}
+ if (indoxygen) {
+ if (match($0,"^#[ \t]*else[ \t]*.*$")) {
+ indoxygen = 0;
+ }
+ next;
+ }
}
-/^static/ || /^[ \t]*typedef/ || !/^[a-zA-Z\_]/ {
+/^static/ || /^[ \t]*typedef/ || !/^[a-zA-Z\_\#]/ {
next;
}
next;
}
+/^#[ \t]*ifdef[ \t]*DOXYGEN[ \t]*.*$/ {
+ indoxygen=1;
+ next;
+}
+
# look for function headers:
{
gotstart = 0;
if ($0 ~ /^[A-Za-z_][A-Za-z0-9_]+/) {
- gotstart = 1;
+ gotstart = 1;
}
if(!gotstart) {
next;
*/
void talloc_free_children(void *ptr);
-#if DOXYGEN
+#ifdef DOXYGEN
/**
* @brief Assign a destructor function to be called when a chunk is freed.
*
void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
#endif
-#if DOXYGEN
+#ifdef DOXYGEN
/**
* @brief Untyped realloc to change the size of a talloc array.
*