#include <stdint.h>
Go to the source code of this file.
◆ automaton
◆ triefunc
typedef int(* triefunc) (struct inputctx *) |
◆ esctrie_id()
int int uint32_t esctrie_id |
( |
const struct esctrie * |
e | ) |
|
◆ input_free_esctrie()
Definition at line 81 of file automaton.c.
81 {
84 for(
unsigned i = 0 ; i < a->
poolused ; ++i){
86 }
90}
struct esctrie * nodepool
◆ inputctx_add_cflow()
◆ inputctx_add_input_escape()
int inputctx_add_input_escape |
( |
automaton * |
a, |
|
|
const char * |
esc, |
|
|
uint32_t |
special, |
|
|
unsigned |
modifiers |
|
) |
| |
Definition at line 513 of file automaton.c.
514 {
515 if(esc[0] !=
NCKEY_ESC || strlen(esc) < 2){
516 logerror(
"not an escape (0x%x)", special);
517 return -1;
518 }
519 esctrie* eptr = insert_path(a, esc + 1);
521 return -1;
522 }
523
524
526 if(eptr->
ni.
id != special){
527 logwarn(
"already added escape (got 0x%x, wanted 0x%x)", eptr->
ni.
id, special);
528 }
529 }else{
530 eptr->
ni.
id = special;
537 logdebug(
"added 0x%08x to %u", special, esctrie_idx(a, eptr));
538 }
539 return 0;
540}
#define logerror(fmt,...)
#define logdebug(fmt,...)
◆ walk_automaton()