Просмотр исходного кода

libdpkg: Rename path_rtrim_slash_slashdot to path_trim_slash_slashdot

Guillem Jover лет назад: 15
Родитель
Сommit
7a0a0619fd
7 измененных файлов с 9 добавлено и 9 удалено
  1. 1 1
      dpkg-deb/build.c
  2. 1 1
      lib/dpkg/libdpkg.Versions
  3. 1 1
      lib/dpkg/path.c
  4. 1 1
      lib/dpkg/path.h
  5. 3 3
      lib/dpkg/test/t-path.c
  6. 1 1
      src/querycmd.c
  7. 1 1
      src/statcmd.c

+ 1 - 1
dpkg-deb/build.c

@@ -246,7 +246,7 @@ void do_build(const char *const *argv) {
   } else {
     m= m_malloc(strlen(directory) + sizeof(DEBEXT));
     strcpy(m, directory);
-    path_rtrim_slash_slashdot(m);
+    path_trim_slash_slashdot(m);
     strcat(m, DEBEXT);
     debar= m;
   }

+ 1 - 1
lib/dpkg/libdpkg.Versions

@@ -64,8 +64,8 @@ LIBDPKG_PRIVATE {
 	varbuf_destroy;
 
 	# Path, directory and file functions
-	path_rtrim_slash_slashdot;
 	path_skip_slash_dotslash;
+	path_trim_slash_slashdot;
 	path_make_temp_template;
 	path_quote_filename;
 

+ 1 - 1
lib/dpkg/path.c

@@ -40,7 +40,7 @@
  * @return The size of the trimmed pathname.
  */
 size_t
-path_rtrim_slash_slashdot(char *path)
+path_trim_slash_slashdot(char *path)
 {
 	char *end;
 

+ 1 - 1
lib/dpkg/path.h

@@ -27,7 +27,7 @@
 
 DPKG_BEGIN_DECLS
 
-size_t path_rtrim_slash_slashdot(char *path);
+size_t path_trim_slash_slashdot(char *path);
 const char *path_skip_slash_dotslash(const char *path);
 char *path_quote_filename(char *dst, const char *src, size_t size);
 

+ 3 - 3
lib/dpkg/test/t-path.c

@@ -33,13 +33,13 @@
 #define test_trim_eq_ref(p, ref) \
 do { \
 	char *t = strdup((p)); \
-	path_rtrim_slash_slashdot(t); \
+	path_trim_slash_slashdot(t); \
 	test_str(t, ==, (ref)); \
 	free(t); \
 } while (0)
 
 static void
-test_path_rtrim(void)
+test_path_trim(void)
 {
 	test_trim_eq_ref("./././.", ".");
 	test_trim_eq_ref("./././", ".");
@@ -160,7 +160,7 @@ test_path_quote(void)
 static void
 test(void)
 {
-	test_path_rtrim();
+	test_path_trim();
 	test_path_skip();
 	test_path_temp();
 	test_path_quote();

+ 1 - 1
src/querycmd.c

@@ -282,7 +282,7 @@ searchfiles(const char *const *argv)
       varbufaddstr(&path, thisarg);
       varbufaddc(&path, '\0');
 
-      varbuf_trunc(&path, path_rtrim_slash_slashdot(path.buf));
+      varbuf_trunc(&path, path_trim_slash_slashdot(path.buf));
 
       thisarg = path.buf;
     }

+ 1 - 1
src/statcmd.c

@@ -110,7 +110,7 @@ path_cleanup(const char *path)
 {
 	char *new_path = m_strdup(path);
 
-	path_rtrim_slash_slashdot(new_path);
+	path_trim_slash_slashdot(new_path);
 	if (opt_verbose && strcmp(path, new_path) != 0)
 		warning(_("stripping trailing /"));