From 4293525fc8fb2bba13d3aa184d95fcf6b2461452 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 17 Oct 2004 06:46:16 +0000 Subject: [PATCH] =?UTF-8?q?Make=20public.=20(#155589,=20Tim-Philipp=20M?= =?UTF-8?q?=C3=BCller)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2004-10-17 Matthias Clasen * glib/gutils.h (G_IS_DIR_SEPARATOR): * glib/gutils.c: Make public. (#155589, Tim-Philipp Müller) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ docs/reference/ChangeLog | 5 +++++ docs/reference/glib/glib-sections.txt | 1 + docs/reference/glib/tmpl/macros.sgml | 11 +++++++++++ glib/gutils.c | 7 ------- glib/gutils.h | 2 ++ 10 files changed, 44 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0187bb29b..00de45dde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-17 Matthias Clasen + + * glib/gutils.h (G_IS_DIR_SEPARATOR): + * glib/gutils.c: Make public. (#155589, Tim-Philipp Müller) + 2004-10-08 Matthias Clasen * glib/gmain.c (g_child_watch_add_full): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0187bb29b..00de45dde 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-10-17 Matthias Clasen + + * glib/gutils.h (G_IS_DIR_SEPARATOR): + * glib/gutils.c: Make public. (#155589, Tim-Philipp Müller) + 2004-10-08 Matthias Clasen * glib/gmain.c (g_child_watch_add_full): diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 0187bb29b..00de45dde 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2004-10-17 Matthias Clasen + + * glib/gutils.h (G_IS_DIR_SEPARATOR): + * glib/gutils.c: Make public. (#155589, Tim-Philipp Müller) + 2004-10-08 Matthias Clasen * glib/gmain.c (g_child_watch_add_full): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0187bb29b..00de45dde 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-10-17 Matthias Clasen + + * glib/gutils.h (G_IS_DIR_SEPARATOR): + * glib/gutils.c: Make public. (#155589, Tim-Philipp Müller) + 2004-10-08 Matthias Clasen * glib/gmain.c (g_child_watch_add_full): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0187bb29b..00de45dde 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-10-17 Matthias Clasen + + * glib/gutils.h (G_IS_DIR_SEPARATOR): + * glib/gutils.c: Make public. (#155589, Tim-Philipp Müller) + 2004-10-08 Matthias Clasen * glib/gmain.c (g_child_watch_add_full): diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 9528fdb16..21ba1db6d 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2004-10-17 Matthias Clasen + + * glib/tmpl/macros.sgml: + * glib/glib-sections.txt: Document G_IS_DIR_SEPARATOR. + 2004-10-05 Matthias Clasen * gobject/tmpl/objects.sgml: Improve the docs for diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index c3e5926bc..59ab696d7 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -122,6 +122,7 @@ G_OS_UNIX G_DIR_SEPARATOR G_DIR_SEPARATOR_S +G_IS_DIR_SEPARATOR G_SEARCHPATH_SEPARATOR G_SEARCHPATH_SEPARATOR_S diff --git a/docs/reference/glib/tmpl/macros.sgml b/docs/reference/glib/tmpl/macros.sgml index 2c498edb2..131bc02fa 100644 --- a/docs/reference/glib/tmpl/macros.sgml +++ b/docs/reference/glib/tmpl/macros.sgml @@ -54,6 +54,17 @@ This is "/" on UNIX machines and "\" under Windows. + + +Checks whether a character is a directory +separator. It returns %TRUE for '/' on UNIX +machines and for '\' or '/' under Windows. + + +@c: a character +@Since: 2.6 + + The search path separator character. diff --git a/glib/gutils.c b/glib/gutils.c index 83a753c25..6a1fea6ac 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -88,13 +88,6 @@ #include #endif -/* G_IS_DIR_SEPARATOR probably should be made public in GLib 2.4 */ -#ifdef G_OS_WIN32 -#define G_IS_DIR_SEPARATOR(c) (c == G_DIR_SEPARATOR || c == '/') -#else -#define G_IS_DIR_SEPARATOR(c) (c == G_DIR_SEPARATOR) -#endif - const guint glib_major_version = GLIB_MAJOR_VERSION; const guint glib_minor_version = GLIB_MINOR_VERSION; const guint glib_micro_version = GLIB_MICRO_VERSION; diff --git a/glib/gutils.h b/glib/gutils.h index c8ba172ac..03eaa17a0 100644 --- a/glib/gutils.h +++ b/glib/gutils.h @@ -39,6 +39,7 @@ G_BEGIN_DECLS */ #define G_DIR_SEPARATOR '\\' #define G_DIR_SEPARATOR_S "\\" +#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/') #define G_SEARCHPATH_SEPARATOR ';' #define G_SEARCHPATH_SEPARATOR_S ";" @@ -48,6 +49,7 @@ G_BEGIN_DECLS #define G_DIR_SEPARATOR '/' #define G_DIR_SEPARATOR_S "/" +#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR) #define G_SEARCHPATH_SEPARATOR ':' #define G_SEARCHPATH_SEPARATOR_S ":"