[vte] Rename "struct _vte_buffer" to VteBuffer
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] Rename "struct _vte_buffer" to VteBuffer
- Date: Thu, 20 Aug 2009 19:12:52 +0000 (UTC)
commit 83018a7d3aa975211996d69dd922b79165439622
Author: Behdad Esfahbod <behdad behdad org>
Date: Thu Aug 20 15:01:40 2009 -0400
Rename "struct _vte_buffer" to VteBuffer
src/buffer.c | 18 +++++++++---------
src/buffer.h | 18 +++++++++---------
src/interpret.c | 2 +-
src/iso2022.c | 4 ++--
src/vte-private.h | 4 ++--
src/vteconv.c | 2 +-
6 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/src/buffer.c b/src/buffer.c
index ed47743..8d7b69d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -35,7 +35,7 @@ struct _vte_real_buffer {
#ifndef G_DISABLE_ASSERT
static void
-_vte_buffer_check(struct _vte_buffer *buffer, size_t length)
+_vte_buffer_check(VteBuffer *buffer, size_t length)
{
struct _vte_real_buffer *buf = (struct _vte_real_buffer*) buffer;
if (length > 0) {
@@ -54,18 +54,18 @@ _vte_buffer_calc_new_size(size_t minimum_length)
return minimum_length + VTE_BUFFER_FUDGE_SIZE;
}
-struct _vte_buffer*
+VteBuffer*
_vte_buffer_new(void)
{
struct _vte_real_buffer *buf;
buf = g_slice_new(struct _vte_real_buffer);
buf->buf_used = buf->buf_length = 0;
buf->bytes = NULL;
- return (struct _vte_buffer*) buf;
+ return (VteBuffer*) buf;
}
void
-_vte_buffer_set_minimum_size(struct _vte_buffer *buffer, size_t length)
+_vte_buffer_set_minimum_size(VteBuffer *buffer, size_t length)
{
struct _vte_real_buffer *buf = (struct _vte_real_buffer*) buffer;
size_t size;
@@ -89,7 +89,7 @@ _vte_buffer_set_minimum_size(struct _vte_buffer *buffer, size_t length)
}
void
-_vte_buffer_append(struct _vte_buffer *buffer,
+_vte_buffer_append(VteBuffer *buffer,
gconstpointer bytes, size_t length)
{
struct _vte_real_buffer *buf = (struct _vte_real_buffer*) buffer;
@@ -116,7 +116,7 @@ _vte_buffer_append(struct _vte_buffer *buffer,
}
void
-_vte_buffer_consume(struct _vte_buffer *buffer, size_t length)
+_vte_buffer_consume(VteBuffer *buffer, size_t length)
{
struct _vte_real_buffer *buf = (struct _vte_real_buffer*) buffer;
_vte_buffer_check(buffer, length);
@@ -131,7 +131,7 @@ _vte_buffer_consume(struct _vte_buffer *buffer, size_t length)
}
void
-_vte_buffer_clear(struct _vte_buffer *buffer)
+_vte_buffer_clear(VteBuffer *buffer)
{
struct _vte_real_buffer *buf = (struct _vte_real_buffer*) buffer;
_vte_buffer_check(buffer, 0);
@@ -139,7 +139,7 @@ _vte_buffer_clear(struct _vte_buffer *buffer)
}
void
-_vte_buffer_free(struct _vte_buffer *buffer)
+_vte_buffer_free(VteBuffer *buffer)
{
struct _vte_real_buffer *buf = (struct _vte_real_buffer*) buffer;
_vte_buffer_check(buffer, 0);
@@ -148,7 +148,7 @@ _vte_buffer_free(struct _vte_buffer *buffer)
}
size_t
-_vte_buffer_length(struct _vte_buffer *buffer)
+_vte_buffer_length(VteBuffer *buffer)
{
struct _vte_real_buffer *buf = (struct _vte_real_buffer*) buffer;
_vte_buffer_check(buffer, 0);
diff --git a/src/buffer.h b/src/buffer.h
index 43f4222..cc22d77 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -28,20 +28,20 @@
G_BEGIN_DECLS
-struct _vte_buffer {
+typedef struct {
/* public */
unsigned char *bytes;
/* private stuff is hidden */
-};
+} VteBuffer;
-struct _vte_buffer* _vte_buffer_new(void);
-void _vte_buffer_free(struct _vte_buffer *buffer);
-void _vte_buffer_append(struct _vte_buffer *buffer,
+VteBuffer* _vte_buffer_new(void);
+void _vte_buffer_free(VteBuffer *buffer);
+void _vte_buffer_append(VteBuffer *buffer,
gconstpointer bytes, size_t length);
-size_t _vte_buffer_length(struct _vte_buffer *buffer);
-void _vte_buffer_consume(struct _vte_buffer *buffer, size_t length);
-void _vte_buffer_clear(struct _vte_buffer *buffer);
-void _vte_buffer_set_minimum_size(struct _vte_buffer *buffer, size_t length);
+size_t _vte_buffer_length(VteBuffer *buffer);
+void _vte_buffer_consume(VteBuffer *buffer, size_t length);
+void _vte_buffer_clear(VteBuffer *buffer);
+void _vte_buffer_set_minimum_size(VteBuffer *buffer, size_t length);
G_END_DECLS
diff --git a/src/interpret.c b/src/interpret.c
index 6d76029..ab5d9b8 100644
--- a/src/interpret.c
+++ b/src/interpret.c
@@ -40,7 +40,7 @@ main(int argc, char **argv)
char *terminal = NULL;
struct _vte_matcher *matcher = NULL;
struct _vte_termcap *termcap = NULL;
- struct _vte_buffer *buffer = NULL;
+ VteBuffer *buffer = NULL;
GArray *array;
unsigned int i, j;
int l;
diff --git a/src/iso2022.c b/src/iso2022.c
index 27dc2c9..12593b5 100644
--- a/src/iso2022.c
+++ b/src/iso2022.c
@@ -72,7 +72,7 @@ struct _vte_iso2022_state {
VteConv conv;
_vte_iso2022_codeset_changed_cb_fn codeset_changed;
gpointer codeset_changed_data;
- struct _vte_buffer *buffer;
+ VteBuffer *buffer;
};
/* DEC Special Character and Line Drawing Set. VT100 and higher (per XTerm
@@ -1729,7 +1729,7 @@ _vte_iso2022_process(struct _vte_iso2022_state *state,
int
main(int argc, char **argv)
{
- struct _vte_buffer *buffer;
+ VteBuffer *buffer;
struct _vte_iso2022_state *state;
GString *string;
GArray *gunichars;
diff --git a/src/vte-private.h b/src/vte-private.h
index d43cba4..22f0434 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -241,11 +241,11 @@ struct _VteTerminalPrivate {
glong max_input_bytes;
/* Output data queue. */
- struct _vte_buffer *outgoing; /* pending input characters */
+ VteBuffer *outgoing; /* pending input characters */
VteConv outgoing_conv;
/* IConv buffer. */
- struct _vte_buffer *conv_buffer;
+ VteBuffer *conv_buffer;
/* Screen data. We support the normal screen, and an alternate
* screen, which seems to be a DEC-specific feature. */
diff --git a/src/vteconv.c b/src/vteconv.c
index b51e42b..a5fcb30 100644
--- a/src/vteconv.c
+++ b/src/vteconv.c
@@ -38,7 +38,7 @@ struct _VteConv {
convert_func convert;
gint (*close)(GIConv converter);
gboolean in_unichar, out_unichar;
- struct _vte_buffer *in_scratch, *out_scratch;
+ VteBuffer *in_scratch, *out_scratch;
};
/* We can't use g_utf8_strlen as that's not nul-safe :( */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]