diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-08-26 21:50:23 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-08-26 21:50:23 -0400 |
commit | 907004a179d476481da9f613cccdabb5cca306ac (patch) | |
tree | e336839af11a405be739f1a21a260a4d09b81a80 /include | |
parent | 0f8623056efdc7a5fe4b02a0b819b920703c5460 (diff) | |
download | libfhp-907004a179d476481da9f613cccdabb5cca306ac.tar.bz2 libfhp-907004a179d476481da9f613cccdabb5cca306ac.zip |
add fhp_strtoken()
Diffstat (limited to 'include')
-rw-r--r-- | include/fhp/fhp.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/include/fhp/fhp.h b/include/fhp/fhp.h index 4a54e3c..3b7e280 100644 --- a/include/fhp/fhp.h +++ b/include/fhp/fhp.h @@ -6,6 +6,19 @@ #include <stdbool.h> // for size_t typedef enum { + FHP_OK, + FHP_ERR_CB, + FHP_ERR_BAD_STATE, + FHP_ERR_INVALID_CHAR, + FHP_ERR_INVALID_ERROR, + FHP_ERR_BUFFER_TOO_SMALL, + FHP_ERR_LAST +} fhp_err_t; + +fhp_err_t +fhp_strerror(fhp_err_t, char * const, size_t); + +typedef enum { FHP_TOKEN_METHOD_START, FHP_TOKEN_METHOD_FRAGMENT, FHP_TOKEN_METHOD_END, @@ -29,6 +42,9 @@ typedef enum { FHP_TOKEN_LAST } fhp_token_t; +fhp_err_t +fhp_strtoken(fhp_token_t, char * const, size_t); + typedef struct fhp_t_ fhp_t; typedef bool (*fhp_cb_t)( @@ -61,19 +77,6 @@ typedef enum { FHP_STATE_LAST } fhp_state_t; -typedef enum { - FHP_OK, - FHP_ERR_CB, - FHP_ERR_BAD_STATE, - FHP_ERR_INVALID_CHAR, - FHP_ERR_INVALID_ERROR, - FHP_ERR_BUFFER_TOO_SMALL, - FHP_ERR_LAST -} fhp_err_t; - -fhp_err_t -fhp_strerror(fhp_err_t, char * const, size_t); - #define FHP_BUF_SIZE 1024 struct fhp_t_ { |