OFStandard Class Reference

A class for various helper functions. More...

List of all members.

Public Types

enum  E_MarkupMode { MM_HTML, MM_HTML32, MM_XHTML, MM_XML }
 Markup language mode. More...

Static Public Member Functions

static size_t strlcpy (char *dst, const char *src, size_t siz)
 This function copies up to size - 1 characters from the NUL- terminated string src to dst, NUL-terminating the result.
static size_t strlcat (char *dst, const char *src, size_t siz)
 This function appends the NUL-terminated string src to the end of dst.
static const char * strerror (const int errnum, char *buf, const size_t buflen)
 convert a given error code to a string.
static OFStringtoUpper (OFString &result, const OFString &value)
 returns the upper-case version of a given string
static OFStringtoUpper (OFString &value)
 returns the upper-case version of a given string.
static OFStringtoLower (OFString &result, const OFString &value)
 returns the lower-case version of a given string
static OFStringtoLower (OFString &value)
 returns the lower-case version of a given string.
static OFBool pathExists (const OFString &pathName)
 check whether the given path exists.
static OFBool fileExists (const OFString &fileName)
 check whether the given file exists.
static OFBool dirExists (const OFString &dirName)
 check whether the given directory exists.
static OFBool isReadable (const OFString &pathName)
 check whether the given path is readable.
static OFBool isWriteable (const OFString &pathName)
 check whether the given path is writeable.
static OFStringgetDirNameFromPath (OFString &result, const OFString &pathName, const OFBool assumeDirName=OFTrue)
 get directory name component from given path name.
static OFStringgetFilenameFromPath (OFString &result, const OFString &pathName, const OFBool assumeFilename=OFTrue)
 get file name component from given path name.
static OFStringnormalizeDirName (OFString &result, const OFString &dirName, const OFBool allowEmptyDirName=OFFalse)
 normalize the given directory name.
static OFStringcombineDirAndFilename (OFString &result, const OFString &dirName, const OFString &fileName, const OFBool allowEmptyDirName=OFFalse)
 combine the given directory and file name.
static OFCondition removeRootDirFromPathname (OFString &result, const OFString &rootDir, const OFString &pathName, const OFBool allowLeadingPathSeparator=OFTrue)
 remove root directory prefix from given path name.
static size_t searchDirectoryRecursively (const OFString &directory, OFList< OFString > &fileList, const OFString &pattern, const OFString &dirPrefix, const OFBool recurse=OFTrue)
 scan a given directory (recursively) and add all filenames found to a list
static OFBool deleteFile (const OFString &filename)
 delete given file from filesystem
static size_t getFileSize (const OFString &filename)
 determine size of given file (in bytes)
static OFBool checkForMarkupConversion (const OFString &sourceString, const OFBool convertNonASCII=OFFalse)
 check whether conversion to HTML/XML mnenonic string is required.
static OFCondition convertToMarkupStream (STD_NAMESPACE ostream &out, const OFString &sourceString, const OFBool convertNonASCII=OFFalse, const E_MarkupMode markupMode=MM_XML, const OFBool newlineAllowed=OFFalse)
 convert character string to HTML/XHTML/XML mnenonic stream.
static const OFStringconvertToMarkupString (const OFString &sourceString, OFString &markupString, const OFBool convertNonASCII=OFFalse, const E_MarkupMode markupMode=MM_XML, const OFBool newlineAllowed=OFFalse)
 convert character string to HTML/XHTML/XML mnenonic string.
static OFCondition encodeBase64 (STD_NAMESPACE ostream &out, const unsigned char *data, const size_t length, const size_t width=0)
 encode binary data according to "Base64" as described in RFC 2045 (MIME).
static const OFStringencodeBase64 (const unsigned char *data, const size_t length, OFString &result, const size_t width=0)
 encode binary data according to "Base64" as described in RFC 2045 (MIME).
static size_t decodeBase64 (const OFString &data, unsigned char *&result)
 decode "Base64" encoded string.
static double atof (const char *s, OFBool *success=NULL)
 converts a floating-point number from an ASCII decimal representation to internal double-precision format.
static void ftoa (char *target, size_t targetSize, double value, unsigned int flags=0, int width=0, int precision=-1)
 formats a floating-point number into an ASCII string.
static unsigned int sleep (unsigned int seconds)
 makes the current process sleep until seconds seconds have elapsed or a signal arrives which is not ignored
static long getProcessID ()
 Determines the identification of the running process.
