mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Fixed a nasty macro expansion bug.
This commit is contained in:
parent
22b89875aa
commit
3acc70b270
12
main.c
12
main.c
@ -54,6 +54,7 @@ char *get_argv(int *argi, int argc, char *argv[])
|
||||
|
||||
#define GET_ARGV() get_argv(&argi, argc, argv)
|
||||
|
||||
d_char *html_timeline(snac *snac, char *list, int local);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@ -131,6 +132,17 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(cmd, "timeline") == 0) {
|
||||
xs *list = local_list(&snac, 0xfffffff);
|
||||
xs *body = html_timeline(&snac, list, 1);
|
||||
|
||||
printf("%s\n", body);
|
||||
user_free(&snac);
|
||||
srv_free();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((url = GET_ARGV()) == NULL)
|
||||
return usage();
|
||||
|
||||
|
7
snac.c
7
snac.c
@ -30,6 +30,13 @@ int srv_running = 0;
|
||||
int dbglevel = 0;
|
||||
|
||||
|
||||
int valid_status(int status)
|
||||
/* is this HTTP status valid? */
|
||||
{
|
||||
return status >= 200 && status <= 299;
|
||||
}
|
||||
|
||||
|
||||
d_char *tid(int offset)
|
||||
/* returns a time-based Id */
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user