diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-07-19 21:14:51 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-07-19 21:14:51 -0400 |
commit | 339cd70e8b9864a3d575a538112f9a7100b1a750 (patch) | |
tree | a2ca784a572c803f4a5d2d8f96041ef58876e007 /blog.h | |
parent | 8197bb3617521d63943ac09db969bd7d66e6f9f7 (diff) |
remove hard-coding of my name and email address from postings
Diffstat (limited to 'blog.h')
-rw-r--r-- | blog.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2,7 +2,6 @@ #define BLOG_H #define PASSWORD_FILE "/blog/password" -#define DATA_DIRECTORY "/jakob" #define DOCTYPE "<!DOCTYPE html>\n" #define HTML "<html lang=\"en\">\n" @@ -14,20 +13,23 @@ #define HTML_HEAD DOCTYPE HTML META TITLE ICON STYLE BODY -#define ADDRESS "<address>Copyright © %d <a href=\"/\">Jakob Kaivo</a> <<a href=\"mailto:jakob@kaivo.net\">jakob@kaivo.net</a>>\n" +#define ADDRESS "<address>Copyright © %1$d <a href=\"/\">%2$s</a> <<a href=\"mailto:%3$s\">%3$s</a>>\n" #define HTML_TAIL "\n" ADDRESS "</body>\n</html>\n" void read_post_data(void); char *find_post_data(char *key); +char *user_name(const char *user); +char *user_email(const char *user); + int authenticate(const char *username, const char *password); int handle_post(void); int show_entry(const char *path); -void add_to_index(const char *path, const char *title); +void add_to_index(const char *user, const char *path, const char *title); int current_year(void); |