On Sat, 18 Dec 1999 19:37:29 +1100, the world broke into rejoicing as
Robert Graham Merkel <[EMAIL PROTECTED]> said:
> I'm currently working on a transaction report, which I intend to use
> as a test case for the improved reporting infrastructure discussed
> previously on the list.
>
> As it turns out, all I need to do is print out a list of the splits
> in a particular account - with some filterting, ordering, and
> formatting frippery.
>
> Account.h contains the C functions I need to get this information -
> xaccAccountGetSplit, xaccAccountGetSplitList, and
> XaccAccountGetNumSplits. These are all fine and dandy, but to be any
> use to me I need a Scheme interface to these functions.
>
> How do I find if the function I need is already wrapped, and how
> do I wrap C functions for Scheme? There's some info on this in
> the Guile documentation, but which files do I need to place what in
> for this to work?
The file in which the wrapping is defined is .../src/g-wrap/gnc.gwp
If you look in it, you'll find that these are, respectively, mapped
to:
a) (gnc:account-get-split account index)
b) (gnc:account-get-split-list account)
c) (gnc:account-get-split-count account)
They are reasonably good examples of how to wrap C functions, as they
have a diverse set of arguments/return values. It would be a good
move to change the documentation strings to something more useful than
the present "Undocumented."
Note that a documentation file, gnc.html gets "compiled" out of the
data in gnc.gwp, and is also well worth looking at.
--
UNIX *is* user friendly. It's just selective about who its friends
are...
[EMAIL PROTECTED] - <http://www.ntlug.org/~cbbrowne/lsf.html>
--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]