|void ||replace_chars_with_string (char *buffer, const uint16 buffer_size, const char find, const char *replace)|
|int ||make_path_to_dir (char *directory)|
|int ||make_path_to_file (char *filename)|
|char * ||strdup_local (const char *str)|
|int ||setLogListener (LogListener li)|
|void ||clearLogListener (void)|
|char * ||getLogTextRaw (LogLevel level, const char *origin, const char *message)|
|char * ||getLogText (const LogEntry *le)|
|void ||LOG (LogLevel level, const char *origin, const char *format,...)|
|void ||purgePipe (ChildProcess *cp, int pipe)|
|void ||monitorChilds (void)|
|void ||logPipe (ChildProcess *child, LogLevel level, int pipe)|
|void ||logChildPipe (ChildProcess *child, LogLevel level, int flag)|
|ChildProcess * ||raiseChild (char *name, int flag)|
|const char *const ||rcsid_common_misc_c = "$Id: misc.c 13982 2010-10-09 22:41:04Z anmaster $"|
|LogEntry * ||LogFirst = NULL|
|LogEntry * ||LogLast = NULL|
|int ||logcount = 0|
|LogListener ||loglist = NULL|
|int ||MINLOG = MINLOGLEVEL|
|ChildProcess * ||FirstChild = NULL|
|ChildProcess * ||LastChild = NULL|
Contains misc useful functions that may be useful to various parts of code, but are not especially tied to it.
Definition in file misc.c.
Convert a buffer of a specified maximum size by replacing token characters with a provided string. Given a buffered template string "/input/to/edit", the maximum size of the buffer, a token '/', and a replacement string ":", the input string is transformed to ":input:to:edit". If the replacement string is empty, the token characters are simply removed. The template is processed from left to right, replacing token characters as they are found. Replacement strings are always inserted whole. If token replacement would overflow the size of the conversion buffer, the token is not replaced, and the remaining portion of the input string is appended after truncating it as required to avoid overfilling the buffer.
|buffer||A string to perform a find and replace operation on. |
|buffer_size||Allocated buffer size (used to avoid buffer overflow). |
|find||A token character to find and replace in the buffer. |
|replace||A string that is to replace each token in the buffer. |
Definition at line 60 of file misc.c.