summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2011-06-04 18:25:11 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2011-06-04 18:25:11 +0200
commit02c5b4315a9aaf64b945428288453134f90b75cc (patch)
tree3cfeae1de92c37d7fcb4c39f71bd2cc716ad0cca
parent02fcb53e3a986a85fa8c0248a306132c8996acd8 (diff)
downloadcataract-02c5b4315a9aaf64b945428288453134f90b75cc.tar.xz
replace-table: Add forgotten file
And also bring back glib/gprintf.h include for g_vasprintf().
-rw-r--r--src/replace-table.c1
-rw-r--r--src/replace-table.h21
2 files changed, 15 insertions, 7 deletions
diff --git a/src/replace-table.c b/src/replace-table.c
index 344a782..3e4f2b0 100644
--- a/src/replace-table.c
+++ b/src/replace-table.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <glib.h>
+#include <glib/gprintf.h>
#include "replace-table.h"
#include "gallery-utils.h"
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