glib/gfileutils.c glib/gfileutils.h glib/glib.symbols Rename g_makepath()
authorTor Lillqvist <tml@novell.com>
Wed, 22 Jun 2005 18:55:33 +0000 (18:55 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Wed, 22 Jun 2005 18:55:33 +0000 (18:55 +0000)
2005-06-22  Tor Lillqvist  <tml@novell.com>

* glib/gfileutils.c
* glib/gfileutils.h
* glib/glib.symbols
* tests/testglib.c: Rename g_makepath() to g_mkdir_with_parents().

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-8
glib/gfileutils.c
glib/gfileutils.h
glib/glib.symbols
tests/testglib.c

index 8646c55..561ad89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-22  Tor Lillqvist  <tml@novell.com>
+
+       * 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  <mclasen@redhat.com>
 
        * glib/goption.c (parse_short_option, parse_long_option): 
index 8646c55..561ad89 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-22  Tor Lillqvist  <tml@novell.com>
+
+       * 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  <mclasen@redhat.com>
 
        * glib/goption.c (parse_short_option, parse_long_option): 
index 8646c55..561ad89 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-22  Tor Lillqvist  <tml@novell.com>
+
+       * 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  <mclasen@redhat.com>
 
        * glib/goption.c (parse_short_option, parse_long_option): 
index 8646c55..561ad89 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-22  Tor Lillqvist  <tml@novell.com>
+
+       * 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  <mclasen@redhat.com>
 
        * glib/goption.c (parse_short_option, parse_long_option): 
index a236a54..2833a21 100644 (file)
@@ -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;
 
index a43dd8a..885ed7c 100644 (file)
@@ -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
 
index 6dbcc38..ff7dabb 100644 (file)
@@ -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
index 0250408..c9f3115 100644 (file)
@@ -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...");