sub c_return_docs {
my $returns = shift;
return () unless defined $returns;
+ my @docs = ();
for my $return (@$returns) {
my $type = $return->[0];
my $name = $return->[1];
or $type eq 'integer'
or $type eq 'time'
or $type eq 'boolean') {
- return (" * \@param ${name}p $descr\n");
+ push(@docs,
+ " * \@param ${name}p $descr\n");
} elsif($type eq 'list' or $type eq 'body') {
- return (" * \@param ${name}p $descr\n",
- " * \@param n${name}p Number of elements in ${name}p\n");
+ push(@docs,
+ " * \@param ${name}p $descr\n",
+ " * \@param n${name}p Number of elements in ${name}p\n");
} elsif($type eq 'pair-list') {
- return (" * \@param ${name}p $descr\n");
+ push(@docs,
+ " * \@param ${name}p $descr\n");
} elsif($type eq 'queue' or $type eq 'queue-one') {
- return (" * \@param ${name}p $descr\n");
+ push(@docs,
+ " * \@param ${name}p $descr\n");
} elsif($type eq 'user') {
- return ();
+ # nothing
} else {
die "$0: c_return_docs: unknown type '$type'\n";
}
}
+ return @docs;
}
# simple(CMD, SUMMARY, DETAIL,
push(@h, @generated, @gpl,
"#ifndef CLIENT_STUBS_H\n",
"#define CLIENT_STUBS_H\n",
+ "/** \@file lib/client-stubs.h\n",
+ " * \@brief Generated client API\n",
+ " *\n",
+ " * Don't include this file directly - use \@ref lib/client.h instead.\n",
+ " */\n",
"\n");
push(@c, @generated, @gpl,
+ "/** \@file lib/client-stubs.c\n",
+ " * \@brief Generated client API implementation\n",
+ " */\n",
"\n");
push(@ah, @generated, @gpl,
"#ifndef ECLIENT_STUBS_H\n",
"#define ECLIENT_STUBS_H\n",
+ "/** \@file lib/client-stubs.h\n",
+ " * \@brief Generated asynchronous client API\n",
+ " *\n",
+ " * Don't include this file directly - use \@ref lib/eclient.h instead.\n",
+ " */\n",
"\n");
push(@ac, @generated, @gpl,
+ "/** \@file lib/client-stubs.c\n",
+ " * \@brief Generated asynchronous client API implementation\n",
+ " */\n",
"\n");
# The protocol ----------------------------------------------------------------