[devhelp] language: indentation fixes
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] language: indentation fixes
- Date: Mon, 20 Dec 2010 14:40:17 +0000 (UTC)
commit e33eb4679d7207a48981e3d9c26c8f42cbe4c0b7
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon Dec 20 15:39:58 2010 +0100
language: indentation fixes
src/dh-language.c | 24 ++++++++++++------------
src/dh-language.h | 3 +--
2 files changed, 13 insertions(+), 14 deletions(-)
---
diff --git a/src/dh-language.c b/src/dh-language.c
index a50698a..c1278af 100644
--- a/src/dh-language.c
+++ b/src/dh-language.c
@@ -34,28 +34,28 @@ void
dh_language_free (DhLanguage *language)
{
g_free (language->name);
- g_slice_free (DhLanguage, language);
+ g_slice_free (DhLanguage, language);
}
DhLanguage *
dh_language_new (const gchar *name)
{
- DhLanguage *language;
+ DhLanguage *language;
- g_return_val_if_fail (name != NULL, NULL);
+ g_return_val_if_fail (name != NULL, NULL);
- language = g_slice_new0 (DhLanguage);
- language->name = g_strdup (name);
+ language = g_slice_new0 (DhLanguage);
+ language->name = g_strdup (name);
- return language;
+ return language;
}
gint
dh_language_compare (const DhLanguage *language_a,
const DhLanguage *language_b)
{
- g_return_val_if_fail (language_a != NULL, NULL);
- g_return_val_if_fail (language_b != NULL, NULL);
+ g_return_val_if_fail (language_a != NULL, NULL);
+ g_return_val_if_fail (language_b != NULL, NULL);
return strcmp (language_a->name, language_b->name);
}
@@ -64,8 +64,8 @@ gint
dh_language_compare_by_name (const DhLanguage *language_a,
const gchar *language_name_b)
{
- g_return_val_if_fail (language_a != NULL, NULL);
- g_return_val_if_fail (language_name_b != NULL, NULL);
+ g_return_val_if_fail (language_a != NULL, NULL);
+ g_return_val_if_fail (language_name_b != NULL, NULL);
return strcmp (language_a->name, language_name_b);
}
@@ -89,7 +89,8 @@ dh_language_get_n_books_enabled (DhLanguage *language)
void
dh_language_inc_n_books_enabled (DhLanguage *language)
-{ g_return_if_fail (language != NULL);
+{
+ g_return_if_fail (language != NULL);
language->n_books_enabled++;
}
@@ -100,6 +101,5 @@ dh_language_dec_n_books_enabled (DhLanguage *language)
g_return_val_if_fail (language != NULL, FALSE);
language->n_books_enabled--;
-
return (language->n_books_enabled <= 0) ? TRUE : FALSE;
}
diff --git a/src/dh-language.h b/src/dh-language.h
index ebd30d6..c8b858c 100644
--- a/src/dh-language.h
+++ b/src/dh-language.h
@@ -29,12 +29,11 @@ DhLanguage *dh_language_new (const gchar *name);
void dh_language_free (DhLanguage *language);
const gchar *dh_language_get_name (DhLanguage *language);
gint dh_language_compare (const DhLanguage *language_a,
- const DhLanguage *language_b);
+ const DhLanguage *language_b);
gint dh_language_compare_by_name (const DhLanguage *language_a,
const gchar *language_name_b);
gint dh_language_get_n_books_enabled (DhLanguage *language);
void dh_language_inc_n_books_enabled (DhLanguage *language);
gboolean dh_language_dec_n_books_enabled (DhLanguage *language);
-
#endif /* __DH_LANGUAGE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]