static OFBool check32BitAddOverflow (const Uint32 summand1, const Uint32 summand2)
 check whether the addition of two 32-bit integers yields in an overflow

Static Public Attributes

ftoa() processing flags.
These flags can be combined by bit-wise or.

static const unsigned int ftoa_format_e
 Use e or E conversion format instead of g or G.
static const unsigned int ftoa_format_f
 Use f or F conversion format instead of g or G.
static const unsigned int ftoa_uppercase
 Use E, F or G conversion format instead of e, f or g.
static const unsigned int ftoa_alternate
 convert value to alternate form.
static const unsigned int ftoa_leftadj
 left-justify number be within the field
static const unsigned int ftoa_zeropad
 pad with zeroes instead of blanks

Static Private Member Functions

static size_t my_strlcpy (char *dst, const char *src, size_t siz)
 private implementation of strlcpy.
static size_t my_strlcat (char *dst, const char *src, size_t siz)
 private implementation of strlcat.
static unsigned int my_sleep (unsigned int seconds)
 makes the current process sleep until seconds seconds have elapsed or a signal arrives which is not ignored


Detailed Description

A class for various helper functions.

This class is used to comprise a number of "global" helper functions.

Definition at line 59 of file ofstd.h.


Member Enumeration Documentation

enum OFStandard::E_MarkupMode

Markup language mode.

Enumerator:
MM_HTML  HTML (Hyper Text Markup Language).
MM_HTML32  HTML 3.2 (Hyper Text Markup Language).
MM_XHTML  XHTML (Extensible Hyper Text Markup Language).
MM_XML  XML (Extensible Markup Language).

Definition at line 68 of file ofstd.h.


Member Function Documentation

static size_t OFStandard::strlcpy ( char *  dst,
const char *  src,
size_t  siz 
) [inline, static]

This function copies up to size - 1 characters from the NUL- terminated string src to dst, NUL-terminating the result.

It is designed to be a safer, more consistent, and less error-prone replacement for strncpy(3). strlcpy takes the full size of the buffer (not just the length) and guarantees to NUL-terminate the result (as long as size is larger than 0). Note that you should include a byte for the NUL in size. Also note that strlcpy only operates on true C strings, i. e. src must be NUL-terminated.

Parameters:
dst destination buffer of size siz, must not be NULL
src source string, must not be NULL
siz size of destination buffer
Returns:
the total length of the string the function tried to create, i.e. strlen(src). While this may seem somewhat confusing it was done to make truncation detection simple.

Definition at line 97 of file ofstd.h.

References my_strlcpy().

static size_t OFStandard::strlcat ( char *  dst,
const char *  src,
size_t  siz 
) [inline, static]

This function appends the NUL-terminated string src to the end of dst.

It will append at most size - strlen(dst) - 1 bytes, NUL- terminating the result. It is designed to be a safer, more consistent, and less error-prone replacement for strncat(3). strlcat takes the full size of the buffer (not just the length) and guarantees to NUL-terminate the result (as long as size is larger than 0). Note that you should include a byte for the NUL in size. Also note that strlcat only operates on true C strings, i. e. dst and src must be NUL-terminated.

Parameters:
dst destination buffer of size siz, must not be NULL
src source string, must not be NULL
siz size of destination buffer
Returns:
the total length of the string the function tried to create, i.e. the initial length of dst plus the length of src. While this may seem somewhat confusing it was done to make truncation detection simple.

Definition at line 123 of file ofstd.h.

References my_strlcat().

static const char* OFStandard::strerror ( const int  errnum,
char *  buf,
const size_t  buflen 
) [static]

convert a given error code to a string.

This function wraps the various approaches found on different systems. Internally, the standard function strerror() or strerror_r() is used.

Parameters:
errnum error code to be converted
buf buffer which is used to store the result string (if supported)
buflen size if the buffer in bytes
Returns:
pointer to string describing the error code. Please note that depending on the implementation of the function used, the result may or may not be a pointer to buf. The return value can also be NULL if the buffer is invalid.

Referenced by OFFile::getLastErrorString().

static OFString& OFStandard::toUpper ( OFString result,
const OFString value 
) [static]

returns the upper-case version of a given string

Parameters:
result string variable in which the result is stored
value string value to be converted to upper case
Returns:
reference to the resulting string (same as 'result')

static OFString& OFStandard::toUpper ( OFString value  )  [static]

returns the upper-case version of a given string.

NB: This function changes the parameter 'value'.

