22 #ifndef _SML_SUPPORT_H_ 23 #define _SML_SUPPORT_H_ 43 #define VA_STRING(param) param?param:"NULL" 45 void smlLog(
const char *logname,
const char *data,
unsigned int size);
46 void smlTrace(SmlTraceType type,
const char *message, ...);
49 char *
smlRandStr(
int maxlength, SmlBool exact);
56 GMutex *started_mutex;
57 GMainContext *context;
66 typedef SmlBool (* SmlThreadCallFunctionType) (
72 SmlThreadCallFunctionType func,
76 void smlSafeFree(gpointer *address);
77 void smlSafeCFree(
char **address);
79 #endif //_SML_SUPPORT_H_ char * smlPrintHex(const char *data, int len)
Used for printing binary data in just hex.
SmlBool smlThreadCallFunction(SmlThread *thread, SmlThreadCallFunctionType func, gpointer data, SmlError **error)
char * smlRandStr(int maxlength, SmlBool exact)
Creates a random string.
char * smlPrintBinary(const char *data, int len)
Used for printing binary data.
void smlTrace(SmlTraceType type, const char *message,...)
Used for tracing the application.
void * smlTryMalloc0(long n_bytes, SmlError **error)
Safely mallocs.