mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
1515b9496b
commit
2de8e70ab0
3 changed files with 18 additions and 19 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue