MINOR: cfgparse: Parse scope lines and save the last one parsed
A scope is a section name between square bracket, alone on its line, ie:
[scope-name]
...
The spaces at the beginning and at the end of the line are skipped. Comments at
the end of the line are also skipped.
When a scope is parsed, its name is saved in the global variable
cfg_scope. Initially, cfg_scope is NULL and it remains NULL until a valid scope
line is parsed.
This feature remains unused in the HAProxy configuration file and
undocumented. However, it will be used during SPOE configuration parsing.
diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h
index 9f432ad..9e75a65 100644
--- a/include/common/cfgparse.h
+++ b/include/common/cfgparse.h
@@ -62,6 +62,7 @@
extern int cfg_maxpconn;
extern int cfg_maxconn;
+extern char *cfg_scope;
int cfg_parse_global(const char *file, int linenum, char **args, int inv);
int cfg_parse_listen(const char *file, int linenum, char **args, int inv);