summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-09-14 17:57:07 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-09-14 17:57:07 +0100
commite1f41810ac85a0d210062ed33f43938dc4b03be4 (patch)
tree24e100886b063dfe8aa49d6881070b9e238296c4 /config.h
parente546de81cbecac2b02d29a02d6c6fd7d0785d739 (diff)
Implement arrays in the configuration file and start using them to allow for multiple connect commands.
Diffstat (limited to 'config.h')
-rw-r--r--config.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.h b/config.h
index 2f2db9f..d478480 100644
--- a/config.h
+++ b/config.h
@@ -40,6 +40,12 @@
// getconfstr() returns.
int getconfstr(char *confname, char *filename, char* dest);
+// Populates 'dest' with the values of the configuration array option
+// with name 'confname' from configuration file 'filename'.
+// Returns 1 on success, 0 on reading no values, or -1 on an error.
+// On error, dest[0] is set to the error string for later retrieval.
+int getconfarr(char *confname, char *filename, char dest[MAXCONFARR][MAXDATASIZE]);
+
// Returns the value of the configuration option with name
// 'confname' from configuration file 'filename'.
// Sets errno to 0 on success, or ECONFINT if it fails, in which case the return value is undefined.