diff options
author | grunfink <grunfink@noreply.codeberg.org> | 2023-07-13 08:42:30 +0000 |
---|---|---|
committer | grunfink <grunfink@noreply.codeberg.org> | 2023-07-13 08:42:30 +0000 |
commit | ff8e400e6730dc77a7321cdc47d2077a51ba74d9 (patch) | |
tree | 6f19968f2be83735b70816bcf21212e0086734f5 /utils.c | |
parent | a0e813db0ae3cbf8dae07ec5bec2e882c3b560c5 (diff) | |
parent | b4283865826de4cd0fd240001b4432dca8df9c77 (diff) |
Merge pull request 'XSS: Also encode in admin page, and other....' (#65) from yonle/snac2:master into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/65
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -85,7 +85,7 @@ int snac_init(const char *basedir) FILE *f; if (basedir == NULL) { - printf("Base directory:\n"); + printf("Base directory: "); srv_basedir = xs_strip_i(xs_readline(stdin)); } else @@ -98,7 +98,7 @@ int snac_init(const char *basedir) srv_basedir = xs_crop_i(srv_basedir, 0, -1); if (mtime(srv_basedir) != 0.0) { - printf("ERROR: directory '%s' must not exist\n", srv_basedir); + printf("ERROR: directory '%s' must not exist.\n", srv_basedir); return 1; } @@ -107,14 +107,14 @@ int snac_init(const char *basedir) xs *layout = xs_number_new(disk_layout); srv_config = xs_dict_set(srv_config, "layout", layout); - printf("Network address [%s]:\n", xs_dict_get(srv_config, "address")); + printf("Network address [%s]: ", xs_dict_get(srv_config, "address")); { xs *i = xs_strip_i(xs_readline(stdin)); if (*i) srv_config = xs_dict_set(srv_config, "address", i); } - printf("Network port [%d]:\n", (int)xs_number_get(xs_dict_get(srv_config, "port"))); + printf("Network port [%d]: ", (int)xs_number_get(xs_dict_get(srv_config, "port"))); { xs *i = xs_strip_i(xs_readline(stdin)); if (*i) { @@ -123,7 +123,7 @@ int snac_init(const char *basedir) } } - printf("Host name:\n"); + printf("Host name: "); { xs *i = xs_strip_i(xs_readline(stdin)); if (*i == '\0') @@ -132,7 +132,7 @@ int snac_init(const char *basedir) srv_config = xs_dict_set(srv_config, "host", i); } - printf("URL prefix:\n"); + printf("URL prefix: "); { xs *i = xs_strip_i(xs_readline(stdin)); @@ -144,7 +144,7 @@ int snac_init(const char *basedir) } } - printf("Admin email address (optional):\n"); + printf("Admin email address (optional): "); { xs *i = xs_strip_i(xs_readline(stdin)); |