diff options
| author | 2022-11-21 11:14:24 +0100 | |
|---|---|---|
| committer | 2022-11-21 11:14:24 +0100 | |
| commit | b487b41be63315b6c0994b43418fb3b4fd181d03 (patch) | |
| tree | 11af29cfe81301e41bd548e429a714ad79bb5747 /html.c | |
| parent | Changed debug level to grampa max_levels reached. (diff) | |
| download | snac2-b487b41be63315b6c0994b43418fb3b4fd181d03.tar.gz snac2-b487b41be63315b6c0994b43418fb3b4fd181d03.tar.xz snac2-b487b41be63315b6c0994b43418fb3b4fd181d03.zip | |
Backport from xs (new xs_set() API).
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -773,11 +773,13 @@ d_char *html_timeline(snac *snac, char *list, int local) | |||
| 773 | /* returns the HTML for the timeline */ | 773 | /* returns the HTML for the timeline */ |
| 774 | { | 774 | { |
| 775 | d_char *s = xs_str_new(NULL); | 775 | d_char *s = xs_str_new(NULL); |
| 776 | xs_set *seen = xs_set_new(4096); | 776 | xs_set seen; |
| 777 | char *v; | 777 | char *v; |
| 778 | double t = ftime(); | 778 | double t = ftime(); |
| 779 | int num = 0; | 779 | int num = 0; |
| 780 | 780 | ||
| 781 | xs_set_init(&seen); | ||
| 782 | |||
| 781 | s = html_user_header(snac, s, local); | 783 | s = html_user_header(snac, s, local); |
| 782 | 784 | ||
| 783 | if (!local) | 785 | if (!local) |
| @@ -789,7 +791,7 @@ d_char *html_timeline(snac *snac, char *list, int local) | |||
| 789 | while (xs_list_iter(&list, &v)) { | 791 | while (xs_list_iter(&list, &v)) { |
| 790 | xs *msg = timeline_get(snac, v); | 792 | xs *msg = timeline_get(snac, v); |
| 791 | 793 | ||
| 792 | s = html_entry(snac, s, msg, seen, local, 0, &num); | 794 | s = html_entry(snac, s, msg, &seen, local, 0, &num); |
| 793 | } | 795 | } |
| 794 | 796 | ||
| 795 | s = xs_str_cat(s, "</div>\n"); | 797 | s = xs_str_cat(s, "</div>\n"); |
| @@ -828,7 +830,7 @@ d_char *html_timeline(snac *snac, char *list, int local) | |||
| 828 | 830 | ||
| 829 | s = xs_str_cat(s, "</body>\n</html>\n"); | 831 | s = xs_str_cat(s, "</body>\n</html>\n"); |
| 830 | 832 | ||
| 831 | xs_set_free(seen); | 833 | xs_set_free(&seen); |
| 832 | 834 | ||
| 833 | return s; | 835 | return s; |
| 834 | } | 836 | } |