aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

machine.h (372B)


      1 #ifndef MACHINE_H
      2 #define MACHINE_H
      3 
      4 struct state {
      5   char          s_char;
      6   char          s_endstate;
      7   struct state *s_match;
      8   struct state *s_next;
      9   short         s_cnt;
     10 };
     11 
     12 #define FSM_OKE       0
     13 #define FSM_ISPREFIX  -1
     14 #define FSM_HASPREFIX 1
     15 
     16 int addstring(char *str, int cnt, struct state **mach);
     17 int match(char *str, int *p_int, struct state *mach);
     18 
     19 #endif