|
koliseo 0.6.5
|
Go to the source code of this file.
Data Structures | |
| struct | Kstr |
Macros | |
| #define | KSTR(c_lit) |
| #define | KSTR_NULL kstr_new(NULL, 0) |
| #define | Kstr_Fmt "%.*s" |
| Format macro for a Kstr. | |
| #define | Kstr_Arg(kstr) |
| Format matching macro for a Kstr. | |
| #define | ONEGB_DEC_INT 1073741824 |
| Defines a one GB size as decimal integer representation. | |
| #define | GULP_MAX_FILE_SIZE ONEGB_DEC_INT |
| Defines max size allowed for a file passed to KLS_GULP_FILE(). | |
| #define | Gulp_Res_Fmt "%s" |
| Format macro for a Gulp_Res. | |
| #define | Gulp_Res_Arg(gr) |
| Format matching macro for a Gulp_Res. | |
| #define | KLS_GULP_FILE(kls, filepath) |
| #define | KLS_GULP_FILE_KSTR(kls, filepath) |
Typedefs | |
| typedef struct Kstr | Kstr |
| typedef enum Gulp_Res | Gulp_Res |
| Defines possible results for kls_gulp_file_sized(). | |
Enumerations | |
| enum | Gulp_Res { GULP_FILE_OK =0 , GULP_FILE_NOT_EXIST , GULP_FILE_TOO_LARGE , GULP_FILE_READ_ERROR , GULP_FILE_CONTAINS_NULLCHAR , GULP_FILE_KLS_NULL , TOT_GULP_RES } |
| Defines possible results for kls_gulp_file_sized(). More... | |
Functions | |
| Kstr | kstr_new (const char *str, size_t len) |
| Kstr | kstr_from_c_lit (const char *c_lit) |
| bool | kstr_eq (Kstr left, Kstr right) |
| bool | kstr_eq_ignorecase (Kstr left, Kstr right) |
| Kstr | kstr_cut_l (Kstr *k, size_t n) |
| Kstr | kstr_cut_r (Kstr *k, size_t n) |
| Kstr | kstr_trim_left (Kstr kstr) |
| Kstr | kstr_trim_right (Kstr kstr) |
| Kstr | kstr_trim (Kstr kstr) |
| bool | kstr_indexof (Kstr k, char c, int *idx) |
| Kstr | kstr_token (Kstr *k, char delim) |
| bool | kstr_try_token (Kstr *k, char delim, Kstr *part) |
| Kstr | kstr_token_kstr (Kstr *k, Kstr delim) |
| const char * | string_from_Gulp_Res (Gulp_Res g) |
| char * | kls_gulp_file_sized (Koliseo *kls, const char *filepath, Gulp_Res *err, size_t max_size) |
| char * | try_kls_gulp_file (Koliseo *kls, const char *filepath, size_t max_size) |
| Kstr * | kls_gulp_file_sized_to_kstr (Koliseo *kls, const char *filepath, Gulp_Res *err, size_t max_size, bool allow_nullchar) |
| Kstr * | try_kls_gulp_file_to_kstr (Koliseo *kls, const char *filepath, size_t max_size, bool allow_nullchar) |
Variables | |
| const char * | gulp_res_names [TOT_GULP_RES+1] |
| String array for representations of Gulp_Res. | |
| #define GULP_MAX_FILE_SIZE ONEGB_DEC_INT |
Defines max size allowed for a file passed to KLS_GULP_FILE().
Use try_kls_gulp_file() if you want a different upper limit.
| #define Gulp_Res_Arg | ( | gr | ) |
Format matching macro for a Gulp_Res.
| #define Gulp_Res_Fmt "%s" |
Format macro for a Gulp_Res.
| #define KLS_GULP_FILE | ( | kls, | |
| filepath ) |
| #define KLS_GULP_FILE_KSTR | ( | kls, | |
| filepath ) |
| #define KSTR | ( | c_lit | ) |
| #define Kstr_Arg | ( | kstr | ) |
Format matching macro for a Kstr.
| #define Kstr_Fmt "%.*s" |
Format macro for a Kstr.
| #define KSTR_NULL kstr_new(NULL, 0) |
| #define ONEGB_DEC_INT 1073741824 |
Defines a one GB size as decimal integer representation.
Defines possible results for kls_gulp_file_sized().
| typedef struct Kstr Kstr |
| enum Gulp_Res |
Defines possible results for kls_gulp_file_sized().
| Enumerator | |
|---|---|
| GULP_FILE_OK | |
| GULP_FILE_NOT_EXIST | |
| GULP_FILE_TOO_LARGE | |
| GULP_FILE_READ_ERROR | |
| GULP_FILE_CONTAINS_NULLCHAR | |
| GULP_FILE_KLS_NULL | |
| TOT_GULP_RES | |
| char * kls_gulp_file_sized | ( | Koliseo * | kls, |
| const char * | filepath, | ||
| Gulp_Res * | err, | ||
| size_t | max_size ) |
| Kstr * kls_gulp_file_sized_to_kstr | ( | Koliseo * | kls, |
| const char * | filepath, | ||
| Gulp_Res * | err, | ||
| size_t | max_size, | ||
| bool | allow_nullchar ) |
| Kstr kstr_from_c_lit | ( | const char * | c_lit | ) |
| bool kstr_indexof | ( | Kstr | k, |
| char | c, | ||
| int * | idx ) |
| Kstr kstr_new | ( | const char * | str, |
| size_t | len ) |
| const char * string_from_Gulp_Res | ( | Gulp_Res | g | ) |
| char * try_kls_gulp_file | ( | Koliseo * | kls, |
| const char * | filepath, | ||
| size_t | max_size ) |
| Kstr * try_kls_gulp_file_to_kstr | ( | Koliseo * | kls, |
| const char * | filepath, | ||
| size_t | max_size, | ||
| bool | allow_nullchar ) |
|
extern |
String array for representations of Gulp_Res.