From b8c119f901c3320a790187304e3bebdcf3a80219 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 22 Jun 2005 18:55:33 +0000 Subject: [PATCH] glib/gfileutils.c glib/gfileutils.h glib/glib.symbols Rename g_makepath() 2005-06-22 Tor Lillqvist * glib/gfileutils.c * glib/gfileutils.h * glib/glib.symbols * tests/testglib.c: Rename g_makepath() to g_mkdir_with_parents(). --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-12 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ glib/gfileutils.c | 6 +++--- glib/gfileutils.h | 4 ++-- glib/glib.symbols | 2 +- tests/testglib.c | 38 +++++++++++++++++++------------------- 8 files changed, 53 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8646c55fd..561ad8915 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-06-22 Tor Lillqvist + + * glib/gfileutils.c + * glib/gfileutils.h + * glib/glib.symbols + * tests/testglib.c: Rename g_makepath() to g_mkdir_with_parents(). + 2005-06-22 Matthias Clasen * glib/goption.c (parse_short_option, parse_long_option): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 8646c55fd..561ad8915 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2005-06-22 Tor Lillqvist + + * glib/gfileutils.c + * glib/gfileutils.h + * glib/glib.symbols + * tests/testglib.c: Rename g_makepath() to g_mkdir_with_parents(). + 2005-06-22 Matthias Clasen * glib/goption.c (parse_short_option, parse_long_option): diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 8646c55fd..561ad8915 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +2005-06-22 Tor Lillqvist + + * glib/gfileutils.c + * glib/gfileutils.h + * glib/glib.symbols + * tests/testglib.c: Rename g_makepath() to g_mkdir_with_parents(). + 2005-06-22 Matthias Clasen * glib/goption.c (parse_short_option, parse_long_option): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 8646c55fd..561ad8915 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2005-06-22 Tor Lillqvist + + * glib/gfileutils.c + * glib/gfileutils.h + * glib/glib.symbols + * tests/testglib.c: Rename g_makepath() to g_mkdir_with_parents(). + 2005-06-22 Matthias Clasen * glib/goption.c (parse_short_option, parse_long_option): diff --git a/glib/gfileutils.c b/glib/gfileutils.c index a236a54ce..2833a21ab 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -58,7 +58,7 @@ #include "galias.h" /** - * g_makepath: + * g_mkdir_with_parents: * @pathname: a pathname in the GLib file name encoding * @mode: permissions to use for newly created directories * @@ -71,8 +71,8 @@ * Since: 2.8 */ int -g_makepath (const gchar *pathname, - int mode) +g_mkdir_with_parents (const gchar *pathname, + int mode) { gchar *fn, *p; diff --git a/glib/gfileutils.h b/glib/gfileutils.h index a43dd8a6c..885ed7c5a 100644 --- a/glib/gfileutils.h +++ b/glib/gfileutils.h @@ -107,8 +107,8 @@ gchar *g_build_path (const gchar *separator, gchar *g_build_filename (const gchar *first_element, ...) G_GNUC_NULL_TERMINATED; -int g_makepath (const gchar *pathname, - int mode); +int g_mkdir_with_parents (const gchar *pathname, + int mode); G_END_DECLS diff --git a/glib/glib.symbols b/glib/glib.symbols index 6dbcc3897..ff7dabbf7 100644 --- a/glib/glib.symbols +++ b/glib/glib.symbols @@ -260,7 +260,7 @@ g_file_open_tmp PRIVATE g_file_test PRIVATE g_file_read_link g_mkstemp PRIVATE -g_makepath +g_mkdir_with_parents #ifdef G_OS_WIN32 g_file_get_contents_utf8 g_file_open_tmp_utf8 diff --git a/tests/testglib.c b/tests/testglib.c index 02504088e..c9f31156b 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -320,7 +320,7 @@ find_first_that(gpointer key, static gboolean -test_g_makepath_1 (const gchar *base) +test_g_mkdir_with_parents_1 (const gchar *base) { char *p0 = g_build_filename (base, "fum", NULL); char *p1 = g_build_filename (p0, "tem", NULL); @@ -333,43 +333,43 @@ test_g_makepath_1 (const gchar *base) if (g_file_test (p0, G_FILE_TEST_EXISTS)) { - g_print ("failed, %s exists, cannot test g_makepath\n", p0); + g_print ("failed, %s exists, cannot test g_mkdir_with_parents\n", p0); return FALSE; } if (g_file_test (p1, G_FILE_TEST_EXISTS)) { - g_print ("failed, %s exists, cannot test g_makepath\n", p1); + g_print ("failed, %s exists, cannot test g_mkdir_with_parents\n", p1); return FALSE; } if (g_file_test (p2, G_FILE_TEST_EXISTS)) { - g_print ("failed, %s exists, cannot test g_makepath\n", p2); + g_print ("failed, %s exists, cannot test g_mkdir_with_parents\n", p2); return FALSE; } - if (g_makepath (p2, 0666) == -1) + if (g_mkdir_with_parents (p2, 0666) == -1) { - g_print ("failed, g_makepath(%s) failed: %s\n", p2, g_strerror (errno)); + g_print ("failed, g_mkdir_with_parents(%s) failed: %s\n", p2, g_strerror (errno)); return FALSE; } if (!g_file_test (p2, G_FILE_TEST_IS_DIR)) { - g_print ("failed, g_makepath(%s) succeeded, but %s is not a directory\n", p2, p2); + g_print ("failed, g_mkdir_with_parents(%s) succeeded, but %s is not a directory\n", p2, p2); return FALSE; } if (!g_file_test (p1, G_FILE_TEST_IS_DIR)) { - g_print ("failed, g_makepath(%s) succeeded, but %s is not a directory\n", p2, p1); + g_print ("failed, g_mkdir_with_parents(%s) succeeded, but %s is not a directory\n", p2, p1); return FALSE; } if (!g_file_test (p0, G_FILE_TEST_IS_DIR)) { - g_print ("failed, g_makepath(%s) succeeded, but %s is not a directory\n", p2, p0); + g_print ("failed, g_mkdir_with_parents(%s) succeeded, but %s is not a directory\n", p2, p0); return FALSE; } @@ -395,15 +395,15 @@ test_g_makepath_1 (const gchar *base) } fclose (f); - if (g_makepath (p1, 0666) == 0) + if (g_mkdir_with_parents (p1, 0666) == 0) { - g_print ("failed, g_makepath(%s) succeeded, even if %s is a file\n", p1, p1); + g_print ("failed, g_mkdir_with_parents(%s) succeeded, even if %s is a file\n", p1, p1); return FALSE; } - if (g_makepath (p2, 0666) == 0) + if (g_mkdir_with_parents (p2, 0666) == 0) { - g_print ("failed, g_makepath(%s) succeeded, even if %s is a file\n", p2, p1); + g_print ("failed, g_mkdir_with_parents(%s) succeeded, even if %s is a file\n", p2, p1); return FALSE; } @@ -415,18 +415,18 @@ test_g_makepath_1 (const gchar *base) } static gboolean -test_g_makepath (void) +test_g_mkdir_with_parents (void) { - g_print ("checking g_makepath()..."); - if (!test_g_makepath_1 ("hum")) + g_print ("checking g_mkdir_with_parents()..."); + if (!test_g_mkdir_with_parents_1 ("hum")) return FALSE; g_remove ("hum"); - if (!test_g_makepath_1 ("hii///haa/hee")) + if (!test_g_mkdir_with_parents_1 ("hii///haa/hee")) return FALSE; g_remove ("hii/haa/hee"); g_remove ("hii/haa"); g_remove ("hii"); - if (!test_g_makepath_1 (g_get_current_dir ())) + if (!test_g_mkdir_with_parents_1 (g_get_current_dir ())) return FALSE; return TRUE; @@ -639,7 +639,7 @@ main (int argc, if (n_skip_root_checks) g_print ("ok\n"); - if (test_g_makepath ()) + if (test_g_mkdir_with_parents ()) g_print ("ok\n"); g_print ("checking doubly linked lists...");