Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 /* GLIB - Library of useful routines for C programming
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 * Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
22 * Modified by the GLib Team and others 1997-2000. See the AUTHORS
23 * file for a list of people on the GLib Team. See the ChangeLog
24 * files for a list of changes. These files are distributed with
25 * GLib at ftp://ftp.gtk.org/pub/gtk/.
28 #ifndef __G_CONVERT_H__
29 #define __G_CONVERT_H__
32 #include <stddef.h> /* For size_t */
33 #include <glib/gerror.h>
39 G_CONVERT_ERROR_NO_CONVERSION,
40 G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
41 G_CONVERT_ERROR_FAILED,
42 G_CONVERT_ERROR_PARTIAL_INPUT,
43 G_CONVERT_ERROR_BAD_URI,
44 G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
47 #define G_CONVERT_ERROR g_convert_error_quark()
48 IMPORT_C GQuark g_convert_error_quark (void);
50 /* Thin wrappers around iconv
52 typedef struct _GIConv *GIConv;
54 IMPORT_C GIConv g_iconv_open (const gchar *to_codeset,
55 const gchar *from_codeset);
56 IMPORT_C size_t g_iconv (GIConv converter,
60 gsize *outbytes_left);
61 IMPORT_C gint g_iconv_close (GIConv converter);
64 IMPORT_C gchar* g_convert (const gchar *str,
66 const gchar *to_codeset,
67 const gchar *from_codeset,
70 GError **error) G_GNUC_MALLOC;
71 IMPORT_C gchar* g_convert_with_iconv (const gchar *str,
76 GError **error) G_GNUC_MALLOC;
77 IMPORT_C gchar* g_convert_with_fallback (const gchar *str,
79 const gchar *to_codeset,
80 const gchar *from_codeset,
84 GError **error) G_GNUC_MALLOC;
87 /* Convert between libc's idea of strings and UTF-8.
89 IMPORT_C gchar* g_locale_to_utf8 (const gchar *opsysstring,
93 GError **error) G_GNUC_MALLOC;
94 IMPORT_C gchar* g_locale_from_utf8 (const gchar *utf8string,
98 GError **error) G_GNUC_MALLOC;
100 /* Convert between the operating system (or C runtime)
101 * representation of file names and UTF-8.
104 #define g_filename_to_utf8 g_filename_to_utf8_utf8
105 #define g_filename_from_utf8 g_filename_from_utf8_utf8
106 #define g_filename_from_uri g_filename_from_uri_utf8
107 #define g_filename_to_uri g_filename_to_uri_utf8
110 IMPORT_C gchar* g_filename_to_utf8 (const gchar *opsysstring,
113 gsize *bytes_written,
114 GError **error) G_GNUC_MALLOC;
115 IMPORT_C gchar* g_filename_from_utf8 (const gchar *utf8string,
118 gsize *bytes_written,
119 GError **error) G_GNUC_MALLOC;
121 IMPORT_C gchar *g_filename_from_uri (const gchar *uri,
123 GError **error) G_GNUC_MALLOC;
125 IMPORT_C gchar *g_filename_to_uri (const gchar *filename,
126 const gchar *hostname,
127 GError **error) G_GNUC_MALLOC;
128 IMPORT_C gchar *g_filename_display_name (const gchar *filename) G_GNUC_MALLOC;
129 IMPORT_C gboolean g_get_filename_charsets (G_CONST_RETURN gchar ***charsets);
131 IMPORT_C gchar *g_filename_display_basename (const gchar *filename) G_GNUC_MALLOC;
133 IMPORT_C gchar **g_uri_list_extract_uris (const gchar *uri_list) G_GNUC_MALLOC;
137 #endif /* __G_CONVERT_H__ */