Parameters:
value string value to be converted to upper case
Returns:
reference to the resulting string (same as 'value')

static OFString& OFStandard::toLower ( OFString result,
const OFString value 
) [static]

returns the lower-case version of a given string

Parameters:
result string variable in which the result is stored
value string value to be converted to lower case
Returns:
reference to the resulting string (same as 'result')

static OFString& OFStandard::toLower ( OFString value  )  [static]

returns the lower-case version of a given string.

NB: This function changes the parameter 'value'.

Parameters:
value string value to be converted to lower case
Returns:
reference to the resulting string (same as 'value')

static OFBool OFStandard::pathExists ( const OFString pathName  )  [static]

check whether the given path exists.

This function does not distinguish files from directories (use 'fileExists()' or 'directoryExists()' if required).

Parameters:
pathName name of the path to be checked
Returns:
OFTrue if path exists, OFFalse otherwise

static OFBool OFStandard::fileExists ( const OFString fileName  )  [static]

check whether the given file exists.

This function also checks that the specified path points to file and not to a directory (or the like).

Parameters:
fileName name of the file to be checked
Returns:
OFTrue if file exists, OFFalse otherwise

static OFBool OFStandard::dirExists ( const OFString dirName  )  [static]

check whether the given directory exists.

This function also checks that the specified path points to directory and not to a file (or the like).

Parameters:
dirName name of the directory to be checked
Returns:
OFTrue if directory exists, OFFalse otherwise

static OFBool OFStandard::isReadable ( const OFString pathName  )  [static]

check whether the given path is readable.

This function works for both files and directories.

Parameters:
pathName name of the path to be checked
Returns:
OFTrue if path is readable, OFFalse otherwise

static OFBool OFStandard::isWriteable ( const OFString pathName  )  [static]

check whether the given path is writeable.

This function works for both files and directories.

Parameters:
pathName name of the path to be checked
Returns:
OFTrue if path is writeable, OFFalse otherwise

static OFString& OFStandard::getDirNameFromPath ( OFString result,
const OFString pathName,
const OFBool  assumeDirName = OFTrue 
) [static]

get directory name component from given path name.

Extracts the substring before the last path separator. If there is no path separator in the given path name, the value of 'pathName' is returned by default; if 'assumeDirName' is OFFalse, an empty string is returned. NB: This function neither checks whether the given 'pathName' exists nor whether the resulting name points to a valid or existing directory.

Parameters:
result string variable in which the resulting directory name is stored
pathName path name from which the directory name should be extracted
assumeDirName assume that there always is a directory name in 'pathName'
Returns:
reference to the resulting directory name (same as 'result')

static OFString& OFStandard::getFilenameFromPath ( OFString result,
const OFString pathName,
const OFBool  assumeFilename = OFTrue 
) [static]

get file name component from given path name.

Extracts the substring after the last path separator. If there is no path separator in the given path name, the value of 'pathName' is returned by default; if 'assumeFilename' is OFFalse, an empty string is returned. NB: This function neither checks whether the given 'pathName' exists nor whether the resulting name points to a valid or existing file.

Parameters:
result string variable in which the resulting file name is stored
pathName path name from which the file name should be extracted
assumeFilename assume that there always is a file name in 'pathName'
Returns:
reference to the resulting file name (same as 'result')

static OFString& OFStandard::normalizeDirName ( OFString result,
const OFString dirName,
const OFBool  allowEmptyDirName = OFFalse 
) [static]

normalize the given directory name.

Removes trailing path separators from the directory name. If the resulting directory name is an empty string and the flag 'allowEmptyDirName' is OFFalse the directory name is set to "." (current directory). If the resulting directory name is "." and the flag 'allowEmptyDirName' is OFTrue the directory name is set to an empty string.

Parameters:
result string variable in which the resulting directory name is stored
dirName directory name to be normalized
allowEmptyDirName flag indicating whether an empty directory name is allowed
Returns:
reference to the resulting directory name (same as 'result')

static OFString& OFStandard::combineDirAndFilename ( OFString result,
const OFString dirName,
const OFString fileName,
const OFBool  allowEmptyDirName = OFFalse 
) [static]

combine the given directory and file name.

Normalizes the directory name and appends the file name (with a path separator) if not empty. If both 'dirName' and 'fileName' are empty strings and the flag 'allowEmptyDirName' is OFFalse the resulting path name is set to "." (current directory). If 'dirName' is "." and the flag 'allowEmptyDirName' is OFTrue an empty directory name is used. NB: This function neither checks whether the given 'dirName' exists nor whether the resulting path name points to a valid or existing file name. Furthermore, the value of 'dirName' is ignored if 'fileName' starts with a path separator.

