[geany/geany-plugins] ae3c51: Spellcheck: Replace NZV-makro with EMPTY-makro

Frank Lanitz git-noreply at xxxxx
Sun Mar 23 10:24:10 UTC 2014


Branch:      refs/heads/master
Author:      Frank Lanitz <frank at frank.uvena.de>
Committer:   Frank Lanitz <frank at frank.uvena.de>
Date:        Sun, 23 Mar 2014 10:24:10 UTC
Commit:      ae3c51119310afa5c5c14b70099a2e06731e360e
             https://github.com/geany/geany-plugins/commit/ae3c51119310afa5c5c14b70099a2e06731e360e

Log Message:
-----------
Spellcheck: Replace NZV-makro with EMPTY-makro


Modified Paths:
--------------
    spellcheck/src/gui.c
    spellcheck/src/scplugin.c
    spellcheck/src/speller.c

Modified: spellcheck/src/gui.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -297,7 +297,7 @@ void sc_gui_update_editor_menu_cb(GObject *obj, const gchar *word, gint pos,
 		search_word = g_strdup(word);
 
 	/* ignore numbers or words starting with digits and non-text */
-	if (! NZV(search_word) || isdigit(*search_word) || ! sc_speller_is_text(doc, pos))
+	if (EMPTY(search_word) || isdigit(*search_word) || ! sc_speller_is_text(doc, pos))
 	{
 		g_free(search_word);
 		return;


Modified: spellcheck/src/scplugin.c
4 files changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -219,7 +219,7 @@ static void dictionary_dir_button_clicked_cb(GtkButton *button, gpointer item)
 					GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
 
 	text = utils_get_locale_from_utf8(gtk_entry_get_text(GTK_ENTRY(item)));
-	if (NZV(text))
+	if (!EMPTY(text))
 		gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), text);
 
 	/* run it */
@@ -294,7 +294,7 @@ GtkWidget *plugin_configure(GtkDialog *dialog)
 	ui_widget_set_tooltip_text(entry_dir,
 		_("Read additional dictionary files from this directory. "
 		  "For now, this only works with myspell dictionaries."));
-	if (NZV(sc_info->dictionary_dir))
+	if (! EMPTY(sc_info->dictionary_dir))
 		gtk_entry_set_text(GTK_ENTRY(entry_dir), sc_info->dictionary_dir);
 
 	button = gtk_button_new();


Modified: spellcheck/src/speller.c
8 files changed, 4 insertions(+), 4 deletions(-)
===================================================================
@@ -133,7 +133,7 @@ static gint sc_speller_check_word(GeanyDocument *doc, gint line_number, const gc
 	g_return_val_if_fail(word != NULL, 0);
 	g_return_val_if_fail(start_pos >= 0 && end_pos >= 0, 0);
 
-	if (! NZV(word))
+	if (EMPTY(word))
 		return 0;
 
 	/* ignore numbers or words starting with digits */
@@ -338,7 +338,7 @@ gchar *sc_speller_get_default_lang(void)
 	const gchar *lang = g_getenv("LANG");
 	gchar *result = NULL;
 
-	if (NZV(lang))
+	if (! EMPTY(lang))
 	{
 		if (*lang == 'C' || *lang == 'c')
 			lang = "en";
@@ -497,7 +497,7 @@ void sc_speller_reinit_enchant_dict(void)
 
 	/* Check if the stored default dictionary is (still) available, fall back to the first
 	 * one in the list if not */
-	if (! NZV(lang) || ! check_default_lang())
+	if (EMPTY(lang) || ! check_default_lang())
 	{
 		if (sc_info->dicts->len > 0)
 		{
@@ -510,7 +510,7 @@ void sc_speller_reinit_enchant_dict(void)
 	}
 
 	/* Request new dict object */
-	if (NZV(lang))
+	if (! EMPTY(lang))
 		sc_speller_dict = enchant_broker_request_dict(sc_speller_broker, lang);
 	else
 		sc_speller_dict = NULL;



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list