#include "ks_malloc.h"
Go to the source code of this file.
Data Structures | |
| struct | _ks_type_t |
| libkarmaclient's type info type. More... | |
| struct | _ks_base_t |
| libkarmaclient's base type. More... | |
Defines | |
| #define | KS_CAST(t, v) |
Typedefs | |
| typedef _ks_base_t | ks_base_t |
| libkarmaclient's base type | |
| typedef _ks_string_t | ks_string_t |
| libkarmaclient's string type | |
| typedef void(*) | ks_destroy_t (ks_base_t *) |
| Destructor function type. | |
| typedef void(*) | ks_bappend_t (ks_string_t *, ks_base_t *) |
| Bencode appender function type. | |
| typedef _ks_type_t | ks_type_t |
| libkarmaclient's type info type. | |
| typedef void(*) | ks_error_handler_t (const char *) |
| libkarmaclient's error handler function type. | |
Functions | |
| void | ks_error_handler_set (ks_error_handler_t) |
| void | ks_error (const char *,...) |
Definition in file ks_common.h.
| #define KS_CAST | ( | t, | |||
| v | ) |
Value:
((t ## _t *) ( ((v)->type == t ## _type()) ? (v) : ks_cast_error(#t, v) ) )
Definition at line 115 of file ks_common.h.
Referenced by ks_assoc_keys(), ks_combination_data(), ks_combination_score(), ks_fact_data(), ks_fact_feed(), ks_fact_identity(), ks_fact_value(), ks_response_bparse(), ks_response_combination(), ks_response_combinations(), ks_response_id(), ks_response_message(), and ks_response_time().
| typedef void(*) ks_bappend_t(ks_string_t *, ks_base_t *) |
| typedef struct _ks_base_t ks_base_t |
| typedef void(*) ks_destroy_t(ks_base_t *) |
| typedef void(*) ks_error_handler_t(const char *) |
| typedef struct _ks_string_t ks_string_t |
| typedef struct _ks_type_t ks_type_t |
libkarmaclient's type info type.
| void ks_error | ( | const char * | format, | |
| ... | ||||
| ) |
Passes an error on to the error handler, after expansion. See printf for a list of expansion tokens.
| format | The format string. |
Definition at line 72 of file ks_error.c.
References KS_ERRBUFSIZ, and KS_ERRTAG.
Referenced by ks_response_bparse(), ks_socket_connect(), ks_socket_new(), ks_socket_recv(), and ks_socket_send().
| void ks_error_handler_set | ( | ks_error_handler_t | handler | ) |
Set the error handler which protocol errors will be delivered to.
| handler | A pointer to a function to be passed error messages. |
Definition at line 58 of file ks_error.c.
1.5.1