From eb677dcd774a460da9349cc3622c5e14317645bd Mon Sep 17 00:00:00 2001 From: npmccallum Date: Sun, 17 Jan 2010 00:49:40 +0000 Subject: make code more c++ish (major rework) git-svn-id: http://libproxy.googlecode.com/svn/trunk@457 c587cffe-e639-0410-9787-d7902ae8ed56 --- utils/CMakeLists.txt | 5 +---- utils/iniparse.c | 23 ----------------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 utils/iniparse.c (limited to 'utils') diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 4f27eb7..eebe337 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -5,8 +5,5 @@ add_executable(proxy proxy.c) target_link_libraries(proxy libproxy) install(TARGETS proxy RUNTIME DESTINATION ${rbindir}) -add_executable(iniparse iniparse.c) -target_link_libraries(iniparse libproxy) - -set_target_properties(proxy iniparse PROPERTIES COMPILE_FLAGS "-g -std=c99") +set_target_properties(proxy PROPERTIES COMPILE_FLAGS "-g -std=c99") diff --git a/utils/iniparse.c b/utils/iniparse.c deleted file mode 100644 index 211f835..0000000 --- a/utils/iniparse.c +++ /dev/null @@ -1,23 +0,0 @@ -#include - -#include "../libproxy/strdict.h" -#include "../libproxy/config_file.h" - -int main(int argc, char **argv) { - if (argc != 4) { - printf("You started with %d parameters.\n", argc); - printf("Wrong invocation. Start with 3 parameters:\n"); - printf("1. path to config file\n2. Section name in conf file.\n3. Keyname to read.\n"); - printf("iniparse will return \"key = value\" if found\n."); - return 2; - } - pxConfigFile* cf = px_config_file_new(argv[1]); - if (!cf) { - printf("Could not find conf file.\n."); - return 1; - } - char* val1 = px_config_file_get_value(cf, argv[2], argv[3]); - printf("%s = %s", argv[3] == NULL ? "NULL" : argv[3], val1 == NULL ? "NULL" : val1); - px_config_file_free(cf); - return 0; -} -- cgit v1.2.1