| 10 | pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; |
| 11 | |
| 12 | list *get_paths(char *filename) |
| 13 | { |
| 14 | char *path; |
| 15 | FILE *file = fopen(filename, "r"); |
| 16 | if(!file) file_error(filename); |
| 17 | list *lines = make_list(); |
| 18 | while((path=fgetl(file))){ |
| 19 | list_insert(lines, path); |
| 20 | } |
| 21 | fclose(file); |
| 22 | return lines; |
| 23 | } |
| 24 | |
| 25 | /* |
| 26 | char **get_random_paths_indexes(char **paths, int n, int m, int *indexes) |