+Mon Sep 11 10:03:24 2000 Owen Taylor <otaylor@redhat.com>
+
+ * glib.h convert.c (g_convert_with_fallback): Change
+ ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
+
+ * docs/reference/glib/glib-sections.txt
+ docs/reference/glib/glib-docs.sgml Update for g_convert,
+ g_unicode_validate.
+
2000-10-16 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
+Mon Sep 11 10:03:24 2000 Owen Taylor <otaylor@redhat.com>
+
+ * glib.h convert.c (g_convert_with_fallback): Change
+ ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
+
+ * docs/reference/glib/glib-sections.txt
+ docs/reference/glib/glib-docs.sgml Update for g_convert,
+ g_unicode_validate.
+
2000-10-16 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
+Mon Sep 11 10:03:24 2000 Owen Taylor <otaylor@redhat.com>
+
+ * glib.h convert.c (g_convert_with_fallback): Change
+ ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
+
+ * docs/reference/glib/glib-sections.txt
+ docs/reference/glib/glib-docs.sgml Update for g_convert,
+ g_unicode_validate.
+
2000-10-16 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
+Mon Sep 11 10:03:24 2000 Owen Taylor <otaylor@redhat.com>
+
+ * glib.h convert.c (g_convert_with_fallback): Change
+ ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
+
+ * docs/reference/glib/glib-sections.txt
+ docs/reference/glib/glib-docs.sgml Update for g_convert,
+ g_unicode_validate.
+
2000-10-16 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
+Mon Sep 11 10:03:24 2000 Owen Taylor <otaylor@redhat.com>
+
+ * glib.h convert.c (g_convert_with_fallback): Change
+ ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
+
+ * docs/reference/glib/glib-sections.txt
+ docs/reference/glib/glib-docs.sgml Update for g_convert,
+ g_unicode_validate.
+
2000-10-16 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
+Mon Sep 11 10:03:24 2000 Owen Taylor <otaylor@redhat.com>
+
+ * glib.h convert.c (g_convert_with_fallback): Change
+ ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
+
+ * docs/reference/glib/glib-sections.txt
+ docs/reference/glib/glib-docs.sgml Update for g_convert,
+ g_unicode_validate.
+
2000-10-16 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
+Mon Sep 11 10:03:24 2000 Owen Taylor <otaylor@redhat.com>
+
+ * glib.h convert.c (g_convert_with_fallback): Change
+ ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
+
+ * docs/reference/glib/glib-sections.txt
+ docs/reference/glib/glib-docs.sgml Update for g_convert,
+ g_unicode_validate.
+
2000-10-16 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
+Mon Sep 11 10:03:24 2000 Owen Taylor <otaylor@redhat.com>
+
+ * glib.h convert.c (g_convert_with_fallback): Change
+ ERROR_OTHER to ERROR_FAILED, add some dummy marking with _().
+
+ * docs/reference/glib/glib-sections.txt
+ docs/reference/glib/glib-docs.sgml Update for g_convert,
+ g_unicode_validate.
+
2000-10-16 Tor Lillqvist <tml@iki.fi>
* glibconfig.h.win32.in: Remove alloca stuff from here. galloca.h
<!entity glib-Message-Logging SYSTEM "sgml/messages.sgml">
<!entity glib-Timers SYSTEM "sgml/timers.sgml">
<!entity glib-String-Utility-Functions SYSTEM "sgml/string_utils.sgml">
+<!entity glib-Character-Set-Conversion SYSTEM "sgml/conversions.sgml">
<!entity glib-Unicode-Manipulation SYSTEM "sgml/unicode.sgml">
<!entity glib-Random-Numbers SYSTEM "sgml/random_numbers.sgml">
<!entity glib-Miscellaneous-Utility-Functions SYSTEM "sgml/misc_utils.sgml">
<chapter id="glib-utilities">
<title>GLib Utilities</title>
&glib-String-Utility-Functions;
+ &glib-Character-Set-Conversion;
&glib-Unicode-Manipulation;
&glib-Date-and-Time-Functions;
&glib-Random-Numbers;
g_random_double_range
</SECTION>
+<SECTION>
+<TITLE>Character Set Conversion</TITLE>
+<FILE>conversions</FILE>
+g_convert
+g_convert_with_fallback
+G_CONVERT_ERROR
+GConvertError
+<SUBSECTION Private>
+g_convert_error_quark
+</SECTION>
+
<SECTION>
<TITLE>Unicode Manipulation</TITLE>
<FILE>unicode</FILE>
g_utf8_strncpy
g_utf8_strchr
g_utf8_strrchr
+g_utf8_validate
<SUBSECTION>
g_utf8_to_utf16
--- /dev/null
+<!-- ##### SECTION Title ##### -->
+Character Set Conversion
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION g_convert ##### -->
+<para>
+
+</para>
+
+@str:
+@len:
+@to_codeset:
+@from_codeset:
+@bytes_read:
+@bytes_written:
+@error:
+@Returns:
+
+
+<!-- ##### FUNCTION g_convert_with_fallback ##### -->
+<para>
+
+</para>
+
+@str:
+@len:
+@to_codeset:
+@from_codeset:
+@fallback:
+@bytes_read:
+@bytes_written:
+@error:
+@Returns:
+
+
+<!-- ##### MACRO G_CONVERT_ERROR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### ENUM GConvertError ##### -->
+<para>
+
+</para>
+
+@G_CONVERT_ERROR_NO_CONVERSION:
+@G_CONVERT_ERROR_ILLEGAL_SEQUENCE:
+@G_CONVERT_ERROR_FAILED:
+
desired key comes before @key in the sort order of the #GTree, or a positive
value if the desired key comes after @key.
+<!-- ##### FUNCTION g_node_insert_after ##### -->
+<para>
+Inserts a #GNode beneath the parent after the given sibling.
+</para>
+
+@parent: the #GNode to place @node under.
+@sibling: the sibling #GNode to place @node after. If sibling is NULL,
+the node is inserted as the first child of @parent.
+@node: the #GNode to insert.
+@Returns: the inserted #GNode.
+
+<!-- ##### FUNCTION g_convert_error_quark ##### -->
+<para>
+
+</para>
+
+@Returns:
+
<!-- ##### MACRO write ##### -->
<para>
@Returns: the inserted #GNode.
-<!-- ##### FUNCTION g_node_insert_after ##### -->
-<para>
-Inserts a #GNode beneath the parent after the given sibling.
-</para>
-
-@parent: the #GNode to place @node under.
-@sibling: the sibling #GNode to place @node after. If sibling is NULL,
-the node is inserted as the first child of @parent.
-@node: the #GNode to insert.
-@Returns: the inserted #GNode.
-
-
<!-- ##### MACRO g_node_append ##### -->
<para>
Inserts a #GNode as the last child of the given parent.
@ch:
+<!-- ##### FUNCTION g_utf8_validate ##### -->
+<para>
+
+</para>
+
+@str:
+@max_len:
+@end:
+@Returns:
+<!-- # Unused Parameters # -->
+@len:
+
+
<!-- ##### FUNCTION g_utf8_to_utf16 ##### -->
<para>
#include "glib.h"
+#define _(s) (s)
+
GQuark
g_convert_error_quark()
{
/* Something went wrong. */
if (errno == EINVAL)
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_NO_CONVERSION,
- "Conversion from character set `%s' to `%s' is not supported",
+ _("Conversion from character set `%s' to `%s' is not supported"),
from_codeset, to_codeset);
else
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- "Could not open converter from `%s' to `%s': %s",
+ _("Could not open converter from `%s' to `%s': %s"),
from_codeset, to_codeset, strerror (errno));
}
/**
* g_convert:
- * @str: the string to convert
- * @len: the length of the string
- * @to_codeset: name of character set into which to convert @str
- * @from_codeset: character set of @str.
- * @bytes_read: location to store the number of bytes in the
- * input string that were successfully converted, or %NULL.
- * Even if the conversion was succesful, this may be
- * less than len if there were partial characters
- * at the end of the input. If the error
- * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value
- * stored will the byte fofset after the last valid
- * input sequence.
- * @error: location to store the error occuring, or %NULL to ignore
- * errors. Any of the errors in #GConvertError may occur.
+ * @str: the string to convert
+ * @len: the length of the string
+ * @to_codeset: name of character set into which to convert @str
+ * @from_codeset: character set of @str.
+ * @bytes_read: location to store the number of bytes in the
+ * input string that were successfully converted, or %NULL.
+ * Even if the conversion was succesful, this may be
+ * less than len if there were partial characters
+ * at the end of the input. If the error
+ * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value
+ * stored will the byte fofset after the last valid
+ * input sequence.
+ * @bytes_written: the stored in the output buffer (not including the
+ * terminating nul.
+ * @error: location to store the error occuring, or %NULL to ignore
+ * errors. Any of the errors in #GConvertError may occur.
*
* Convert a string from one character set to another.
*
}
case EILSEQ:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
- "Invalid byte sequence in conversion input");
+ _("Invalid byte sequence in conversion input"));
have_error = TRUE;
break;
default:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- "Error during conversion: %s",
+ _("Error during conversion: %s"),
strerror (errno));
have_error = TRUE;
break;
* G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value
* stored will the byte fofset after the last valid
* input sequence.
+ * @bytes_written: the stored in the output buffer (not including the
+ * terminating nul.
* @error: location to store the error occuring, or %NULL to ignore
* errors. Any of the errors in #GConvertError may occur.
*
/* Error converting fallback string - fatal
*/
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
- "Cannot convert fallback '%s' to codeset '%s'",
+ _("Cannot convert fallback '%s' to codeset '%s'"),
insert_str, to_codeset);
have_error = TRUE;
break;
break;
default:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- "Error during conversion: %s",
+ _("Error during conversion: %s"),
strerror (errno));
have_error = TRUE;
break;
#include "glib.h"
+#define _(s) (s)
+
GQuark
g_convert_error_quark()
{
/* Something went wrong. */
if (errno == EINVAL)
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_NO_CONVERSION,
- "Conversion from character set `%s' to `%s' is not supported",
+ _("Conversion from character set `%s' to `%s' is not supported"),
from_codeset, to_codeset);
else
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- "Could not open converter from `%s' to `%s': %s",
+ _("Could not open converter from `%s' to `%s': %s"),
from_codeset, to_codeset, strerror (errno));
}
/**
* g_convert:
- * @str: the string to convert
- * @len: the length of the string
- * @to_codeset: name of character set into which to convert @str
- * @from_codeset: character set of @str.
- * @bytes_read: location to store the number of bytes in the
- * input string that were successfully converted, or %NULL.
- * Even if the conversion was succesful, this may be
- * less than len if there were partial characters
- * at the end of the input. If the error
- * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value
- * stored will the byte fofset after the last valid
- * input sequence.
- * @error: location to store the error occuring, or %NULL to ignore
- * errors. Any of the errors in #GConvertError may occur.
+ * @str: the string to convert
+ * @len: the length of the string
+ * @to_codeset: name of character set into which to convert @str
+ * @from_codeset: character set of @str.
+ * @bytes_read: location to store the number of bytes in the
+ * input string that were successfully converted, or %NULL.
+ * Even if the conversion was succesful, this may be
+ * less than len if there were partial characters
+ * at the end of the input. If the error
+ * G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value
+ * stored will the byte fofset after the last valid
+ * input sequence.
+ * @bytes_written: the stored in the output buffer (not including the
+ * terminating nul.
+ * @error: location to store the error occuring, or %NULL to ignore
+ * errors. Any of the errors in #GConvertError may occur.
*
* Convert a string from one character set to another.
*
}
case EILSEQ:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
- "Invalid byte sequence in conversion input");
+ _("Invalid byte sequence in conversion input"));
have_error = TRUE;
break;
default:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- "Error during conversion: %s",
+ _("Error during conversion: %s"),
strerror (errno));
have_error = TRUE;
break;
* G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value
* stored will the byte fofset after the last valid
* input sequence.
+ * @bytes_written: the stored in the output buffer (not including the
+ * terminating nul.
* @error: location to store the error occuring, or %NULL to ignore
* errors. Any of the errors in #GConvertError may occur.
*
/* Error converting fallback string - fatal
*/
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
- "Cannot convert fallback '%s' to codeset '%s'",
+ _("Cannot convert fallback '%s' to codeset '%s'"),
insert_str, to_codeset);
have_error = TRUE;
break;
break;
default:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- "Error during conversion: %s",
+ _("Error during conversion: %s"),
strerror (errno));
have_error = TRUE;
break;
*/
gboolean g_utf8_validate (const gchar *str,
- gint len,
+ gint max_len,
const gchar **end);
G_END_DECLS
*/
gboolean g_utf8_validate (const gchar *str,
- gint len,
+ gint max_len,
const gchar **end);
G_END_DECLS