]> git.itanic.dy.fi Git - log-plotter/commitdiff
config.c: Export store_str_variable_value_to_array()
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Thu, 16 Jan 2014 20:20:07 +0000 (22:20 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Thu, 16 Jan 2014 20:20:07 +0000 (22:20 +0200)
Make it possible to store string values into array database even from
outside of config.c.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
config.c
config.h

index 8b84d58a27f7bfa7f1f7b6305342d8b1bc5d0fea..5f1f633564524004b7eef0dd70cf9144570e2487 100644 (file)
--- a/config.c
+++ b/config.c
@@ -102,9 +102,8 @@ static struct variable_value *prepare_slot_for_insertion(
        return &v[i];
 }
 
-static int store_str_variable_value_to_array(const char *variable,
-                                       const char *value,
-                                       struct plotter_config *cfg)
+int store_str_variable_value_to_array(const char *variable, const char *value,
+                               struct plotter_config *cfg)
 {
        struct variable_value *v;
 
index c8abadc9f8cbb6f7de17e9d0cb3ec2e619e4fc07..c4df7108213c67a20a962fe0540f5ae9d5663c47 100644 (file)
--- a/config.h
+++ b/config.h
@@ -30,6 +30,8 @@ int read_args(int argc, char *argv[], struct plotter_config *cfg);
 int populate_config_data_from_file(const char *path,
                                struct plotter_config *cfg);
 
+int store_str_variable_value_to_array(const char *variable, const char *value,
+                               struct plotter_config *cfg);
 int store_int_variable_value_to_array(const char *variable, int value,
                                struct plotter_config *cfg);
 int replace_variables_with_values(char *str, size_t len,