tags:

views:

400

answers:

6

I'm looking for a good collection of libraries for ANSI-C, stuff for handling vectors, hash maps, binary tress, string processing, etc.

+12  A: 

Try glib? It's used by GTK+, but it can also be used on other platforms. You can also try Apache APR, which is used by the Apache web server and some of their other C components, or NSPR, which is used by Mozilla projects in C.

blwy10
The problem with glib is that everything has been g'd to death, with all kinds of unnecessary junk like gint and gchar, and once your program is written using this library, it's almost like using some kind of dialect of C. It has a lot of useful functions in it though.
Kinopiko
That's unfortunately a fact of life with C. The ANSI C89 standard didn't specify exact sizes for types, so libraries that need them have always had to invent their own. c.f. OpenGL, Win32, etc... Very, very few large APIs are written to the core types.
Andy Ross
+2  A: 

You might also find this question useful:

http://stackoverflow.com/questions/305611/container-class-library-for-c

As well, this book might be interesting:

Mastering Algorithms with C

The full source code is on the CD and it has code for most of those data structures and algorithms.

BobbyShaftoe
+3  A: 

gnu's glib collection. furthermore, it's portable for many platforms.

EffoStaff Effo
+1  A: 

check also gnulib's data structures. This library also provides many other features as well as portable layer to ANSI/non-ANSI compilers and POSIX/non-POSIX systems.

dfa
A: 

checkout http://www.invincibleideas.com/library.asp

Arup Hore
A: 

GLUT OpenGL I can recommend for very flexible C (graphics) development

LarsOn