From 3c852ea244a4d774a89be7234eada00f4f1a26c7 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 4 Apr 2009 22:37:11 +0200 Subject: Speed up replace table by using token parser --- src/replace-table.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/replace-table.h') diff --git a/src/replace-table.h b/src/replace-table.h index 5c2b35e..8146f25 100644 --- a/src/replace-table.h +++ b/src/replace-table.h @@ -56,3 +56,14 @@ void replace_table_process (gchar **buffer, ReplaceTable *table); void adjust_tags_normal (char **str); void adjust_tags_parameter (char **str); + + +/* + * get_next_token: retrieves first token ( or $(TOKEN)) in the string + * - returns newly allocated token name, caller is responsible for freeing + * - start and end are positions of token in the source string 's' + * - tag_parameter indicates where the token stands - as a tag itself ( ) + * or as a parameter value of some tag ( $(TOKEN) ) + * + */ +char * get_next_token (const char *s, char **start, char **end, gboolean *tag_parameter); -- cgit v1.2.3