-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunctypes.h
48 lines (39 loc) · 1.03 KB
/
functypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* This file is part of Hubbub.
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license.php
* Copyright 2007-8 John-Mark Bell <[email protected]>
*/
#ifndef hubbub_functypes_h_
#define hubbub_functypes_h_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <hubbub/types.h>
/**
* Type of token handling function
*
* \param token Pointer to token to handle
* \param pw Pointer to client data
* \return HUBBUB_OK on success, appropriate error otherwise.
*/
typedef hubbub_error (*hubbub_token_handler)(
const hubbub_token *token, void *pw);
/**
* Type of parse error handling function
*
* \param line Source line on which error occurred
* \param col Column in \p line of start of erroneous input
* \param message Error message
* \param pw Pointer to client data
*/
typedef void (*hubbub_error_handler)(uint32_t line, uint32_t col,
const char *message, void *pw);
#ifdef __cplusplus
}
#endif
#endif