Untitled
unknown
plain_text
2 years ago
340 B
4
Indexable
#include "fdf.h" char **read_map(char *file) { char *temp; char **maparray; int y; int x; int fd; maparray = malloc(sizeof(maparray) * MAP_MAX_SIZE); x = 0; y = 0; fd = open(file, O_RDONLY); temp = get_next_line(fd); while (temp != NULL) { maparray[y++] = temp; get_next_line(fd); } close(fd); return (maparray); }
Editor is loading...