summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/CMakeLists.txt5
-rw-r--r--utils/iniparse.c23
2 files changed, 1 insertions, 27 deletions
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 <stdio.h>
-
-#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;
-}