DataSource for C SDK  7.1.28.98838-0467ac22
Miscellaneous Utility Functions

Functions

char * ds_debug_config_string (int level)
 This function will convert a debug level into an appropriate string. More...
 
char * ds_debug_string (int level)
 This function will convert a debug level into an appropriate string. More...
 
char * ds_filename_expand (const char *format, char *buffer, size_t bufsize)
 Expand a filename pattern into a fully qualified filename. More...
 

Detailed Description

Miscellaneous functions.

Function Documentation

char* ds_debug_config_string ( int  level)

This function will convert a debug level into an appropriate string.

Parameters
levelThe debug level to to convert
Returns
An appropriate string

If an appropriate value of level is supplied then a zero length string will be returned

Example:

ds_debug_config_string(DS_LOG_INFO);

Will return the string "INFO".

The value returned from this function should not be freed.

char* ds_debug_string ( int  level)

This function will convert a debug level into an appropriate string.

Parameters
levelThe debug level to to convert
Returns
An appropriate string

If an appropriate value of level is supplied then a zero length string will be returned

Example:

ds_debug_string(DS_LOG_INFO);

Will return the string "INFO:".

The value returned from this function should not be freed.

char* ds_filename_expand ( const char *  format,
char *  buffer,
size_t  bufsize 
)

Expand a filename pattern into a fully qualified filename.

Parameters
formatFormat of filename to expand
bufferBuffer to expand into
bufsizeLength of the expansion buffer
Returns
The input variable buf containing an expanded filename

This function will expand the following tokens in the supplied argument:

  • %h The hostname
  • %a The application name (as set by the configuration option application-name)
  • %n The application name (as set by the configuration option application-name)
  • %r The application root (as set by the configuration option application-root)
  • %u The home directory of the process owner.

Generated on Fri Jan 20 2023 17:49:17 for DataSource for C SDK