README for ui-utilcpp
=====================

Abstract
--------

A toolbox-like C++ library, with a diverse set of utilities:

* Exception: Generic Exception classes and THROW macros.
* Sys: C++ "exception" wrappers for a wide range of system C functions.
* Cap: Capabilities C++ wrapper.
* CharsetMagic: Charset guessing.
* Recoder: Charset recoding.
* Time: Misc date and time utilities.
* File: Misc file utilities.
* Text: Misc string utilities.
* http/: Minimal HTTP implementiation.
* PosixRegex: Simple wrapper for C 'regexec'.
* QuotaInfo: Wrapper to fs quota information.
* SMLog[Mono]: Syslog Macro Log.
* Socket: Simple Socket abstraction (inet+unix).
* Thread: Process based pseudo thread abstraction.
* CmdLine: Create CLI-like programs.
* GetOpt: Abstraction of GNU C getopt_long(3).

Copyright (c) 2001-2014 United Internet AG, under LGPLv3.


LFS support since 1.8.3
-----------------------

Since 1.8.3, ui-utilcpp is compiled with large file system
support. This is potentially harmful if you are mixing
ui-utilcpp (especially the wrappers in namespace Sys) C call
wrappers with your own C code.

To be on the safe side, also compile your project with LFS
support. For autotools, it's as simple as adding::

	AC_SYS_LARGEFILE

to your configure.ac. You should also check that your are
actually using 1.8.3 or better; with m4-macros from "ui-auto",
this looks like::

	UI_CHECK(ui_utilcpp, ui-utilcpp, 1, 8, 3, 9, 0, 0)

(You can craft your own check w/o ui-auto using the
'ui-utilcpp-version' script).


Upgrading from 1.0
------------------

-> Includes:

Old                         New

ToolboxSys                  Some of File, Thread, Time, Text.
ToolboxCPP                  Some of Text, Time, File.
ToolboxSTL                  Some of Text, Time, File, Misc.

-> Interface changes:

strtok: Separator must be changed from char ('.') to std::string
(",").

-> Exceptions:

All catch() blocks must be updated. In the simplest case, the old
exception handler can be replaced by

catch (UI::Util::Exception const & e)
{
	std::cerr << e.what() << std::endl; // or whatever
}

For diversed error handling, use the respective exception classes if
needed.
