plug-ins: replace s/printf/g_printf/

When cross-compiling, I got various linking errors for printf() calls:
> undefined reference to `libintl_printf'

I am unsure why, since this is not recent code, and it used to build
fine with mingw64 compilers (last I cross-built, which is many months
ago). Anyway g_printf() works fine, all necessary libs are already
linked, and it is supposed to be a synonym. So let's just go the easy
way and use g_printf() only.

(cherry picked from commit c49afa4f84)
This commit is contained in:
Jehan
2018-08-12 19:21:44 +02:00
parent 8e453330c9
commit 0832bbd771
7 changed files with 97 additions and 97 deletions

View File

@ -922,7 +922,7 @@ p_load_pointfile (BenderDialog *cd,
}
else
{
printf("warning: BAD points[%d] in file %s are ignored\n", l_pi, filename);
g_printf("warning: BAD points[%d] in file %s are ignored\n", l_pi, filename);
}
}
l_len = strlen(KEY_VAL_Y);
@ -937,7 +937,7 @@ p_load_pointfile (BenderDialog *cd,
}
else
{
printf("warning: BAD y_vals[%d] in file %s are ignored\n", l_ci, filename);
g_printf("warning: BAD y_vals[%d] in file %s are ignored\n", l_ci, filename);
}
}
@ -1702,7 +1702,7 @@ bender_plot_curve (BenderDialog *cd,
else
{
cd->curve_ptr[cd->outline][lastx] = lasty;
if(gb_debug) printf("bender_plot_curve xmax:%d ymax:%d\n", (int)xmax, (int)ymax);
if(gb_debug) g_printf("bender_plot_curve xmax:%d ymax:%d\n", (int)xmax, (int)ymax);
}
/* loop over the curve */
@ -1734,7 +1734,7 @@ bender_plot_curve (BenderDialog *cd,
/* use dynamic allocated curve_ptr (for the real curve) */
cd->curve_ptr[cd->outline][newx] = newy;
if(gb_debug) printf("outline: %d cX: %d cY: %d\n", (int)cd->outline, (int)newx, (int)newy);
if(gb_debug) g_printf("outline: %d cX: %d cY: %d\n", (int)cd->outline, (int)newx, (int)newy);
}
}
@ -2822,7 +2822,7 @@ p_bender_calculate_iter_curve (BenderDialog *cd,
(cd->bval_to == NULL) ||
(cd->bval_curr == NULL))
{
if(gb_debug) printf("p_bender_calculate_iter_curve NORMAL1\n");
if(gb_debug) g_printf("p_bender_calculate_iter_curve NORMAL1\n");
if (cd->curve_type == SMOOTH)
{
cd->outline = OUTLINE_UPPER;
@ -2838,7 +2838,7 @@ p_bender_calculate_iter_curve (BenderDialog *cd,
else
{
/* compose curves by iterating between FROM/TO values */
if(gb_debug) printf ("p_bender_calculate_iter_curve ITERmode 1\n");
if(gb_debug) g_printf ("p_bender_calculate_iter_curve ITERmode 1\n");
/* init FROM curves */
cd_from = g_new (BenderDialog, 1);
@ -3237,11 +3237,11 @@ p_main_bend (BenderDialog *cd,
gimp_item_set_visible (l_tmp_layer_id, FALSE);
gimp_item_set_name (l_tmp_layer_id, "curve_bend_dummylayer");
if(gb_debug) printf("p_main_bend l_tmp_layer_id %d\n", (int)l_tmp_layer_id);
if(gb_debug) g_printf("p_main_bend l_tmp_layer_id %d\n", (int)l_tmp_layer_id);
if (cd->rotation != 0.0)
{
if(gb_debug) printf("p_main_bend rotate: %f\n", (float)cd->rotation);
if(gb_debug) g_printf("p_main_bend rotate: %f\n", (float)cd->rotation);
p_gimp_rotate(l_image_id, l_tmp_layer_id, l_interpolation, cd->rotation);
}
src_drawable = gimp_drawable_get (l_tmp_layer_id);
@ -3257,12 +3257,12 @@ p_main_bend (BenderDialog *cd,
+ p_upper_curve_extend(cd, src_drawable->width, src_drawable->height)
+ p_lower_curve_extend(cd, src_drawable->width, src_drawable->height);
if(gb_debug) printf("p_main_bend: l_dst_height:%d\n", (int)l_dst_height);
if(gb_debug) g_printf("p_main_bend: l_dst_height:%d\n", (int)l_dst_height);
if(work_on_copy)
{
dst_drawable = p_add_layer(src_drawable->width, l_dst_height, src_drawable);
if(gb_debug) printf("p_main_bend: DONE add layer\n");
if(gb_debug) g_printf("p_main_bend: DONE add layer\n");
}
else
{
@ -3271,7 +3271,7 @@ p_main_bend (BenderDialog *cd,
src_drawable->width,
l_dst_height,
l_offset_x, l_offset_y);
if(gb_debug) printf("p_main_bend: DONE layer resize\n");
if(gb_debug) g_printf("p_main_bend: DONE layer resize\n");
if(!gimp_drawable_has_alpha(original_drawable->drawable_id))
{
/* always add alpha channel */
@ -3286,7 +3286,7 @@ p_main_bend (BenderDialog *cd,
p_vertical_bend(cd, &l_src_gdrw, &l_dst_gdrw);
if(gb_debug) printf("p_main_bend: DONE vertical bend\n");
if(gb_debug) g_printf("p_main_bend: DONE vertical bend\n");
p_end_gdrw(&l_src_gdrw);
p_end_gdrw(&l_dst_gdrw);
@ -3313,7 +3313,7 @@ p_main_bend (BenderDialog *cd,
g_free (cd->curve_ptr[OUTLINE_UPPER]);
g_free (cd->curve_ptr[OUTLINE_LOWER]);
if (gb_debug) printf("p_main_bend: DONE bend main\n");
if (gb_debug) g_printf("p_main_bend: DONE bend main\n");
return dst_drawable->drawable_id;
}

View File

@ -504,12 +504,12 @@ load_image (const gchar *filename,
#ifdef XWD_COL_DEBUG
{
int j;
printf ("File %s\n",filename);
g_printf ("File %s\n",filename);
for (j = 0; j < xwdhdr.l_colormap_entries; j++)
printf ("Entry 0x%08lx: 0x%04lx, 0x%04lx, 0x%04lx, %d\n",
(long)xwdcolmap[j].l_pixel,(long)xwdcolmap[j].l_red,
(long)xwdcolmap[j].l_green,(long)xwdcolmap[j].l_blue,
(int)xwdcolmap[j].l_flags);
g_printf ("Entry 0x%08lx: 0x%04lx, 0x%04lx, 0x%04lx, %d\n",
(long)xwdcolmap[j].l_pixel,(long)xwdcolmap[j].l_red,
(long)xwdcolmap[j].l_green,(long)xwdcolmap[j].l_blue,
(int)xwdcolmap[j].l_flags);
}
#endif
@ -965,12 +965,12 @@ read_xwd_cols (FILE *ifp,
if (flag_is_bad || index_is_bad)
{
printf ("xwd: Warning. Error in XWD-color-structure (");
g_printf ("xwd: Warning. Error in XWD-color-structure (");
if (flag_is_bad) printf ("flag");
if (index_is_bad) printf ("index");
if (flag_is_bad) g_printf ("flag");
if (index_is_bad) g_printf ("index");
printf (")\n");
g_printf (")\n");
}
if (err)
@ -1078,14 +1078,14 @@ set_pixelmap (int ncols,
}
pixelmap->npixel = maxcols;
#ifdef XWD_COL_DEBUG
printf ("Colors in pixelmap: %d\n",pixelmap->npixel);
g_printf ("Colors in pixelmap: %d\n",pixelmap->npixel);
for (j=0; j<pixelmap->npixel; j++)
printf ("Pixelvalue 0x%08lx, 0x%02x 0x%02x 0x%02x\n",
pixelmap->pmap[j].pixel_val,
pixelmap->pmap[j].red,pixelmap->pmap[j].green,
pixelmap->pmap[j].blue);
g_printf ("Pixelvalue 0x%08lx, 0x%02x 0x%02x 0x%02x\n",
pixelmap->pmap[j].pixel_val,
pixelmap->pmap[j].red,pixelmap->pmap[j].green,
pixelmap->pmap[j].blue);
for (j=0; j<=MAPPERMASK; j++)
printf ("0x%08lx: %d\n",(long)j,pixelmap->pixel_in_map[j]);
g_printf ("0x%08lx: %d\n",(long)j,pixelmap->pixel_in_map[j]);
#endif
return pixelmap->npixel;
@ -1140,7 +1140,7 @@ set_bw_color_table (gint32 image_ID)
static guchar BWColorMap[2*3] = { 255, 255, 255, 0, 0, 0 };
#ifdef XWD_COL_DEBUG
printf ("Set GIMP b/w-colortable:\n");
g_printf ("Set GIMP b/w-colortable:\n");
#endif
gimp_image_set_colormap (image_ID, BWColorMap, 2);
@ -1243,10 +1243,10 @@ set_color_table (gint32 image_ID,
}
#ifdef XWD_COL_DEBUG
printf ("Set GIMP colortable:\n");
g_printf ("Set GIMP colortable:\n");
for (j = 0; j < 256; j++)
printf ("%3d: 0x%02x 0x%02x 0x%02x\n", j,
ColorMap[j*3], ColorMap[j*3+1], ColorMap[j*3+2]);
g_printf ("%3d: 0x%02x 0x%02x 0x%02x\n", j,
ColorMap[j*3], ColorMap[j*3+1], ColorMap[j*3+2]);
#endif
gimp_image_set_colormap (image_ID, ColorMap, 256);
@ -1303,7 +1303,7 @@ load_xwd_f2_d1_b1 (const gchar *filename,
GeglBuffer *buffer;
#ifdef XWD_DEBUG
printf ("load_xwd_f2_d1_b1 (%s)\n", filename);
g_printf ("load_xwd_f2_d1_b1 (%s)\n", filename);
#endif
width = xwdhdr->l_pixmap_width;
@ -1442,7 +1442,7 @@ load_xwd_f2_d8_b8 (const gchar *filename,
GeglBuffer *buffer;
#ifdef XWD_DEBUG
printf ("load_xwd_f2_d8_b8 (%s)\n", filename);
g_printf ("load_xwd_f2_d8_b8 (%s)\n", filename);
#endif
width = xwdhdr->l_pixmap_width;
@ -1550,7 +1550,7 @@ load_xwd_f2_d16_b16 (const gchar *filename,
GeglBuffer *buffer;
#ifdef XWD_DEBUG
printf ("load_xwd_f2_d16_b16 (%s)\n", filename);
g_printf ("load_xwd_f2_d16_b16 (%s)\n", filename);
#endif
width = xwdhdr->l_pixmap_width;
@ -1712,7 +1712,7 @@ load_xwd_f2_d24_b32 (const gchar *filename,
GeglBuffer *buffer;
#ifdef XWD_DEBUG
printf ("load_xwd_f2_d24_b32 (%s)\n", filename);
g_printf ("load_xwd_f2_d24_b32 (%s)\n", filename);
#endif
width = xwdhdr->l_pixmap_width;
@ -1925,7 +1925,7 @@ load_xwd_f2_d32_b32 (const gchar *filename,
GeglBuffer *buffer;
#ifdef XWD_DEBUG
printf ("load_xwd_f2_d32_b32 (%s)\n", filename);
g_printf ("load_xwd_f2_d32_b32 (%s)\n", filename);
#endif
width = xwdhdr->l_pixmap_width;
@ -2088,7 +2088,7 @@ load_xwd_f1_d24_b1 (const gchar *filename,
GeglBuffer *buffer;
#ifdef XWD_DEBUG
printf ("load_xwd_f1_d24_b1 (%s)\n", filename);
g_printf ("load_xwd_f1_d24_b1 (%s)\n", filename);
#endif
xwddata = g_malloc (xwdhdr->l_bytes_per_line);
@ -2344,7 +2344,7 @@ save_index (GOutputStream *output,
gboolean success = TRUE;
#ifdef XWD_DEBUG
printf ("save_index ()\n");
g_printf ("save_index ()\n");
#endif
buffer = gimp_drawable_get_buffer (drawable_ID);
@ -2487,7 +2487,7 @@ save_rgb (GOutputStream *output,
gboolean success = TRUE;
#ifdef XWD_DEBUG
printf ("save_rgb ()\n");
g_printf ("save_rgb ()\n");
#endif
buffer = gimp_drawable_get_buffer (drawable_ID);

View File

@ -599,7 +599,7 @@ draw_jigsaw (guchar *buffer,
}
else
{
printf("draw_jigsaw: bad style\n");
g_printf ("draw_jigsaw: bad style\n");
gimp_quit ();
}
gimp_progress_update (1.0);

View File

@ -787,7 +787,7 @@ newsprint_menu_callback (GtkWidget *widget,
*/
if (in_progress)
{
printf ("newsprint_menu_callback: unexpected recursion: can't happen\n");
g_printf ("newsprint_menu_callback: unexpected recursion: can't happen\n");
return;
}
@ -1476,7 +1476,7 @@ newsprint_cspace_update (GtkWidget *widget,
preview = g_object_get_data (G_OBJECT (widget), "preview");
if (!st)
printf ("newsprint: cspace_update: no state, can't happen!\n");
g_printf ("newsprint: cspace_update: no state, can't happen!\n");
if (st)
{
@ -1831,13 +1831,13 @@ newsprint (GimpDrawable *drawable,
WGT (x, y) = BARTLETT (x, y);
#endif /* 0 */
#define ASRT(_x) \
do { \
if (!VALID_SPOTFN(_x)) \
{ \
printf("newsprint: %d is not a valid spot type\n", _x); \
_x = SPOTFN_DOT; \
} \
#define ASRT(_x) \
do { \
if (!VALID_SPOTFN(_x)) \
{ \
g_printf ("newsprint: %d is not a valid spot type\n", _x); \
_x = SPOTFN_DOT; \
} \
} while(0)
/* calculate the RGB / CMYK rotations and threshold matrices */

View File

@ -329,7 +329,7 @@ run (const gchar *name,
g_Sdebug = TRUE;
if (g_Sdebug)
printf ("sample colorize run\n");
g_printf ("sample colorize run\n");
g_show_progress = FALSE;
run_mode = param[0].data.d_int32;
@ -892,8 +892,8 @@ update_preview (gint32 *id_ptr)
t_GDRW gdrw;
if (g_Sdebug)
printf ("UPD PREVIEWS ID:%d ENABLE_UPD:%d\n",
id_ptr ? (int) *id_ptr : -1, (int)g_di.enable_preview_update);
g_printf ("UPD PREVIEWS ID:%d ENABLE_UPD:%d\n",
id_ptr ? (int) *id_ptr : -1, (int)g_di.enable_preview_update);
if (id_ptr == NULL || !g_di.enable_preview_update)
return;
@ -977,7 +977,7 @@ levels_update (gint update)
gint i;
if (g_Sdebug)
printf ("levels_update: update reques %x\n", update);
g_printf ("levels_update: update reques %x\n", update);
/* Recalculate the transfer array */
calculate_level_transfers ();
@ -1090,14 +1090,14 @@ level_in_events (GtkWidget *widget,
{
case GDK_EXPOSE:
if (g_Sdebug)
printf ("EVENT: GDK_EXPOSE\n");
g_printf ("EVENT: GDK_EXPOSE\n");
if (widget == g_di.in_lvl_drawarea)
levels_update (INPUT_SLIDERS);
break;
case GDK_BUTTON_PRESS:
if (g_Sdebug)
printf ("EVENT: GDK_BUTTON_PRESS\n");
g_printf ("EVENT: GDK_BUTTON_PRESS\n");
gtk_grab_add (widget);
bevent = (GdkEventButton *) event;
@ -1116,7 +1116,7 @@ level_in_events (GtkWidget *widget,
case GDK_BUTTON_RELEASE:
if (g_Sdebug)
printf ("EVENT: GDK_BUTTON_RELEASE\n");
g_printf ("EVENT: GDK_BUTTON_RELEASE\n");
gtk_grab_remove (widget);
switch (g_di.active_slider)
{
@ -1138,7 +1138,7 @@ level_in_events (GtkWidget *widget,
case GDK_MOTION_NOTIFY:
if (g_Sdebug)
printf ("EVENT: GDK_MOTION_NOTIFY\n");
g_printf ("EVENT: GDK_MOTION_NOTIFY\n");
mevent = (GdkEventMotion *) event;
x = mevent->x;
gdk_event_request_motions (mevent);
@ -1147,14 +1147,14 @@ level_in_events (GtkWidget *widget,
default:
if (g_Sdebug)
printf ("EVENT: default\n");
g_printf ("EVENT: default\n");
break;
}
if (update)
{
if (g_Sdebug)
printf ("EVENT: ** update **\n");
g_printf ("EVENT: ** update **\n");
switch (g_di.active_slider)
{
case 0: /* low input */
@ -1203,14 +1203,14 @@ level_out_events (GtkWidget *widget,
{
case GDK_EXPOSE:
if (g_Sdebug)
printf ("OUT_EVENT: GDK_EXPOSE\n");
g_printf ("OUT_EVENT: GDK_EXPOSE\n");
if (widget == g_di.sample_drawarea)
levels_update (OUTPUT_SLIDERS);
break;
case GDK_BUTTON_PRESS:
if (g_Sdebug)
printf ("OUT_EVENT: GDK_BUTTON_PRESS\n");
g_printf ("OUT_EVENT: GDK_BUTTON_PRESS\n");
bevent = (GdkEventButton *) event;
distance = G_MAXINT;
@ -1229,7 +1229,7 @@ level_out_events (GtkWidget *widget,
case GDK_BUTTON_RELEASE:
if (g_Sdebug)
printf ("OUT_EVENT: GDK_BUTTON_RELEASE\n");
g_printf ("OUT_EVENT: GDK_BUTTON_RELEASE\n");
switch (g_di.active_slider)
{
case 3: /* low output */
@ -1246,7 +1246,7 @@ level_out_events (GtkWidget *widget,
case GDK_MOTION_NOTIFY:
if (g_Sdebug)
printf ("OUT_EVENT: GDK_MOTION_NOTIFY\n");
g_printf ("OUT_EVENT: GDK_MOTION_NOTIFY\n");
mevent = (GdkEventMotion *) event;
x = mevent->x;
gdk_event_request_motions (mevent);
@ -1255,14 +1255,14 @@ level_out_events (GtkWidget *widget,
default:
if (g_Sdebug)
printf ("OUT_EVENT: default\n");
g_printf ("OUT_EVENT: default\n");
break;
}
if (update)
{
if (g_Sdebug)
printf ("OUT_EVENT: ** update **\n");
g_printf ("OUT_EVENT: ** update **\n");
switch (g_di.active_slider)
{
case 3: /* low output */
@ -1872,7 +1872,7 @@ get_filevalues (void)
fclose (fp);
}
printf ("g_values.tol_col_err :%f\n", g_values.tol_col_err);
g_printf ("g_values.tol_col_err :%f\n", g_values.tol_col_err);
}
static gint32
@ -1934,15 +1934,15 @@ provide_tile (t_GDRW *gdrw,
/* debug start */
printf ("\np_provide_tile: row: %d col: %d data:", (int)row, (int)col);
g_printf ("\np_provide_tile: row: %d col: %d data:", (int)row, (int)col);
ptr = gdrw->tile->data;
for (i = 0; i < 16; i++)
{
printf (" %d", (int)(*ptr));
g_printf (" %d", (int)(*ptr));
ptr++;
}
printf ("\n\n");
g_printf ("\n\n");
/* debug stop */
}
@ -1986,9 +1986,9 @@ get_pixel (t_GDRW *gdrw,
return;
printf ("get_pixel: x: %d y: %d bpp:%d RGBA:%d %d %d %d\n",
(int)x, (int)y, (int)gdrw->bpp,
(int)pixel[0], (int)pixel[1], (int)pixel[2], (int)pixel[3]);
g_printf ("get_pixel: x: %d y: %d bpp:%d RGBA:%d %d %d %d\n",
(int)x, (int)y, (int)gdrw->bpp,
(int)pixel[0], (int)pixel[1], (int)pixel[2], (int)pixel[3]);
}
/* clear table */
@ -2501,8 +2501,8 @@ is_layer_alive (gint32 drawable_id)
if (gimp_item_get_image (drawable_id) < 0)
{
printf ("sample colorize: unknown layer_id %d (Image closed?)\n",
(int)drawable_id);
g_printf ("sample colorize: unknown layer_id %d (Image closed?)\n",
(int)drawable_id);
return -1;
}
@ -2548,8 +2548,8 @@ init_gdrw (t_GDRW *gdrw,
gint32 non_empty;
if (g_Sdebug)
printf ("\np_init_gdrw: drawable %p ID: %d\n",
drawable, (int)drawable->drawable_id);
g_printf ("\np_init_gdrw: drawable %p ID: %d\n",
drawable, (int)drawable->drawable_id);
gdrw->drawable = drawable;
gdrw->tile = NULL;
@ -2588,12 +2588,12 @@ init_gdrw (t_GDRW *gdrw,
if (g_Sdebug)
{
printf ("init_gdrw: image_id %d sel_channel_id: %d\n",
(int)image_id, (int)sel_channel_id);
printf ("init_gdrw: BOUNDS x1: %d y1: %d x2:%d y2: %d\n",
(int)gdrw->x1, (int)gdrw->y1, (int)gdrw->x2,(int)gdrw->y2);
printf ("init_gdrw: OFFS x: %d y: %d\n",
(int)offsetx, (int)offsety );
g_printf ("init_gdrw: image_id %d sel_channel_id: %d\n",
(int)image_id, (int)sel_channel_id);
g_printf ("init_gdrw: BOUNDS x1: %d y1: %d x2:%d y2: %d\n",
(int)gdrw->x1, (int)gdrw->y1, (int)gdrw->x2,(int)gdrw->y2);
g_printf ("init_gdrw: OFFS x: %d y: %d\n",
(int)offsetx, (int)offsety );
}
gimp_selection_bounds (image_id, &non_empty, &x1, &y1, &x2, &y2);
@ -2631,13 +2631,13 @@ init_gdrw (t_GDRW *gdrw,
if (g_Sdebug)
{
printf ("init_gdrw: SEL_BOUNDS x1: %d y1: %d x2:%d y2: %d\n",
(int)sel_gdrw->x1, (int)sel_gdrw->y1,
(int)sel_gdrw->x2, (int)sel_gdrw->y2);
printf ("init_gdrw: SEL_OFFS x: %d y: %d\n",
(int)sel_offsetx, (int)sel_offsety );
printf ("init_gdrw: SEL_DELTA x: %d y: %d\n",
(int)gdrw->seldeltax, (int)gdrw->seldeltay );
g_printf ("init_gdrw: SEL_BOUNDS x1: %d y1: %d x2:%d y2: %d\n",
(int)sel_gdrw->x1, (int)sel_gdrw->y1,
(int)sel_gdrw->x2, (int)sel_gdrw->y2);
g_printf ("init_gdrw: SEL_OFFS x: %d y: %d\n",
(int)sel_offsetx, (int)sel_offsety );
g_printf ("init_gdrw: SEL_DELTA x: %d y: %d\n",
(int)gdrw->seldeltax, (int)gdrw->seldeltay );
}
}
else
@ -2745,7 +2745,7 @@ sample_analyze (t_GDRW *sample_gdrw)
gimp_progress_update (1.0);
if (g_Sdebug)
printf ("ROWS: %d - %d COLS: %d - %d\n",
g_printf ("ROWS: %d - %d COLS: %d - %d\n",
(int)first_row, (int)last_row,
(int)first_col, (int)last_col);
@ -2775,7 +2775,7 @@ sample_analyze (t_GDRW *sample_gdrw)
/* check if there was at least one visible pixel */
if (sample_pixels == 0)
{
printf ("Error: Source sample has no visible Pixel\n");
g_printf ("Error: Source sample has no visible Pixel\n");
return -1;
}
return 0;

View File

@ -401,10 +401,10 @@ load_image (const gchar *filename,
if (debug_prints)
{
printf ("[%s] trying to call\n", __FILE__);
g_printf ("[%s] trying to call\n", __FILE__);
for (gchar **iter = argv; *iter; iter++)
printf (" %s\n", *iter);
printf("\n");
g_printf (" %s\n", *iter);
g_printf ("\n");
}
if (g_spawn_sync (NULL,

View File

@ -458,8 +458,8 @@ load_image (const gchar *filename,
for (i = 0; i < sgip->zsize; i ++)
if (sgiGetRow (sgip, rows[i], sgip->ysize - 1 - y, i) < 0)
printf("sgiGetRow(sgip, rows[i], %d, %d) failed!\n",
sgip->ysize - 1 - y, i);
g_printf ("sgiGetRow(sgip, rows[i], %d, %d) failed!\n",
sgip->ysize - 1 - y, i);
if (sgip->bpp == 1)
{