From 10cbea0dac822a3427c009d65cfb61de7187c3d9 Mon Sep 17 00:00:00 2001 From: thematdev Date: Tue, 4 Jul 2023 15:34:30 +0300 Subject: [PATCH] Slight improvements --- src/main.c | 6 +++--- src/string_buffer.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index bb94cde..bf89d06 100644 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,3 @@ -#include "printf.h" #include "string_buffer.h" #include "utils.h" #include "comment.h" @@ -8,6 +7,7 @@ #include #include +#include #define COMMENTS_PER_PAGE 20 #define MAX_NAME 1024 @@ -102,7 +102,7 @@ defer: void print_submit_form() { - fputs("
\n" + fputs("\n" "\n" "
\n" "
\n" @@ -203,7 +203,7 @@ handle_submitted_comment() time(&header.creation_time); header.reply_id = rid; header.text_length = strlen(sanitized_text); - header.user_sid = "anonymous"; + header.user_sid = "web/anonymous"; header.user_displayname = displayname; if (driver.leave_comment(&driver_data, &header, sanitized_text) < 0) { diff --git a/src/string_buffer.h b/src/string_buffer.h index 45a58b6..36bf734 100644 --- a/src/string_buffer.h +++ b/src/string_buffer.h @@ -1,6 +1,8 @@ #ifndef STRING_BUFFER_H #define STRING_BUFFER_H +#include + /* "move" underlying contents of buffer to str shrinking it */ /* TODO: handle realloc fail */ #define SB_MOVE(buffer, str) do { \