X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fgmarkup.c;h=9b60387cdfda04c0a38986ac89ed960599b43489;hb=13e15733f38a40c6ef6a1baede91cce81c86ebaa;hp=b9c88a96c96dbab610d325334c87a6430e6de295;hpb=078dbda148a81af1b3a76fbda72f089b963087f1;p=platform%2Fupstream%2Fglib.git
diff --git a/glib/gmarkup.c b/glib/gmarkup.c
index b9c88a9..9b60387 100644
--- a/glib/gmarkup.c
+++ b/glib/gmarkup.c
@@ -41,8 +41,7 @@
* SECTION:markup
* @Title: Simple XML Subset Parser
* @Short_description: parses a subset of XML
- * @See_also: XML
- * Specification
+ * @See_also: [XML Specification](http://www.w3.org/TR/REC-xml/)
*
* The "GMarkup" parser is intended to parse a simple markup format
* that's a subset of XML. This is a small, efficient, easy-to-use
@@ -56,31 +55,34 @@
*
* GMarkup is not guaranteed to signal an error on all invalid XML;
* the parser may accept documents that an XML parser would not.
- * However, XML documents which are not well-formedBeing wellformed is a weaker condition than being
- * valid. See the XML
- * specification for definitions of these terms.
- * are not considered valid GMarkup documents.
+ * However, XML documents which are not well-formed (which is a
+ * weaker condition than being valid. See the
+ * [XML specification](http://www.w3.org/TR/REC-xml/)
+ * for definitions of these terms.) are not considered valid GMarkup
+ * documents.
*
* Simplifications to XML include:
- *
- * Only UTF-8 encoding is allowed
- * No user-defined entities
- * Processing instructions, comments and the doctype declaration
- * are "passed through" but are not interpreted in any way
- * No DTD or validation.
- *
+ *
+ * - Only UTF-8 encoding is allowed
+ *
+ * - No user-defined entities
+ *
+ * - Processing instructions, comments and the doctype declaration
+ * are "passed through" but are not interpreted in any way
+ *
+ * - No DTD or validation
*
* The markup format does support:
- *
- * Elements
- * Attributes
- * 5 standard entities:
- * & < > " '
- *
- * Character references
- * Sections marked as CDATA
- *
+ *
+ * - Elements
+ *
+ * - Attributes
+ *
+ * - 5 standard entities: & < > " '
+ *
+ * - Character references
+ *
+ * - Sections marked as CDATA
*/
G_DEFINE_QUARK (g-markup-error-quark, g_markup_error)
@@ -212,7 +214,7 @@ string_blank (GString *string)
* the parse context can't continue to parse text (you have to
* free it and create a new parse context).
*
- * Return value: a new #GMarkupParseContext
+ * Returns: a new #GMarkupParseContext
**/
GMarkupParseContext *
g_markup_parse_context_new (const GMarkupParser *parser,
@@ -630,7 +632,7 @@ unescape_gstring_inplace (GMarkupParseContext *context,
normalize_attribute = FALSE;
/*
- * Meeks' theorum: unescaping can only shrink text.
+ * Meeks' theorem: unescaping can only shrink text.
* for < etc. this is obvious, for more
* thought is required, but this is patently so.
*/
@@ -1113,7 +1115,7 @@ emit_end_element (GMarkupParseContext *context,
* is reported, no further data may be fed to the #GMarkupParseContext;
* all errors are fatal.
*
- * Return value: %FALSE if an error occurred, %TRUE on success
+ * Returns: %FALSE if an error occurred, %TRUE on success
*/
gboolean
g_markup_parse_context_parse (GMarkupParseContext *context,
@@ -1744,7 +1746,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
* This function reports an error if the document isn't complete,
* for example if elements are still open.
*
- * Return value: %TRUE on success, %FALSE if an error was set
+ * Returns: %TRUE on success, %FALSE if an error was set
*/
gboolean
g_markup_parse_context_end_parse (GMarkupParseContext *context,
@@ -1995,7 +1997,7 @@ g_markup_parse_context_get_user_data (GMarkupParseContext *context)
* As an example, see the following implementation of a simple
* parser that counts the number of tags encountered.
*
- * |[
+ * |[
* typedef struct
* {
* gint tag_count;
@@ -2037,7 +2039,7 @@ g_markup_parse_context_get_user_data (GMarkupParseContext *context)
* In order to allow this parser to be easily used as a subparser, the
* following interface is provided:
*
- * |[
+ * |[
* void
* start_counting (GMarkupParseContext *context)
* {
@@ -2062,13 +2064,13 @@ g_markup_parse_context_get_user_data (GMarkupParseContext *context)
*
* The subparser would then be used as follows:
*
- * |[
+ * |[
* static void start_element (context, element_name, ...)
* {
* if (strcmp (element_name, "count-these") == 0)
* start_counting (context);
*
- * /* else, handle other tags... */
+ * // else, handle other tags...
* }
*
* static void end_element (context, element_name, ...)
@@ -2076,7 +2078,7 @@ g_markup_parse_context_get_user_data (GMarkupParseContext *context)
* if (strcmp (element_name, "count-these") == 0)
* g_print ("Counted %d tags\n", end_counting (context));
*
- * /* else, handle other tags... */
+ * // else, handle other tags...
* }
* ]|
*
@@ -2214,12 +2216,12 @@ append_escaped_text (GString *str,
* of line endings and attribute values.
*
* Note also that this function will produce character references in
- * the range of  ...  for all control sequences
+ * the range of ... for all control sequences
* except for tabstop, newline and carriage return. The character
* references in this range are not valid XML 1.0, but they are
* valid XML 1.1 and will be accepted by the GMarkup parser.
*
- * Return value: a newly allocated string with the escaped text
+ * Returns: a newly allocated string with the escaped text
*/
gchar*
g_markup_escape_text (const gchar *text,
@@ -2250,7 +2252,7 @@ g_markup_escape_text (const gchar *text,
* Partially based on code from printf-parser.c,
* Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.
*
- * Return value: pointer to the next conversion in @format,
+ * Returns: pointer to the next conversion in @format,
* or %NULL, if none.
*/
static const char *
@@ -2374,7 +2376,7 @@ find_conversion (const char *format,
* all string and character arguments in the fashion
* of g_markup_escape_text(). See g_markup_printf_escaped().
*
- * Return value: newly allocated result from formatting
+ * Returns: newly allocated result from formatting
* operation. Free with g_free().
*
* Since: 2.4
@@ -2416,9 +2418,9 @@ g_markup_vprintf_escaped (const gchar *format,
* To find the span of the first argument, we find the first position
* where the two arguments differ, which tells us that the first
* argument formatted to "Susan & Fred". We then escape that
- * to "Susan & Fred" and join up with the intermediate portions
+ * to "Susan & Fred" and join up with the intermediate portions
* of the format string and the second argument to get
- * "Susan & Fred ate 5 apples".
+ * "Susan & Fred ate 5 apples".
*/
/* Create the two modified format strings
@@ -2522,19 +2524,19 @@ g_markup_vprintf_escaped (const gchar *format,
* output, without having to worry that the strings
* might themselves contain markup.
*
- * |[
- * const char *store = "Fortnum & Mason";
+ * |[
+ * const char *store = "Fortnum & Mason";
* const char *item = "Tea";
* char *output;
- *
- * output = g_markup_printf_escaped ("<purchase>"
- * "<store>%s</store>"
- * "<item>%s</item>"
- * "</purchase>",
+ *
+ * output = g_markup_printf_escaped (""
+ * "%s"
+ * "- %s
"
+ * "",
* store, item);
* ]|
*
- * Return value: newly allocated result from formatting
+ * Returns: newly allocated result from formatting
* operation. Free with g_free().
*
* Since: 2.4
@@ -2662,7 +2664,7 @@ g_markup_parse_boolean (const char *string,
* %G_MARKUP_ERROR_INVALID_CONTENT). In all of these cases %FALSE
* will be returned and @error will be set as appropriate.
*
- * Return value: %TRUE if successful
+ * Returns: %TRUE if successful
*
* Since: 2.16
**/