mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
mcclellan: fix printf format specifiers
This commit is contained in:
parent
106667e24e
commit
32af5fa794
@ -145,7 +145,7 @@ u32 doNormal16(const struct mcclellan *m, const u8 **c_inout, const u8 *end,
|
|||||||
} else {
|
} else {
|
||||||
const char *sherman_state
|
const char *sherman_state
|
||||||
= findShermanState(m, sherman_base_offset, sherman_base, s);
|
= findShermanState(m, sherman_base_offset, sherman_base, s);
|
||||||
DEBUG_PRINTF("doing sherman (%hu)\n", s);
|
DEBUG_PRINTF("doing sherman (%u)\n", s);
|
||||||
s = doSherman16(sherman_state, cprime, succ_table, as);
|
s = doSherman16(sherman_state, cprime, succ_table, as);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ char mcclellanExec16_i(const struct mcclellan *m, u32 *state, const u8 *buf,
|
|||||||
u32 cached_accept_id = 0;
|
u32 cached_accept_id = 0;
|
||||||
u32 cached_accept_state = 0;
|
u32 cached_accept_state = 0;
|
||||||
|
|
||||||
DEBUG_PRINTF("s: %hu, len %zu\n", s, len);
|
DEBUG_PRINTF("s: %u, len %zu\n", s, len);
|
||||||
|
|
||||||
const u8 *min_accel_offset = c;
|
const u8 *min_accel_offset = c;
|
||||||
if (!m->has_accel || len < ACCEL_MIN_LEN) {
|
if (!m->has_accel || len < ACCEL_MIN_LEN) {
|
||||||
@ -354,7 +354,7 @@ u32 doNormal8(const struct mcclellan *m, const u8 **c_inout, const u8 *end,
|
|||||||
ourisprint(*c) ? *c : '?', cprime);
|
ourisprint(*c) ? *c : '?', cprime);
|
||||||
s = succ_table[(s << as) + cprime];
|
s = succ_table[(s << as) + cprime];
|
||||||
|
|
||||||
DEBUG_PRINTF("s: %hhu\n", s);
|
DEBUG_PRINTF("s: %u\n", s);
|
||||||
c++;
|
c++;
|
||||||
if (do_accel) {
|
if (do_accel) {
|
||||||
if (s >= accel_limit) {
|
if (s >= accel_limit) {
|
||||||
@ -621,7 +621,7 @@ char nfaExecMcClellan16_Q2i(const struct NFA *n, u64a offset, const u8 *buffer,
|
|||||||
if (mode == STOP_AT_MATCH && final_look != cur_buf + local_ep) {
|
if (mode == STOP_AT_MATCH && final_look != cur_buf + local_ep) {
|
||||||
DEBUG_PRINTF("this is as far as we go\n");
|
DEBUG_PRINTF("this is as far as we go\n");
|
||||||
assert(q->cur);
|
assert(q->cur);
|
||||||
DEBUG_PRINTF("state %hu final_look %zd\n", s, final_look - cur_buf);
|
DEBUG_PRINTF("state %u final_look %zd\n", s, final_look - cur_buf);
|
||||||
q->cur--;
|
q->cur--;
|
||||||
q->items[q->cur].type = MQE_START;
|
q->items[q->cur].type = MQE_START;
|
||||||
q->items[q->cur].location = final_look - cur_buf + 1; /* due to
|
q->items[q->cur].location = final_look - cur_buf + 1; /* due to
|
||||||
@ -930,7 +930,7 @@ char nfaExecMcClellan16_reportCurrent(const struct NFA *n, struct mq *q) {
|
|||||||
u8 single = m->flags & MCCLELLAN_FLAG_SINGLE;
|
u8 single = m->flags & MCCLELLAN_FLAG_SINGLE;
|
||||||
u64a offset = q_cur_offset(q);
|
u64a offset = q_cur_offset(q);
|
||||||
assert(q_cur_type(q) == MQE_START);
|
assert(q_cur_type(q) == MQE_START);
|
||||||
DEBUG_PRINTF("state %hu\n", s);
|
DEBUG_PRINTF("state %u\n", s);
|
||||||
assert(s);
|
assert(s);
|
||||||
|
|
||||||
if (aux->accept) {
|
if (aux->accept) {
|
||||||
|
@ -46,7 +46,7 @@ static really_inline
|
|||||||
u32 mcclellanEnableStarts(const struct mcclellan *m, u32 s) {
|
u32 mcclellanEnableStarts(const struct mcclellan *m, u32 s) {
|
||||||
const struct mstate_aux *aux = get_aux(m, s);
|
const struct mstate_aux *aux = get_aux(m, s);
|
||||||
|
|
||||||
DEBUG_PRINTF("enabling starts %hu->%hu\n", s, aux->top);
|
DEBUG_PRINTF("enabling starts %u->%hu\n", s, aux->top);
|
||||||
return aux->top;
|
return aux->top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user