From 532d4a24e2013262dfa41fd85c06a9715c99abf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 24 Oct 2022 21:03:42 +0200 Subject: New upstream version 4.7 --- doc/libHX_Documentation.rst | 142 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 doc/libHX_Documentation.rst (limited to 'doc/libHX_Documentation.rst') diff --git a/doc/libHX_Documentation.rst b/doc/libHX_Documentation.rst new file mode 100644 index 0000000..710e265 --- /dev/null +++ b/doc/libHX_Documentation.rst @@ -0,0 +1,142 @@ +=================== +libHX Documentation +=================== + +libHX collects many useful day-to-day functions, intended to reduce the amount +of otherwise repeatedly open-coded instructions. + +Overview +======== + +* Maps (key-value pairs) + + Originally created to provide a data structure like Perl's associative + arrays. Different map types and characteristics are available, such as + hash-based or the traditional rbtree. + +* Linked lists (Deques) + + Double-ended queues, implemented as a doubly-linked list with sentinels, are + suitable for both providing stack and queue functionality. + +* Inline doubly-linked list, uncounted and counted + + Light-weight linked lists as used in the Linux kernel. + +* Common string operations + + ``basename``, ``chomp``, ``dirname``, ``getl``/``getline``, ``split``, + ``strlcat``/``strlcpy``, ``strlower``/``strupper``, ``str*trim``, ``strsep``, + etc. + +* Memory container, auto-sizing string operations + + Scripting-like invocation for string handling — automatically doing + (re)allocations as needed. + +* String formatter (Format templates) + + HXfmt is a template system for by-name variable expansion. It can be used to + substitute placeholders in format strings supplied by the user by appropriate + expanded values defined by the program. + +* Directory functions + + Directory creation, traversal, removal, and file copying. + +* Option parsing + + Table-/callback-based option parser that works similar to Perl's + Getopt::Long — no open-coding but a single “atomic” invocation. + +* Shell-style config parser + + Configuration file reader for Shell-style “configuration” files + with key-value pairs, as usually foudn in ``/etc/sysconfig``. + +* Random number gathering + + Convenient wrapper that uses kernel-provided RNG devices when + available. + +* External process invocation + + Setting up pipes for the standard file descriptors for + sending/capturing data to/from a program. + +* a bit more beyond that ... Miscellaneous + + +General reading +=============== + +* `Installation `_ (if you do not have a binray package from a + distro yet) +* `History `_ remarks + + +First things first +================== + +Many functions are prefixed with ``HX_`` or ``HXsubsys_``, as are structures +(sometimes without underscores, be sure to check the syntax and names), to +avoid name clashes with possibly existing files. Functions that are not tied to +a specific data structure such as most of the string functions use the +subsystem-less prefix, ``HX_``. Functions from a clearly-defined subsystem, +such as map or deque, augment the base prefix by a suffix, forming e.g. +``HXmap_``. + +* `Library initialization `_ + + +Data structures +=============== + +* `Bitmaps `_ +* `Maps `_ +* `Linked lists `_ +* `Inline lists `_ +* `Counted inline lists `_ + + +Strings and memory +================== + +* `String operations `_ +* `Memory containers `_ +* `String formatter `_ +* Everything with `Files and directories `_ + + +Options and configuration files +=============================== + +* `Option parsing `_ +* `Shell-style config file parser `_ + + +Systems-related components +========================== + +* `Time functions `_ +* `Random numbers `_ +* `Process functions `_ + + +Miscellaneous +============= + +* `Type-checking casts `_ +* `Helper headers `_ for other software +* `Macros `_ +* `Misc functions `_ that did not fit in any other category + + +Resources +========= + +As of this writing, the repository is located at + +* git://git.inai.de/libhx — clone URL + +* https://inai.de/projects/libhx/ — home page (and link to tarballs) -- cgit v1.2.3