[easytag] Move internal struct from charset header to source



commit 2e93948066ae248e41df4381abdb98a13b20b4ab
Author: David King <amigadave amigadave com>
Date:   Sun Sep 7 21:47:54 2014 +0100

    Move internal struct from charset header to source
    
    Also, rearrange and tidy the header.

 src/charset.c |   22 +++++++++-------------
 src/charset.h |   49 +++++++++++++++++--------------------------------
 2 files changed, 26 insertions(+), 45 deletions(-)
---
diff --git a/src/charset.c b/src/charset.c
index 06a7b44..661b625 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -20,7 +20,10 @@
  *
  */
 
-#include <config.h>
+#include "config.h"
+
+#include "charset.h"
+
 #include <stdlib.h>
 #include <glib.h>
 #include <string.h>
@@ -31,16 +34,15 @@
 #include <langinfo.h>
 #endif
 
-#include "charset.h"
 #include "setting.h"
 #include "log.h"
-
 #include "win32/win32dep.h"
 
-
-/****************
- * Declarations *
- ****************/
+typedef struct
+{
+    const gchar *charset_title;
+    const gchar *charset_name;
+} CharsetInfo;
 
 #define CHARSET_TRANS_ARRAY_LEN ( sizeof(charset_trans_array) / sizeof((charset_trans_array)[0]) )
 static const CharsetInfo charset_trans_array[] = {
@@ -139,12 +141,6 @@ static const CharsetInfo charset_trans_array[] = {
 static GHashTable *encodings;
 
 
-
-/*************
- * Functions *
- *************/
-
-
 /* stolen from gnome-desktop-item.c */
 static gboolean
 check_locale (const char *locale)
diff --git a/src/charset.h b/src/charset.h
index 7809f14..17b49d7 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -1,46 +1,32 @@
-/* charset.h - 2001/12/04 */
-/*
- *  EasyTAG - Tag editor for MP3 and Ogg Vorbis files
- *  Copyright (C) 2000-2003  Jerome Couderc <easytag gmail com>
+/* EasyTAG - Tag editor for audio files
+ * Copyright (C) 2014  David King <amigadave amigadave com>
+ * Copyright (C) 2000-2003  Jerome Couderc <easytag gmail com>
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-
-#ifndef __CHARSET_H__
-#define __CHARSET_H__
+#ifndef ET_CHARSET_H_
+#define ET_CHARSET_H_
 
 #include <gtk/gtk.h>
 
 G_BEGIN_DECLS
 
-typedef struct
-{
-    const gchar *charset_title;
-    const gchar *charset_name;
-} CharsetInfo;
-
-
-/**************
- * Prototypes *
- **************/
-
 const char  *get_encoding_from_locale (const char *locale);
 const gchar *get_locale               (void);
 
-
 gchar *convert_string   (const gchar *string, const gchar *from_codeset, const gchar *to_codeset, const 
gboolean display_error);
 gchar *convert_string_1 (const gchar *string, gssize length, const gchar *from_codeset, const gchar 
*to_codeset, const gboolean display_error);
 
@@ -56,10 +42,9 @@ void Charset_Populate_Combobox (GtkComboBox *combo, gint select_charset);
 const gchar *Charset_Get_Name_From_Title (const gchar *charset_title);
 const gchar * et_charset_get_name_from_index (gint index);
 
-
 void Charset_Insert_Locales_Init    (void);
 void Charset_Insert_Locales_Destroy (void);
 
 G_END_DECLS
 
-#endif /* __CHARSET_H__ */
+#endif /* ET_CHARSET_H_ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]