From eb3092f8bd30d065c4e6f4bf0159309e1a960156 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 31 Mar 2011 23:23:24 +0200 Subject: block-parser: Add function to mark block as used Some blocks such as "IMG_LIST" are containers themselves and no data are retrieved from them. That way they don't ever get marked as used, resulting in constant hit in the generator loop. --- src/block-parser.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/block-parser.h') diff --git a/src/block-parser.h b/src/block-parser.h index 666d27a..21d0cfb 100644 --- a/src/block-parser.h +++ b/src/block-parser.h @@ -55,6 +55,13 @@ gchar * block_parser_get_data (BlockParser *parser, const gchar *key); */ gboolean block_parser_has_unused_data (BlockParser *parser, const gchar *key); +/* + * block_parser_set_as_used: manually set data as used - sometimes blocks can act as containers for other nested blocks and + * cannot be used itself + * + */ +void block_parser_set_as_used (BlockParser *parser, const gchar *key); + /* * block_parser_read_and_parse: reads input from the file and returns parsed line * - if there's a multiline block, string before the opening placeholder and -- cgit v1.2.3