Commit Graph

7 Commits

Author SHA1 Message Date
Tor Lillqvist
421e7fdfad Fix Win32 behaviour in some cases where a drive letter is present. For
2004-03-21  Tor Lillqvist  <tml@iki.fi>

	* glib/gutils.c (g_path_get_dirname): Fix Win32 behaviour in some
	cases where a drive letter is present. For 'a:' or 'a:foo', return
	'a:.'. This is mostly just for consistency with the behaviour
	without a drive letter. But very important is to for 'a:\foo' or
	'a:\', return 'a:\', and not 'a:'. (Ditto for forward slashes
	instead of backslashes.) (#137316)

	* tests/dirname-test.c (main): More complete testing on
	Win32. If a test fails, include expected and actual result in
	error message.
2004-03-21 21:43:13 +00:00
Darin Adler
3fa620d4df Add missing const. (g_strsplit): Add g_return_val_if_fail for case of
* glib/gstrfuncs.c: (g_ascii_strdown), (g_ascii_strup): Add
	missing const.
	(g_strsplit): Add g_return_val_if_fail for case of empty
	delimiter, which can result in an infinite loop otherwise.
	* glib/gstrfuncs.h: Add missing const.
	* tests/.cvsignore: Ignore a generated file.

	* tests/array-test.c:
	* tests/dirname-test.c:
	* tests/hash-test.c:
	* tests/list-test.c:
	* tests/node-test.c:
	* tests/relation-test.c:
	* tests/shell-test.c:
	* tests/slist-test.c:
	* tests/spawn-test.c:
	* tests/strfunc-test.c:
	* tests/string-test.c:
	* tests/testglib.c:
	* tests/tree-test.c:
	* tests/type-test.c:
	Add an #undef G_DISABLE_ASSERT so all tests will assert even if
	asserts are disabled inside glib itself.
2001-07-19 20:07:41 +00:00
Tim Janik
c9bd7542e1 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:02:02 +00:00
Sebastian Wilhelmi
fec9828ac6 Mark the functions g_basename and g_dirname deprecated. They will issue an
2000-07-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gutils.c, glib.h: Mark the functions g_basename and g_dirname
	deprecated. They will issue an warning once, when compiled with
	G_ENABLE_DEBUG, but continue to work as before. Instead the
	functions g_path_get_basename and g_path_get_dirname should be
	used, which BOTH return newly allocated memory, that has to freed
	by g_free. The new g_path_get_basename now strips trailing slashes
	from the path. This fixes #5097. For discussion see
	http://mail.gnome.org/pipermail/gtk-devel-list/2000-April/003139.html

	* gwin32.c, testglib.c, tests/dirname-test.c: Use the new
	functions instead of the old ones.

	* gmodule/libgplugin_a.c, gmodule/testgmodule.c: Use
	g_path_get_basename instead of the deprecated g_basename.
2000-07-20 16:58:54 +00:00
Tor Lillqvist
1dc5f94cfa Use G_OS_WIN32.
* tests/string-test.c tests/dirname-test.c: Use G_OS_WIN32.

* glib.def: Add g_thread_use_default_impl.
1999-10-05 16:21:07 +00:00
CST 1999 Shawn T. Amundson
b9ef2b41db inserted additional note to look for ChangeLog and AUTHORS file for a log
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>

        * *.[ch]: inserted additional note to look for ChangeLog and
	  AUTHORS file for a log of modifications.
1999-02-24 06:14:27 +00:00
Jeff Garzik
5eeca0d62d Make all aux functions static.
* testglib.c:
        Make all aux functions static.

        * tests/Makefile.am, tests/dirname-test.c, tests/type-test.c:
        New tests dirname-test and type-test, from testglib.
1999-01-09 20:10:45 +00:00