Parameters:
result string variable in which the resulting path name is stored
dirName directory name to be combined with the file name
fileName file name to be combined with the directory name
allowEmptyDirName flag indicating whether an empty directory name is allowed
Returns:
reference to the resulting path name (same as 'result')

static OFCondition OFStandard::removeRootDirFromPathname ( OFString result,
const OFString rootDir,
const OFString pathName,
const OFBool  allowLeadingPathSeparator = OFTrue 
) [static]

remove root directory prefix from given path name.

In case 'pathName' starts with 'rootDir', the common prefix is removed. Otherwise, an empty string is returned.

Parameters:
result string variable in which the resulting path name is stored
rootDir name of the root directory to be removed
pathName path name from which the root directory (prefix) is removed
allowLeadingPathSeparator flag indicating whether a leading path separator is allowed for the resulting path name (automatically removed otherwise)
Returns:
status, EC_Normal if successful, an error code otherwise

static size_t OFStandard::searchDirectoryRecursively ( const OFString directory,
OFList< OFString > &  fileList,
const OFString pattern,
const OFString dirPrefix,
const OFBool  recurse = OFTrue 
) [static]

scan a given directory (recursively) and add all filenames found to a list

Parameters:
directory name of the directory to be scanned
fileList list to which the filenames are added. Please note that the list is not not cleared automatically.
pattern optional wildcard pattern used to match the filenames against. By default all files match. In order to work under Unix the system function fnmatch() is required.
dirPrefix optional prefix added to the directory name. This prefix will, however, not be part of the filenames added to the list.
recurse flag indicating whether to search recursively (default) or not
Returns:
number of new files added to the list

static OFBool OFStandard::deleteFile ( const OFString filename  )  [static]

delete given file from filesystem

Parameters:
filename name of the file (including directory) to delete
Returns:
OFTrue if deletion was successul, OFFalse otherwise

static size_t OFStandard::getFileSize ( const OFString filename  )  [static]

determine size of given file (in bytes)

Parameters:
filename name of the file to be checked
Returns:
size of the file in bytes (0 in case of error)

static OFBool OFStandard::checkForMarkupConversion ( const OFString sourceString,
const OFBool  convertNonASCII = OFFalse 
) [static]

check whether conversion to HTML/XML mnenonic string is required.

This check can be performed before convertToMarkupStream() or convertToMarkupString() is called in order to speed up the process in case the conversion is not required.

