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

version» Context lines:

pike.git/src/modules/Image/encodings/xcf.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: xcf.c,v 1.46 2003/10/24 23:34:42 nilsson Exp $ + || $Id: xcf.c,v 1.47 2004/01/22 23:11:34 nilsson Exp $   */      #include "global.h" - RCSID("$Id: xcf.c,v 1.46 2003/10/24 23:34:42 nilsson Exp $"); + RCSID("$Id: xcf.c,v 1.47 2004/01/22 23:11:34 nilsson 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:129:    }   }      static void f_substring_get_int( INT32 args )   {    struct substring *s = SS(fp->current_object);    int res;    unsigned char *p;    int x = sp[-1].u.integer;    if( x > s->len>>2 ) -  Pike_error("Index %d out of range", x ); +  Pike_error("Index %d out of range.\n", x );       p = ((unsigned char *)s->s->str) + s->offset + x*4;    res = (p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3];    push_int( res );   }         static void f_substring_get_uint( INT32 args )   {    struct substring *s = SS(fp->current_object);    unsigned int res;    unsigned char *p;    int x = sp[-1].u.integer;    if( x > s->len>>2 ) -  Pike_error("Index %d out of range", x ); +  Pike_error("Index %d out of range.\n", x );       p = ((unsigned char *)s->s->str) + s->offset + x*4;    res = (p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3];    push_int64( res );   }      static void f_substring_get_ushort( INT32 args )   {    struct substring *s = SS(fp->current_object);    unsigned short res;    unsigned char *p;    int x = sp[-1].u.integer;    if( x > s->len>>1 ) -  Pike_error("Index %d out of range", x ); +  Pike_error("Index %d out of range.\n", x );       p = ((unsigned char *)s->s->str) + s->offset + x*2;    res = (p[2]<<8) | p[3];    push_int( res );   }      static void f_substring_get_short( INT32 args )   {    struct substring *s = SS(fp->current_object);    short res;    unsigned char *p;    int x = sp[-1].u.integer;    if( x > s->len>>1 ) -  Pike_error("Index %d out of range", x ); +  Pike_error("Index %d out of range.\n", x );       p = ((unsigned char *)s->s->str) + s->offset + x*2;    res = (p[2]<<8) | p[3];    push_int( res );   }      static void push_substring( struct pike_string *s,    ptrdiff_t offset,    ptrdiff_t len )   {