Revision: 3696 http://geany.svn.sourceforge.net/geany/?rev=3696&view=rev Author: eht16 Date: 2009-04-07 22:08:38 +0000 (Tue, 07 Apr 2009)
Log Message: ----------- Make editor_highlight_braces() static. Remove unused wrapper functions.
Modified Paths: -------------- trunk/ChangeLog trunk/src/editor.c trunk/src/editor.h trunk/src/sciwrappers.c trunk/src/sciwrappers.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-04-07 22:08:19 UTC (rev 3695) +++ trunk/ChangeLog 2009-04-07 22:08:38 UTC (rev 3696) @@ -3,6 +3,9 @@ * src/main.c: Fix setting a wrong default window size when starting without an existing configuration. + * src/editor.c, src/sciwrappers.c, src/sciwrapper.h: + Make editor_highlight_braces() static. + Remove unused wrapper functions.
2009-04-07 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2009-04-07 22:08:19 UTC (rev 3695) +++ trunk/src/editor.c 2009-04-07 22:08:38 UTC (rev 3696) @@ -99,6 +99,7 @@ static void auto_close_chars(ScintillaObject *sci, gint pos, gchar c); static void auto_table(GeanyEditor *editor, gint pos); static void close_block(GeanyEditor *editor, gint pos); +static void editor_highlight_braces(GeanyEditor *editor, gint cur_pos);
void editor_snippets_free(void) @@ -2831,7 +2832,7 @@ }
-void editor_highlight_braces(GeanyEditor *editor, gint cur_pos) +static void editor_highlight_braces(GeanyEditor *editor, gint cur_pos) { gint brace_pos = cur_pos - 1; gint end_pos;
Modified: trunk/src/editor.h =================================================================== --- trunk/src/editor.h 2009-04-07 22:08:19 UTC (rev 3695) +++ trunk/src/editor.h 2009-04-07 22:08:38 UTC (rev 3696) @@ -187,8 +187,6 @@
gint editor_do_uncomment(GeanyEditor *editor, gint line, gboolean toggle);
-void editor_highlight_braces(GeanyEditor *editor, gint cur_pos); - gboolean editor_lexer_is_c_like(gint lexer);
gint editor_lexer_get_type_keyword_idx(gint lexer);
Modified: trunk/src/sciwrappers.c =================================================================== --- trunk/src/sciwrappers.c 2009-04-07 22:08:19 UTC (rev 3695) +++ trunk/src/sciwrappers.c 2009-04-07 22:08:38 UTC (rev 3696) @@ -84,15 +84,6 @@ }
-gboolean sci_get_line_numbers(ScintillaObject * sci) -{ - gint margin_width; - - margin_width = SSM(sci, SCI_GETMARGINWIDTHN, 0, 0); - if( margin_width > 0 ) return TRUE; - else return FALSE; -} - /* symbol margin visibility */ void sci_set_symbol_margin(ScintillaObject * sci, gboolean set ) { @@ -108,12 +99,6 @@ } }
-gboolean sci_get_symbol_margin(ScintillaObject *sci) -{ - if (SSM(sci, SCI_GETMARGINWIDTHN, 1, 0) > 0 ) return TRUE; - else return FALSE; -} - /* folding margin visibility */ void sci_set_folding_margin_visible(ScintillaObject *sci, gboolean set) { @@ -129,26 +114,12 @@ } }
-gboolean sci_get_folding_margin_visible(ScintillaObject * sci) -{ - gint margin_width; - - margin_width = SSM(sci, SCI_GETMARGINWIDTHN, 2, 0); - if( margin_width > 0 ) return TRUE; - else return FALSE; -} - /* end of lines */ void sci_set_visible_eols(ScintillaObject* sci, gboolean set ) { SSM(sci,SCI_SETVIEWEOL,set,0); }
-gboolean sci_get_visible_eols(ScintillaObject* sci) -{ - return SSM( sci, SCI_GETVIEWEOL,0,0); -} - void sci_set_visible_white_spaces(ScintillaObject* sci, gboolean set ) { if (set) @@ -157,11 +128,6 @@ SSM(sci,SCI_SETVIEWWS,SCWS_INVISIBLE,0); }
-gboolean sci_get_visible_white_spaces(ScintillaObject* sci) -{ - return SSM( sci, SCI_GETVIEWWS,0,0); -} - void sci_set_lines_wrapped(ScintillaObject* sci, gboolean set ) { if (set) @@ -170,11 +136,6 @@ SSM(sci,SCI_SETWRAPMODE,SC_WRAP_NONE,0); }
-gboolean sci_get_lines_wrapped(ScintillaObject* sci) -{ - return SSM( sci, SCI_GETWRAPMODE,0,0); -} - gint sci_get_eol_mode( ScintillaObject* sci) { return SSM( sci, SCI_GETEOLMODE, 0, 0); @@ -209,16 +170,6 @@ }
-void sci_add_text_buffer(ScintillaObject* sci, const gchar* text, gint len) -{ - if (G_LIKELY(text != NULL)) - { /* if null text is passed to scintilla will segfault */ - SSM(sci, SCI_CLEARALL, 0, 0); - SSM(sci, SCI_ADDTEXT, len, (sptr_t) text); - } -} - - gboolean sci_can_undo( ScintillaObject* sci ) { return SSM( sci, SCI_CANUNDO, 0, 0); @@ -269,12 +220,6 @@ }
-gboolean sci_get_undo_collection( ScintillaObject* sci ) -{ - return SSM( sci, SCI_GETUNDOCOLLECTION,0,0); -} - - void sci_empty_undo_buffer( ScintillaObject* sci ) { SSM( sci, SCI_EMPTYUNDOBUFFER,0,0); @@ -623,13 +568,6 @@ }
-void sci_get_xy_from_position(ScintillaObject* sci,gint pos, gint* x, gint* y) -{ - *x = SSM(sci, SCI_POINTXFROMPOSITION,0, (int) pos); - *y = SSM(sci, SCI_POINTYFROMPOSITION,0, (int) pos); -} - - /** Check if a line is visible (folding may have hidden it). * @param sci Scintilla widget. * @param line Line number. @@ -655,13 +593,6 @@ }
-/* Get the next line after start_line with fold level <= level */ -gint sci_get_last_child(ScintillaObject* sci, gint start_line, gint level) -{ - return SSM( sci, SCI_GETLASTCHILD, start_line, level); -} - - /* Get the line number of the fold point before start_line, or -1 if there isn't one */ gint sci_get_fold_parent(ScintillaObject* sci, gint start_line) { @@ -687,12 +618,6 @@ }
-void sci_set_lexer(ScintillaObject * sci, gint lexer) -{ - SSM( sci, SCI_SETLEXER, lexer, 0); -} - - void sci_clear_all(ScintillaObject * sci) { SSM( sci, SCI_CLEARALL, 0, 0); @@ -926,18 +851,6 @@ }
-void sci_grab_focus(ScintillaObject *sci) -{ - SSM(sci, SCI_GRABFOCUS, 0, 0); -} - - -void sci_set_cursor(ScintillaObject *sci, gint cursor) -{ - SSM(sci, SCI_SETCURSOR, cursor, 0); -} - - void sci_target_from_selection(ScintillaObject *sci) { SSM(sci, SCI_TARGETFROMSELECTION, 0, 0); @@ -972,11 +885,6 @@ SSM(sci, SCI_SETREADONLY, readonly, 0); }
-gboolean sci_get_readonly(ScintillaObject *sci) -{ - return SSM(sci, SCI_GETREADONLY, 0, 0); -} - /** A simple convenience function for sending Scintilla commands without any parameters. * @param sci The Scintilla @c GtkWidget. * @param cmd @c SCI_COMMAND. @@ -1018,23 +926,6 @@ }
-void sci_set_styling(ScintillaObject *sci, gint len, gint style) -{ - if (len < 0 || style < 0) return; - - SSM(sci, SCI_SETSTYLING, len, style); -} - -void sci_start_styling(ScintillaObject *sci, gint pos, gint mask) -{ - SSM(sci, SCI_STARTSTYLING, pos, mask); -} - -gint sci_indicator_get(ScintillaObject *sci) -{ - return SSM(sci, SCI_GETINDICATORCURRENT, 0, 0); -} - /** * Set the current indicator. This is necessary to define an indicator for a range of text or * clearing indicators for a range of text.
Modified: trunk/src/sciwrappers.h =================================================================== --- trunk/src/sciwrappers.h 2009-04-07 22:08:19 UTC (rev 3695) +++ trunk/src/sciwrappers.h 2009-04-07 22:08:38 UTC (rev 3696) @@ -30,11 +30,9 @@
void sci_set_line_numbers (ScintillaObject* sci, gboolean set, gint extra_width); void sci_set_mark_long_lines (ScintillaObject* sci, gint type, gint column, const gchar *color); -gboolean sci_get_line_numbers (ScintillaObject * sci);
void sci_set_text (ScintillaObject* sci, const gchar* text); void sci_add_text (ScintillaObject* sci, const gchar* text); -void sci_add_text_buffer (ScintillaObject* sci, const gchar* text, gint len); gboolean sci_can_redo (ScintillaObject* sci); gboolean sci_can_undo (ScintillaObject* sci); gboolean sci_has_selection (ScintillaObject* sci); @@ -46,11 +44,8 @@ gboolean sci_is_modified (ScintillaObject *sci);
void sci_set_visible_eols (ScintillaObject* sci, gboolean set ); -gboolean sci_get_visible_eols (ScintillaObject* sci); void sci_set_lines_wrapped (ScintillaObject* sci, gboolean set ); -gboolean sci_get_lines_wrapped (ScintillaObject* sci); void sci_set_visible_white_spaces(ScintillaObject* sci, gboolean set ); -gboolean sci_get_visible_white_spaces(ScintillaObject* sci); void sci_convert_eols (ScintillaObject* sci, gint eolmode); gint sci_get_eol_mode (ScintillaObject* sci); void sci_set_eol_mode (ScintillaObject* sci, gint eolmode); @@ -93,11 +88,9 @@ gchar* sci_get_line (ScintillaObject* sci, gint line_num); gint sci_get_line_length (ScintillaObject* sci, gint line); gint sci_get_line_count (ScintillaObject* sci); -void sci_get_xy_from_position (ScintillaObject* sci,gint pos, gint* x, gint* y); gint sci_get_position_from_xy (ScintillaObject* sci, gint x, gint y, gboolean nearby);
void sci_set_undo_collection (ScintillaObject* sci, gboolean set); -gboolean sci_get_undo_collection (ScintillaObject* sci);
gint sci_get_line_end_position (ScintillaObject* sci, gint line);
@@ -105,15 +98,12 @@ gboolean sci_get_line_is_visible (ScintillaObject* sci, gint line); void sci_ensure_line_is_visible (ScintillaObject* sci, gint line); gint sci_get_fold_level (ScintillaObject* sci, gint line); -gint sci_get_last_child (ScintillaObject* sci, gint start_line, gint level); gint sci_get_fold_parent (ScintillaObject* sci, gint start_line);
void sci_set_folding_margin_visible (ScintillaObject * sci, gboolean set ); -gboolean sci_get_folding_margin_visible(ScintillaObject * sci); gboolean sci_get_fold_expanded (ScintillaObject* sci, gint line);
void sci_colourise (ScintillaObject* sci, gint start, gint end); -void sci_set_lexer (ScintillaObject * sci, gint lexer); void sci_clear_all (ScintillaObject * sci); gint sci_get_end_styled (ScintillaObject * sci); void sci_set_tab_width (ScintillaObject * sci, gint width); @@ -136,7 +126,6 @@ void sci_marker_delete_all (ScintillaObject * sci, gint marker); gint sci_get_style_at (ScintillaObject * sci, gint position); void sci_set_symbol_margin (ScintillaObject * sci, gboolean set); -gboolean sci_get_symbol_margin (ScintillaObject * sci); void sci_set_codepage (ScintillaObject * sci, gint cp); void sci_clear_cmdkey (ScintillaObject * sci, gint key); void sci_assign_cmdkey (ScintillaObject * sci, gint key, gint command); @@ -145,8 +134,6 @@ void sci_selection_duplicate (ScintillaObject * sci); void sci_line_duplicate (ScintillaObject * sci); void sci_insert_text (ScintillaObject * sci, gint pos, const gchar *text); -void sci_grab_focus (ScintillaObject * sci); -void sci_set_cursor (ScintillaObject * sci, gint cursor); void sci_target_from_selection (ScintillaObject * sci); void sci_target_start (ScintillaObject * sci, gint start); void sci_target_end (ScintillaObject * sci, gint end); @@ -155,7 +142,6 @@ void sci_set_keywords (ScintillaObject * sci, gint k, gchar *text); gint sci_get_lexer (ScintillaObject * sci); void sci_set_readonly (ScintillaObject * sci, gboolean readonly); -gboolean sci_get_readonly (ScintillaObject * sci); gint sci_get_zoom (ScintillaObject * sci); void sci_send_command (ScintillaObject * sci, gint cmd);
@@ -163,10 +149,6 @@ gint sci_get_lines_selected (ScintillaObject * sci); gint sci_get_first_visible_line (ScintillaObject * sci);
-void sci_set_styling (ScintillaObject * sci, gint len, gint style); -void sci_start_styling (ScintillaObject * sci, gint pos, gint mask); - -gint sci_indicator_get (ScintillaObject * sci); void sci_indicator_set (ScintillaObject * sci, gint indic); void sci_indicator_fill (ScintillaObject * sci, gint pos, gint len); void sci_indicator_clear (ScintillaObject * sci, gint pos, gint len);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.