| 54 | } |
| 55 | |
| 56 | int *read_map(char *filename) |
| 57 | { |
| 58 | int n = 0; |
| 59 | int *map = 0; |
| 60 | char *str; |
| 61 | FILE *file = fopen(filename, "r"); |
| 62 | if(!file) file_error(filename); |
| 63 | while((str=fgetl(file))){ |
| 64 | ++n; |
| 65 | map = realloc(map, n*sizeof(int)); |
| 66 | map[n-1] = atoi(str); |
| 67 | } |
| 68 | return map; |
| 69 | } |
| 70 | |
| 71 | void sorta_shuffle(void *arr, size_t n, size_t size, size_t sections) |
| 72 | { |
no test coverage detected