Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _FILLER_H_
- #define _FILLER_H_
- typedef struct map_s
- {
- int h;
- int w;
- char **array;
- } map_t;
- typedef struct elem_s
- {
- int h;
- int w;
- char **array;
- } elem_t;
- typedef struct pos_s
- {
- int x;
- int y;
- } pos_t;
- typedef struct req_s
- {
- char symbol;
- map_t map;
- elem_t elem;
- } req_t;
- typedef struct stream_s
- {
- char *str;
- unsigned int size;
- unsigned int limit;
- } stream_t;
- typedef struct filler_s
- {
- stream_t *current_stream;
- int status;
- } filler_t;
- req_t* read_request(filler_t *filler);
- stream_t* read_input(int state);
- int find_size(char res[32], char *buf, int start_pos);
- pos_t parse_size(char *answer);
- void read_matrix(char** matrix, char* array, int pos, int w, int h);
- req_t* parse_all(char *all);
- void print_pos(pos_t pos);
- void print_size(int fd, char *buffer);
- void print_matrix(int fd, char **array, int w, int h);
- pos_t play(req_t *core);
- int set_nonblocking(int fd);
- void create_filler(filler_t *filler);
- void destroy_filler(filler_t *filler);
- void start_game(filler_t *filler);
- #endif // _FILLER_H_%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement