From 907004a179d476481da9f613cccdabb5cca306ac Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 26 Aug 2016 21:50:23 -0400 Subject: add fhp_strtoken() --- include/fhp/fhp.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'include/fhp') 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 @@ -5,6 +5,19 @@ #include // for size_t #include // 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, @@ -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_ { -- cgit v1.2.3