|
|
@ -46,27 +46,50 @@ int main(int argc, char *argv[]) { // ClearDNS service |
|
|
|
LOG_LEVEL = LOG_DEBUG; |
|
|
|
log_info("ClearDNS server start (%s)", VERSION); |
|
|
|
|
|
|
|
char **test = string_list_init(); |
|
|
|
log_info("len -> %u", string_list_len(test)); |
|
|
|
string_list_append(&test, "test1"); |
|
|
|
string_list_append(&test, "test2"); |
|
|
|
string_list_append(&test, "test3"); |
|
|
|
log_info("len -> %u", string_list_len(test)); |
|
|
|
|
|
|
|
char *temp = string_list_dump(test); |
|
|
|
// char **test = string_list_init();
|
|
|
|
// log_info("len -> %u", string_list_len(test));
|
|
|
|
// string_list_append(&test, "test1");
|
|
|
|
// string_list_append(&test, "test2");
|
|
|
|
// string_list_append(&test, "test3");
|
|
|
|
// log_info("len -> %u", string_list_len(test));
|
|
|
|
//
|
|
|
|
// char *temp = string_list_dump(test);
|
|
|
|
// log_info("content -> %s", temp);
|
|
|
|
// free(temp);
|
|
|
|
//
|
|
|
|
// char **add = string_list_init();
|
|
|
|
// string_list_append(&add, "test4");
|
|
|
|
// string_list_append(&add, "test5");
|
|
|
|
//
|
|
|
|
// string_list_update(&test, add);
|
|
|
|
// log_info("len -> %d", string_list_len(test));
|
|
|
|
// temp = string_list_dump(test);
|
|
|
|
// log_info("content -> %s", temp);
|
|
|
|
// free(temp);
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t **test = uint32_list_init(); |
|
|
|
log_info("len -> %u", uint32_list_len(test)); |
|
|
|
uint32_list_append(&test, 1); |
|
|
|
uint32_list_append(&test, 2); |
|
|
|
uint32_list_append(&test, 3); |
|
|
|
log_info("len -> %u", uint32_list_len(test)); |
|
|
|
|
|
|
|
char *temp = uint32_list_dump(test); |
|
|
|
log_info("content -> %s", temp); |
|
|
|
free(temp); |
|
|
|
|
|
|
|
char **add = string_list_init(); |
|
|
|
string_list_append(&add, "test4"); |
|
|
|
string_list_append(&add, "test5"); |
|
|
|
uint32_t **add = uint32_list_init(); |
|
|
|
uint32_list_append(&add, 4); |
|
|
|
uint32_list_append(&add, 5); |
|
|
|
|
|
|
|
string_list_update(&test, add); |
|
|
|
log_info("len -> %d", string_list_len(test)); |
|
|
|
temp = string_list_dump(test); |
|
|
|
uint32_list_update(&test, add); |
|
|
|
log_info("len -> %d", uint32_list_len(test)); |
|
|
|
temp = uint32_list_dump(test); |
|
|
|
log_info("content -> %s", temp); |
|
|
|
free(temp); |
|
|
|
|
|
|
|
|
|
|
|
// process *test = process_init("TEST", "lls");
|
|
|
|
// process *test = process_init("TEST", "ls");
|
|
|
|
// process_add_arg(test, "-al");
|
|
|
|