diff options
| author | 2024-05-23 10:01:37 +0200 | |
|---|---|---|
| committer | 2024-05-23 10:01:37 +0200 | |
| commit | 8cf7559a7e21c5757455b948814d61e6e96f08f1 (patch) | |
| tree | c9a9d6d637977f97ebfc83ba36ae794fe5f9d8c1 /format.c | |
| parent | Also return an application/ld+json object in webfinger. (diff) | |
| download | penes-snac2-8cf7559a7e21c5757455b948814d61e6e96f08f1.tar.gz penes-snac2-8cf7559a7e21c5757455b948814d61e6e96f08f1.tar.xz penes-snac2-8cf7559a7e21c5757455b948814d61e6e96f08f1.zip | |
Added more const.
Diffstat (limited to 'format.c')
| -rw-r--r-- | format.c | 11 |
1 files changed, 7 insertions, 4 deletions
| @@ -82,7 +82,8 @@ static xs_str *format_line(const char *line, xs_list **attach) | |||
| 82 | /* formats a line */ | 82 | /* formats a line */ |
| 83 | { | 83 | { |
| 84 | xs_str *s = xs_str_new(NULL); | 84 | xs_str *s = xs_str_new(NULL); |
| 85 | char *p, *v; | 85 | char *p; |
| 86 | const char *v; | ||
| 86 | 87 | ||
| 87 | /* split by markup */ | 88 | /* split by markup */ |
| 88 | xs *sm = xs_regex_split(line, | 89 | xs *sm = xs_regex_split(line, |
| @@ -155,7 +156,8 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag | |||
| 155 | int in_pre = 0; | 156 | int in_pre = 0; |
| 156 | int in_blq = 0; | 157 | int in_blq = 0; |
| 157 | xs *list; | 158 | xs *list; |
| 158 | char *p, *v; | 159 | char *p; |
| 160 | const char *v; | ||
| 159 | 161 | ||
| 160 | /* work by lines */ | 162 | /* work by lines */ |
| 161 | list = xs_split(content, "\n"); | 163 | list = xs_split(content, "\n"); |
| @@ -234,7 +236,7 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag | |||
| 234 | /* traditional emoticons */ | 236 | /* traditional emoticons */ |
| 235 | xs *d = emojis(); | 237 | xs *d = emojis(); |
| 236 | int c = 0; | 238 | int c = 0; |
| 237 | char *k, *v; | 239 | const char *k, *v; |
| 238 | 240 | ||
| 239 | while (xs_dict_next(d, &k, &v, &c)) { | 241 | while (xs_dict_next(d, &k, &v, &c)) { |
| 240 | const char *t = NULL; | 242 | const char *t = NULL; |
| @@ -280,7 +282,8 @@ xs_str *sanitize(const char *content) | |||
| 280 | xs_str *s = xs_str_new(NULL); | 282 | xs_str *s = xs_str_new(NULL); |
| 281 | xs *sl; | 283 | xs *sl; |
| 282 | int n = 0; | 284 | int n = 0; |
| 283 | char *p, *v; | 285 | char *p; |
| 286 | const char *v; | ||
| 284 | 287 | ||
| 285 | sl = xs_regex_split(content, "</?[^>]+>"); | 288 | sl = xs_regex_split(content, "</?[^>]+>"); |
| 286 | 289 | ||