pike.git / src / post_modules / GTK2 / source / support.c

version» Context lines:

pike.git/src/post_modules/GTK2/source/support.c:155:    2/ use that array to build a pike X-image colormap.    3/ call Image.X.encode_pseudocolor( img, bpp, lpad, depth, colormp )    4/ copy the actual data to the image..    */    if (!colors_allocated) {   #define COLORMAP_SIZE 256    char allocated[COLORMAP_SIZE];    int j,i,r,g,b;    PFTIME("Creating colormap");    colors_allocated=1; -  MEMSET(allocated,0,sizeof(allocated)); +  memset(allocated,0,sizeof(allocated));    for (r=0; r<3; r++) for (g=0; g<4; g++) for (b=0; b<3; b++) {    GdkColor color;    color.red = (guint16)(r * (65535/2.0));    color.green = (guint16)(g * (65535/3.0));    color.blue = (guint16)(b * (65535/2.0));    color.pixel = 0;    if (gdk_color_alloc(col,&color))    if (color.pixel<COLORMAP_SIZE)    allocated[color.pixel]=1;    }
pike.git/src/post_modules/GTK2/source/support.c:839:    mode=Pike_sp[-args].u.integer;    pgtk2_pop_n_elems(args);    if (mode!='O') {    push_undefined();    return;    }    push_string(make_shared_binary_string(__pgtk2_string_data+offset,len));   }      void pgtk2_clear_obj_struct(struct object *o) { -  MEMSET(Pike_fp->current_storage,0,sizeof(struct object_wrapper)); +  memset(Pike_fp->current_storage,0,sizeof(struct object_wrapper));   }      void pgtk2_setup_mixin(struct object *o, struct program *p) {    ptrdiff_t offset;    offset = low_get_storage(o->prog, p);    if(offset == -1)    Pike_error("This class can not be instantiated on its own.\n");    ((struct mixin_wrapper *)Pike_fp->current_storage)->offset = offset;   }