1357 |
1364 |
1358 #define MALLOC malloc |
1365 #define MALLOC malloc |
1359 #define CALLOC(size) calloc(1, size) |
1366 #define CALLOC(size) calloc(1, size) |
1360 #define REALLOC realloc |
1367 #define REALLOC realloc |
1361 #define FREE free |
1368 #define FREE free |
|
1369 #define STRDUP strdup |
1362 |
1370 |
1363 // func util functions |
1371 // func util functions |
1364 FuncStruct* func_resolve(pblock *pb, Session *sn, Request *rq); |
1372 FuncStruct* func_resolve(pblock *pb, Session *sn, Request *rq); |
1365 int func_exec(pblock *pb, Session *sn, Request *rq); |
1373 int func_exec(pblock *pb, Session *sn, Request *rq); |
1366 struct FuncStruct func_insert(char *name, FuncPtr fn); |
1374 struct FuncStruct func_insert(char *name, FuncPtr fn); |
1382 |
1390 |
1383 NSAPI_PUBLIC void http_format_etag(Session *sn, Request *rq, char *etagp, int etaglen, off_t size, time_t mtime); |
1391 NSAPI_PUBLIC void http_format_etag(Session *sn, Request *rq, char *etagp, int etaglen, off_t size, time_t mtime); |
1384 NSAPI_PUBLIC int http_check_preconditions(Session *sn, Request *rq, struct tm *mtm, const char *etag); |
1392 NSAPI_PUBLIC int http_check_preconditions(Session *sn, Request *rq, struct tm *mtm, const char *etag); |
1385 NSAPI_PUBLIC int http_set_finfo(Session *sn, Request *rq, struct stat *finfo); |
1393 NSAPI_PUBLIC int http_set_finfo(Session *sn, Request *rq, struct stat *finfo); |
1386 |
1394 |
|
1395 NSAPI_PUBLIC char **http_hdrs2env(pblock *pb); |
1387 |
1396 |
1388 typedef void (*thrstartfunc)(void *); |
1397 typedef void (*thrstartfunc)(void *); |
1389 SYS_THREAD INTsysthread_start(int prio, int stksz, thrstartfunc fn, void *arg); |
1398 SYS_THREAD INTsysthread_start(int prio, int stksz, thrstartfunc fn, void *arg); |
1390 NSAPI_PUBLIC void INTsysthread_sleep(int milliseconds); |
1399 NSAPI_PUBLIC void INTsysthread_sleep(int milliseconds); |
1391 |
1400 |