18 -> 17
This commit is contained in:
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
2
Makefile
Normal file → Executable file
2
Makefile
Normal file → Executable file
@@ -1,4 +1,4 @@
|
|||||||
CFLAGS=--std=c18 -O2 -Wall -Wextra -Werror -pedantic
|
CFLAGS=--std=c17 -O2 -Wall -Wextra -Werror -pedantic
|
||||||
|
|
||||||
annotate: annotate.o
|
annotate: annotate.o
|
||||||
|
|
||||||
|
|||||||
5
annotate.c
Normal file → Executable file
5
annotate.c
Normal file → Executable file
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
#define BUF_SIZE 1024
|
#define BUF_SIZE 1024
|
||||||
|
|
||||||
void print_now() {
|
|
||||||
|
void print_now(void) {
|
||||||
time_t now;
|
time_t now;
|
||||||
time(&now);
|
time(&now);
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ void print_now() {
|
|||||||
* Program that reads from STDIN and writes to STDOUT with each line annotated
|
* Program that reads from STDIN and writes to STDOUT with each line annotated
|
||||||
* with the current date and time
|
* with the current date and time
|
||||||
*/
|
*/
|
||||||
int main() {
|
int main(void) {
|
||||||
char buffer[BUF_SIZE];
|
char buffer[BUF_SIZE];
|
||||||
|
|
||||||
// when true, print the time on the next iteration
|
// when true, print the time on the next iteration
|
||||||
|
|||||||
Reference in New Issue
Block a user