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

version» Context lines:

pike.git/src/modules/Image/encodings/wbf.c:1:   #include "global.h"      #include <math.h>   #include <stdio.h>   #include <ctype.h>      #include "stralloc.h" - RCSID("$Id: wbf.c,v 1.3 1999/11/19 15:36:17 grubba Exp $"); + RCSID("$Id: wbf.c,v 1.4 2000/02/03 19:01:29 grubba Exp $");   #include "pike_macros.h"   #include "object.h"   #include "mapping.h"   #include "constants.h"   #include "interpret.h"   #include "operators.h"   #include "svalue.h"   #include "threads.h"   #include "array.h"   #include "error.h"
pike.git/src/modules/Image/encodings/wbf.c:196:   static void low_image_f_wbf_decode( int args, int mode )   {    struct pike_string *s;    struct wbf_header wh;    int map_num_elems = 0;    struct buffer buff;       get_all_args( "decode", args, "%S", &s );       buff.len = s->len; -  buff.str = s->str; +  buff.str = (unsigned char *)s->str;    sp--; /* Evil me */       wh = decode_header( &buff );       switch( wh.type )    {    case 0:    /*    The only supported format. B/W uncompressed bitmap   
pike.git/src/modules/Image/encodings/wbf.c:336:    {    p = data + (i->xsize+7)/8*y;    for( x = 0; x<i->xsize; x++ )    {    if( is->r || is->g || is->b )    p[x/8] |= 128 >> (x%8);    is++;    }    printf("\n");    } -  push_string( make_shared_binary_string( data, i->ysize * (i->xsize+7)/8 ) ); +  push_string( make_shared_binary_string( (char *)data, +  i->ysize * (i->xsize+7)/8 ) );   }      static void image_f_wbf_encode( int args )   {    struct object *o;    struct image *i;    struct mapping *options = NULL;    int num_strings = 0;       if( !args )