Parameters:
sourceString source string to be checked
convertNonASCII convert non-ASCII characters (< #32 and >= #127) to numeric value (&#nnn;) if OFTrue
Returns:
OFTrue if markup conversion is required, OFFalse otherwise

static OFCondition OFStandard::convertToMarkupStream ( STD_NAMESPACE ostream &  out,
const OFString sourceString,
const OFBool  convertNonASCII = OFFalse,
const E_MarkupMode  markupMode = MM_XML,
const OFBool  newlineAllowed = OFFalse 
) [static]

convert character string to HTML/XHTML/XML mnenonic stream.

Characters with special meaning for HTML/XHTML/XML (e.g. '<' and '&') are replaced by the corresponding mnenonics (e.g. "&lt;" and "&amp;"). If flag 'convertNonASCII' is OFTrue, all characters < #32 and >= #127 are also converted (useful if only HTML 3.2 is supported which does not allow to specify the character set). In HTML 3.2 mode, the quotation mark (") is converted to "&#34;" instead of """ because the latter entity is not defined. In HTML mode, the apostrophe sign (') is converted to "&#39;" instead of "&apos;" for the same reason.

Parameters:
out stream used for the HTML/XHTML/XML mnenonic output
sourceString source string to be converted
convertNonASCII convert non-ASCII characters (< # 32 and >= #127) to numeric value (&#nnn;) if OFTrue
markupMode convert to HTML, HTML 3.2, XHTML or XML markup. LF and CR are encoded as "&#10;" and "&#13;" in XML mode, the flag 'newlineAllowed' has no meaning in this case.
newlineAllowed optional flag indicating whether newlines are allowed or not. If they are allowed the text "<br>" (HTML) or "<br />" (XHTML) is used, "&para;" otherwise. The following combinations are accepted: LF, CR, LF CR, CF LF.
Returns:
status, always returns EC_Normal

static const OFString& OFStandard::convertToMarkupString ( const OFString sourceString,
OFString markupString,
const OFBool  convertNonASCII = OFFalse,
const E_MarkupMode  markupMode = MM_XML,
const OFBool  newlineAllowed = OFFalse 
) [static]

convert character string to HTML/XHTML/XML mnenonic string.

Characters with special meaning for HTML/XHTML/XML (e.g. '<' and '&') are replaced by the corresponding mnenonics (e.g. "&lt;" and "&amp;"). If flag 'convertNonASCII' is OFTrue, all characters < #32 and >= #127 are also converted (useful if only HTML 3.2 is supported which does not allow to specify the character set). In HTML 3.2 mode, the quotation mark (") is converted to "&#34;" instead of """ because the latter entity is not defined. In HTML mode, the apostrophe sign (') is converted to "&#39;" instead of "&apos;" for the same reason.

Parameters:
sourceString source string to be converted
markupString reference to character string where the result should be stored
convertNonASCII convert non-ASCII characters (< # 32 and >= #127) to numeric value (&#nnn;) if OFTrue
markupMode convert to HTML, HTML 3.2, XHTML or XML markup string. LF and CR are encoded as "@&@#10;" and "@&@#13;" in XML mode, the flag 'newlineAllowed' has no meaning in this case.
newlineAllowed optional flag indicating whether newlines are allowed or not. If they are allowed the text "<br>" (HTML) or "<br />" (XHTML) is used, "&para;" otherwise. The following combinations are accepted: LF, CR, LF CR, CF LF.
Returns:
reference to resulting 'markupString' (might be empty if 'sourceString' was empty)

static OFCondition OFStandard::encodeBase64 ( STD_NAMESPACE ostream &  out,
const unsigned char *  data,
const size_t  length,
const size_t  width = 0 
) [static]

encode binary data according to "Base64" as described in RFC 2045 (MIME).

Basic algorithm: groups of 3 bytes from the binary input are coded as groups of 4 bytes in the textual output. The input data is 'padded' with zeros to create a length that is an even multiple of 3. A special character ('=') is used to denote padding so that the output can be decoded back to its exact size. If the input data is NULL an error code (EC_IllegalParameter) is returned.

Parameters:
out output stream used for the base64 encoded data
data buffer with binary data to be encoded (big endian required!)
length length of the input data buffer (in bytes)
width maximum number of characters per line in the output stream (default: 0 = no line breaks, typical for MIME = 72)
Returns:
status, EC_Normal if successful, an error code otherwise

static const OFString& OFStandard::encodeBase64 ( const unsigned char *  data,
const size_t  length,
OFString result,
const size_t  width = 0 
) [static]

encode binary data according to "Base64" as described in RFC 2045 (MIME).

Basic algorithm: groups of 3 bytes from the binary input are coded as groups of 4 bytes in the textual output. The input data is 'padded' with zeros to create a length that is an even multiple of 3. A special character ('=') is used to denote padding so that the output can be decoded back to its exact size. If the input data is NULL an empty string is returned.

Parameters:
data buffer with binary data to be encoded (big endian required!)
length length of the input data buffer (in bytes)
result reference to resulting string variable (Base64 encoded)
width maximum number of characters per line in the output string (default: 0 = no line breaks, typical for MIME = 72)
Returns:
reference to the resulting string

static size_t OFStandard::decodeBase64 ( const OFString data,
unsigned char *&  result 
) [static]

decode "Base64" encoded string.

Any character that does not belong to the Base64 alphabet (0..9, A..Z, a..z, + and /) is ignored when decoding the input string. This is especially true for line breaks which are usually contained in MIME (RFC 2045) encoded streams (see above). The first occurence of a '=' character is taken as evidence that the end of the data has been reached. NB: The memory buffer in which the binary output is stored is allocated inside this function and has to to be freed (using "delete[]") by the caller! Do not pass a pointer to an already allocated buffer to this function, the caller does not know the exact size anyway.

Parameters:
data Base64 encoded input data (possibly padded with '=' at the end)
result receives pointer to resulting buffer with binary data (big endian encoded)
Returns:
length of the resulting binary data (0 if an error occurred, in this case the buffer is deleted internally)

static double OFStandard::atof ( const char *  s,
OFBool *  success = NULL 
) [static]

converts a floating-point number from an ASCII decimal representation to internal double-precision format.

Unlike the atof() function defined in Posix, this implementation is not affected by a locale setting, the radix character is always assumed to be '.' This implementation does not set errno if the input cannot be parsed and it does not implement special handling for overflow/underflow or NaN values. However, a return code indicates whether or not a successful conversion could be performed. The precision of this implementation is limited to approx. 9 decimal digits. The use of this implementation can be disabled by defining the macro DISABLE_OFSTD_ATOF at compile time; in this case, the locale dependent Posix implementation of sscanf is used and the application is responsible for making sure that the Posix locale is activated at all times.

Parameters:
s A decimal ASCII floating-point number, optionally preceded by white space. Must have form "-I.FE-X", where I is the integer part of the mantissa, F is the fractional part of the mantissa, and X is the exponent. Either of the signs may be "+", "-", or omitted. Either I or F may be omitted, or both. The decimal point isn't necessary unless F is present. The "E" may actually be an "e". E and X may both be omitted (but not just one).
success pointer to return status code, may be NULL. if present, a status code is stored in the variable pointed to by this parameter. The status is OFTrue if a conversion could be performed and OFFalse if the string does not have the expected format.
Returns:
floating-point equivalent of string. If a terminating character is found before any floating-point digits, then zero is returned.

static void OFStandard::ftoa ( char *  target,
size_t  targetSize,
double  value,
unsigned int  flags = 0,
int  width = 0,
int  precision = -1 
) [static]

formats a floating-point number into an ASCII string.

This function works similar to sprintf(), except that this implementation is not affected by a locale setting. The radix character is always '.'.

This implementation guarantees that the given string size is always respected by using strlcpy to copy the formatted string into the target buffer.

The use of this implementation can be disabled by defining the macro DISABLE_OFSTD_FTOA at compile time; in this case, the locale dependent Posix implementation of sprintf is used and the application is responsible for making sure that the Posix locale is activated at all times.

Parameters:
target pointer to target string buffer
targetSize size of target string buffer
value double value to be formatted
flags processing flags. Any of the flags defined below can be combined by bit-wise or.
width width from format (8d), or 0
precision precision from format (%.3d), or -1

static unsigned int OFStandard::sleep ( unsigned int  seconds  )  [inline, static]

makes the current process sleep until seconds seconds have elapsed or a signal arrives which is not ignored

Parameters:
seconds number of seconds to sleep
Returns:
zero if the requested time has elapsed, or the number of seconds left to sleep

Definition at line 543 of file ofstd.h.

References my_sleep().

static long OFStandard::getProcessID (  )  [static]

Determines the identification of the running process.

Returns:
the process ID of the currently running process.

static OFBool OFStandard::check32BitAddOverflow ( const Uint32  summand1,
const Uint32  summand2 
) [inline, static]

check whether the addition of two 32-bit integers yields in an overflow

Parameters:
summand1 first integer value to be added
summand2 second integer value to be added
Returns:
OFTrue if an overflow occurred during the addition, OFFalse otherwise

Definition at line 564 of file ofstd.h.

static size_t OFStandard::my_strlcpy ( char *  dst,
const char *  src,
size_t  siz 
) [static, private]

private implementation of strlcpy.

Called when strlcpy is not available in the standard library.

Parameters:
dst destination buffer of size siz, must not be NULL
src source string, must not be NULL
siz size of destination buffer
Returns:
the total length of the string the function tried to create, i.e. strlen(src)

Referenced by strlcpy().

static size_t OFStandard::my_strlcat ( char *  dst,
const char *  src,
size_t  siz 
) [static, private]

private implementation of strlcat.

Called when strlcat is not available in the standard library.

Parameters:
dst destination buffer of size siz, must not be NULL
src source string, must not be NULL
siz size of destination buffer
Returns:
the total length of the string the function tried to create, i.e. the initial length of dst plus the length of src

Referenced by strlcat().

static unsigned int OFStandard::my_sleep ( unsigned int  seconds  )  [static, private]

makes the current process sleep until seconds seconds have elapsed or a signal arrives which is not ignored

Parameters:
seconds number of seconds to sleep
Returns:
zero if the requested time has elapsed, or the number of seconds left to sleep

Referenced by sleep().


Member Data Documentation

const unsigned int OFStandard::ftoa_alternate [static]

convert value to alternate form.

The result will always contain a decimal point, even if no digits follow the point. For g and G conversions, trailing zeroes will not be removed from the result.

Definition at line 528 of file ofstd.h.


The documentation for this class was generated from the following file:


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1