*
* @param c Client
* @param addressp Where to store hostname or address
+ * @param portp Where to store service name or port number
* @return 0 on success, non-0 on error
*/
int disorder_rtp_address(disorder_client *c, char **addressp, char **portp);
*
* @param c Client
* @param leftp Left channel volume
+ * @param rightp Right channel volume
* @return 0 on success, non-0 on error
*/
int disorder_get_volume(disorder_client *c, long *leftp, long *rightp);
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,