include/xmmsc/xmmsc_util.h File Reference

#include <stdio.h>
#include "xmmsc/xmmsc_stdbool.h"

Go to the source code of this file.

Defines

#define XMMS_STRINGIFY_NOEXPAND(x)   #x
#define XMMS_STRINGIFY(x)   XMMS_STRINGIFY_NOEXPAND(x)
#define x_return_if_fail(expr)   if (!(expr)) { fprintf (stderr, "Failed in file " __FILE__ " on row %d\n", __LINE__); return; }
#define x_return_val_if_fail(expr, val)   if (!(expr)) { fprintf (stderr, "Failed in file " __FILE__ " on row %d\n", __LINE__); return val; }
#define x_return_null_if_fail(expr)   x_return_val_if_fail (expr, NULL)
#define x_oom()   do { fprintf(stderr, "Out of memory in " __FILE__ "on row %d\n", __LINE__); } while (0)
#define x_new0(type, num)   calloc (1, sizeof (type) * (num))
#define x_new(type, num)   malloc (sizeof (type) * (num))
#define x_malloc0(size)   calloc (1, size)
#define x_malloc(size)   malloc (size)
#define XPOINTER_TO_INT(p)   ((int) (p))
#define XPOINTER_TO_UINT(p)   ((unsigned int) (p))
#define XINT_TO_POINTER(i)   ((void *) (i))
#define XUINT_TO_POINTER(u)   ((void *) (u))
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
#define X_N_ELEMENTS(a)   (sizeof (a) / sizeof ((a)[0]))
#define XMMS_PATH_MAX   255
#define XMMS_DEFAULT_TCP_PORT   9667

Functions

const char * xmms_userconfdir_get (char *buf, int len)
const char * xmms_usercachedir_get (char *buf, int len)
const char * xmms_default_ipcpath_get (char *buf, int len)
const char * xmms_fallback_ipcpath_get (char *buf, int len)
bool xmms_sleep_ms (int n)

Define Documentation

#define MIN ( a,
 )     (((a) < (b)) ? (a) : (b))

Definition at line 35 of file xmmsc_util.h.

Referenced by xmmsv_dict_format().

#define x_malloc ( size   )     malloc (size)

Definition at line 18 of file xmmsc_util.h.

Referenced by xmmsv_decode_url(), and xmmsv_new_bin().

#define x_malloc0 ( size   )     calloc (1, size)

Definition at line 17 of file xmmsc_util.h.

#define X_N_ELEMENTS (  )     (sizeof (a) / sizeof ((a)[0]))

Definition at line 39 of file xmmsc_util.h.

#define x_new ( type,
num   )     malloc (sizeof (type) * (num))

Definition at line 16 of file xmmsc_util.h.

#define x_new0 ( type,
num   )     calloc (1, sizeof (type) * (num))
 
#define x_oom (  )     do { fprintf(stderr, "Out of memory in " __FILE__ "on row %d\n", __LINE__); } while (0)
#define x_return_if_fail ( expr   )     if (!(expr)) { fprintf (stderr, "Failed in file " __FILE__ " on row %d\n", __LINE__); return; }
#define x_return_null_if_fail ( expr   )     x_return_val_if_fail (expr, NULL)

Definition at line 13 of file xmmsc_util.h.

Referenced by xmmsv_coll_get_idlist().

#define x_return_val_if_fail ( expr,
val   )     if (!(expr)) { fprintf (stderr, "Failed in file " __FILE__ " on row %d\n", __LINE__); return val; }
#define XINT_TO_POINTER (  )     ((void *) (i))

Definition at line 30 of file xmmsc_util.h.

#define XMMS_DEFAULT_TCP_PORT   9667

Definition at line 45 of file xmmsc_util.h.

#define XMMS_PATH_MAX   255

Definition at line 42 of file xmmsc_util.h.

#define XMMS_STRINGIFY (  )     XMMS_STRINGIFY_NOEXPAND(x)

Definition at line 9 of file xmmsc_util.h.

#define XMMS_STRINGIFY_NOEXPAND (  )     #x

Definition at line 8 of file xmmsc_util.h.

#define XPOINTER_TO_INT (  )     ((int) (p))

Definition at line 28 of file xmmsc_util.h.

#define XPOINTER_TO_UINT (  )     ((unsigned int) (p))

Definition at line 29 of file xmmsc_util.h.

#define XUINT_TO_POINTER (  )     ((void *) (u))

Definition at line 31 of file xmmsc_util.h.


Function Documentation

const char* xmms_default_ipcpath_get ( char *  buf,
int  len 
)

Referenced by xmmsc_connect().

const char* xmms_fallback_ipcpath_get ( char *  buf,
int  len 
)
bool xmms_sleep_ms ( int  n  ) 

Referenced by check_drawtime().

const char* xmms_usercachedir_get ( char *  buf,
int  len 
)
const char* xmms_userconfdir_get ( char *  buf,
int  len 
)

Referenced by xmmsc_userconfdir_get().


Generated on Tue Feb 23 18:17:57 2010 for XmmsClient by  doxygen 1.6.1