|
football
socket abstraction layer
|
Football utility functions. More...
#include <config.h>#include <stdio.h>#include <errno.h>#include <ctype.h>#include <stdbool.h>#include <assert.h>#include <stdlib.h>#include <stdarg.h>#include <memory.h>#include <time.h>#include <arpa/inet.h>#include "fb_public.h"#include "fb_service.h"Functions | |
| void | fb_set_logging (int logtype, FB_LOGGING_FUNCTION func) |
| Set logging level. | |
| void | fb_log_impl (const char *file, int line, const char *func, int level, const char *format,...) |
| const char * | fb_connection_info (FB_CONNECTION *connection) |
| bool | fb_expandcalloc (void **data, size_t *capacity, size_t newcapacity, size_t itemsize) |
| calloc() with ability to expand the allocated data. | |
| void | fb_destroy_argv (char **argv) |
| int | fb_create_argv (const char *commandline, char ***result) |
| int | fb_create_argv_from_query_string (const char *query_string, char ***result_names, char ***result_values) |
Variables | |
| FB_LOGGING_FUNCTION | fb_log = fb_log_impl |
Football utility functions.
| bool fb_expandcalloc | ( | void ** | data, |
| size_t * | capacity, | ||
| size_t | newcapacity, | ||
| size_t | itemsize | ||
| ) |
calloc() with ability to expand the allocated data.
Does nothing if the actual capacity meets or exceeds the requested capacity. When expansion occurs, the added elements are zeroed out.
| data | the allocation to expand. May be *NULL for initial allocation. |
| capacity | the capacity of the allocation, which may be adjusted by this call. |
| newcapacity | the desired capacity of the allocation. |
| itemsize | the size of data items in the allocation. |
| void fb_set_logging | ( | int | logtype, |
| FB_LOGGING_FUNCTION | func | ||
| ) |
Set logging level.
Set which messages will be collected by the internal logging function, or provide an alternate logging function. When using a private logging function, logtype is not used.
| logtype | a bitmask indicating which data to log. |
| func | a logging function that replaces the default one. |