MHEG5  18.9.0
MHEG5 Documentation
Functions
mh5base.c File Reference

Implement basic functions for the MHEG5 defined basic data types. More...

#include "mh5memory.h"
#include "mh5base.h"
#include "mh5debug.h"
#include "stb_os.h"
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

MHEG5String MHEG5stringCopy (MHEG5String source)
 <Function description>=""> More...
 
MHEG5String MHEG5stringCopyChr (const char *source)
 Copy the C-String source to a MHEG5String. More...
 
MHEG5String MHEG5stringCat (MHEG5String source1, MHEG5String source2)
 Concatenate two MHEG5Strings. More...
 
void MHEG5stringDestruct (MHEG5String *item)
 Destruct a MHEG5String. More...
 
MHEG5Bool MHEG5stringEqual (MHEG5String *s1, MHEG5String *s2)
 Compare two Strings (case sensitive!) More...
 
MHEG5Int MHEG5strToInt (MHEG5String string)
 Convert a MHEG5String to a MHEG5Integer. More...
 
MHEG5String MHEG5intToStr (MHEG5Int i)
 Convert MHEG5Int to MHEG5String. More...
 
void MHEG5genericDestruct (MHEG5Generic *item)
 Destruct a MHEG5Generic. More...
 
void MHEG5genericCopy (MHEG5Generic *dest, MHEG5Generic *src)
 Copy a MHEG5Generic. More...
 
MHEG5Bool MHEG5genericEqual (MHEG5Generic *g1, MHEG5Generic *g2)
 Compare two generic Variables. More...
 
void MHEG5gListDestruct (MHEG5GList *item)
 Destruct a list of MHEG5Generic objects. More...
 
MHEG5GListMHEG5gListCopy (MHEG5GList *list)
 Copy a list of MHEG5Generic objects. More...
 
void MHEG5genericSet (MHEG5Generic *item, MHEG5Int initialValue)
 Set a MHEG5Generic to the MHEG5Int value. More...
 
unsigned long MHEG5random (void)
 Calculate and return a psuedo random number. More...
 
char * MHEG5safeStrcat (char *dest, size_t destLength, const char *source)
 Perform a standard strcat restricted to the length of the destination. The dest string will always be null terminated. More...
 

Detailed Description

Implement basic functions for the MHEG5 defined basic data types.

Date
29/01/2002
Author
iwillis

Definition in file mh5base.c.

Function Documentation

void MHEG5genericCopy ( MHEG5Generic dest,
MHEG5Generic src 
)

Copy a MHEG5Generic.

Parameters
MHEG5Generic* dest
MHEG5Generic* src
Returns
void

Definition at line 861 of file mh5base.c.

void MHEG5genericDestruct ( MHEG5Generic item)

Destruct a MHEG5Generic.

Parameters
MHEG5Generic* item
Returns
void

Definition at line 834 of file mh5base.c.

MHEG5Bool MHEG5genericEqual ( MHEG5Generic g1,
MHEG5Generic g2 
)

Compare two generic Variables.

Parameters
MHEG5Generic* g1
MHEG5Generic* g2
Returns
MHEG5Bool MHEG5Bool

Definition at line 889 of file mh5base.c.

void MHEG5genericSet ( MHEG5Generic item,
MHEG5Int  initialValue 
)

Set a MHEG5Generic to the MHEG5Int value.

Parameters
MHEG5Generic* item
MHEG5IntinitialValue
Returns
void

Definition at line 978 of file mh5base.c.

MHEG5GList* MHEG5gListCopy ( MHEG5GList list)

Copy a list of MHEG5Generic objects.

Parameters
MHEG5GList*list
Returns
MHEG5GList * Pointer to the first element of the new MHEG5GList

Definition at line 950 of file mh5base.c.

void MHEG5gListDestruct ( MHEG5GList item)

Destruct a list of MHEG5Generic objects.

Parameters
MHEG5GList*item
Returns
void

Definition at line 933 of file mh5base.c.

MHEG5String MHEG5intToStr ( MHEG5Int  i)

Convert MHEG5Int to MHEG5String.

Parameters
MHEG5Inti
Returns
MHEG5String MHEG5String

Definition at line 787 of file mh5base.c.

unsigned long MHEG5random ( void  )

Calculate and return a psuedo random number.

Returns
Next random number in the sequence

Definition at line 1071 of file mh5base.c.

char* MHEG5safeStrcat ( char *  dest,
size_t  destLength,
const char *  source 
)

Perform a standard strcat restricted to the length of the destination. The dest string will always be null terminated.

Parameters
destDestination to concatenate string to.
destLengthMaximum length of the destination string, including null termination.
sourceNull terminated string to concatenate with the destination.
Returns
Pointer to dest

Definition at line 1103 of file mh5base.c.

MHEG5String MHEG5stringCat ( MHEG5String  source1,
MHEG5String  source2 
)

Concatenate two MHEG5Strings.

Parameters
MHEG5Stringsource1
MHEG5Stringsource2
Returns
MHEG5String MHEG5String

Definition at line 648 of file mh5base.c.

MHEG5String MHEG5stringCopy ( MHEG5String  source)

<Function description>="">

Returns
<Return value>=""> Copy a MHEG5String and return the new MHEG5String
Parameters
MHEG5Stringsource
Returns
MHEG5String MHEG5String

Definition at line 574 of file mh5base.c.

MHEG5String MHEG5stringCopyChr ( const char *  source)

Copy the C-String source to a MHEG5String.

Parameters
char*source
Returns
MHEG5String MHEG5String

Definition at line 612 of file mh5base.c.

void MHEG5stringDestruct ( MHEG5String item)

Destruct a MHEG5String.

Parameters
MHEG5Stringitem
Returns
void

Definition at line 686 of file mh5base.c.

MHEG5Bool MHEG5stringEqual ( MHEG5String s1,
MHEG5String s2 
)

Compare two Strings (case sensitive!)

Parameters
MHEG5Strings1
MHEG5Strings2
Returns
MHEG5Bool MHEG5Bool

Definition at line 710 of file mh5base.c.

MHEG5Int MHEG5strToInt ( MHEG5String  string)

Convert a MHEG5String to a MHEG5Integer.

Parameters
MHEG5Stringstring
Returns
MHEG5Int MHEG5Int

Definition at line 739 of file mh5base.c.