From 6cec807140fec54b98f5aad17c2b37e992164e39 Mon Sep 17 00:00:00 2001
From: Slava Zanko <slavazanko@gmail.com>
Date: Wed, 6 Apr 2011 12:01:27 +0300
Subject: [PATCH] str_isutf8() function now returns gboolean value

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
---
 lib/strutil.h         | 4 ++--
 lib/strutil/strutil.c | 9 ++-------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/lib/strutil.h b/lib/strutil.h
index 0bef7495f..87c24baec 100644
--- a/lib/strutil.h
+++ b/lib/strutil.h
@@ -511,10 +511,10 @@ int str_key_collate (const char *t1, const char *t2, int case_sen);
  */
 void str_release_key (char *key, int case_sen);
 
-/* return 1 if codeset_name is utf8 or utf-8 
+/* return TRUE if codeset_name is utf8 or utf-8
  * I
  */
-int str_isutf8 (const char *codeset_name);
+gboolean str_isutf8 (const char *codeset_name);
 
 const char *str_detect_termencoding (void);
 
diff --git a/lib/strutil/strutil.c b/lib/strutil/strutil.c
index b145a2a5a..4117b0b69 100644
--- a/lib/strutil/strutil.c
+++ b/lib/strutil/strutil.c
@@ -354,15 +354,10 @@ str_choose_str_functions (void)
     }
 }
 
-int
+gboolean
 str_isutf8 (const char *codeset_name)
 {
-    int result = 0;
-    if (str_test_encoding_class (codeset_name, str_utf8_encodings))
-    {
-        result = 1;
-    }
-    return result;
+    return (str_test_encoding_class (codeset_name, str_utf8_encodings) != 0);
 }
 
 void