-out_store:
- v[i].name = strdup(variable);
- v[i].type = TYPE_STRING;
- v[i].ptr = strdup(value);
+ return &v[i];
+}
+
+int store_str_variable_value_to_array(const char *variable, const char *value,
+ struct plotter_config *cfg)
+{
+ struct variable_value *v;
+
+ v = prepare_slot_for_insertion(cfg, variable);
+
+ v->name = strdup(variable);
+ v->type = TYPE_STRING;
+ v->ptr = strdup(value);
+
+ return 0;
+}
+
+int store_int_variable_value_to_array(const char *variable, int value,
+ struct plotter_config *cfg)
+{
+ struct variable_value *v;
+ int *p;
+
+ v = prepare_slot_for_insertion(cfg, variable);
+
+ v->name = strdup(variable);
+ v->type = TYPE_INT;
+ p = v->ptr = malloc(sizeof(value));
+ *p = value;