Changeset 1712


Ignore:
Timestamp:
Jan 25, 2007, 4:33:22 PM (9 years ago)
Author:
sam
Message:
  • More verbosity in fread().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/lib-stream.c

    r1711 r1712  
    241241    ret = ORIG(fread)(ptr, size, nmemb, stream);
    242242    _zz_unlock(fd);
    243     debug("%s(%p, %li, %li, [%i]) = %li", __func__, ptr,
    244           (long int)size, (long int)nmemb, fd, (long int)ret);
    245243
    246244#if defined HAVE___SREFILL /* Don't fuzz or seek if we have __srefill() */
     
    258256    if(newpos != pos)
    259257    {
     258        char *b = ptr;
     259
    260260        _zz_fuzz(fd, ptr, newpos - pos);
    261261        _zz_setpos(fd, newpos);
    262     }
    263 #endif
     262
     263        if(newpos >= pos + 4)
     264            debug("%s(%p, %li, %li, [%i]) = %li \"%c%c%c%c...", __func__, ptr,
     265                  (long int)size, (long int)nmemb, fd, (long int)ret,
     266                  b[0], b[1], b[2], b[3]);
     267        else
     268            debug("%s(%p, %li, %li, [%i]) = %li \"%c...", __func__, ptr,
     269                  (long int)size, (long int)nmemb, fd, (long int)ret, b[0]);
     270    }
     271    else
     272#endif
     273        debug("%s(%p, %li, %li, [%i]) = %li", __func__, ptr,
     274              (long int)size, (long int)nmemb, fd, (long int)ret);
    264275
    265276    return ret;
Note: See TracChangeset for help on using the changeset viewer.