|
|
@ -69,20 +69,8 @@ int main() |
|
|
|
void printInit() |
|
|
|
{ |
|
|
|
FILE *stream; |
|
|
|
char *line = NULL; |
|
|
|
size_t len = 0; |
|
|
|
ssize_t read; |
|
|
|
|
|
|
|
stream = getStream(gameInstructionsFile); |
|
|
|
|
|
|
|
/* print line by line from file */ |
|
|
|
while ((read = getline(&line, &len, stream)) != -1) |
|
|
|
{ |
|
|
|
// printf("Retrieved line of length %u :\n", read); |
|
|
|
printf("%s", line); |
|
|
|
} |
|
|
|
|
|
|
|
free(line); /* Deallocate allocated memory */ |
|
|
|
printStreamLines(stream); |
|
|
|
fclose(stream); /* closing file */ |
|
|
|
|
|
|
|
acceptInstructions(); |
|
|
|