diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-01-17 17:49:23 +0000 |
---|---|---|
committer | Chris Wilson <cpwilson@src.gnome.org> | 2007-01-17 17:49:23 +0000 |
commit | 9e9d2c65c1687d10d3d83ab13ecbe203ba36ae18 (patch) | |
tree | b225c764b2c2d6681c45a764f13366c78297163b /src/iso2022.c | |
parent | 7c070ed56f33e131f618b5929fe9dbb0e6a27d76 (diff) | |
download | vte-9e9d2c65c1687d10d3d83ab13ecbe203ba36ae18.tar.gz |
As part of Bug 397439.
2007-01-17 Chris Wilson <chris@chris-wilson.co.uk>
As part of Bug 397439.
* src/interpret.c: (main):
* src/iso2022.c: (_vte_iso2022_fragment_input),
(_vte_iso2022_process), (main):
* src/vte.c: (vte_terminal_match_contents_refresh),
(vte_terminal_process_incoming), (vte_terminal_init),
(vte_terminal_set_word_chars):
* src/vteaccess.c:
(vte_terminal_accessible_update_private_data_if_needed):
* src/vtefc.c: (_vte_fc_patterns_from_pango_font_desc):
* src/vtefc.h:
* src/vteglyph.c: (_vte_glyph_cache_new), (_vte_glyph_cache_free),
(_vte_glyph_cache_set_font_description):
* src/vteglyph.h:
* src/vteregex.c: (_vte_regex_sort_matches):
* src/vtexft.c: (_vte_xft_font_open), (_vte_xft_font_close),
(_vte_xft_font_for_char):
s/g_array_new(TRUE, TRUE/g_array_new(FALSE, FALSE/
All uses of GArray respect their lengths and do not
zero-termination or untouched members to be cleared.
svn path=/trunk/; revision=1434
Diffstat (limited to 'src/iso2022.c')
-rw-r--r-- | src/iso2022.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/iso2022.c b/src/iso2022.c index 8dc604cb..b81acc6f 100644 --- a/src/iso2022.c +++ b/src/iso2022.c @@ -1060,13 +1060,16 @@ _vte_iso2022_sequence_length(const unsigned char *nextctl, gsize length) return sequence_length; } -static void -_vte_iso2022_fragment_input(struct _vte_buffer *input, GArray *blocks) +static GArray * +_vte_iso2022_fragment_input(struct _vte_buffer *input) { unsigned char *nextctl = NULL, *p, *q; glong sequence_length = 0; struct _vte_iso2022_block block; gboolean quit; + GArray *blocks; + + blocks = g_array_new(FALSE, FALSE, sizeof(struct _vte_iso2022_block)); p = input->bytes; q = input->bytes + _vte_buffer_length(input); @@ -1123,6 +1126,8 @@ _vte_iso2022_fragment_input(struct _vte_buffer *input, GArray *blocks) break; } } + + return blocks; } static int @@ -1706,9 +1711,7 @@ _vte_iso2022_process(struct _vte_iso2022_state *state, gboolean preserve_last = FALSE; int i, initial; - blocks = g_array_new(TRUE, TRUE, sizeof(struct _vte_iso2022_block)); - - _vte_iso2022_fragment_input(input, blocks); + blocks = _vte_iso2022_fragment_input(input); for (i = 0; i < blocks->len; i++) { block = &g_array_index(blocks, struct _vte_iso2022_block, i); @@ -1852,7 +1855,7 @@ main(int argc, char **argv) state = _vte_iso2022_state_new(NULL, NULL, NULL); buffer = _vte_buffer_new(); - gunichars = g_array_new(TRUE, TRUE, sizeof(gunichar)); + gunichars = g_array_new(FALSE, FALSE, sizeof(gunichar)); if (argc > 1) { string = g_string_new(NULL); for (i = 1; i < argc; i++) { |