#include <stdio.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) |
| Get the absolute path to the user config dir. | |
| const char * | xmms_usercachedir_get (char *buf, int len) |
| Get the absolute path to the user cache dir. | |
| const char * | xmms_default_ipcpath_get (char *buf, int len) |
| Get the default connection path. | |
| const char * | xmms_fallback_ipcpath_get (char *buf, int len) |
| Get the fallback connection path (if XMMS_PATH is not accessible). | |
| #define MIN | ( | a, | |||
| b | ) | (((a) < (b)) ? (a) : (b)) |
Definition at line 33 of file xmmsc_util.h.
Referenced by xmms_ipc_msg_get_string(), xmms_ringbuf_write(), xmms_xform_this_peek(), and xmms_xform_this_read().
| #define x_malloc | ( | size | ) | malloc (size) |
Definition at line 16 of file xmmsc_util.h.
Referenced by xmms_ipc_msg_get_bin_alloc(), and xmms_ipc_msg_get_string_alloc().
| #define x_malloc0 | ( | size | ) | calloc (1, size) |
Definition at line 15 of file xmmsc_util.h.
| #define X_N_ELEMENTS | ( | a | ) | (sizeof (a) / sizeof ((a)[0])) |
Definition at line 37 of file xmmsc_util.h.
| #define x_new | ( | type, | |||
| num | ) | malloc (sizeof (type) * (num)) |
| #define x_new0 | ( | type, | |||
| num | ) | calloc (1, sizeof (type) * (num)) |
Definition at line 13 of file xmmsc_util.h.
Referenced by xmms_ipc_msg_alloc(), xmms_ipc_tcp_accept(), xmms_ipc_tcp_client_init(), xmms_ipc_tcp_server_init(), xmms_ipc_usocket_accept(), xmms_ipc_usocket_client_init(), xmms_ipc_usocket_server_init(), xmmsc_coll_new(), and xmmsc_coll_set_idlist().
| #define x_oom | ( | ) | do { fprintf(stderr, "Out of memory in " __FILE__ "on row %d\n", __LINE__); } while (0) |
Definition at line 12 of file xmmsc_util.h.
Referenced by xmmsc_coll_new(), and xmmsc_coll_set_idlist().
| #define x_return_if_fail | ( | expr | ) | if (!(expr)) { fprintf (stderr, "Failed in file " __FILE__ " on row %d\n", __LINE__); return; } |
Definition at line 9 of file xmmsc_util.h.
Referenced by xmms_ipc_msg_destroy(), xmms_ipc_msg_set_cmd(), xmms_ipc_msg_set_length(), xmms_ipc_msg_set_object(), xmms_ipc_transport_destroy(), xmmsc_coll_add_operand(), xmmsc_coll_attribute_list_entry(), xmmsc_coll_attribute_list_first(), xmmsc_coll_attribute_list_next(), xmmsc_coll_operand_list_clear(), xmmsc_coll_remove_operand(), xmmsc_coll_set_idlist(), and xmmsc_coll_unref().
| #define x_return_null_if_fail | ( | expr | ) | x_return_val_if_fail (expr, NULL) |
| #define x_return_val_if_fail | ( | expr, | |||
| val | ) | if (!(expr)) { fprintf (stderr, "Failed in file " __FILE__ " on row %d\n", __LINE__); return val; } |
Definition at line 10 of file xmmsc_util.h.
Referenced by xmms_ipc_client_init(), xmms_ipc_msg_get_cmd(), xmms_ipc_msg_get_cookie(), xmms_ipc_msg_get_length(), xmms_ipc_msg_get_object(), xmms_ipc_msg_read_transport(), xmms_ipc_msg_write_transport(), xmms_ipc_server_accept(), xmms_ipc_server_init(), xmms_ipc_tcp_accept(), xmms_ipc_tcp_read(), xmms_ipc_tcp_write(), xmms_ipc_transport_fd_get(), xmms_ipc_usocket_accept(), xmms_ipc_usocket_read(), xmms_ipc_usocket_write(), xmmsc_coll_attribute_list_valid(), xmmsc_coll_get_type(), xmmsc_coll_idlist_append(), xmmsc_coll_idlist_clear(), xmmsc_coll_idlist_get_index(), xmmsc_coll_idlist_get_size(), xmmsc_coll_idlist_insert(), xmmsc_coll_idlist_move(), xmmsc_coll_idlist_remove(), xmmsc_coll_idlist_set_index(), xmmsc_coll_operand_list_entry(), xmmsc_coll_operand_list_first(), xmmsc_coll_operand_list_next(), xmmsc_coll_operand_list_restore(), xmmsc_coll_operand_list_save(), xmmsc_coll_operand_list_valid(), and xmmsc_coll_ref().
| #define XINT_TO_POINTER | ( | i | ) | ((void *) (i)) |
Definition at line 28 of file xmmsc_util.h.
| #define XMMS_DEFAULT_TCP_PORT 9667 |
Definition at line 43 of file xmmsc_util.h.
Referenced by xmms_fallback_ipcpath_get(), xmms_ipc_tcp_client_init(), and xmms_ipc_tcp_server_init().
| #define XMMS_PATH_MAX 255 |
| #define XMMS_STRINGIFY | ( | x | ) | XMMS_STRINGIFY_NOEXPAND(x) |
Definition at line 7 of file xmmsc_util.h.
Referenced by xmms_fallback_ipcpath_get(), xmms_ipc_tcp_client_init(), xmms_ipc_tcp_server_init(), and xmms_sqlite_print_version().
| #define XMMS_STRINGIFY_NOEXPAND | ( | x | ) | #x |
Definition at line 6 of file xmmsc_util.h.
| #define XPOINTER_TO_INT | ( | p | ) | ((int) (p)) |
Definition at line 26 of file xmmsc_util.h.
| #define XPOINTER_TO_UINT | ( | p | ) | ((unsigned int) (p)) |
Definition at line 27 of file xmmsc_util.h.
| #define XUINT_TO_POINTER | ( | u | ) | ((void *) (u)) |
Definition at line 29 of file xmmsc_util.h.
| const char* xmms_default_ipcpath_get | ( | char * | buf, | |
| int | len | |||
| ) |
| const char* xmms_fallback_ipcpath_get | ( | char * | buf, | |
| int | len | |||
| ) |
Get the fallback connection path (if XMMS_PATH is not accessible).
| buf | A char buffer | |
| len | The length of buf (PATH_MAX is a good choice) |
Definition at line 91 of file utils_unix.c.
Referenced by main(), and xmms_default_ipcpath_get().
| const char* xmms_usercachedir_get | ( | char * | buf, | |
| int | len | |||
| ) |
Get the absolute path to the user cache dir.
| buf | a char buffer | |
| len | the lenght of buf (PATH_MAX is a good choice) |
Definition at line 65 of file utils_unix.c.
| const char* xmms_userconfdir_get | ( | char * | buf, | |
| int | len | |||
| ) |
Get the absolute path to the user config dir.
| buf | A char buffer | |
| len | The length of buf (PATH_MAX is a good choice) |
Definition at line 78 of file utils_unix.c.
Referenced by xmms_build_path().
1.5.6