Algorithm-GDiffDelta

 view release on metacpan or  search on metacpan

GDiffDelta.xs  view on Meta::CPAN

#endif


#include "util.c"


static void
careful_fread (void *ptr, size_t size, SV *f, const char *from)
{
#ifdef QEF_DEBUG_IO
    fprintf(stderr, "read from %p (%s): %u bytes ->%p\n", (void *) f, from,
            (unsigned int) size, ptr);
#endif

    if (sv_isobject(f)) {
        I32 n;
        SV *ret, *buf;
        STRLEN len;
        char *str;

        dSP;

GDiffDelta.xs  view on Meta::CPAN

    }
}

static void
careful_fwrite (const void *ptr, size_t size, SV *f, const char *to)
{
    I32 n;
    SV *ret;

#ifdef QEF_DEBUG_IO
    fprintf(stderr, "write to %p (%s): %u bytes <-%p\n", (void *) f, to,
            (unsigned int) size, ptr);
#endif

    if (sv_isobject(f)) {
        dSP;
        ENTER;
        SAVETMPS;
        PUSHMARK(SP);
        XPUSHs(f);
        XPUSHs(sv_2mortal(newSVpvn(ptr, size)));

GDiffDelta.xs  view on Meta::CPAN

        if ((size_t) PerlIO_write(IoIFP(sv_2io(f)), ptr, size) != size)
            croak("error writing to %s: %s", to, strerror(errno));
    }
}

static void
careful_fseek_whence (SV *f, Off_t offset, const char *from, int whence)
{
    assert(whence == SEEK_SET || whence == SEEK_CUR || whence == SEEK_END);
#ifdef QEF_DEBUG_IO
    fprintf(stderr, "seek %p (%s): %s %u\n", (void *) f, from,
            (whence == SEEK_SET ? "SEEK_SET" :
             whence == SEEK_CUR ? "SEEK_CUR" : "SEEK_END"),
            (unsigned int) offset);
#endif

    if (sv_isobject(f)) {
        I32 n;
        SV *ret;

        dSP;



( run in 1.373 second using v1.01-cache-2.11-cpan-49f99fa48dc )