mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 17:45:04 +00:00
More symbol renaming.
This commit is contained in:
parent
74d30a561c
commit
ba4df29abd
3 changed files with 6 additions and 3 deletions
2
main.c
2
main.c
|
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
|
|||
/* ... */
|
||||
basedir = GET_ARGV();
|
||||
|
||||
return initdb(basedir);
|
||||
return snac_init(basedir);
|
||||
}
|
||||
|
||||
if (strcmp(cmd, "upgrade") == 0) {
|
||||
|
|
2
snac.h
2
snac.h
|
@ -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,
|
||||
char **body, int *b_size, char **ctype);
|
||||
|
||||
int initdb(const char *_basedir);
|
||||
int snac_init(const char *_basedir);
|
||||
int adduser(const char *uid);
|
||||
int resetpwd(snac *snac);
|
||||
|
|
5
utils.c
5
utils.c
|
@ -79,7 +79,7 @@ const char *greeting_html =
|
|||
"<p>This site is powered by <abbr title=\"Social Networks Are Crap\">snac</abbr>.</p>\n"
|
||||
"</body></html>\n";
|
||||
|
||||
int initdb(const char *basedir)
|
||||
int snac_init(const char *basedir)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
|
@ -154,6 +154,9 @@ int initdb(const char *basedir)
|
|||
xs *odir = xs_fmt("%s/object", srv_basedir);
|
||||
mkdir(odir, 0755);
|
||||
|
||||
xs *qdir = xs_fmt("%s/queue", srv_basedir);
|
||||
mkdir(qdir, 0755);
|
||||
|
||||
xs *gfn = xs_fmt("%s/greeting.html", srv_basedir);
|
||||
if ((f = fopen(gfn, "w")) == NULL) {
|
||||
printf("ERROR: cannot create '%s'\n", gfn);
|
||||
|
|
Loading…
Reference in a new issue