Generic Library for C.

M

marty

Folks,

Any suggestions for a generic library to do linked lists, hashes and the
sort. I have tried libds and it seems to do my job ok. It will be used in
closed source software (not my choice). I think from the license with
libds that is ok.

If you have any suggestions on a better library to use then please let me
know.

thanks,
Martin.
 
C

CBFalconer

marty said:
Any suggestions for a generic library to do linked lists, hashes
and the sort. I have tried libds and it seems to do my job ok.
It will be used in closed source software (not my choice). I
think from the license with libds that is ok.

If you have any suggestions on a better library to use then
please let me know.

My hashlib handles the hashing, and the demonstration programs
include linked lists and sorting. hashlib is under GPL, but under
suitable conditions (spelled $) I can be persuaded to issue other
licenses. Of course if you GPL your own software that uses it you
don't need any expense.

<http://cbfalconer.home.att.net/download/hashlib.zip>
 
J

Jonathan Bartlett

Any suggestions for a generic library to do linked lists, hashes and the
sort. I have tried libds and it seems to do my job ok. It will be used in
closed source software (not my choice). I think from the license with
libds that is ok.

Try GLIB:

http://www.gtk.org/

You don't have to use the GUI stuff -- GLIB is all just simplified C
programming.

Jon
 
G

Greg Rowe

Marian said:
Check http://www.xref-tech.com/sglib useful especially
if you need to keep your allocations/freeing under
your control.

I'm not trying to knock sglib in any way but glib does allow you to at
least specify allocation/deallocation functions. I ran into a need for
this recently using glib + the Boehm garbage collector.

Greg
 
R

Roger Leigh

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


And don't forget GObject!
I thought something like gtk would require me to opensource any code linked
against it?

Did you actually read the licence? It's LGPL.


- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFCb9g8VcFcaSW/uEgRAgCLAKDZVl5W53QK2+ln9bKYC5RCCMeimwCgqmaT
LCiDqlwReDItECvB22wRovo=
=8NSy
-----END PGP SIGNATURE-----
 
D

Daniel Haude

On Wed, 27 Apr 2005 19:21:50 +0100,
in Msg. said:
And don't forget GObject!

Aaargh! The moment you feel compelled to actually make use of GObject is
the moment to switch to C++. By the time you have understood how to define
a class in GObject you'll have mastered quite a bit of C++ (just a guess;
I've not been able to wrap my head around GObject yet and quit trying).

I use Gtk+ for GUI programming in C, but that's OK because I don't get to
see much of GObject that way.

But this is OT.

--Daniel
 
R

Roger Leigh

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Haude said:
On Wed, 27 Apr 2005 19:21:50 +0100,


Aaargh! The moment you feel compelled to actually make use of GObject is
the moment to switch to C++. By the time you have understood how to define
a class in GObject you'll have mastered quite a bit of C++ (just a guess;
I've not been able to wrap my head around GObject yet and quit trying).

I came back to C from C++, primarily because of GObject. You are
correct, though: knowing C++ (or Objective C) helps understand it,
since you need to know the internals of how the C++ runtime works in
order to comprehend the details of GObject (fixing up the vtable,
chaining up constructors, virtual calls, etc.).

I was certainly well out of my depth until I had mastered C++, but my
C skills are much better as a result.

You might find these useful:
http://www.le-hacker.org/papers/gobject/
http://people.debian.org/~rleigh/gtk/ogcalc/
I use Gtk+ for GUI programming in C, but that's OK because I don't
get to see much of GObject that way.

You use it every time you connect a signal, or instantiate an object.
You also don't realise the full potential of GTK+ unless you derive
from the standard widgets, or create your own from scratch. Trivial
example: in most of my code, my top-level "application" object derives
from GtkWindow.
But this is OT.

ACK. Followup set.


Regards,
Roger

- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFCci74VcFcaSW/uEgRAuzpAJ9kVjr26VU/NfAnXT2HvMCGu9fZAACfUJ5U
4+pbCzIT4dhoN7gjF1ICSdg=
=iZN3
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,163
Messages
2,570,897
Members
47,434
Latest member
TobiasLoan

Latest Threads

Top