diff options
| author | 2023-11-23 20:41:10 +0100 | |
|---|---|---|
| committer | 2023-11-23 20:41:10 +0100 | |
| commit | 741302cc3bd40ffac61677ef3c002559d65aa2c5 (patch) | |
| tree | 55ece541d6528091bf2de0fd72e1b7cfe2210469 /main.c | |
| parent | Minor xs_html tweaks. (diff) | |
| download | snac2-741302cc3bd40ffac61677ef3c002559d65aa2c5.tar.gz snac2-741302cc3bd40ffac61677ef3c002559d65aa2c5.tar.xz snac2-741302cc3bd40ffac61677ef3c002559d65aa2c5.zip | |
New function html_note() (still unused).
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 23 |
1 files changed, 23 insertions, 0 deletions
| @@ -56,6 +56,16 @@ char *get_argv(int *argi, int argc, char *argv[]) | |||
| 56 | 56 | ||
| 57 | #define GET_ARGV() get_argv(&argi, argc, argv) | 57 | #define GET_ARGV() get_argv(&argi, argc, argv) |
| 58 | 58 | ||
| 59 | #include "xs_html.h" | ||
| 60 | |||
| 61 | xs_html *html_note(snac *user, char *summary, | ||
| 62 | char *div_id, char *form_id, | ||
| 63 | char *ta_plh, char *ta_content, | ||
| 64 | char *edit_id, char *actor_id, | ||
| 65 | xs_val *cw_yn, char *cw_text, | ||
| 66 | xs_val *mnt_only, char *redir, | ||
| 67 | char *in_reply_to, int poll); | ||
| 68 | |||
| 59 | int main(int argc, char *argv[]) | 69 | int main(int argc, char *argv[]) |
| 60 | { | 70 | { |
| 61 | char *cmd; | 71 | char *cmd; |
| @@ -199,6 +209,19 @@ int main(int argc, char *argv[]) | |||
| 199 | srv_free(); | 209 | srv_free(); |
| 200 | #endif | 210 | #endif |
| 201 | 211 | ||
| 212 | { | ||
| 213 | xs_html *note = html_note(&snac, "Note...", | ||
| 214 | "DIV_ID", "FORM_ID", | ||
| 215 | "TEXTAREA_PLACEHOLDER", "TEXTAREA_CONTENT", | ||
| 216 | "EDIT_ID", "ACTOR_ID", | ||
| 217 | xs_stock_false, "CW_TEXT", | ||
| 218 | xs_stock_false, "REDIR", | ||
| 219 | "IN_REPLY_TO", 1); | ||
| 220 | |||
| 221 | xs *s1 = xs_html_render(note); | ||
| 222 | printf("\n%s\n", s1); | ||
| 223 | } | ||
| 224 | |||
| 202 | xs *idx = xs_fmt("%s/private.idx", snac.basedir); | 225 | xs *idx = xs_fmt("%s/private.idx", snac.basedir); |
| 203 | xs *list = index_list_desc(idx, 0, 256); | 226 | xs *list = index_list_desc(idx, 0, 256); |
| 204 | xs *tl = timeline_top_level(&snac, list); | 227 | xs *tl = timeline_top_level(&snac, list); |