More symbol renaming.

This commit is contained in:
default 2023-01-31 18:38:56 +01:00
parent 74d30a561c
commit ba4df29abd
3 changed files with 6 additions and 3 deletions

2
main.c
View File

@ -63,7 +63,7 @@ int main(int argc, char *argv[])
/* ... */ /* ... */
basedir = GET_ARGV(); basedir = GET_ARGV();
return initdb(basedir); return snac_init(basedir);
} }
if (strcmp(cmd, "upgrade") == 0) { if (strcmp(cmd, "upgrade") == 0) {

2
snac.h
View File

@ -178,6 +178,6 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
char **body, int *b_size, char **ctype); char **body, int *b_size, char **ctype);
int initdb(const char *_basedir); int snac_init(const char *_basedir);
int adduser(const char *uid); int adduser(const char *uid);
int resetpwd(snac *snac); int resetpwd(snac *snac);

View File

@ -79,7 +79,7 @@ const char *greeting_html =
"<p>This site is powered by <abbr title=\"Social Networks Are Crap\">snac</abbr>.</p>\n" "<p>This site is powered by <abbr title=\"Social Networks Are Crap\">snac</abbr>.</p>\n"
"</body></html>\n"; "</body></html>\n";
int initdb(const char *basedir) int snac_init(const char *basedir)
{ {
FILE *f; FILE *f;
@ -154,6 +154,9 @@ int initdb(const char *basedir)
xs *odir = xs_fmt("%s/object", srv_basedir); xs *odir = xs_fmt("%s/object", srv_basedir);
mkdir(odir, 0755); mkdir(odir, 0755);
xs *qdir = xs_fmt("%s/queue", srv_basedir);
mkdir(qdir, 0755);
xs *gfn = xs_fmt("%s/greeting.html", srv_basedir); xs *gfn = xs_fmt("%s/greeting.html", srv_basedir);
if ((f = fopen(gfn, "w")) == NULL) { if ((f = fopen(gfn, "w")) == NULL) {
printf("ERROR: cannot create '%s'\n", gfn); printf("ERROR: cannot create '%s'\n", gfn);