From 61548a46c286f2d3112cde38882ef4b0c6f0bed7 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 3 May 2007 15:41:42 +0000 Subject: Implement eglib versions of needed GString functions --- eglib/gmain.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'eglib/gmain.h') diff --git a/eglib/gmain.h b/eglib/gmain.h index 0546421d..ce9bdce5 100644 --- a/eglib/gmain.h +++ b/eglib/gmain.h @@ -200,6 +200,7 @@ gpointer g_malloc(gulong n_bytes); gpointer g_malloc0(gulong n_bytes); gpointer g_try_malloc(gulong n_bytes); gpointer g_try_malloc0(gulong n_bytes); +gpointer g_realloc(gpointer mem, gulong n_bytes); void g_free(gpointer mem); @@ -243,4 +244,19 @@ gboolean g_key_file_get_boolean(GKeyFile *key_file, const gchar *key, GError **error); + +/* GString */ + +typedef struct { + gchar *str; + gsize len; + gsize allocated_len; +} GString; + +GString *g_string_new(const gchar *init); + +void g_string_append_printf(GString *string, const gchar *format, ...); + +gchar *g_string_free(GString *string, gboolean free_segment); + #endif /* __GMAIN_H */ -- cgit