Programmers 'C' library of functions for: resizable strings, file and network access, string tokenization, pattern matching, terminal output, etc, etc
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
CommandLineParser.c
CommandLineParser.h
Compression.c
Compression.h
ConnectionChain.c
ConnectionChain.h
DataParser.c
DataParser.h
DataProcessing.c
DataProcessing.h
Encodings.c
Encodings.h
Errors.c
Errors.h
Expect.c
Expect.h
FileSystem.c
FileSystem.h
GeneralFunctions.c
GeneralFunctions.h
Hash.c
Hash.h
Http.c
Http.h
LICENCE
LibSettings.c
LibSettings.h
List.c
List.h
Log.c
Log.h
Makefile
Makefile.in
Markup.c
Markup.h
OAuth.c
OAuth.h
OpenSSL.c
OpenSSL.h
PatternMatch.c
PatternMatch.h
Process.c
Process.h
Pty.c
Pty.h
Quickstart.txt
README
RawData.c
RawData.h
SecureMem.c
SecureMem.h
Smtp.c
Smtp.h
Socket.c
Socket.h
SpawnPrograms.c
SpawnPrograms.h
Ssh.c
Ssh.h
Stream.c
Stream.h
String.c
String.h
Terminal.c
Terminal.h
Time.c
Time.h
Tokenizer.c
Tokenizer.h
URL.c
URL.h
Unicode.c
Unicode.h
UnixSocket.c
UnixSocket.h
Vars.c
Vars.h
base64.c
base64.h
configure
configure.ac
crc32.c
crc32.h
defines.h
includes.h
inet.c
inet.h
install-sh
jh_ref.c
jh_ref.h
libUseful.h
md5-global.h
md5.h
md5c.c
sha1.c
sha1.h
sha2.c
sha2.h
whirlpool.c
whirlpool.h

README

libUseful - a 'C' library of useful functions. 
-----------------------------------------------

libUseful provides a range of functions that simplify common programming tasks in 'C', particularly networking and communications. It hides the complexities of sockets, openssl, zlib, pseudoterminals, http, etc and provides commonly needed functionality like resizeable strings, linked lists and maps. 

libUseful has been compiled and used on various linux and freebsd systems.

Install
-------

should be as simple as:

./configure --prefix=/usr/local --enable-ssl --enable-ip6 
make
make install

.h files will be copied to <prefix>/include/libUseful-3.0

On linux a few linux-specific functions can be activated via configure:

--enable-sendfile   enable kernel-level 'fastcopy' within the STREAMSendFile function

On intel systems some MMX/SSE/SSE2 features can be turned on by

--enable-simd=<level>    where level is one of 'mmx', 'sse' or 'sse2'

the major use of --enable-simd is SSE2 cache hinting in the list/map system, which can prevent large lists from poisoning the cache and so improve program performance.

Compiler Flags
--------------

If libUseful is compiled with openssl support then you need to pass the following library flags to gcc when you compile your programs

gcc -o myProg myProg.c -lUseful-2.8 -lssl -lcrypto -lz

If openssl is not used (libUseful compiled with --disable-ssl), but zlib is used then the flags are

gcc -o myProg myProg.c -lUseful-2.8 -lssl -lcrypto -lz

If neither zlib or openssl functionality is used in libUseful, then the flags are just

gcc -o myProg myProg.c -lUseful-2.8 


IPv6 support
------------

Please note that, due to the author's lack of access to IPv6 networks the IPv6 functionality has not been extensively tested.


Documentation
-------------

Please read Quickstart.md for an overview of core paradigms of using libUseful. Individual functions are documented in the .h header files.


Author
------
libUseful is (C) 2009 Colum Paget. It is released under the GPLv3 so you may do anything with them that the GPL allows.

Email: colums.projects@gmail.com


DISCLAIMER
----------
This is free software. It comes with no guarentees and I take no responsiblity if it makes your computer explode or opens a portal to the demon dimensions, or does anything.