diff options
Diffstat (limited to 'src/sc_parse.c')
-rw-r--r-- | src/sc_parse.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sc_parse.c b/src/sc_parse.c index 3853800..a8b2c09 100644 --- a/src/sc_parse.c +++ b/src/sc_parse.c @@ -140,6 +140,18 @@ SCBlock *sc_block_append_end(SCBlock *bl, char *name, char *opt, char *contents) } +void sc_block_append_block(SCBlock *bl, SCBlock *bln) +{ + + if ( bl == NULL ) return; + + while ( bl->next != NULL ) bl = bl->next; + + bl->next = bln; + bln->next = NULL; +} + + /* Append a new block to the chain inside "parent". * "name", "options" and "contents" will not be copied. Returns the block just * created, or NULL on error. */ |