This commit is contained in:
2025-08-07 21:11:55 -07:00
parent 762692e0ce
commit cf8326c9ff
3 changed files with 4 additions and 3 deletions

0
.gitignore vendored Normal file → Executable file
View File

2
Makefile Normal file → Executable file
View File

@@ -1,4 +1,4 @@
CFLAGS=--std=c18 -O2 -Wall -Wextra -Werror -pedantic
CFLAGS=--std=c17 -O2 -Wall -Wextra -Werror -pedantic
annotate: annotate.o

5
annotate.c Normal file → Executable file
View File

@@ -6,7 +6,8 @@
#define BUF_SIZE 1024
void print_now() {
void print_now(void) {
time_t now;
time(&now);
@@ -30,7 +31,7 @@ void print_now() {
* Program that reads from STDIN and writes to STDOUT with each line annotated
* with the current date and time
*/
int main() {
int main(void) {
char buffer[BUF_SIZE];
// when true, print the time on the next iteration