Advertisement
Guest User

Untitled

a guest
May 25th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. #ifndef _FILLER_H_
  2. #define _FILLER_H_
  3.  
  4. typedef struct map_s
  5. {
  6. int h;
  7. int w;
  8. char **array;
  9. } map_t;
  10.  
  11. typedef struct elem_s
  12. {
  13. int h;
  14. int w;
  15. char **array;
  16. } elem_t;
  17.  
  18. typedef struct pos_s
  19. {
  20. int x;
  21. int y;
  22. } pos_t;
  23.  
  24. typedef struct req_s
  25. {
  26. char symbol;
  27. map_t map;
  28. elem_t elem;
  29. } req_t;
  30.  
  31. typedef struct stream_s
  32. {
  33. char *str;
  34. unsigned int size;
  35. unsigned int limit;
  36. } stream_t;
  37.  
  38. typedef struct filler_s
  39. {
  40. stream_t *current_stream;
  41. int status;
  42. } filler_t;
  43.  
  44. req_t* read_request(filler_t *filler);
  45. stream_t* read_input(int state);
  46. int find_size(char res[32], char *buf, int start_pos);
  47. pos_t parse_size(char *answer);
  48. void read_matrix(char** matrix, char* array, int pos, int w, int h);
  49. req_t* parse_all(char *all);
  50.  
  51. void print_pos(pos_t pos);
  52.  
  53. void print_size(int fd, char *buffer);
  54. void print_matrix(int fd, char **array, int w, int h);
  55. pos_t play(req_t *core);
  56.  
  57. int set_nonblocking(int fd);
  58.  
  59.  
  60. void create_filler(filler_t *filler);
  61. void destroy_filler(filler_t *filler);
  62. void start_game(filler_t *filler);
  63. #endif // _FILLER_H_%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement