void
Utils_FreeListOfLists(
lsList list_of_lists
)
- This function can be used to destroy lists of list. The
contained set of lists is removed from memory as the top level list.
More than two levels are not handled at the moment.
- Side Effects Lists are deallocated
- See Also
lsDestroy
void
Utils_StripPathNoExtension(
const char* fpathname,
char* filename
)
- Example: given "~/.../test.smv", "test" will be returned.
filename must be a string whose length is large enought to contain the "pure"
filename
- Side Effects the string pointed by 'filename' changes
void
Utils_StripPathNoFilenameNoExtension(
const char* fpathname,
char* dirname
)
- dirname must be a string whose length is large enough to
contain the directory part
- Side Effects The string pointed to by 'dirname' changes
- See Also
Utils_StripPathNoExtension
Utils_StripPath
const char*
Utils_StripPath(
const char* pathfname
)
- Returns pathname without path prefix
- Side Effects None
boolean
Utils_file_exists_in_directory(
const char* filename,
char* directory
)
- Checks for the existence of a file within a directory.
boolean
Utils_file_exists_in_paths(
const char* filename,
const char* paths,
const char* delimiters
)
- The list of directories (delimited by the charaters given)
are checked for the existence of the file.
char*
Utils_get_temp_filename_in_dir(
const char* dir,
const char* templ
)
- This functions gets a template parameter for the file
name, with 6 'X' that will be substituted by an unique id. See
mkstemp for further info. Ensures that the filename is not already
in use in the given directory. If NULL is passed as the directory,
then the standard temporary directory is used instead. Returned
string must be freed. Returtns NULL if the filename cannot be found
or if we do not have write priviledges in the specified directory.
void
Utils_pkg_init(
)
- Initializes the utils package
- Side Effects None
void
Utils_pkg_quit(
)
- De-initializes the utils package
- Side Effects None
void
Utils_print_timer(
const char* name,
const char* msg
)
- The timer must be already existing. msg can be NULL
void
Utils_reset_timer(
const char* name
)
- The timer must be already existing.
void
Utils_start_timer(
const char* name
)
- If the timer does not exist, it will be created and
started. If already started an error occurs.
void
Utils_stop_timer(
const char* name
)
- The timer must be already existing and running.
int
Utils_strcasecmp(
const char* s1,
const char* s2
)
- Compares the two strings s1 and s2,
ignoring the case of the characters.