Revision: 3805 http://geany.svn.sourceforge.net/geany/?rev=3805&view=rev Author: eht16 Date: 2009-05-19 20:17:37 +0000 (Tue, 19 May 2009)
Log Message: ----------- Make some locally only used functions static. Fix wrong sanity check.
Modified Paths: -------------- trunk/ChangeLog trunk/src/editor.c trunk/src/editor.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-05-19 20:17:21 UTC (rev 3804) +++ trunk/ChangeLog 2009-05-19 20:17:37 UTC (rev 3805) @@ -3,6 +3,9 @@ * src/symbols.c, tagmanager/python.c: Parse Python import statements to get symbol completion for the imported module names. + * src/editor.c, src/editor.h: + Make some only locally used functions static. + Fix wrong sanity check.
2009-05-19 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2009-05-19 20:17:21 UTC (rev 3804) +++ trunk/src/editor.c 2009-05-19 20:17:37 UTC (rev 3805) @@ -100,6 +100,8 @@ 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); +static void editor_auto_latex(GeanyEditor *editor, gint pos); +static void editor_strip_line_trailing_spaces(GeanyEditor *editor, gint line);
void editor_snippets_free(void) @@ -1686,12 +1688,15 @@ }
-void editor_auto_latex(GeanyEditor *editor, gint pos) +static void editor_auto_latex(GeanyEditor *editor, gint pos) { ScintillaObject *sci;
- g_return_if_fail(editor != NULL && editor->document->file_type != NULL); + g_return_if_fail(editor != NULL);
+ if (editor->document->file_type == NULL) + return; + sci = editor->sci;
if (sci_get_char_at(sci, pos - 2) == '}') @@ -3220,7 +3225,7 @@
#if 0 -gboolean editor_lexer_is_c_like(gint lexer) +static gboolean editor_lexer_is_c_like(gint lexer) { switch (lexer) { @@ -4006,7 +4011,7 @@ }
-void editor_strip_line_trailing_spaces(GeanyEditor *editor, gint line) +static void editor_strip_line_trailing_spaces(GeanyEditor *editor, gint line) { gint line_start = sci_get_position_from_line(editor->sci, line); gint line_end = sci_get_line_end_position(editor->sci, line);
Modified: trunk/src/editor.h =================================================================== --- trunk/src/editor.h 2009-05-19 20:17:21 UTC (rev 3804) +++ trunk/src/editor.h 2009-05-19 20:17:37 UTC (rev 3805) @@ -175,8 +175,6 @@
gboolean editor_complete_snippet(GeanyEditor *editor, gint pos);
-void editor_auto_latex(GeanyEditor *editor, gint pos); - void editor_show_macro_list(GeanyEditor *editor);
gboolean editor_show_calltip(GeanyEditor *editor, gint pos); @@ -187,8 +185,6 @@
gint editor_do_uncomment(GeanyEditor *editor, gint line, gboolean toggle);
-gboolean editor_lexer_is_c_like(gint lexer); - gint editor_lexer_get_type_keyword_idx(gint lexer);
void editor_insert_multiline_comment(GeanyEditor *editor); @@ -252,8 +248,6 @@
void editor_replace_spaces(GeanyEditor *editor);
-void editor_strip_line_trailing_spaces(GeanyEditor *editor, gint line); - void editor_strip_trailing_spaces(GeanyEditor *editor);
void editor_ensure_final_newline(GeanyEditor *editor);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.