summaryrefslogtreecommitdiff
path: root/src/replace-table.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/replace-table.h')
-rw-r--r--src/replace-table.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/replace-table.h b/src/replace-table.h
index 799956d..7d6b70e 100644
--- a/src/replace-table.h
+++ b/src/replace-table.h
@@ -23,17 +23,11 @@
G_BEGIN_DECLS
-typedef GHashTable ReplaceTable;
+typedef struct ReplaceTable ReplaceTable;
ReplaceTable * replace_table_new ();
-/*
- * replace_table_new_from_defines: creates new replace table object and fills it with defines from the hash table
- *
- */
-ReplaceTable * replace_table_new_from_defines (GHashTable *defines);
-
void replace_table_free (ReplaceTable *table);
@@ -48,6 +42,12 @@ void replace_table_add_key_int (ReplaceTable *table, const gchar *tag, gint valu
void replace_table_add_key_printf (ReplaceTable *table, const gchar *tag, const gchar *format, ...) G_GNUC_PRINTF (3, 4);
/*
+ * replace_table_set_defines: set a hash table to be used for defines lookup
+ *
+ */
+void replace_table_set_defines (ReplaceTable *table, GHashTable *defines);
+
+/*
* replace_table_process: process buffer and replace all tags filled in the replace table
*
* - reallocates source buffer
@@ -76,6 +76,13 @@ void adjust_tags_parameter (gchar **str);
*/
gchar * get_next_token (const gchar *s, gchar **start, gchar **end, gboolean *tag_parameter);
+/*
+ * extract_token_arg: retrieves token argument "xxx(value)"
+ * - returns newly allocated string, caller is responsible for freeing
+ *
+ */
+gchar * extract_token_arg (const gchar *str);
+
G_END_DECLS