summaryrefslogtreecommitdiff
path: root/src/matcher.c
AgeCommit message (Collapse)AuthorFilesLines
2008-12-01#include <config.h> instead of "../config.h".Behdad Esfahbod1-1/+1
2008-12-01 Behdad Esfahbod <behdad@gnome.org> * src/buffer.c: * src/caps.c: * src/dumpkeys.c: * src/interpret.c: * src/iso2022.c: * src/keymap.c: * src/matcher.c: * src/mev.c: * src/pty.c: * src/reaper.c: * src/reflect.c: * src/ring.c: * src/slowcat.c: * src/ssfe.c: * src/table.c: * src/trie.c: * src/vteaccess.c: * src/vtebg.c: * src/vteconv.c: * src/vtedraw.c: * src/vteseq.c: * src/vteskel.c: * src/xticker.c: #include <config.h> instead of "../config.h". svn path=/trunk/; revision=2259
2007-02-08Some more callgrinding - kill a little bit of overhead.Chris Wilson1-4/+4
2007-02-08 Chris Wilson <chris@chris-wilson.co.uk> Some more callgrinding - kill a little bit of overhead. * src/iso2022.c: (_vte_iso2022_sequence_length), (_vte_iso2022_fragment_input), (process_control): * src/matcher.c: (_vte_matcher_free_params_array): * src/vteconv.c: (_vte_conv): svn path=/trunk/; revision=1649
2007-02-05Some more small callgrind tweaks - well into the law of diminishingChris Wilson1-2/+1
2007-02-05 Chris Wilson <chris@chris-wilson.co.uk> Some more small callgrind tweaks - well into the law of diminishing returns. * src/iso2022.c: (_vte_iso2022_is_ambiguous_ht), (_vte_iso2022_is_ambiguous), (process_8_bit_sequence), (process_cdata), (_vte_iso2022_unichar_width): * src/matcher.c: (_vte_matcher_free_params_array): * src/vte.c: (vte_terminal_process_incoming): svn path=/trunk/; revision=1625
2007-02-05Beware the trivial change. Handle reuse of GValueArray correctly.Chris Wilson1-1/+1
2007-02-05 Chris Wilson <chris@chris-wilson.co.uk> Beware the trivial change. Handle reuse of GValueArray correctly. * src/matcher.c: (_vte_matcher_match): * src/table.c: (_vte_table_match): * src/trie.c: (_vte_trie_match): * src/vte.c: (vte_terminal_process_incoming): svn path=/trunk/; revision=1624
2007-02-05The continual reallocation of GValueArray is the last trivially avoidableChris Wilson1-10/+22
2007-02-05 Chris Wilson <chris@chris-wilson.co.uk> The continual reallocation of GValueArray is the last trivially avoidable g_realloc. * src/interpret.c: (main): * src/matcher.c: (_vte_matcher_create), (_vte_matcher_destroy), (_vte_matcher_match), (_vte_matcher_free_params_array): * src/matcher.h: * src/table.c: (_vte_table_extract_string): * src/trie.c: (_vte_trie_matchx), (_vte_trie_match), (main): * src/vte.c: (vte_terminal_process_incoming): svn path=/trunk/; revision=1622
2007-01-29Bug 336105 – gnome-terminal crashes when termcap not foundChris Wilson1-25/+28
2007-01-29 Chris Wilson <chris@chris-wilson.co.uk> Bug 336105 – gnome-terminal crashes when termcap not found * src/matcher.c: (_vte_matcher_init): * src/vte-private.h: * src/vte.c: (vte_terminal_set_default_tabstops), (vte_terminal_key_press), (vte_terminal_set_emulation), (_vte_terminal_inline_error_message), (vte_terminal_set_termcap), (vte_terminal_init), (vte_terminal_finalize), (vte_terminal_draw_cells): Detect and issue an inline warning when we fail to load a termcap. svn path=/trunk/; revision=1578
2007-01-26s/_VTE_DEBUG_ON/_VTE_DEBUG_IF/ and don't include the code block inside theChris Wilson1-2/+2
2007-01-26 Chris Wilson <chris@chris-wilson.co.uk> s/_VTE_DEBUG_ON/_VTE_DEBUG_IF/ and don't include the code block inside the macro. * src/debug.h: * src/iso2022.c: (process_control), (_vte_iso2022_process): * src/keymap.c: (_vte_keymap_map): * src/matcher.c: (_vte_matcher_init): * src/pty.c: (_vte_pty_run_on_pty): * src/table.c: (_vte_table_addi), (_vte_table_matchi), (_vte_table_extract_numbers), (_vte_table_match): * src/trie.c: (_vte_trie_addx): * src/vte.c: (vte_terminal_match_check_internal), (vte_terminal_match_check), (vte_terminal_handle_sequence), (vte_terminal_catch_child_exited), (vte_terminal_process_incoming), (vte_terminal_io_write), (vte_terminal_send), (vte_terminal_key_press), (vte_terminal_copy_cb), (vte_terminal_set_font_full), (vte_terminal_realize), (vte_terminal_paint), (vte_terminal_scroll): * src/vteapp.c: (main): * src/vtebg.c: (vte_bg_root_pixmap): svn path=/trunk/; revision=1551
2007-01-26Janitorial work - near elimination of #ifdef VTE_DEBUG from withinChris Wilson1-19/+5
2007-01-26 Chris Wilson <chris@chris-wilson.co.uk> Janitorial work - near elimination of #ifdef VTE_DEBUG from within functions, trimming over a thousand lines of code. We introduce a _vte_debug_print macro to cover the more common occurrence of printing a message at a certain debug level. And a _VTE_DEBUG_ON for a conditional code block. src/debug.h | 11 src/iso2022.c | 201 ++------- src/keymap.c | 41 - src/matcher.c | 24 - src/pty.c | 134 +----- src/reaper.c | 21 src/ring.c | 78 +-- src/table.c | 11 src/trie.c | 19 src/vte.c | 1187 ++++++++++--------------------------------------- src/vteaccess.c | 198 +++------ src/vteapp.c | 21 src/vtebg.c | 43 -- src/vteconv.c | 60 +- src/vteconv.h | 12 src/vtedraw.c | 6 src/vtefc.c | 4 src/vteft2.c | 5 src/vteglyph.c | 27 - src/vtepango.c | 11 src/vtepangox.c | 7 src/vteregex.c | 2 src/vteseq.c | 385 +++++------------- src/vtexft.c | 26 - 24 files changed, 789 insertions(+), 1745 deletions(-) svn path=/trunk/; revision=1539
2007-01-17As part of Bug 397439.Chris Wilson1-57/+21
2007-01-17 Chris Wilson <chris@chris-wilson.co.uk> As part of Bug 397439. * src/matcher.c: (_vte_matcher_add), (_vte_matcher_create), (_vte_matcher_destroy), (_vte_matcher_new), (_vte_matcher_match), (_vte_matcher_print): * src/matcher.h: * src/table.c: (_vte_table_new): * src/table.h: * src/trie.c: (_vte_trie_new): * src/trie.h: _vte_match_match() is called extremely frequently, and the switch shows up on the profiles. Replace the switch with a function pointer obtained by introducing function tables for the matcher implementations. svn path=/trunk/; revision=1444
2007-01-17As part of Bug 397439.Chris Wilson1-5/+1
2007-01-17 Chris Wilson <chris@chris-wilson.co.uk> As part of Bug 397439. * src/iso2022.c: (_vte_iso2022_state_free): * src/matcher.c: (_vte_matcher_free_params_array): * src/ring.c: (_vte_ring_free): * src/table.c: (_vte_table_free): * src/trie.c: (_vte_trie_match): * src/vte.c: (_vte_terminal_match_contents_clear), (_vte_terminal_fork_basic), (vte_terminal_get_text_range_maybe_wrapped), (vte_terminal_copy), (vte_terminal_finalize), (vte_terminal_draw_cells_with_attributes): * src/vteaccess.c: (vte_terminal_accessible_free_private_data): * src/vtebg.c: (vte_bg_root_pixmap), (vte_bg_cache_item_free): * src/vteconv.c: (_vte_conv_close): * src/vtedraw.c: (_vte_draw_free): * src/vteft2.c: (_vte_ft2_destroy): * src/vtegl.c: (_vte_gl_destroy): * src/vteglyph.c: (_vte_glyph_cache_free): * src/vtepango.c: (_vte_pango_destroy): * src/vtepangox.c: (_vte_pango_x_destroy): * src/vtergb.c: (_vte_rgb_buffer_new), (_vte_rgb_buffer_free): * src/vteseq.c: (vte_sequence_handler_se), (vte_sequence_handler_so): * src/vteskel.c: (_vte_skel_destroy): * src/vtexft.c: (_vte_xft_font_close), (_vte_xft_destroy): Do not zero memory in destructors, as glib will zero all freed memory if G_DEBUG=gc-friendly. svn path=/trunk/; revision=1433
2007-01-17As part of Bug 397439.Chris Wilson1-6/+5
2007-01-17 Chris Wilson <chris@chris-wilson.co.uk> As part of Bug 397439. * src/debug.c: * src/iso2022.c: (_vte_iso2022_ambiguous_width_guess), (_vte_iso2022_state_new), (_vte_iso2022_state_set_codeset), (process_8_bit_sequence), (process_cdata), (process_control), (_vte_iso2022_process): * src/keymap.c: (_vte_keymap_map): * src/matcher.c: (_vte_matcher_init), (_vte_matcher_create), (_vte_matcher_destroy): * src/pty.c: (_vte_pty_run_on_pty), (_vte_pty_fork_on_pty_name), (_vte_pty_fork_on_pty_fd), (_vte_pty_set_size), (_vte_pty_get_size), (_vte_pty_ptsname), (_vte_pty_open_unix98), (_vte_pty_open_with_helper), (_vte_pty_open), (main): * src/reaper.c: (vte_reaper_emit_signal), (vte_reaper_child_watch_cb), (vte_reaper_init), (vte_reaper_finalize): * src/reflect.c: (text_changed_insert), (text_changed_delete): * src/ring.c: (_vte_ring_insert), (_vte_ring_insert_preserve), (_vte_ring_remove), (scrolled_off), (main): * src/slowcat.c: (main): * src/table.c: (_vte_table_printi), (_vte_table_print): * src/trie.c: (char_class_string_extract): * src/vte.c: (_vte_invalidate_cursor_once), (vte_terminal_emit_selection_changed), (vte_terminal_emit_commit), (vte_terminal_emit_emulation_changed), (vte_terminal_emit_encoding_changed), (vte_terminal_emit_child_exited), (_vte_terminal_emit_contents_changed), (vte_terminal_emit_cursor_moved), (vte_terminal_emit_eof), (vte_terminal_emit_char_size_changed), (_vte_terminal_emit_status_line_changed), (vte_terminal_emit_increase_font_size), (vte_terminal_emit_decrease_font_size), (_vte_terminal_emit_text_inserted), (_vte_terminal_emit_text_deleted), (vte_terminal_emit_text_modified), (vte_terminal_emit_text_scrolled), (vte_terminal_deselect_all), (vte_terminal_match_check_internal), (vte_terminal_match_check), (vte_terminal_emit_adjustment_changed), (vte_terminal_queue_adjustment_changed), (_vte_terminal_adjust_adjustments), (vte_terminal_scroll_pages), (vte_terminal_maybe_scroll_to_bottom), (vte_terminal_set_encoding), (_vte_terminal_set_pointer_visible), (vte_terminal_new), (vte_terminal_generate_bold), (_vte_terminal_insert_char), (display_control_sequence), (vte_terminal_fork_command), (vte_terminal_emit_pending_text_signals), (vte_terminal_process_incoming), (vte_terminal_io_write), (vte_terminal_send), (vte_terminal_im_commit), (vte_terminal_im_preedit_start), (vte_terminal_im_preedit_end), (vte_terminal_im_preedit_changed), (vte_terminal_configure_toplevel), (vte_terminal_hierarchy_changed), (vte_terminal_style_changed), (vte_terminal_key_press), (vte_terminal_paste_cb), (vte_terminal_match_hilite_clear), (vte_terminal_match_hilite), (vte_terminal_clear_cb), (vte_terminal_copy_cb), (vte_terminal_copy), (vte_terminal_paste), (vte_terminal_start_selection), (vte_terminal_extend_selection), (vte_terminal_autoscroll), (vte_terminal_motion_notify), (vte_terminal_button_press), (vte_terminal_button_release), (vte_terminal_focus_in), (vte_terminal_focus_out), (vte_terminal_set_font_full), (vte_terminal_set_size), (vte_terminal_handle_scroll), (vte_terminal_set_emulation), (vte_terminal_set_termcap), (vte_terminal_reset_rowdata), (vte_terminal_fc_settings_changed), (vte_terminal_init), (vte_terminal_size_request), (vte_terminal_size_allocate), (vte_terminal_show), (vte_terminal_unrealize), (vte_terminal_finalize), (vte_terminal_realize), (vte_terminal_draw_cells), (_vte_terminal_map_pango_color), (vte_terminal_paint), (vte_terminal_scroll), (vte_terminal_class_init), (vte_terminal_get_type), (vte_terminal_copy_clipboard), (vte_terminal_paste_clipboard), (vte_terminal_copy_primary), (vte_terminal_paste_primary), (vte_terminal_background_update), (vte_terminal_queue_background_update), (vte_terminal_set_background_saturation), (vte_terminal_set_background_tint_color), (vte_terminal_set_background_transparent), (vte_terminal_set_background_image), (vte_terminal_set_background_image_file), (vte_terminal_set_word_chars): * src/vteaccess.c: (emit_text_caret_moved), (emit_text_changed_insert), (emit_text_changed_delete), (vte_terminal_accessible_update_private_data_if_needed), (vte_terminal_accessible_invalidate_cursor), (vte_terminal_accessible_finalize), (vte_terminal_accessible_get_text), (vte_terminal_accessible_get_text_somewhere), (vte_terminal_accessible_text_init), (vte_terminal_accessible_component_init), (vte_terminal_accessible_factory_new): * src/vteapp.c: (main): * src/vtebg.c: (vte_bg_root_pixmap), (_vte_bg_resize_pixbuf): * src/vtedraw.c: (_vte_draw_new): * src/vtepango.c: (_vte_pango_set_text_font): * src/vtepangox.c: (_vte_pango_x_set_text_font): * src/vteseq.c: (vte_terminal_emit_deiconify_window), (vte_terminal_emit_iconify_window), (vte_terminal_emit_icon_title_changed), (vte_terminal_emit_window_title_changed), (vte_terminal_emit_raise_window), (vte_terminal_emit_lower_window), (vte_terminal_emit_maximize_window), (vte_terminal_emit_refresh_window), (vte_terminal_emit_restore_window), (vte_terminal_emit_move_window), (vte_terminal_emit_resize_window), (vte_sequence_handler_set_title_internal), (vte_sequence_handler_decset_internal), (vte_sequence_handler_bt), (vte_sequence_handler_application_keypad), (vte_sequence_handler_normal_keypad), (vte_sequence_handler_window_manipulation): * src/vtetc.c: (main): * src/vtexft.c: (_vte_xft_set_text_font): s/fprintf(stderr,/g_printerr(/ svn path=/trunk/; revision=1430
2006-12-27Bug 354061 – Excessive use of strlen by _vte_termcap_createRyan Lortie1-9/+7
2006-12-27 Ryan Lortie <desrt@desrt.ca> Bug 354061 – Excessive use of strlen by _vte_termcap_create * src/vtetc.c: near-complete rewrite to use a GMappedFile rather than reading a line at a time with excessive strlen/realloc use. * str/matcher.c: this shouldn't be calling the strip code as the strings it has are already unescaped.
2006-11-16Bug 356602 – const cast warning fixes for libvte Patch by Ryan LortieMariano Suárez-Alvarez1-4/+5
2006-11-16 Mariano Suárez-Alvarez <mariano@gnome.org> Bug 356602 – const cast warning fixes for libvte Patch by Ryan Lortie (desrt) * src/matcher.h: Use const char * where appropriate. * src/matcher.c: Use const char * where appropriate. Cast g_strdup to (GCacheDupFunc) to avoid a warning. * src/vtetc.h: Use const char * where appropriate. * src/vtetc.c: Use const char * where appropriate. Cast g_strdup to (GCacheDupFunc) to avoid a warning. * src/vte.c: Use const char * where appropriate.
2006-04-18Remove the #ident strings.Behdad Esfahbod1-1/+0
2006-04-18Make some data structures const by changing char * to char [].Behdad Esfahbod1-1/+1
2006-04-18 Behdad Esfahbod <behdad@gnome.org> * src/caps.c (_vte_capability_init), src/caps.h: * src/keymap.c (_vte_keymap_map), src/keymap.h: Make some data structures const by changing char * to char []. * src/vte.c (vte_update_delay_timeout), (vte_update_timeout), (vte_terminal_extend_selection), (_vte_terminal_fudge_pango_colors): Fix warnings and adapt to above changes.
2006-03-31Bug 336117 – [patch] Use g_slice API Patch from Aivars Kalvans.Behdad Esfahbod1-2/+2
2006-03-30 Behdad Esfahbod <behdad@gnome.org> Bug 336117 – [patch] Use g_slice API Patch from Aivars Kalvans. * src/*.c: Use g_slice instead of g_malloc for structs. Also, replace g_string_new("") with g_string_new(NULL).
2006-02-03Add the debug flag TRIE for printing out the trie (previous was usingBehdad Esfahbod1-1/+1
2006-02-03 Behdad Esfahbod <behdad@gnome.org> * src/debug.c, src/debug.h, src/matcher.c: Add the debug flag TRIE for printing out the trie (previous was using MISC.) * src/vte.c (vte_invalidate_cells): Update row_count and column_count when clamping their respective _start values. * src/vte.c (vte_terminal_extend_selection, * _vte_terminal_select_text): Pass row_count to vte_invalidate_cells(), instead of row_stop. * src/vteapp.c: Run $SHELL by default.
2005-03-14Add patch for excessive memory consumption when opening new tabs. ThisKjartan Maraas1-25/+162
2005-03-14 Kjartan Maraas <kmaraas@gnome.org> * src/Makefile.am: * src/interpret.c: (main): * src/matcher.c: (_vte_matcher_add), (_vte_matcher_init), (_vte_matcher_create), (_vte_matcher_destroy), (_vte_matcher_new), (_vte_matcher_free): * src/matcher.h: * src/vte.c: (vte_terminal_set_emulation), (vte_terminal_init): * src/vtetc.c: (_vte_termcap_create), (_vte_termcap_destroy), (_vte_termcap_new), (_vte_termcap_free): * src/vtetc.h: Add patch for excessive memory consumption when opening new tabs. This patch makes struct _vte_matcher and struct _vte_termcap shared between terminals and should reduce memory consumption with multiple tabs a lot. Patch from Aivars Kalvans <kalvans at inbox lv>. From bug #160993.
2003-05-21free the temporary array. add. use _vte_matcher_free_params_array insteadNalin Dahyabhai1-0/+25
* src/iso2022.c(_vte_iso2022_process): free the temporary array. * src/matcher.c(_vte_matcher_free_params_array): add. * src/vte.c: use _vte_matcher_free_params_array instead of the local copy, which is removed. * src/interpret.c, src/table.c, src/trie.c: use _vte_matcher_free_params_array to free parameter arrays instead of g_value_array_free, which doesn't take care of the pointer values. * src/vte.c(vte_sequence_handler_set_title_internal): only attempt to close the conversion descriptor if it was opened successfully. * src/vteapp.c: add the -k option to spin after gtk_main() returns. * src/vtefc.c: make copies of patterns with FcPatternDuplicate so that we know where all of the returned patterns came from. * src/vtexft.c(_vte_xft_font_for_char): set the item in the pattern array to NULL if we successfully opened a font using the pattern.
2003-05-07add VteConv as a thin wrapper around GIConv. use VteConv. remove. remove.Nalin Dahyabhai1-107/+0
* src/vteconv.c, src/vteconv.h: add VteConv as a thin wrapper around GIConv. * src/iso2022.c: use VteConv. * src/matcher.c(_vte_matcher_find_valid_encoding): remove. * src/matcher.c(_vte_matcher_wide_encoding): remove. * src/trie.c: use VteConv. * src/utf8echo.c: use VteConv. * src/vte.c: use VteConv (#112446).
2003-05-05include <glib.h> for gboolean type definition. include "config.h" andNalin Dahyabhai1-0/+2
* src/debug.h: include <glib.h> for gboolean type definition. * src/matcher.c: include "config.h" and "debug.h". * src/matcher.h: use G_BEGIN_DECLS/G_END_DECLS * src/table.h: use G_BEGIN_DECLS/G_END_DECLS * src/termcap.h: include <glib.h>, again for gboolean. * src/vtebg.h,src/vterdb.h,src/vtergb.h: adjust macro used to prevent multiple inclusions to match the rest of the tree. * src/vtefc.c(_vte_fc_patterns_from_pango_font_desc): provide a callback which can be used to override all defaults. * src/vtegl.h,src/vtexft.h: don't include "config.h" * src/vteglyph.c, src/vteglyph.h: add _vte_glyph_get_uncached().
2003-04-30remove the unused DEFAULT_ISO_8859_1 case. don't callNalin Dahyabhai1-24/+12
* src/vte.c(vte_sequence_handler_local_charset): remove the unused DEFAULT_ISO_8859_1 case. * src/vte.c(vte_terminal_class_init): don't call _vte_matcher_narrow_encoding(), because we don't need it any more. Change the error message emitted when _vte_matcher_wide_encoding() fails (#111925), and mark it for translation. * src/trie.c(main): don't call _vte_matcher_narrow_encoding() just to print its result. * src/vte.c(vte_terminal_set_encoding): include the right codeset name in the error message. * src/vteglyph.c(_vte_glyph_get): mark error message for translation. * src/matcher.c, src/matcher.h: remove _vte_matcher_narrow_encoding(). Make tables of strings "const".
2002-12-10- addNalin Dahyabhai1-0/+246