QuickIO  0.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
buffer.h
Go to the documentation of this file.
1 
12 #include "qev.h"
13 
19 #define g_string_printf qev_buffer_printf
20 
24 #define g_string_vprintf qev_buffer_vprintf
25 
29 #define g_string_append_printf qev_buffer_append_printf
30 
34 #define g_string_append_vprintf qev_buffer_append_vprintf
35 
40 #define g_string_append(buff, str) qev_buffer_append_len(buff, str, strlen(str))
41 
52 GString* qev_buffer_get();
53 
63 void qev_buffer_put(GString *buff);
64 
74 void qev_buffer_put0(GString **buff);
75 
87  GString *buff,
88  const gchar *format,
89  ...) G_GNUC_PRINTF(2, 3);
90 
103 void qev_buffer_vprintf(
104  GString *buff,
105  const gchar *format,
106  va_list args) G_GNUC_PRINTF(2, 0);
107 
119  GString *buff,
120  const gchar *format,
121  ...) G_GNUC_PRINTF(2, 3);
122 
136  GString *buff,
137  const gchar *format,
138  va_list args) G_GNUC_PRINTF(2, 0);
139 
150 void qev_buffer_ensure(GString *buff, const gsize len);
151 
163 void qev_buffer_append_buff(GString *buff, const GString *other);
164 
180 void qev_buffer_append_len(GString *buff, const gchar *str, const gsize len);
181 
188 void qev_buffer_clear(GString *buff);
189 
198 void qev_buffer_append_uint(GString *buff, guint64 v);
199 
211  GString *buff,
212  const gchar *from,
213  const gchar *to);
void void void void void qev_buffer_ensure(GString *buff, const gsize len)
Ensures that the string will fit at least len bytes more.
void qev_buffer_append_buff(GString *buff, const GString *other)
Append a buffer to this buffer.
void qev_buffer_put(GString *buff)
Releases a buffer to the pool.
void qev_buffer_append_uint(GString *buff, guint64 v)
A faster alternative to g_string_printf("%lu", v).
void qev_buffer_put0(GString **buff)
Releases the buffer and sets the pointer to NULL.
void void void qev_buffer_append_printf(GString *buff, const gchar *format,...) G_GNUC_PRINTF(2
The variable argument version of qev_buffer_append_vprintf()
void qev_buffer_replace_str(GString *buff, const gchar *from, const gchar *to)
Replace the given sequence in the string with the other.
GString * qev_buffer_get()
Gets a buffer from the pool.
void void qev_buffer_vprintf(GString *buff, const gchar *format, va_list args) G_GNUC_PRINTF(2
glib's g_string_printf() functions are, stupidly enough, NOT zero-allocation (at least as much as app...
void qev_buffer_append_len(GString *buff, const gchar *str, const gsize len)
A faster alternative to g_string_append_len()
void void void void qev_buffer_append_vprintf(GString *buff, const gchar *format, va_list args) G_GNUC_PRINTF(2
glib's g_string_append_printf() functions are, stupidly enough, NOT zero-allocation (at least as much...
Provides all the qev_* functions that are needed for creating an event loop.
void qev_buffer_clear(GString *buff)
A faster alternative to g_string_truncate(str, 0)
void qev_buffer_printf(GString *buff, const gchar *format,...) G_GNUC_PRINTF(2
The variable argument version of qev_buffer_vprintf()