diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-16 12:18:04 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-16 12:21:25 +0300 |
commit | aa31497d9f0a3e96801d3752dd2d8f4ea20a2f4c (patch) | |
tree | 3bdf880ec5c4bd2c97d7d7ff665e13a7ca4b0a76 /src/txtacc.c | |
parent | 8eb1be8941228d01438436b53dd46b422ba980a3 (diff) | |
download | grecs-aa31497d9f0a3e96801d3752dd2d8f4ea20a2f4c.tar.gz grecs-aa31497d9f0a3e96801d3752dd2d8f4ea20a2f4c.tar.bz2 |
Implement parser for git-style config files.
* am/grecs.m4: New option: parser-git
* doc/GRECS_SETUP.3: Document new options.
* src/git-parser.c: New file.
* src/Make.am [GRECS_COND_GIT_PARSER]: Define GRECS_PARSER_GIT.
(GRECS_SRC): Add GRECS_PARSER_GIT.
* src/grecs.h (grecs_git_parser): New proto.
* src/txtacc.c (grecs_txtacc_free): Ignore NULL argument.
Diffstat (limited to 'src/txtacc.c')
-rw-r--r-- | src/txtacc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/txtacc.c b/src/txtacc.c index ff13e42..5ff9ec6 100644 --- a/src/txtacc.c +++ b/src/txtacc.c @@ -105,10 +105,12 @@ grecs_txtacc_create() void grecs_txtacc_free(struct grecs_txtacc *acc) { + if (acc) { grecs_list_free (acc->cur); grecs_list_free (acc->mem); free (acc); } +} void grecs_txtacc_grow(struct grecs_txtacc *acc, const char *buf, size_t size) |