jag

jagParse_c

public

parser lib for my games

Star0
Watch0
ab284e1a1cfeee747ec7596c6b52ca0db5d3908f
1
ssh://git@git.jaglekon.de:30/jag/jagParse_c.git
include/jag_parse.hC22 lines392 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, P_KEY, Q_KEY, LEFT_ARROW, RIGHT_ARROW, UP_ARROW, DOWN_ARROW, INCOMPLETE, UNKNOWN
14
} keypress;
15
16
int add_to_buf(uint8_t *input, uint16_t input_length);
17
18
keypress parse_input();
19
20
void break_unfinished();
21
22
#endif