dav/main.c

changeset 107
a0903d2d8e3e
parent 105
ee0de2b1872e
child 119
451607eeff05
equal deleted inserted replaced
106:9cec78f23cbf 107:a0903d2d8e3e
52 52
53 //#define DO_THE_TEST 53 //#define DO_THE_TEST
54 #include <libidav/davqlparser.h> 54 #include <libidav/davqlparser.h>
55 void test() { 55 void test() {
56 DavQLStatement *stmt = dav_parse_statement(S( 56 DavQLStatement *stmt = dav_parse_statement(S(
57 "get *,count(*) as count from /uap/House of Cards with depth = infinity")); 57 "get - from '/path/with space' with depth = %d"));
58 dav_debug_statement(stmt); 58 dav_debug_statement(stmt);
59 dav_free_statement(stmt); 59 dav_free_statement(stmt);
60 } 60 }
61 61
62 int main(int argc, char **argv) { 62 int main(int argc, char **argv) {
64 initGenericErrorDefaultFunc(&fnc); 64 initGenericErrorDefaultFunc(&fnc);
65 ctx = dav_context_new(); 65 ctx = dav_context_new();
66 load_config(ctx); 66 load_config(ctx);
67 #ifdef DO_THE_TEST 67 #ifdef DO_THE_TEST
68 test(); 68 test();
69 return 0;
69 #endif 70 #endif
70 71
71 memcpy(ctx->http_proxy, get_http_proxy(), sizeof(Proxy)); 72 memcpy(ctx->http_proxy, get_http_proxy(), sizeof(Proxy));
72 memcpy(ctx->https_proxy, get_https_proxy(), sizeof(Proxy)); 73 memcpy(ctx->https_proxy, get_https_proxy(), sizeof(Proxy));
73 74

mercurial