Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need a general purpose library, pure C [closed]

Could you recommend a good general purpose data container library for C (pure C, not C++)? I just need basic structures, like dynamic arrays, hash tables, etc.

(Note: By "good" I mean fast + elegant interface).

like image 366
Igor Krivokon Avatar asked May 20 '09 20:05

Igor Krivokon


People also ask

Where can I find C library?

Libaries consist of a set of related functions to perform a common task; for example, the standard C library, 'libc. a', is automatically linked into your programs by the “gcc” compiler and can be found at /usr/lib/libc. a. Standard system libraries are usually found in /lib and /usr/lib/ directories.

What happened if standard library is not present in C?

Without the standard library, you're entire reliant on your own code, any non-standard libraries that might be available to you, and any operating system system calls that you might be able to interface to (which might be considered non-standard library calls).

What standard library should almost all C programs contain?

The standard input and output library is stdio. h, and you will find that you include this library in almost every program you write. It allows printing to the screen and collecting input from the user.

How many C libraries are there?

The ANSI C standard library consists of 24 C header files which can be included into a programmer's project with a single directive. Each header file contains one or more function declarations, data type definitions and macros. The contents of these header files follows.


3 Answers

Isn't Glib sufficient for your needs ? :-) developer.gnome.org/glib

like image 155
yves Baumes Avatar answered Oct 18 '22 00:10

yves Baumes


I think Dave Hanson's C Interfaces and Implementations qualifies as both fast and elegant. It includes many different kinds of containers, some string processing, multiprecision arithmetic, exceptions, a couple of different memory managers. Nice stuff.

There's a book, but you don't need to buy it to use the software.

like image 37
Norman Ramsey Avatar answered Oct 18 '22 00:10

Norman Ramsey


Apache Portable Runtime

http://apr.apache.org/

Includes modules for these areas.

  • Platform Definitions
  • Internal Memory Allocation
  • Atomic Operations
  • Dynamic Object Handling
  • Functions for manipulating the environment
  • Error Codes
  • File Information
  • File I/O Handling Functions
  • Filename Matching Functions
  • Miscellaneous library routines
  • Command Argument Parsing
  • Global Locking Routines
  • Hash Tables
  • General Purpose Library Routines
  • MMAP (Memory Map) Routines
  • Network Routines
  • Poll Routines
  • Memory Pool Functions
  • Portability Routines
  • Process Locking Routines
  • Random Functions
  • Ring Macro Implementations
  • Shared Memory Routines
  • Signal Handling
  • String routines
  • Internal APR support functions
  • Table and Array Functions
  • Condition Variable Routines
  • Thread Mutex Routines
  • Threads and Process Functions
  • Reader/Writer Lock Routines
  • Time Routines
  • User and Group ID Services
like image 33
Unknown Avatar answered Oct 18 '22 02:10

Unknown