473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Generic Library for C.

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.
Nov 14 '05 #1
9 1645
marty wrote:

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>

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #2
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
----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017
Nov 14 '05 #3
Check http://www.xref-tech.com/sglib useful especially
if you need to keep your allocations/freeing under
your control.

Marian Vittek

Nov 14 '05 #4
Marian wrote:
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

--
Home is where the .bashrc is.
Nov 14 '05 #5
Jonathan Bartlett wrote:
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
----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017


I thought something like gtk would require me to opensource any code linked
against it?
Nov 14 '05 #6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

marty <ma***@btinternet.com> writes:
Jonathan Bartlett wrote:
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.


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-----
Nov 14 '05 #7
In article <87************@hardknott.home.whinlatter.ukfsn.or g>,
${*******@invalid.whinlatter.ukfsn.org.invalid says...
I thought something like gtk would require me to opensource any code linked
against it?


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


Yeah, it's still a PITA if you want to statically link.

--
Randy Howard (2reply remove FOOBAR)
"Making it hard to do stupid things often makes it hard
to do smart ones too." -- Andrew Koenig
Nov 14 '05 #8
On Wed, 27 Apr 2005 19:21:50 +0100,
Roger Leigh <${*******@invalid.whinlatter.ukfsn.org.invalid> wrote
in Msg. <87************@hardknott.home.whinlatter.ukfsn.or g>
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
Nov 14 '05 #9
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Haude <ha***@kir.physnet.uni-hamburg.de> writes:
On Wed, 27 Apr 2005 19:21:50 +0100,
Roger Leigh <${*******@invalid.whinlatter.ukfsn.org.invalid> wrote
in Msg. <87************@hardknott.home.whinlatter.ukfsn.or g>
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 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-----
Nov 14 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: gong | last post by:
hi i recently looked at alexandrescu's book on c++, and i found it pretty much unintelligible. i have a few points which i wonder about. 1. as a developer, it is important, from a bottom line...
4
by: Michael Kennedy [UB] | last post by:
Hi Everyone, I have this multithreaded C# windows forms application which does a lot of image processing. Occasionally, I get the following error: A generic error occurred in GDI+....
0
by: Dave | last post by:
Hello all, I have recently completed work on a generic implementation of a state space search library (standard C++ only). I have also written a toy client application - the classic 8 puzzle -...
17
by: Andreas Huber | last post by:
What follows is a discussion of my experience with .NET generics & the ..NET framework (as implemented in the Visual Studio 2005 Beta 1), which leads to questions as to why certain things are the...
0
by: Peter Sestoft | last post by:
C5 is a comprehensive library of generic collection classes for the upcoming version 2.0 of the .Net platform (C#, VB.Net) C5 extends the standard System.Collections.Generic namespace with tree...
4
by: Mitchel Haas | last post by:
Hello, Feeling a need for a generic tree container to supplement the available containers in the STL, I've created a generic tree container library (TCL). The library usage is very much like...
3
by: markww | last post by:
Hi, I have a wrapper around some 3rd party database library function. The pseudo code looks like the following - it is meant to open a table in a database, extract values from a table, then copy...
5
by: Torben Laursen | last post by:
I am writing a COM in C# using visual studio 2005 and VSTO. Inside the code I use some support classes that are generic but they are not used in the inferface of the COM. However I still get a...
0
by: epoxyparser | last post by:
Hi all, I work as a glue coder and often have to interface existing mechanisms with other platforms. Creating bridge code between command-line functionality and desktop GUIs takes up a lot of that...
3
by: Łukasz | last post by:
I have project that uses managed c++ where I use c - library, this library contains some variables named generic, during compilation I get error: Error 1 error C2146: syntax error : missing ';'...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.