Defines | Functions

src/core/utilities.h File Reference

Go to the source code of this file.

Defines

#define BOOLEAN   int
#define TRUE   1
#define FALSE   0
#define ROW_MAJOR_IDX(R, C, NCOL)   ((R)*(NCOL) + (C))

Functions

int endsWith (char *string, char *ending)
int longestName (char *filenames[], int nFiles)
int lowerStrNCmp (const char *str1, const char *str2, int n)
void stringTokenizer (char *line)
char * nextToken ()
char * constructFileName (char *basedir, char *filename)
char * td_malloc (size_t size)
void td_free (void *mem, size_t size)
long getMemoryReport ()
char * getLibraryVersion ()

Define Documentation

#define BOOLEAN   int
#define FALSE   0
#define ROW_MAJOR_IDX (   R,
  C,
  NCOL 
)    ((R)*(NCOL) + (C))
#define TRUE   1

Function Documentation

char* constructFileName ( char *  basedir,
char *  filename 
)
int endsWith ( char *  string,
char *  ending 
)
char* getLibraryVersion (  ) 
long getMemoryReport (  ) 
int longestName ( char *  filenames[],
int  nFiles 
)
int lowerStrNCmp ( const char *  str1,
const char *  str2,
int  n 
)

Compare two string up to n characters. Comparison is done with lowercase version of each string.

Parameters:
[in] str1 A string to compare.
[in] str2 Another string to compare.
[in] n maximum number of characters to compare.
Returns:
TRUE if strings are equal; FALSE otherwise.
char* nextToken (  ) 

stringTokenizer and nextToken work together to parse a character string into tokens, separated by spaces. nextToken finds the next set of non-white space characters, which is considered a token.

Returns:
The next token in the string or NULL if there are no more tokens.
void stringTokenizer ( char *  line  ) 

stringTokenizer and nextToken work together to parse a character string into tokens, separated by spaces. stringTokenizer intializes variables for breaking a string into tokens.

Parameters:
[in] line The string to break into words.
void td_free ( void *  mem,
size_t  size 
)
char* td_malloc ( size_t  size  ) 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines