libfuncs is collection of code (list, queue, circular buffer, io, logging, etc.). https://georgi.unixsol.org/programs/libfuncs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Georgi Chorbadzhiyski 8fcac8dd4d Add format string attributes 4 years ago
.gitignore makefile: Add dependancy tracking. 13 years ago
LICENSE-MIT.txt The code is under MIT license. 13 years ago
Makefile build: Allow changing CC even when CROSS is set. 10 years ago
README README: Add section about development and releases. 13 years ago
TODO todo: Correct TODO items to match the library. 13 years ago
asyncdns.c The code is under MIT license. 13 years ago
asyncdns.h The code is under MIT license. 13 years ago
cbuf.c cbuf: Fix memory leaks and reduce allocations. 9 years ago
cbuf.h cbuf: Fix memory leaks and reduce allocations. 9 years ago
http_response.c The code is under MIT license. 13 years ago
http_response.h Add format string attributes 4 years ago
io.c Compile with -Wstrict-prototypes and -std=c99 13 years ago
io.h Add format string attributes 4 years ago
libfuncs.h The code is under MIT license. 13 years ago
list.c list: Fix memory leaks and reduce allocations. 9 years ago
list.h list: Fix memory leaks and reduce allocations. 9 years ago
log.c Compile with -Wstrict-prototypes and -std=c99 13 years ago
log.h Compile with -Wstrict-prototypes and -std=c99 13 years ago
misc.c The code is under MIT license. 13 years ago
misc.h The code is under MIT license. 13 years ago
queue.c queue: Fix memory leaks and reduce allocations. 9 years ago
queue.h queue: Fix memory leaks and reduce allocations. 9 years ago
server.c Check return value of freopen() because it could fail 8 years ago
server.h The code is under MIT license. 13 years ago

README

libfuncs
========
You won't find anything earth shattering here. It is just a bunch
of code that was used all over my projects, so I just extracted it
into a self contained library suitable for static compilation and
decided to release it. You'll probably find better list functions,
queue functions and just about anything than what it is here, so
be warned. The code works and it is used in production, but it is
not pretty, documented or portable. Developed and tested in Linux
environment only with very rare compilation tests under FreeBSD.

Using it
========
Clone or download libfuncs in a directory in your source tree and
look at the example Makefile bellow:

---
FUNCS_DIR = libfuncs
FUNCS_LIB = $(FUNCS_DIR)/libfuncs.a

all: prog

prog_OBJS = main.o $(FUNCS_LIB)

$(FUNCS_LIB):
$(MAKE) -s -C $(FUNCS_DIR)

prog: $(prog_OBJS)
$(CC) $(CFLAGS) $(prog_OBJS) -o prog
---

In every C file that you need to use it, add

#include "libfuncs/libfuncs.h"

Documentation
=============
There isn't any. I'm too lazy to write proper docs. Maybe some day but
until then just look at the header files.

Development
===========
The development is tracked using git. The repository is hosted at github
to get it, run the following command:

git clone git://github.com/gfto/libfuncs.git

Releases
========
Official releases can be downloaded from libfuncs home page which is

http://georgi.unixsol.org/programs/libfuncs/

Contact
=======
For patches, bug reports, complaints and so on send e-mail to

Georgi Chorbadzhiyski <georgi@unixsol.org>