* snarf .h files
@ 2011-11-23 17:56 Mike Gran
2011-11-23 18:12 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Mike Gran @ 2011-11-23 17:56 UTC (permalink / raw)
To: Guile User
Hi-
Is there a script that will scrape SCM_DEFINEs from c files
to make header declarations to put in .h files?
Basically to search for c file definitions like this...
SCM_DEFINE (cfunc, "gfunc", 1, 0, 0, (SCM arg), "a function");
and return header declarations like this
SCM cfunc (SCM arg);
(It is an easy problem, but, I figured I'd be lazy and
ask.)
Thanks,
Mike Gran
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: snarf .h files
2011-11-23 17:56 snarf .h files Mike Gran
@ 2011-11-23 18:12 ` Ludovic Courtès
2011-11-24 4:23 ` Mike Gran
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2011-11-23 18:12 UTC (permalink / raw)
To: guile-user
Hi Mike,
Mike Gran <spk121@yahoo.com> skribis:
> Basically to search for c file definitions like this...
>
> SCM_DEFINE (cfunc, "gfunc", 1, 0, 0, (SCM arg), "a function");
>
> and return header declarations like this
>
> SCM cfunc (SCM arg);
There’s no such tool AFAIK, but you can always come up with one. :-)
The tools at
<http://git.savannah.gnu.org/cgit/gnutls.git/tree/guile/modules/system/documentation>
could serve as a starting point, I think.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: snarf .h files
2011-11-23 18:12 ` Ludovic Courtès
@ 2011-11-24 4:23 ` Mike Gran
2011-11-24 23:29 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Mike Gran @ 2011-11-24 4:23 UTC (permalink / raw)
To: Ludovic Courtès, guile-user@gnu.org
> From: Ludovic Courtès <ludo@gnu.org>
>> Basically to search for c file definitions like this...
>>
>> SCM_DEFINE (cfunc, "gfunc", 1, 0, 0, (SCM arg), "a function");
>>
>> and return header declarations like this
>>
>> SCM cfunc (SCM arg);
>
>There’s no such tool AFAIK, but you can always come up with one. :-)
Cool. I was able to cobble something together.
>The tools at
><http://git.savannah.gnu.org/cgit/gnutls.git/tree/guile/modules/system/documentation>
>could serve as a starting point, I think.
There's a argument ordering bug in your output.scm. The procedure
run-cpp-and-extract-snarfing expects (1) file, (2) cpp, (3) cpp-flags
but it is passed (2) cpp, (1) c-file, (3) cflags from within
output-procedure-texi-documentation-from-c-file.
Thanks,
Mike
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: snarf .h files
2011-11-24 4:23 ` Mike Gran
@ 2011-11-24 23:29 ` Ludovic Courtès
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2011-11-24 23:29 UTC (permalink / raw)
To: Mike Gran; +Cc: guile-user@gnu.org
Hey,
Mike Gran <spk121@yahoo.com> skribis:
>> From: Ludovic Courtès <ludo@gnu.org>
>
>>> Basically to search for c file definitions like this...
>>>
>>> SCM_DEFINE (cfunc, "gfunc", 1, 0, 0, (SCM arg), "a function");
>>>
>>> and return header declarations like this
>>>
>>> SCM cfunc (SCM arg);
>>
>>There’s no such tool AFAIK, but you can always come up with one. :-)
>
>
> Cool. I was able to cobble something together.
>
>
>>The tools at
>><http://git.savannah.gnu.org/cgit/gnutls.git/tree/guile/modules/system/documentation>
>>could serve as a starting point, I think.
>
> There's a argument ordering bug in your output.scm. The procedure
>
> run-cpp-and-extract-snarfing expects (1) file, (2) cpp, (3) cpp-flags
> but it is passed (2) cpp, (1) c-file, (3) cflags from within
>
> output-procedure-texi-documentation-from-c-file.
Oh nice. :-) This one is actually unused, though.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-24 23:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 17:56 snarf .h files Mike Gran
2011-11-23 18:12 ` Ludovic Courtès
2011-11-24 4:23 ` Mike Gran
2011-11-24 23:29 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).