]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add config read tool read config
authorBastian Dehn <hhaalo@arcor.de>
Sat, 2 Mar 2024 21:02:16 +0000 (22:02 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 2 Mar 2024 21:02:16 +0000 (22:02 +0100)
src/kds_s2000w_net.conf
tools/read_config.c

index bce4ac9c77f9b7edce96a40cee7087b44a13127a..698f116301c2e49b221e6ab0de53ed4cd7c34501 100644 (file)
@@ -1,3 +1,2 @@
-# scanner_url = http://scanner.example.com
 scanner_url = http://scanner.example.com
-
+username = muster
index 964292bdce7dd1e01c55867ac3d324dc10d9f59a..a2028e1049dd8fe6b9e8b9509da796b1ffae6dd3 100644 (file)
@@ -5,14 +5,14 @@
 int main(int argc, char** argv)
 {
        program_config* config = malloc(sizeof(program_config));
-
        char* config_stream = NULL;
+
+       printf("config file %s\n", argv[1]);
        read_config_file(argv[1], &config_stream);
-       printf("config:\n%s\n", config_stream);
        load_config(config, config_stream);
 
-       printf("scanner_url: %s", config->scanner_url);
-       printf("username %s", config->username);
+       printf("scanner_url: %s\n", config->scanner_url);
+       printf("username: %s\n", config->username);
 
        free(config_stream);
        config_stream = NULL;