This the first of a set of cleanups related to the removal of 2
preferences: save_userid_local and userid. The commits are
ordered so that a sane running state remains, should a
bisect ever lands here.
Here, just read a git or XML logbook including the to be removed
preferences, as existing users can have this data sitting around.
The only thing done here is not to store the possibly read data
for the mentioned preferences.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The match() function compares a pattern with a name with
a twist: The name may either end in '\0' or '.'. If pattern
and name match, a parsing function is called on a buffer and
a destination value. The result of the parsing is not checked.
This seems awfully XML-specific and therefore move the function
from the general parse.c to the specialized parse-xml.c unit
and make it of local linkage.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Mostly replace "return (expression);" by "return expression;" and one
case of "function((parameter))" by "function(parameter)".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
There are ca. 50 constructs of the kind
same_string(s, "")
to test for empty or null strings. Replace them by the new helper
function empty_string().
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The object cur_setting was defined in core/pref.h. Instead, declare
it as extern and define it in core/parse.c. This silences a compiler
warning, since inclusion of core/pref.h would define the object, which
was then left unused in tests/testparse.cpp.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This should help us to move parsing that is not XML related to other
files, hopefully making the code cleaner.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>