MCPcopy Create free account
hub / github.com/acl-dev/acl / http_creator

Function http_creator

app/wizard/http_creator.cpp:170–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void http_creator(const char* name, const char* type)
171{
172 bool loop;
173 file_tmpl tmpl;
174
175 if (name && *name && type && *type) {
176 loop = true;
177 } else {
178 loop = false;
179 }
180
181 // ����Դ��������Ŀ¼
182 tmpl.set_path_from("tmpl/http");
183
184 while (true) {
185 char buf[256];
186 int n;
187
188 if (name == NULL || *name == 0) {
189 printf("please input your program name: ");
190 fflush(stdout);
191 n = acl_vstream_gets_nonl(ACL_VSTREAM_IN, buf, sizeof(buf));
192 if (n == ACL_VSTREAM_EOF) {
193 break;
194 }
195
196 if (n == 0) {
197 acl::safe_snprintf(buf, sizeof(buf), "http_demo");
198 }
199
200 name = buf;
201 }
202
203 tmpl.set_project_name(name);
204
205 // ����Ŀ¼
206 tmpl.create_dirs();
207
208 tmpl.create_common();
209 create_http_servlet(tmpl, type);
210
211 if (!loop) {
212 break;
213 }
214 }
215}

Callers 2

create_http_serviceFunction · 0.85
mainFunction · 0.85

Calls 5

acl_vstream_gets_nonlFunction · 0.85
safe_snprintfFunction · 0.85
create_http_servletFunction · 0.85
create_dirsMethod · 0.80
create_commonMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…