diff --git a/Makefile b/Makefile index 8ab585a..c50efcf 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS=--std=c99 -O2 -Wall -Wextra -Werror -pedantic +CFLAGS=--std=c18 -O2 -Wall -Wextra -Werror -pedantic annotate: annotate.o diff --git a/annotate.c b/annotate.c index f70601c..9eab74d 100644 --- a/annotate.c +++ b/annotate.c @@ -45,15 +45,9 @@ int main() { output_time = false; } + fputc(buffer[i], stdout); if (buffer[i] == '\n') { - printf("\n"); - if (fflush(stdout) == EOF) { - perror("Unable to flush stdout"); - exit(2); - } output_time = true; - } else { - fputc(buffer[i], stdout); } } }