src/include/xmmsc/xmmsc_strlist.h File Reference

#include <stdarg.h>

Go to the source code of this file.

Functions

char ** xmms_valist_to_strlist (const char *first, va_list ap)
 Convert a list of variable arguments into a list of strings.
char ** xmms_vargs_to_strlist (const char *first,...)
 Convert a variable number of arguments into a list of strings.
int xmms_strlist_len (char **data)
 Get the number of strings in a list.
void xmms_strlist_destroy (char **data)
 Destroy a list of strings.
char ** xmms_strlist_prepend_copy (char **data, char *newstr)
 Return a copy of a list with newstr prepended.
char ** xmms_strlist_copy (char **strlist)
 Return a deep copy of a list.

Function Documentation

char** xmms_strlist_copy ( char **  strlist  ) 

Return a deep copy of a list.

Parameters:
strlist The original list.
Returns:
A newly allocated list of strings.

Definition at line 139 of file strlist.c.

void xmms_strlist_destroy ( char **  data  ) 

Destroy a list of strings.

Equivalent to g_strfreev().

Parameters:
data The list to destroy.

Definition at line 101 of file strlist.c.

Referenced by xmms_build_path().

int xmms_strlist_len ( char **  data  ) 

Get the number of strings in a list.

Note that the real length of the (char **) array will be larger by 1 element (containing the terminating NULL).

Parameters:
data The list of strings
Returns:
Number of strings

Definition at line 87 of file strlist.c.

Referenced by xmms_strlist_copy(), and xmms_strlist_prepend_copy().

char** xmms_strlist_prepend_copy ( char **  data,
char *  newstr 
)

Return a copy of a list with newstr prepended.

Parameters:
data The original list.
newstr The string to prepend.
Returns:
A newly allocated list of strings.

Definition at line 119 of file strlist.c.

Referenced by xmms_build_path().

char** xmms_valist_to_strlist ( const char *  first,
va_list  ap 
)

Convert a list of variable arguments into a list of strings.

Note: Assumes that the arguments provided are all strings.

Parameters:
first The first string. Cannot be NULL.
ap List of variable arguments.
Returns:
A newly allocated list of strings.

Definition at line 37 of file strlist.c.

Referenced by xmms_build_path(), and xmms_vargs_to_strlist().

char** xmms_vargs_to_strlist ( const char *  first,
  ... 
)

Convert a variable number of arguments into a list of strings.

Note: Assumes that the arguments provided are all strings.

Parameters:
first The first string. Cannot be NULL.
... Variable number of strings.
Returns:
A newly allocated list of strings.

Definition at line 65 of file strlist.c.


Generated on Tue Feb 23 18:14:36 2010 for XMMS2 by  doxygen 1.6.1