chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Things I forgot [Was: the future of Chicken]


From: Perry E. Metzger
Subject: Re: [Chicken-users] Things I forgot [Was: the future of Chicken]
Date: 11 Aug 2002 09:57:26 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Peter Keller <address@hidden> writes:
> I'm well familiar with C idiosyncracies (I write C/C++ for a living) and
> even so it is still wierdly layed out.

Not really. It is all very ordinary. For example:

  int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);

does exactly what you'd expect: adds a to b and puts the result in r,
returning a 1 for success or a 0 for an error. (You could guess that
from the function signature even without the man page.)

All the other routines are almost identically straightforward.

The code is pretty straightforward, too.

The only thing unusual about the whole thing is the BN_CTX stuff,
which is actually very useful in a Lisp context. The routines that
need temporaries require that you allocate them elsewhere and pass
them in as arguments. This is good -- since the routines never use
malloc() themselves, it is trivial to convert them all to use heap
allocated storage.

If you want, I'll happily do all the C hacking if you do the Chicken
hacking -- I'm not really comfortable with the Chicken to C interfaces
but I'm comfortable with the rest of this.

> > Just read the man pages (for instance, "man BN_add")
> 
> I would, but I get an syntax error in the middle of installing the
> documentation. :( I suppose I have to debug it.

I can give you .mdoc versions of all of them if you like.

-- 
Perry E. Metzger                address@hidden
--
"Ask not what your country can force other people to do for you..."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]