diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-08-19 16:12:16 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-30 13:32:09 -0700 |
commit | 2de8e70ab04b0cc254a1d04f31e7e02db57743fa (patch) | |
tree | 993cfc264185847bb4f3e45139ae5ccbd26dbb2d /core/parse.h | |
parent | 1515b9496b161ec3619a47306adb2e9124cfe594 (diff) | |
download | subsurface-2de8e70ab04b0cc254a1d04f31e7e02db57743fa.tar.gz |
Parser: move match() into core/parse-xml.c
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>
Diffstat (limited to 'core/parse.h')
-rw-r--r-- | core/parse.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/core/parse.h b/core/parse.h index 2a666ec4d..5682e4c03 100644 --- a/core/parse.h +++ b/core/parse.h @@ -61,8 +61,6 @@ int trimspace(char *buffer); void clear_table(struct dive_table *table); void start_match(const char *type, const char *name, char *buffer); void nonmatch(const char *type, const char *name, char *buffer); -typedef void (*matchfn_t)(char *buffer, void *); -int match(const char *pattern, int plen, const char *name, matchfn_t fn, char *buf, void *data); void event_start(void); void event_end(void); struct divecomputer *get_dc(void); |