#include <apr.h>
#include <apr_pools.h>
Go to the source code of this file.
Defines | |
#define | FALSE 0 |
You figure it out. | |
#define | TRUE 1 |
You figure it out. | |
#define | LCN_NO_ERROR 0 |
The best kind of error. | |
#define | LCN_ERR(expr) |
A handy wrapper for functions that return an lcn_error_t , just returns the error to our caller if it's not LCN_NO_ERROR . | |
#define | LCN_STRING_SIZE(str) ((lcn_strlen (str) + 1) * sizeof (lcn_char_t)) |
Get the size of a string of lcn_char_t's in bytes. | |
#define | APR_ARRAY_IDX(ary, i, type) (((type *)(ary)->elts)[i]) |
Index into an apr_array_header_t. | |
#define | APR_ARRAY_PUSH(ary, type) (*((type *)apr_array_push (ary))) |
Easier array-pushing syntax. | |
#define | lcn_pool_destroy apr_pool_destroy |
For symmetry with lcn_pool_create . | |
Typedefs | |
typedef int | lcn_boolean_t |
Since we use C89 we need a boolean type... | |
typedef lcn_error_t | lcn_error_t |
Our exception object. | |
typedef apr_uint16_t | lcn_char_t |
A java style 16 bit char. | |
Functions | |
lcn_error_t * | lcn_error_create (apr_status_t apr_err, lcn_error_t *child, const char *message) |
Create a new error with underlying error code apr_err, wrapping around child, with error message message. | |
lcn_error_t * | lcn_error_createf (apr_status_t apr_err, lcn_error_t *child, const char *fmt,...) |
A printf style version of lcn_error_create . | |
void | lcn_error_clear (lcn_error_t *error) |
Destroy error. | |
apr_size_t | lcn_strlen (const lcn_char_t *str) |
Count the number of characters in a string of lcn_char_t's. | |
int | lcn_strcmp (const lcn_char_t *first, const lcn_char_t *second) |
Lexographically compare first and second. | |
lcn_char_t * | lcn_strcpy (const lcn_char_t *str, apr_pool_t *pool) |
Return a copy of str, allocated in pool. | |
lcn_error_t * | lcn_str_to_cstring (char **out, const lcn_char_t *in, apr_pool_t *pool) |
Convert in into a cstring out, allocated in pool. | |
lcn_char_t * | lcn_str_from_cstring (const char *in, apr_pool_t *pool) |
Create a string of lcn_char_ts that corresponds to the contents of in, allocated in pool. | |
apr_pool_t * | lcn_pool_create (apr_pool_t *parent) |
A convenience wrapper for apr_pool_create . |
Definition in file lcn_types.h.
|
Value: do { \ lcn_error_t *lcn_err__temp = (expr); \ if (lcn_err__temp) \ return lcn_err__temp; \ } while (0) lcn_error_t , just returns the error to our caller if it's not LCN_NO_ERROR .
Definition at line 86 of file lcn_types.h. |
|
Convert in into a cstring out, allocated in pool. This will result in an error if in cannot be represented in ASCII characters. |