% $Id: MISC.TEX 1.1 2000/01/24 10:18:52 ska Exp ska $
\section{\label{ssmisc}\subsys{misc}}

This subsystem collects a wide range of functions, that won't fit
anywhere else and are too few to make an individual subsystem of.

\subsection{String Functions}

Some functions doing repeatedly implemented work over strings are
collected here.

\begin{tabTS}
\fct{skipws} & Skips whitespaces; returns the address of the
	first non-whitespace character or the end of the string. \\
\fct{skipwd} & Skips a word; returns the address of the first
	whitespace character or the end of the string. \\
\fct{singleword} & Returns the first non-whitespace character, if the
	passed string contains exactly one word. \\
\fct{itoa10} & Transforms an integer \tok{(signed int)} value into its
	ASCII format of radix 10. \\
\fct{utoa10} & Transforms an unsigned integer \tok{(unsigned int)} value
	into its ASCII format of radix 10. \\
\fct{strnum} & Parses an ASCII integer into its binary format. The
	function supports C-style hexadecimal numbers; assembly-style
	binary, octal, decimal and hexadecimal numbers (append \verb|b|,
	\verb|o|, \verb|d| or \verb|h|); and (default) decimal numbers. \\
\fct{strbool} & Probe a string, if it is a word of a boolean state:
	\verb|false|/\verb|off|, \verb|true|/\verb|on| or
	\verb|toggle|/\verb|switch|. \\
\fct{memzero} & Fills a memory area with zeroes; used throughout  \suppl
	at places where a block of scalars -- \tok{(int)}, \tok{(short)}
	and \tok{(char)} values -- or pointers are to initialize with zero
	or \tok{NULL}. This will work on all systems, where the internal
	(binary) representation of pointers and scalars are bytes with
	all bits cleared. When porting to other systems those places can be
	easily identified and a replacement implemented, but on portable
	system to fill the block with zeroes is the most efficient variant. \\
\fct{memzerobj} & Zeroes an object; \tok{sizeof(obj)} must return the
	complete size of the object and \tok{&(obj)} must create an address
	to it. See notes to \fct{memzero()}. \\
\fct{memzerostrct} & Zeroes a structure.  See notes to \fct{memzero()}. \\
\end{tabTS}
