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

libdpkg: Rename (de)compress_cat funtions to (de)compress_filter

Guillem Jover лет назад: 16
Родитель
Сommit
4d89c0703a
4 измененных файлов с 13 добавлено и 12 удалено
  1. 2 2
      dpkg-deb/build.c
  2. 1 1
      dpkg-deb/extract.c
  3. 4 4
      lib/dpkg/compress.c
  4. 6 5
      lib/dpkg/compress.h

+ 2 - 2
dpkg-deb/build.c

@@ -432,7 +432,7 @@ void do_build(const char *const *argv) {
   c2 = subproc_fork();
   if (!c2) {
     m_dup2(p1[0],0); m_dup2(gzfd,1); close(p1[0]); close(gzfd);
-    compress_cat(compress_type_gzip, 0, 1, "9", _("control"));
+    compress_filter(compress_type_gzip, 0, 1, "9", _("control"));
   }
   close(p1[0]);
   subproc_wait_check(c2, "gzip -9c", 0);
@@ -498,7 +498,7 @@ void do_build(const char *const *argv) {
     close(p1[1]);
     m_dup2(p2[0],0); close(p2[0]);
     m_dup2(oldformatflag ? fileno(ar) : gzfd,1);
-    compress_cat(compress_type, 0, 1, compression, _("data"));
+    compress_filter(compress_type, 0, 1, compression, _("data"));
   }
   close(p2[0]);
   /* All the pipes are set, now lets run find, and start feeding

+ 1 - 1
dpkg-deb/extract.c

@@ -294,7 +294,7 @@ void extracthalf(const char *debar, const char *directory,
     m_dup2(readfromfd,0);
     if (admininfo) close(p1[0]);
     if (taroption) { m_dup2(p2[1],1); close(p2[0]); close(p2[1]); }
-    decompress_cat(compress_type, 0, 1, _("data"));
+    decompress_filter(compress_type, 0, 1, _("data"));
   }
   if (readfromfd != fileno(ar)) close(readfromfd);
   if (taroption) close(p2[1]);

+ 4 - 4
lib/dpkg/compress.c

@@ -70,8 +70,8 @@ fd_fd_filter(int fd_in, int fd_out, const char *desc, const char *file, ...)
 }
 
 void
-decompress_cat(enum compress_type type, int fd_in, int fd_out,
-               const char *desc, ...)
+decompress_filter(enum compress_type type, int fd_in, int fd_out,
+                  const char *desc, ...)
 {
   va_list al;
   struct varbuf v = VARBUF_INIT;
@@ -152,8 +152,8 @@ decompress_cat(enum compress_type type, int fd_in, int fd_out,
 }
 
 void
-compress_cat(enum compress_type type, int fd_in, int fd_out,
-             const char *compression, const char *desc, ...)
+compress_filter(enum compress_type type, int fd_in, int fd_out,
+                const char *compression, const char *desc, ...)
 {
   va_list al;
   struct varbuf v = VARBUF_INIT;

+ 6 - 5
lib/dpkg/compress.h

@@ -37,11 +37,12 @@ enum compress_type {
   compress_type_lzma,
 };
 
-void decompress_cat(enum compress_type type, int fd_in, int fd_out,
-                    const char *desc, ...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(4);
-void compress_cat(enum compress_type type, int fd_in, int fd_out,
-                  const char *compression, const char *desc, ...)
-                  DPKG_ATTR_NORET DPKG_ATTR_PRINTF(5);
+void decompress_filter(enum compress_type type, int fd_in, int fd_out,
+                       const char *desc, ...) DPKG_ATTR_NORET
+                       DPKG_ATTR_PRINTF(4);
+void compress_filter(enum compress_type type, int fd_in, int fd_out,
+                     const char *compression, const char *desc, ...)
+                     DPKG_ATTR_NORET DPKG_ATTR_PRINTF(5);
 
 DPKG_END_DECLS