Przeglądaj źródła

libdpkg: Rename compress_type_cat to compress_type_none

Guillem Jover 16 lat temu
rodzic
commit
ad010e125f
5 zmienionych plików z 7 dodań i 7 usunięć
  1. 1 1
      dpkg-deb/build.c
  2. 1 1
      dpkg-deb/extract.c
  3. 1 1
      dpkg-deb/main.c
  4. 3 3
      lib/dpkg/compress.c
  5. 1 1
      lib/dpkg/compress.h

+ 1 - 1
dpkg-deb/build.c

@@ -549,7 +549,7 @@ void do_build(const char *const *argv) {
     case compress_type_lzma:
     case compress_type_lzma:
       datamember = DATAMEMBER_LZMA;
       datamember = DATAMEMBER_LZMA;
       break;
       break;
-    case compress_type_cat:
+    case compress_type_none:
       datamember = DATAMEMBER;
       datamember = DATAMEMBER;
       break;
       break;
     default:
     default:

+ 1 - 1
dpkg-deb/extract.c

@@ -187,7 +187,7 @@ void extracthalf(const char *debar, const char *directory,
 	    compress_type = compress_type_lzma;
 	    compress_type = compress_type_lzma;
 	  } else if (strncmp(arh.ar_name, DATAMEMBER, sizeof(arh.ar_name)) == 0) {
 	  } else if (strncmp(arh.ar_name, DATAMEMBER, sizeof(arh.ar_name)) == 0) {
 	    adminmember= 0;
 	    adminmember= 0;
-	    compress_type = compress_type_cat;
+	    compress_type = compress_type_none;
 	  } else {
 	  } else {
             ohshit(_("file `%.250s' contains ununderstood data member %.*s, giving up"),
             ohshit(_("file `%.250s' contains ununderstood data member %.*s, giving up"),
                    debar, (int)sizeof(arh.ar_name), arh.ar_name);
                    debar, (int)sizeof(arh.ar_name), arh.ar_name);

+ 1 - 1
dpkg-deb/main.c

@@ -200,7 +200,7 @@ static void setcompresstype(const struct cmdinfo *cip, const char *value) {
   else if (!strcmp(value, "lzma"))
   else if (!strcmp(value, "lzma"))
     compress_type = compress_type_lzma;
     compress_type = compress_type_lzma;
   else if (!strcmp(value, "none"))
   else if (!strcmp(value, "none"))
-    compress_type = compress_type_cat;
+    compress_type = compress_type_none;
   else
   else
     ohshit(_("unknown compression type `%s'!"), value);
     ohshit(_("unknown compression type `%s'!"), value);
 }
 }

+ 3 - 3
lib/dpkg/compress.c

@@ -143,7 +143,7 @@ decompress_cat(enum compress_type type, int fd_in, int fd_out,
 #endif
 #endif
     case compress_type_lzma:
     case compress_type_lzma:
       fd_fd_filter(fd_in, fd_out, v.buf, LZMA, "-dc", NULL);
       fd_fd_filter(fd_in, fd_out, v.buf, LZMA, "-dc", NULL);
-    case compress_type_cat:
+    case compress_type_none:
       fd_fd_copy(fd_in, fd_out, -1, _("%s: decompression"), v.buf);
       fd_fd_copy(fd_in, fd_out, -1, _("%s: decompression"), v.buf);
       exit(0);
       exit(0);
     default:
     default:
@@ -165,7 +165,7 @@ compress_cat(enum compress_type type, int fd_in, int fd_out,
 
 
   if(compression == NULL) compression= "9";
   if(compression == NULL) compression= "9";
   else if (*compression == '0')
   else if (*compression == '0')
-    type = compress_type_cat;
+    type = compress_type_none;
 
 
   switch(type) {
   switch(type) {
     case compress_type_gzip:
     case compress_type_gzip:
@@ -239,7 +239,7 @@ compress_cat(enum compress_type type, int fd_in, int fd_out,
     case compress_type_lzma:
     case compress_type_lzma:
       snprintf(combuf, sizeof(combuf), "-c%c", *compression);
       snprintf(combuf, sizeof(combuf), "-c%c", *compression);
       fd_fd_filter(fd_in, fd_out, v.buf, LZMA, combuf, NULL);
       fd_fd_filter(fd_in, fd_out, v.buf, LZMA, combuf, NULL);
-    case compress_type_cat:
+    case compress_type_none:
       fd_fd_copy(fd_in, fd_out, -1, _("%s: compression"), v.buf);
       fd_fd_copy(fd_in, fd_out, -1, _("%s: compression"), v.buf);
       exit(0);
       exit(0);
     default:
     default:

+ 1 - 1
lib/dpkg/compress.h

@@ -31,7 +31,7 @@ DPKG_BEGIN_DECLS
 #define LZMA		"lzma"
 #define LZMA		"lzma"
 
 
 enum compress_type {
 enum compress_type {
-  compress_type_cat,
+  compress_type_none,
   compress_type_gzip,
   compress_type_gzip,
   compress_type_bzip2,
   compress_type_bzip2,
   compress_type_lzma,
   compress_type_lzma,