Minor prototype change.

This commit is contained in:
default 2023-05-21 20:11:06 +02:00
parent d055b63a0d
commit 63053ab5db
2 changed files with 8 additions and 8 deletions

View file

@ -38,10 +38,10 @@ struct {
}; };
static d_char *format_line(const char *line) static xs_str *format_line(const char *line)
/* formats a line */ /* formats a line */
{ {
d_char *s = xs_str_new(NULL); xs_str *s = xs_str_new(NULL);
char *p, *v; char *p, *v;
/* split by markup */ /* split by markup */
@ -90,10 +90,10 @@ static d_char *format_line(const char *line)
} }
d_char *not_really_markdown(const char *content) xs_str *not_really_markdown(const char *content)
/* formats a content using some Markdown rules */ /* formats a content using some Markdown rules */
{ {
d_char *s = xs_str_new(NULL); xs_str *s = xs_str_new(NULL);
int in_pre = 0; int in_pre = 0;
int in_blq = 0; int in_blq = 0;
xs *list; xs *list;
@ -172,10 +172,10 @@ const char *valid_tags[] = {
"span", "i", "b", "u", "pre", "code", "em", "strong", NULL "span", "i", "b", "u", "pre", "code", "em", "strong", NULL
}; };
d_char *sanitize(const char *content) xs_str *sanitize(const char *content)
/* cleans dangerous HTML output */ /* cleans dangerous HTML output */
{ {
d_char *s = xs_str_new(NULL); xs_str *s = xs_str_new(NULL);
xs *sl; xs *sl;
int n = 0; int n = 0;
char *p, *v; char *p, *v;

4
snac.h
View file

@ -228,8 +228,8 @@ int activitypub_post_handler(const xs_dict *req, const char *q_path,
char *payload, int p_size, char *payload, int p_size,
char **body, int *b_size, char **ctype); char **body, int *b_size, char **ctype);
d_char *not_really_markdown(const char *content); xs_str *not_really_markdown(const char *content);
d_char *sanitize(const char *str); xs_str *sanitize(const char *content);
int html_get_handler(const xs_dict *req, const char *q_path, int html_get_handler(const xs_dict *req, const char *q_path,
char **body, int *b_size, char **ctype); char **body, int *b_size, char **ctype);