blob: 9fceb29b38af2dbb7a086cbee810aebf5a7f666b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef BLOG_H
#define BLOG_H
#define DOCTYPE "<!DOCTYPE html>\n"
#define HTML "<html lang=\"en\">\n"
#define META "<meta charset=\"utf-8\">\n"
#define TITLE "<title>%s</title>\n"
#define RSS "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Feed\" href=\"/feed.xml\">"
#define ICON "<link type=\"shortcut icon\" href=\"/icon.png\">\n"
#define STYLE "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\">\n"
#define BODY "</head>\n<body>\n"
#define HTML_HEAD DOCTYPE HTML META TITLE RSS ICON STYLE BODY
#define ADDRESS "<address>Copyright © %1$d <a href=\"/\">%2$s</a> <<a href=\"mailto:%3$s\">%3$s</a>></address>\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 handle_post(void);
void add_to_index(const char *user, const char *path, const char *title);
int current_year(void);
#endif
|