X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgcharsetconverter.c;h=86be20e842e2bde7a2be089e02f35dd4e9959049;hb=7103484017ff000d01ed94567539d37fa09b32b2;hp=35b0a5a0d4dfe32efffecdf2a13f43dc48d59385;hpb=69801f8dc84c0c9403df6802eccc5d03328cd3ae;p=platform%2Fupstream%2Fglib.git
diff --git a/gio/gcharsetconverter.c b/gio/gcharsetconverter.c
index 35b0a5a..86be20e 100644
--- a/gio/gcharsetconverter.c
+++ b/gio/gcharsetconverter.c
@@ -13,25 +13,21 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see .
*
* Author: Alexander Larsson
*/
#include "config.h"
+#include "gcharsetconverter.h"
+
#include
-#include "gcontenttypeprivate.h"
-#include "gcharsetconverter.h"
-#include "glib.h"
#include "ginitable.h"
#include "gioerror.h"
#include "glibintl.h"
-#include "gioalias.h"
enum {
PROP_0,
@@ -207,9 +203,9 @@ g_charset_converter_init (GCharsetConverter *local)
* Since: 2.24
**/
GCharsetConverter *
-g_charset_converter_new (const gchar *to_charset,
- const gchar *from_charset,
- GError **error)
+g_charset_converter_new (const gchar *to_charset,
+ const gchar *from_charset,
+ GError **error)
{
GCharsetConverter *conv;
@@ -238,15 +234,15 @@ g_charset_converter_reset (GConverter *converter)
}
static GConverterResult
-g_charset_converter_convert (GConverter *converter,
- const void *inbuf,
- gsize inbuf_size,
- void *outbuf,
- gsize outbuf_size,
- GConverterFlags flags,
- gsize *bytes_read,
- gsize *bytes_written,
- GError **error)
+g_charset_converter_convert (GConverter *converter,
+ const void *inbuf,
+ gsize inbuf_size,
+ void *outbuf,
+ gsize outbuf_size,
+ GConverterFlags flags,
+ gsize *bytes_read,
+ gsize *bytes_written,
+ GError **error)
{
GCharsetConverter *conv;
gsize res;
@@ -432,9 +428,9 @@ g_charset_converter_iface_init (GConverterIface *iface)
}
static gboolean
-g_charset_converter_initable_init (GInitable *initable,
- GCancellable *cancellable,
- GError **error)
+g_charset_converter_initable_init (GInitable *initable,
+ GCancellable *cancellable,
+ GError **error)
{
GCharsetConverter *conv;
@@ -449,10 +445,9 @@ g_charset_converter_initable_init (GInitable *initable,
return FALSE;
}
- conv->iconv =
- g_iconv_open (conv->to, conv->from);
+ conv->iconv = g_iconv_open (conv->to, conv->from);
- if (conv->iconv == NULL)
+ if (conv->iconv == (GIConv)-1)
{
if (errno == EINVAL)
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
@@ -473,6 +468,3 @@ g_charset_converter_initable_iface_init (GInitableIface *iface)
{
iface->init = g_charset_converter_initable_init;
}
-
-#define __G_CHARSET_CONVERTER_C__
-#include "gioaliasdef.c"