[Top][All Lists]

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

Re: [Adonthell-devel] Adonthell File Format

From: Klaus Blindert
Subject: Re: [Adonthell-devel] Adonthell File Format
Date: Wed, 5 Aug 2009 15:51:03 +0200

On Mittwoch 05 August 2009 15:01:30 Kai Sterker wrote:
> On Wed, Aug 5, 2009 at 11:51 AM, Klaus Blindert<address@hidden>
> > One important question is the license. I would prefer to
> > put the result under the LGPL. It's a library after all.
> >
> > That requires your permission, though.
> AFAIK, LGPL allows non-(L)GPLd applications to (statically) link
> against the code. Whereas you could link dynamically even to GPL code.
> (?)
> I personally don't see any problem with this, as any modifications to
> the code must still be released under LGPL even then.
> So go ahead and use those parts of the code that I have written. The
> only file you might need that isn't written by me would be the
> interface to zlib (in base/file.h|.cc). It's written by Alex, so you'd
> probably need his okay too.

That's fine.

> > Another part is that the API will change a little.
> > But I'll come back with that once a useable package is done.
> Might also go through the code and clean it up a bit. Memory
> management is a bit odd, as it's copying chunks of memory instead of
> just pointing to them.
> Kai

At the moment I don't care about speed or memory issues.
Those are implementation details anyway.
The 'flat' is fast enough as it is :)

However as for the API, I have a few questions:

What purpose does the T_CHAR type serve?
It's basically a duplicate of the s_int8.

Did you ever use the T_BLOB type? I think it's
dangerous and should go ...

I'd rather add typed arrays T_SINT16_ARRAY and so on
instead of that.

Finally, I found the "optional" argument cumbersome to use.
I'll replace that by two functions, one with an default value,
one without.

u_int32 abf_get_uint32 (abf_flat_t* flat, const char* name);
u_int32 abf_getopt_uint32 (abf_flat_t* flat, const char* name,
u_int32 _default);

(First I'm writing a C library. ABF stands for adonthell binary format.)

Thanks for your quick replies!


ps: sorry for the duplicate.

reply via email to

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