jag

jagParse_c

public

parser lib for my games

Star0
Watch0
7c852362e9708c9a31484ef6b1d82f4bd4eef9ba
1
ssh://git@git.jaglekon.de:30/jag/jagParse_c.git
include/jag_parse.hC25 lines462 B
1
#ifndef PARSER_H
2
#define PARSER_H
3
4
#include <string.h>
5
#include <ctype.h>
6
#include <stdint.h>
7
#include <stdbool.h>
8
9
#define BUF_LEN 4096
10
#define ARROW_LEN 3 
11
12
typedef enum {
13
  NO_KEY, ESCAPE_KEY, ENTER_KEY, LEFT_ARROW, RIGHT_ARROW, UP_ARROW, DOWN_ARROW, A_KEY, D_KEY, Q_KEY, P_KEY, S_KEY, W_KEY, INCOMPLETE, UNKNOWN
14
} keypress;
15
16
17
void free_buf();
18
19
int add_to_buf(uint8_t *input, uint16_t input_length);
20
21
keypress parse_input();
22
23
void break_unfinished();
24
25
#endif