mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
Windows porting: port hyperscan and chimera tools to windows.
This commit is contained in:
@@ -92,7 +92,7 @@ void pq_pop_nice(struct match_pq *pq) {
|
||||
|
||||
/** dummy event handler for use when user does not provide one */
|
||||
static
|
||||
int null_onEvent(UNUSED unsigned id, UNUSED unsigned long long from,
|
||||
int HS_CDECL null_onEvent(UNUSED unsigned id, UNUSED unsigned long long from,
|
||||
UNUSED unsigned long long to, UNUSED unsigned flags,
|
||||
UNUSED unsigned size, UNUSED const ch_capture_t *captured,
|
||||
UNUSED void *ctxt) {
|
||||
@@ -108,12 +108,12 @@ struct HybridContext {
|
||||
struct ch_scratch *scratch;
|
||||
struct match_pq *pq;
|
||||
/** \brief user-supplied match callback */
|
||||
int (*match_callback)(unsigned int id, unsigned long long from,
|
||||
int (HS_CDECL *match_callback)(unsigned int id, unsigned long long from,
|
||||
unsigned long long to, unsigned int flags,
|
||||
unsigned int size, const ch_capture_t *capture,
|
||||
void *ctx);
|
||||
/** \brief user-supplied error callback */
|
||||
int (*error_callback)(ch_error_event_t error_type, unsigned int id,
|
||||
int (HS_CDECL *error_callback)(ch_error_event_t error_type, unsigned int id,
|
||||
void *info, void *ctx);
|
||||
/** \brief user-supplied context */
|
||||
void *context;
|
||||
@@ -363,7 +363,7 @@ ch_error_t catchupPcre(struct HybridContext *hyctx, unsigned int id,
|
||||
|
||||
/** \brief Callback used for internal Hyperscan multi-matcher. */
|
||||
static
|
||||
int multiCallback(unsigned int id, unsigned long long from,
|
||||
int HS_CDECL multiCallback(unsigned int id, unsigned long long from,
|
||||
unsigned long long to, UNUSED unsigned int flags,
|
||||
void *ctx) {
|
||||
assert(ctx);
|
||||
|
@@ -201,7 +201,7 @@ typedef struct ch_capture {
|
||||
* pattern, while a return value of @ref CH_CALLBACK_SKIP_PATTERN will
|
||||
* cease matching this pattern but continue matching the next pattern.
|
||||
*/
|
||||
typedef ch_callback_t (*ch_match_event_handler)(unsigned int id,
|
||||
typedef ch_callback_t (HS_CDECL *ch_match_event_handler)(unsigned int id,
|
||||
unsigned long long from,
|
||||
unsigned long long to,
|
||||
unsigned int flags,
|
||||
@@ -233,11 +233,12 @@ typedef ch_callback_t (*ch_match_event_handler)(unsigned int id,
|
||||
* function.
|
||||
*
|
||||
* @return
|
||||
* The callback can return @ref CH_CALLBACK_SKIP_PATTERN to cease matching this
|
||||
* pattern but continue matching the next pattern. Otherwise, we stop
|
||||
* The callback can return @ref CH_CALLBACK_SKIP_PATTERN to cease matching
|
||||
* this pattern but continue matching the next pattern. Otherwise, we stop
|
||||
* matching for all patterns with @ref CH_CALLBACK_TERMINATE.
|
||||
*/
|
||||
typedef ch_callback_t (*ch_error_event_handler)(ch_error_event_t error_type,
|
||||
typedef ch_callback_t (HS_CDECL *ch_error_event_handler)(
|
||||
ch_error_event_t error_type,
|
||||
unsigned int id, void *info,
|
||||
void *ctx);
|
||||
|
||||
|
Reference in New Issue
Block a user