libir - C library for misc programs



Purpose

libir is a fork of many of the utility functions I wrote as part of iroffer. libir is a refinement of those functions for use in other programs.

Download

Download the latest version for linux systems. Last updated January 2010

APIs

Full documentation is provided in libir.h. Notible features are summarized below:

Misc
min2()/min3()/max2()/max3()/between()/floor()/ceiling() - what you would expect
set_socket_nonblocking() - wrapper around fcntl()
is_fd_readable()/is_fd_writeable() - what you would expect

ir_list - Doublely linked list
Link listed APIs with sorting, iteration, and searching

ir_boutput - Buffered non-blocking writes
Buffered character based FIFO APIs for nonblocking sockets or stdio