From: Richard Kettlewell Date: Sat, 6 Aug 2011 15:39:58 +0000 (+0100) Subject: protogen: comments. X-Git-Tag: branchpoint-5.1~22^2~12 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/commitdiff_plain/ea9f5de5f3e64810a64543b04fe2f86ec9d97654 protogen: comments. --- diff --git a/scripts/protocol b/scripts/protocol index c3eb6f3..6bf9126 100755 --- a/scripts/protocol +++ b/scripts/protocol @@ -43,6 +43,9 @@ use strict; our @h = (); our @c = (); +# Write(PATH, LINES) +# +# Write array ref LINES to file PATH. sub Write { my $path = shift; my $lines = shift; @@ -55,6 +58,10 @@ sub Write { # Command classes ------------------------------------------------------------- +# c_in_decl([TYPE, NAME]) +# +# Return the C declaration for an input parameter of type TYPE with +# name NAME. sub c_in_decl { my $arg = shift; @@ -72,6 +79,10 @@ sub c_in_decl { } } +# c_out_decl([TYPE, NAME]) +# +# Return the C declaration for an output (reference) parameter of type +# TYPE with name NAME. sub c_out_decl { my $arg = shift; @@ -98,6 +109,9 @@ sub c_out_decl { } } +# c_param_docs([TYPE, NAME}) +# +# Return the doc string for a C input parameter. sub c_param_docs { my $args = shift; my @d = (); @@ -113,6 +127,9 @@ sub c_param_docs { return @d; } +# c_param_docs([TYPE, NAME}) +# +# Return the doc string for a C output parameter. sub c_return_docs { my $return = shift; return () unless defined $return;