...
| Code Block | ||||
|---|---|---|---|---|
| ||||
#include <stdio.h> #define BUFFER_SIZE 1024 void func(FILE *file) { char buf[BUFSIZBUFFER_SIZE]; if (fgets(buf, sizeof(buf), file) == NULL) { /* Set error flag and continue */ } } |
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
#include <stdio.h> #define BUFFER_SIZE 1024 void func(FILE *file) { char buf[BUFSIZBUFFER_SIZE]; if (fgets(buf, sizeof(buf), file) == NULL) { /* Set error flag and continue */ *buf = '\0'; } } |
...