Changeset 684

Show
Ignore:
Timestamp:
08/02/09 13:43:39
Author:
ben
Message:

Layout.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openpgpsdk/trunk/src/lib/accumulate.c

    r636 r684  
    9898        if(!cur) 
    9999            return OPS_RELEASE_MEMORY; 
    100     ops_add_packet_to_keydata(cur, &content->packet); 
     100       ops_add_packet_to_keydata(cur, &content->packet); 
    101101        return OPS_KEEP_MEMORY; 
    102102 
  • openpgpsdk/trunk/src/lib/compress.c

    r621 r684  
    6868// \todo remove code duplication between this and bzip2_compressed_data_reader 
    6969static int zlib_compressed_data_reader(void *dest,size_t length, 
    70                                   ops_error_t **errors, 
    71                                   ops_reader_info_t *rinfo, 
    72                                   ops_parse_cb_info_t *cbinfo) 
     70                                       ops_error_t **errors, 
     71                                       ops_reader_info_t *rinfo, 
     72                                       ops_parse_cb_info_t *cbinfo) 
    7373    { 
    7474    z_decompress_arg_t *arg=ops_reader_get_arg(rinfo); 
     
    8585        { 
    8686        if(arg->inflate_ret != Z_STREAM_END) 
    87             OPS_ERROR(cbinfo->errors, OPS_E_P_DECOMPRESSION_ERROR,"Compressed data didn't end when region ended."); 
     87            OPS_ERROR(cbinfo->errors, OPS_E_P_DECOMPRESSION_ERROR, 
     88                      "Compressed data didn't end when region ended."); 
    8889        /* 
    8990          else 
     
    131132                if(!arg->region->indeterminate 
    132133                   && arg->region->length_read != arg->region->length) 
    133                     OPS_ERROR(cbinfo->errors,OPS_E_P_DECOMPRESSION_ERROR,"Compressed stream ended before packet end."); 
     134                    OPS_ERROR(cbinfo->errors,OPS_E_P_DECOMPRESSION_ERROR, 
     135                              "Compressed stream ended before packet end."); 
    134136                } 
    135137            else if(ret != Z_OK) 
     
    154156// \todo remove code duplication between this and zlib_compressed_data_reader 
    155157static int bzip2_compressed_data_reader(void *dest,size_t length, 
    156                                   ops_error_t **errors, 
    157                                   ops_reader_info_t *rinfo, 
    158                                   ops_parse_cb_info_t *cbinfo) 
     158                                       ops_error_t **errors, 
     159                                       ops_reader_info_t *rinfo, 
     160                                       ops_parse_cb_info_t *cbinfo) 
    159161    { 
    160162    bz_decompress_arg_t *arg=ops_reader_get_arg(rinfo); 
     
    171173        { 
    172174        if(arg->inflate_ret != BZ_STREAM_END) 
    173             OPS_ERROR(cbinfo->errors, OPS_E_P_DECOMPRESSION_ERROR,"Compressed data didn't end when region ended."); 
     175            OPS_ERROR(cbinfo->errors, OPS_E_P_DECOMPRESSION_ERROR, 
     176                      "Compressed data didn't end when region ended."); 
    174177        } 
    175178 
     
    198201                    n=sizeof arg->in; 
    199202 
    200                 if(!ops_stacked_limited_read((unsigned char *)arg->in,n,arg->region, 
    201                                              errors,rinfo,cbinfo)) 
     203                if(!ops_stacked_limited_read((unsigned char *)arg->in, n, 
     204                                             arg->region, errors, rinfo, 
     205                                             cbinfo)) 
    202206                    return -1; 
    203207 
     
    212216                if(!arg->region->indeterminate 
    213217                   && arg->region->length_read != arg->region->length) 
    214                     OPS_ERROR(cbinfo->errors,OPS_E_P_DECOMPRESSION_ERROR,"Compressed stream ended before packet end."); 
     218                    OPS_ERROR(cbinfo->errors, OPS_E_P_DECOMPRESSION_ERROR, 
     219                              "Compressed stream ended before packet end."); 
    215220                } 
    216221            else if(ret != BZ_OK) 
    217222                { 
    218                 OPS_ERROR_1(cbinfo->errors,OPS_E_P_DECOMPRESSION_ERROR,"Invalid return %d from BZ2_bzDecompress", ret); 
     223                OPS_ERROR_1(cbinfo->errors, OPS_E_P_DECOMPRESSION_ERROR, 
     224                            "Invalid return %d from BZ2_bzDecompress", ret); 
    219225                } 
    220226            arg->inflate_ret=ret; 
     
    281287 
    282288    default: 
    283         OPS_ERROR_1(&parse_info->errors, OPS_E_ALG_UNSUPPORTED_COMPRESS_ALG, "Compression algorithm %d is not yet supported", type); 
     289        OPS_ERROR_1(&parse_info->errors, OPS_E_ALG_UNSUPPORTED_COMPRESS_ALG, 
     290                    "Compression algorithm %d is not yet supported", type); 
    284291        return 0; 
    285292        } 
     
    304311 
    305312    default: 
    306         OPS_ERROR_1(&parse_info->errors, OPS_E_ALG_UNSUPPORTED_COMPRESS_ALG, "Compression algorithm %d is not yet supported", type); 
     313        OPS_ERROR_1(&parse_info->errors, OPS_E_ALG_UNSUPPORTED_COMPRESS_ALG, 
     314                    "Compression algorithm %d is not yet supported", type); 
    307315        return 0; 
    308316        } 
     
    314322        if(ret != Z_OK) 
    315323            { 
    316             OPS_ERROR_1(&parse_info->errors, OPS_E_P_DECOMPRESSION_ERROR, "Cannot initialise ZIP or ZLIB stream for decompression: error=%d", ret); 
     324            OPS_ERROR_1(&parse_info->errors, OPS_E_P_DECOMPRESSION_ERROR, 
     325                        "Cannot initialise ZIP or ZLIB stream " 
     326                        "for decompression: error=%d", ret); 
    317327            return 0; 
    318328            } 
     
    323333        if (ret != BZ_OK) 
    324334            { 
    325             OPS_ERROR_1(&parse_info->errors, OPS_E_P_DECOMPRESSION_ERROR, "Cannot initialise BZIP2 stream for decompression: error=%d", ret); 
     335            OPS_ERROR_1(&parse_info->errors, OPS_E_P_DECOMPRESSION_ERROR, 
     336                        "Cannot initialise BZIP2 stream " 
     337                        "for decompression: error=%d", ret); 
    326338            return 0; 
    327339            } 
     
    330342 
    331343    default: 
    332         OPS_ERROR_1(&parse_info->errors, OPS_E_ALG_UNSUPPORTED_COMPRESS_ALG, "Compression algorithm %d is not yet supported", type); 
     344        OPS_ERROR_1(&parse_info->errors, OPS_E_ALG_UNSUPPORTED_COMPRESS_ALG, 
     345                    "Compression algorithm %d is not yet supported", type); 
    333346        return 0; 
    334347        }