Changeset 76 for trunk/src/sh_tiger0.c


Ignore:
Timestamp:
Dec 19, 2006, 10:01:59 PM (18 years ago)
Author:
rainer
Message:

Fix for ticket #38 (csv escaping) and #39 (building on cygwin). Also optimize a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_tiger0.c

    r46 r76  
    331331        sh.statistics.bytes_hashed += 64;
    332332        ++nblocks; ncount = 0;
    333         for (i = 0; i < 56; i += 4)
    334           {
    335             bbuf[i]   = (sh_byte) '\0';
    336             bbuf[i+1] = (sh_byte) '\0';
    337             bbuf[i+2] = (sh_byte) '\0';
    338             bbuf[i+3] = (sh_byte) '\0';
    339           }
    340         /* memset(bbuf, 0, 56 ); */
     333        sl_memset(bbuf, 0, 56 );
    341334      }
    342335
     
    361354#endif
    362355
    363     for (i = 0; i < 64; i += 4)
    364       {
    365         bbuf[i]   = (sh_byte) '\0';
    366         bbuf[i+1] = (sh_byte) '\0';
    367         bbuf[i+2] = (sh_byte) '\0';
    368         bbuf[i+3] = (sh_byte) '\0';
    369       }
    370 
    371     bptr = buffer;
    372 
    373     memcpy(bptr, bbuf,     64); bptr +=    64;
    374     memcpy(bptr, bbuf,     64); bptr +=    64;
    375     memcpy(bptr, buffer,  128); bptr +=   128;
    376     memcpy(bptr, buffer,  256); bptr +=   256;
    377     memcpy(bptr, buffer,  512); bptr +=   512;
    378     memcpy(bptr, buffer, 1024); bptr +=  1024;
    379     memcpy(bptr, buffer, 2048); bptr +=  2048;
    380     memcpy(bptr, buffer, 4096); bptr +=  4096;
    381     memcpy(bptr, buffer, 8192); bptr +=  8192;
    382     memcpy(bptr, buffer,16384);
     356    sl_memset (bbuf,   '\0', sizeof(bbuf));
     357    sl_memset (buffer, '\0', sizeof(buffer));
    383358
    384359    if (what == TIGER_FILE)
Note: See TracChangeset for help on using the changeset viewer.