diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-04-04 22:37:11 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-04-04 22:37:11 +0200 |
| commit | 3c852ea244a4d774a89be7234eada00f4f1a26c7 (patch) | |
| tree | 05fcaab84a666e27cf2e4f3e9a30288209f86a3d /src/replace-table.h | |
| parent | 759f11d12743a86b1efce1516328bb9d82c0e716 (diff) | |
| download | cataract-3c852ea244a4d774a89be7234eada00f4f1a26c7.tar.xz | |
Speed up replace table by using token parser
Diffstat (limited to 'src/replace-table.h')
| -rw-r--r-- | src/replace-table.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 (<!-- $(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 ( <!-- $(TOKEN) --> ) + * or as a parameter value of some tag ( $(TOKEN) ) + * + */ +char * get_next_token (const char *s, char **start, char **end, gboolean *tag_parameter); |
