MINOR: cfgparse: Parse scope lines and save the last one parsed
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 4 Nov 2016 21:36:15 +0000 (22:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 9 Nov 2016 21:56:59 +0000 (22:56 +0100)
commit79bdef3cadaae20c3f3443f9732a7fbc2986b007
tree25da1e7ea3661fd0b21ed7215d93fd7204197d94
parent7110b40d0686441f6212af65b3a046623eb6fb49
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.
include/common/cfgparse.h
src/cfgparse.c