Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/archival/gzip.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1122 by niro, Sun May 30 11:32:42 2010 UTC revision 1123 by niro, Wed Aug 18 21:56:57 2010 UTC
# Line 620  static int longest_match(IPos cur_match) Line 620  static int longest_match(IPos cur_match)
620   /* Skip to next match if the match length cannot increase   /* Skip to next match if the match length cannot increase
621   * or if the match length is less than 2:   * or if the match length is less than 2:
622   */   */
623   if (match[best_len] != scan_end ||   if (match[best_len] != scan_end
624   match[best_len - 1] != scan_end1 ||   || match[best_len - 1] != scan_end1
625   *match != *scan || *++match != scan[1])   || *match != *scan || *++match != scan[1]
626     ) {
627   continue;   continue;
628     }
629    
630   /* The check at best_len-1 can be removed because it will be made   /* The check at best_len-1 can be removed because it will be made
631   * again later. (This heuristic is not always a win.)   * again later. (This heuristic is not always a win.)
# Line 674  static void check_match(IPos start, IPos Line 676  static void check_match(IPos start, IPos
676   if (verbose > 1) {   if (verbose > 1) {
677   bb_error_msg("\\[%d,%d]", start - match, length);   bb_error_msg("\\[%d,%d]", start - match, length);
678   do {   do {
679   fputc(G1.window[start++], stderr);   bb_putchar_stderr(G1.window[start++]);
680   } while (--length != 0);   } while (--length != 0);
681   }   }
682  }  }
# Line 962  static void compress_block(ct_data * ltr Line 964  static void compress_block(ct_data * ltr
964  #else  #else
965  #  define SEND_CODE(c, tree) \  #  define SEND_CODE(c, tree) \
966  { \  { \
967   if (verbose > 1) bb_error_msg("\ncd %3d ",(c)); \   if (verbose > 1) bb_error_msg("\ncd %3d ", (c)); \
968   send_bits(tree[c].Code, tree[c].Len); \   send_bits(tree[c].Code, tree[c].Len); \
969  }  }
970  #endif  #endif
# Line 1996  static void zip(ulg time_stamp) Line 1998  static void zip(ulg time_stamp)
1998    
1999  /* ======================================================================== */  /* ======================================================================== */
2000  static  static
2001  char* make_new_name_gzip(char *filename)  IF_DESKTOP(long long) int FAST_FUNC pack_gzip(unpack_info_t *info UNUSED_PARAM)
 {  
  return xasprintf("%s.gz", filename);  
 }  
   
 static  
 IF_DESKTOP(long long) int pack_gzip(unpack_info_t *info UNUSED_PARAM)  
2002  {  {
2003   struct stat s;   struct stat s;
2004    
# Line 2061  static const char gzip_longopts[] ALIGN1 Line 2057  static const char gzip_longopts[] ALIGN1
2057  #endif  #endif
2058    
2059  /*  /*
2060   * Linux kernel build uses gzip -d -n. We accept and ignore it.   * Linux kernel build uses gzip -d -n. We accept and ignore -n.
2061   * Man page says:   * Man page says:
2062   * -n --no-name   * -n --no-name
2063   * gzip: do not save the original file name and time stamp.   * gzip: do not save the original file name and time stamp.
# Line 2111  int gzip_main(int argc UNUSED_PARAM, cha Line 2107  int gzip_main(int argc UNUSED_PARAM, cha
2107   /* Initialise the CRC32 table */   /* Initialise the CRC32 table */
2108   G1.crc_32_tab = crc32_filltable(NULL, 0);   G1.crc_32_tab = crc32_filltable(NULL, 0);
2109    
2110   return bbunpack(argv, make_new_name_gzip, pack_gzip);   return bbunpack(argv, pack_gzip, append_ext, "gz");
2111  }  }

Legend:
Removed from v.1122  
changed lines
  Added in v.1123