commit 63053ab
default
·
2023-05-21 18:11:06 +0000 UTC
parent d055b63
Minor prototype change.
M
format.c
+6,
-6
1@@ -38,10 +38,10 @@ struct {
2 };
3
4
5-static d_char *format_line(const char *line)
6+static xs_str *format_line(const char *line)
7 /* formats a line */
8 {
9- d_char *s = xs_str_new(NULL);
10+ xs_str *s = xs_str_new(NULL);
11 char *p, *v;
12
13 /* split by markup */
14@@ -90,10 +90,10 @@ static d_char *format_line(const char *line)
15 }
16
17
18-d_char *not_really_markdown(const char *content)
19+xs_str *not_really_markdown(const char *content)
20 /* formats a content using some Markdown rules */
21 {
22- d_char *s = xs_str_new(NULL);
23+ xs_str *s = xs_str_new(NULL);
24 int in_pre = 0;
25 int in_blq = 0;
26 xs *list;
27@@ -172,10 +172,10 @@ const char *valid_tags[] = {
28 "span", "i", "b", "u", "pre", "code", "em", "strong", NULL
29 };
30
31-d_char *sanitize(const char *content)
32+xs_str *sanitize(const char *content)
33 /* cleans dangerous HTML output */
34 {
35- d_char *s = xs_str_new(NULL);
36+ xs_str *s = xs_str_new(NULL);
37 xs *sl;
38 int n = 0;
39 char *p, *v;
M
snac.h
+2,
-2
1@@ -228,8 +228,8 @@ int activitypub_post_handler(const xs_dict *req, const char *q_path,
2 char *payload, int p_size,
3 char **body, int *b_size, char **ctype);
4
5-d_char *not_really_markdown(const char *content);
6-d_char *sanitize(const char *str);
7+xs_str *not_really_markdown(const char *content);
8+xs_str *sanitize(const char *content);
9
10 int html_get_handler(const xs_dict *req, const char *q_path,
11 char **body, int *b_size, char **ctype);