summaryrefslogtreecommitdiff
path: root/include/fhp
diff options
context:
space:
mode:
Diffstat (limited to 'include/fhp')
-rw-r--r--include/fhp/fhp.h29
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_ {