pike.git / src / modules / Image / encodings / xcf.c

version» Context lines:

pike.git/src/modules/Image/encodings/xcf.c:1:   #include "global.h" - RCSID("$Id: xcf.c,v 1.35 2000/12/05 21:08:28 per Exp $"); + RCSID("$Id: xcf.c,v 1.36 2001/03/17 20:39:34 grubba Exp $");      #include "image_machine.h"      #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "module_support.h"   #include "interpret.h"   #include "object.h"   #include "svalue.h"
pike.git/src/modules/Image/encodings/xcf.c:70:   {    /* FIXME: assumes string */    struct substring *s = SS(fp->current_object);    pop_n_elems( args );    push_string( make_shared_binary_string( (((char *)s->s->str)+s->offset),    s->len ) );   }      static void f_substring_index( INT32 args )   { -  int i = sp[-1].u.integer; +  ptrdiff_t i = sp[-1].u.integer;    struct substring *s = SS(fp->current_object);    pop_n_elems( args );       if( i < 0 ) i = s->len + i;    if( i >= s->len ) {    Pike_error("Index out of bounds, %d > %ld\n", i,    DO_NOT_WARN((long)s->len-1) );    }    push_int( ((unsigned char *)s->s->str)[s->offset+i] );   }
pike.git/src/modules/Image/encodings/xcf.c:105:       switch( x )    {    case 't':    push_constant_text("SubString");    return;    case 'O':    push_constant_text("SubString( %O /* [+%d .. %d] */ )" );    push_text("string"); f_substring_cast( 1 );    -  push_int( s->len ); -  push_int( s->offset ); +  push_int64( s->len ); +  push_int64( s->offset );    f_sprintf( 4 );    return;    default:    push_int(0);    return;    }   }      static void f_substring_get_int( INT32 args )   {