On Mon, Jan 24, 2011 at 5:33 PM, Fabien Chouteau <chout...@adacore.com> wrote: > @@ -236,6 +237,55 @@ linetoc_end_simple() > EOF > } > > +#STDIO > +linetoh_begin_stdio() > +{ > + return > +} > + > +linetoh_stdio() > +{ > + local name args argnamess argc fmt > + name=$(get_name "$1") > + args=$(get_args "$1") > + argnames=$(get_argnames "$1" ",") > + argc=$(get_argc "$1") > + state=$(get_state "$1") > + fmt=$(get_fmt "$1") > + > + if [ "$argc" -gt 0 ]; then > + argnames=", $argnames" > + fi > + > + cat <<EOF > +static inline void trace_$name($args) > +{ > + printf("$name $fmt\n" $argnames);
Forgot to mention this but the generated header file needs to #include <stdio.h>. Stefan