jdk/src/share/native/com/sun/java/util/jar/pack/bands.cpp
changeset 23304 bb48872f9326
parent 16117 3c521ba54a81
equal deleted inserted replaced
23303:a88030d506db 23304:bb48872f9326
   286 
   286 
   287 #define BAND_INIT(name, cspec, ix) \
   287 #define BAND_INIT(name, cspec, ix) \
   288   { e_##name,  #name, /*debug only*/ \
   288   { e_##name,  #name, /*debug only*/ \
   289     cspec, ix }
   289     cspec, ix }
   290 
   290 
   291 const band_init all_band_inits[] = {
   291 const band_init all_band_inits[BAND_LIMIT+1] = {
   292 //BAND_INIT(archive_magic, BYTE1_spec, 0),
   292 //BAND_INIT(archive_magic, BYTE1_spec, 0),
   293 //BAND_INIT(archive_header, UNSIGNED5_spec, 0),
   293 //BAND_INIT(archive_header, UNSIGNED5_spec, 0),
   294 //BAND_INIT(band_headers, BYTE1_spec, 0),
   294 //BAND_INIT(band_headers, BYTE1_spec, 0),
   295   BAND_INIT(cp_Utf8_prefix, DELTA5_spec, 0),
   295   BAND_INIT(cp_Utf8_prefix, DELTA5_spec, 0),
   296   BAND_INIT(cp_Utf8_suffix, UNSIGNED5_spec, 0),
   296   BAND_INIT(cp_Utf8_suffix, UNSIGNED5_spec, 0),
   446   BAND_INIT(file_size_hi, UNSIGNED5_spec, 0),
   446   BAND_INIT(file_size_hi, UNSIGNED5_spec, 0),
   447   BAND_INIT(file_size_lo, UNSIGNED5_spec, 0),
   447   BAND_INIT(file_size_lo, UNSIGNED5_spec, 0),
   448   BAND_INIT(file_modtime, DELTA5_spec, 0),
   448   BAND_INIT(file_modtime, DELTA5_spec, 0),
   449   BAND_INIT(file_options, UNSIGNED5_spec, 0),
   449   BAND_INIT(file_options, UNSIGNED5_spec, 0),
   450 //BAND_INIT(file_bits, BYTE1_spec, 0),
   450 //BAND_INIT(file_bits, BYTE1_spec, 0),
   451 #ifndef PRODUCT
   451   { 0, NULL, 0, 0 }
   452   { 0, 0, 0, 0 }
       
   453 #else
       
   454   { 0, 0 }
       
   455 #endif
       
   456 };
   452 };
   457 #define NUM_BAND_INITS \
       
   458         (sizeof(all_band_inits)/sizeof(all_band_inits[0]))
       
   459 
   453 
   460 band* band::makeBands(unpacker* u) {
   454 band* band::makeBands(unpacker* u) {
   461   band* tmp_all_bands = U_NEW(band, BAND_LIMIT);
   455   band* tmp_all_bands = U_NEW(band, BAND_LIMIT);
   462   for (int i = 0; i < BAND_LIMIT; i++) {
   456   for (int i = 0; i < BAND_LIMIT; i++) {
   463     assert((byte*)&all_band_inits[i+1]
   457     assert((byte*)&all_band_inits[i+1]