summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/utils.c b/utils.c
index a33362c..9c510ff 100644
--- a/utils.c
+++ b/utils.c
@@ -87,7 +87,7 @@ int snac_init(const char *basedir)
87 FILE *f; 87 FILE *f;
88 88
89 if (basedir == NULL) { 89 if (basedir == NULL) {
90 printf("Base directory: "); 90 printf("Base directory: "); fflush(stdout);
91 srv_basedir = xs_strip_i(xs_readline(stdin)); 91 srv_basedir = xs_strip_i(xs_readline(stdin));
92 } 92 }
93 else 93 else
@@ -109,14 +109,14 @@ int snac_init(const char *basedir)
109 xs *layout = xs_number_new(disk_layout); 109 xs *layout = xs_number_new(disk_layout);
110 srv_config = xs_dict_set(srv_config, "layout", layout); 110 srv_config = xs_dict_set(srv_config, "layout", layout);
111 111
112 printf("Network address [%s]: ", xs_dict_get(srv_config, "address")); 112 printf("Network address [%s]: ", xs_dict_get(srv_config, "address")); fflush(stdout);
113 { 113 {
114 xs *i = xs_strip_i(xs_readline(stdin)); 114 xs *i = xs_strip_i(xs_readline(stdin));
115 if (*i) 115 if (*i)
116 srv_config = xs_dict_set(srv_config, "address", i); 116 srv_config = xs_dict_set(srv_config, "address", i);
117 } 117 }
118 118
119 printf("Network port [%d]: ", (int)xs_number_get(xs_dict_get(srv_config, "port"))); 119 printf("Network port [%d]: ", (int)xs_number_get(xs_dict_get(srv_config, "port"))); fflush(stdout);
120 { 120 {
121 xs *i = xs_strip_i(xs_readline(stdin)); 121 xs *i = xs_strip_i(xs_readline(stdin));
122 if (*i) { 122 if (*i) {
@@ -125,7 +125,7 @@ int snac_init(const char *basedir)
125 } 125 }
126 } 126 }
127 127
128 printf("Host name: "); 128 printf("Host name: "); fflush(stdout);
129 { 129 {
130 xs *i = xs_strip_i(xs_readline(stdin)); 130 xs *i = xs_strip_i(xs_readline(stdin));
131 if (*i == '\0') 131 if (*i == '\0')
@@ -134,7 +134,7 @@ int snac_init(const char *basedir)
134 srv_config = xs_dict_set(srv_config, "host", i); 134 srv_config = xs_dict_set(srv_config, "host", i);
135 } 135 }
136 136
137 printf("URL prefix: "); 137 printf("URL prefix: "); fflush(stdout);
138 { 138 {
139 xs *i = xs_strip_i(xs_readline(stdin)); 139 xs *i = xs_strip_i(xs_readline(stdin));
140 140
@@ -146,7 +146,7 @@ int snac_init(const char *basedir)
146 } 146 }
147 } 147 }
148 148
149 printf("Admin email address (optional): "); 149 printf("Admin email address (optional): "); fflush(stdout);
150 { 150 {
151 xs *i = xs_strip_i(xs_readline(stdin)); 151 xs *i = xs_strip_i(xs_readline(stdin));
152 152
@@ -227,7 +227,7 @@ int adduser(const char *uid)
227 FILE *f; 227 FILE *f;
228 228
229 if (uid == NULL) { 229 if (uid == NULL) {
230 printf("Username: "); 230 printf("Username: "); fflush(stdout);
231 uid = xs_strip_i(xs_readline(stdin)); 231 uid = xs_strip_i(xs_readline(stdin));
232 } 232 }
233 233