From d078ae47133959733ff9e9fd939c0515b420a9d2 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Thu, 1 Dec 2016 11:52:46 +0300 Subject: [PATCH] option_auto_syntax: change type to gboolean. Signed-off-by: Andrew Borodin --- src/editor/choosesyntax.c | 6 +++--- src/editor/edit-impl.h | 2 +- src/editor/edit.c | 2 +- src/editor/syntax.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/editor/choosesyntax.c b/src/editor/choosesyntax.c index b7e402e0d..2cb29d9c2 100644 --- a/src/editor/choosesyntax.c +++ b/src/editor/choosesyntax.c @@ -113,7 +113,7 @@ edit_syntax_dialog (WEdit * edit) { gboolean force_reload = FALSE; char *current_syntax; - int old_auto_syntax; + gboolean old_auto_syntax; current_syntax = g_strdup (edit->syntax_type); old_auto_syntax = option_auto_syntax; @@ -121,13 +121,13 @@ edit_syntax_dialog (WEdit * edit) switch (syntax) { case 0: /* auto syntax */ - option_auto_syntax = 1; + option_auto_syntax = TRUE; break; case 1: /* reload current syntax */ force_reload = TRUE; break; default: - option_auto_syntax = 0; + option_auto_syntax = FALSE; g_free (edit->syntax_type); edit->syntax_type = g_strdup (g_ptr_array_index (names, syntax - N_DFLT_ENTRIES)); } diff --git a/src/editor/edit-impl.h b/src/editor/edit-impl.h index c04fb0e47..73d178b0e 100644 --- a/src/editor/edit-impl.h +++ b/src/editor/edit-impl.h @@ -127,7 +127,7 @@ extern edit_stack_type edit_history_moveto[MAX_HISTORY_MOVETO]; extern int option_line_state_width; extern int option_max_undo; -extern int option_auto_syntax; +extern gboolean option_auto_syntax; extern gboolean search_create_bookmark; diff --git a/src/editor/edit.c b/src/editor/edit.c index 2c17d69b2..56ef4b5f8 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -2082,7 +2082,7 @@ edit_init (WEdit * edit, int y, int x, int lines, int cols, const vfs_path_t * f { gboolean to_free = FALSE; - option_auto_syntax = 1; /* Resetting to auto on every invokation */ + option_auto_syntax = TRUE; /* Resetting to auto on every invokation */ option_line_state_width = option_line_state ? LINE_STATE_WIDTH : 0; if (edit != NULL) diff --git a/src/editor/syntax.c b/src/editor/syntax.c index fb5d4ce35..20130d69a 100644 --- a/src/editor/syntax.c +++ b/src/editor/syntax.c @@ -67,7 +67,7 @@ /*** global variables ****************************************************************************/ gboolean option_syntax_highlighting = TRUE; -int option_auto_syntax = 1; +gboolean option_auto_syntax = TRUE; /*** file scope macro definitions ****************************************************************/ -- 2.11.4.GIT