+2003-06-19 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gutils.c (g_path_get_basename): Move the documentation
+ inline and add details. (#108505)
+
2003-06-18 Matthias Clasen <maclas@gmx.de>
* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
+2003-06-19 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gutils.c (g_path_get_basename): Move the documentation
+ inline and add details. (#108505)
+
2003-06-18 Matthias Clasen <maclas@gmx.de>
* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
+2003-06-19 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gutils.c (g_path_get_basename): Move the documentation
+ inline and add details. (#108505)
+
2003-06-18 Matthias Clasen <maclas@gmx.de>
* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
+2003-06-19 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gutils.c (g_path_get_basename): Move the documentation
+ inline and add details. (#108505)
+
2003-06-18 Matthias Clasen <maclas@gmx.de>
* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
+2003-06-19 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gutils.c (g_path_get_basename): Move the documentation
+ inline and add details. (#108505)
+
2003-06-18 Matthias Clasen <maclas@gmx.de>
* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
+2003-06-19 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gutils.c (g_path_get_basename): Move the documentation
+ inline and add details. (#108505)
+
2003-06-18 Matthias Clasen <maclas@gmx.de>
* acinclude.m4 (JH_PATH_XML_CATALOG, JH_CHECK_XML_CATALOG): New
+2003-06-19 Matthias Clasen <maclas@gmx.de>
+
+ * glib/tmpl/misc_utils.sgml: Move g_path_get_basename() docs inline.
+
2003-06-18 Matthias Clasen <maclas@gmx.de>
- * glib/glib-sections.txt: Add g_thread_init_glib to silence gtk-doc.
+o * glib/glib-sections.txt: Add g_thread_init_glib to silence gtk-doc.
* gobject/Makefile.am: Add rule to regenerate man pages from
Docbook.
@Returns:
+<!-- ##### FUNCTION g_set_application_name ##### -->
+<para>
+
+</para>
+
+@application_name:
+
+
<!-- ##### FUNCTION g_get_prgname ##### -->
<para>
Gets the name of the program. This name should NOT be localized,
<!-- ##### FUNCTION g_path_get_basename ##### -->
<para>
-Gets the name of the file without any leading directory components.
-The returned string should be freed when no longer needed.
-</para>
-<note>
-<para>
-This function allocates new memory for the returned string. This is
-different from the old g_basename() function, which returned a pointer
-into the argument.
</para>
-</note>
-@file_name: the name of the file.
-@Returns: the name of the file without any leading directory components.
+@file_name:
+@Returns:
<!-- ##### FUNCTION g_path_get_dirname ##### -->
*
* Return value: the name of the file without any leading directory components.
*
- * Deprecated: Use g_path_get_basename() instead.
+ * Deprecated: Use g_path_get_basename() instead, but notice that
+ * g_path_get_basename() allocates new memory for the returned string, unlike
+ * this function which returns a pointer into the argument.
**/
G_CONST_RETURN gchar*
g_basename (const gchar *file_name)
return (gchar*) file_name;
}
+/**
+ * g_path_get_basename:
+ * @file_name: the name of the file.
+ *
+ * Gets the last component of the filename. If @file_name ends with a
+ * directory separator it gets the component before the last slash. If
+ * @file_name consists only of directory separators (and on Windows,
+ * possibly a drive letter), a single separator is returned. If
+ * @file_name is empty, it gets ".".
+ *
+ * Return value: a newly allocated string containing the last component of
+ * the filename.
+ */
gchar*
g_path_get_basename (const gchar *file_name)
{