The C language does not have core support for simple operations such as input/output or string handling. This is instead provided by a “standard C library”, the ABLE implementation of this standard is referred to as the ABLE C Library (or just the C library).
The ABLE C library is a collection of headers and binary library components which provide not only the ISO “standard C library” but also additional elements for some POSIX functions. The library is not however completely conformant to a specific standard.
The ABLE implementations of some of this functionality may be limited or missing. These limits or omissions are primarily due to the limited environment which a bootloader can reasonably be expected to provide. The ABLE C library documentation packages contain a set of files describing each provided function in detail.
Table 21.1. ISO headers provided in ABLE C library
Header | Contents |
---|---|
assert.h | Contains the assert macro, used to assist with detecting logical errors and other types of bug in debugging versions of a program. |
ctype.h | Contains functions used to classify characters by their types or to convert between upper and lower case in a way that is independent of the used character set. |
errno.h | For testing error codes reported by library functions. |
float.h | Contains defined constants specifying the implementation-specific properties of the floating-point library. |
inttypes.h | For precise conversion between integer types. |
limits.h | Contains defined constants specifying the implementation-specific properties of the integer types. |
locale.h | For setlocale() and related constants. This is used to choose an appropriate locale. |
math.h | For computing common mathematical functions |
setjmp.h | Declares the macros setjmp and longjmp, which are used for non-local exits |
signal.h | For controlling various exceptional conditions |
stdarg.h | For accessing a varying number of arguments passed to functions. |
stdbool.h | For a boolean data type. |
stdint.h | For defining various integer types. |
stdio.h | Provides the core input and output capabilities of the C language. |
stdlib.h | For performing a variety of operations, including conversion, pseudo-random numbers, memory allocation, process control, environment, signalling, searching, and sorting. |
string.h | For manipulating several kinds of strings. |
time.h | For converting between various time and date formats. |
wchar.h | For manipulating strings using wide characters. Support within ABLE is extremely limited. |
wctype.h | For classifying wide characters. |
ABLE also supports a variety of non standard additional
interfaces. These include a GNU compatible
getopt
implementation, a simple
readline
implementation and a basic TCP/IP
sockets interface.
Table 21.2. Additional headers available in ABLE libc
Header | Contents |
---|---|
alloca.h | The alloca function allows memory to be allocated from the stack. |
fcntl.h | Routines to manipulate file descriptors. |
libintl.h | Internationalisation support for text strings, this is a stub and only supports the ASCII english representation. |
netdb.h | Definitions and structures for using DNS nam eresolution. |
poll.h | Definitions and structures for the poll call. |
strings.h | BSD style string manipulation. |
dirent.h | Directory entry manipulation. |
getopt.h | Provide access to the long format
getopt calls. |
regex.h | Functions and sructures for regular expression handling. |
err.h | Non standard BSD error display routines, implementations may be incomplete. |
iconv.h | character set conversions, limited support for ASCII, UTF-8, ISO88591 and CP437 character sets. |
malloc.h | Dynamic memory allocation and manipulation routines. |
unistd.h | Access to UNIX® standard routines. |
Additional packages provide a set of “core” libraries which include zlib for compression support, libpng for png image support and libjpeg for using jpeg images.