hackaround for buggy window managers (like WindowMaker) that store a bogus

XWDColor flag field.

-Yosh
This commit is contained in:
Manish Singh 1999-06-01 19:09:58 +00:00
parent 177aeb9f27
commit f30c065875
3 changed files with 29 additions and 16 deletions

View File

@ -1,3 +1,8 @@
Tue Jun 1 12:07:57 PDT 1999 Manish Singh <yosh@gimp.org>
* plug-ins/xwd/xwd.c: hackaround for buggy window managers (like
WindowMaker) that store a bogus XWDColor flag field.
1999-06-01 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/app_procs.c

View File

@ -675,8 +675,12 @@ read_xwd_cols (FILE *ifp,
colormap[j].l_flags = read_card8 (ifp, &err);
colormap[j].l_pad = read_card8 (ifp, &err);
if (colormap[j].l_flags > 7)
flag_is_bad++;
/* WindowMaker at 24bpp seems to insert a bogus value here.. we don't
* use flags, so just ignore it
*/
/* if (colormap[j].l_flags > 7)
flag_is_bad++; */
if (indexed && (colormap[j].l_pixel > 255))
index_is_bad++;
@ -705,8 +709,8 @@ read_xwd_cols (FILE *ifp,
colormap[j].l_flags = read_card8 (ifp, &err);
colormap[j].l_pad = read_card8 (ifp, &err);
if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++;
/* if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++; */
if (indexed && (colormap[j].l_pixel > 255))
index_is_bad++;
@ -735,8 +739,8 @@ read_xwd_cols (FILE *ifp,
colormap[j].l_flags = read_card8 (ifp, &err);
colormap[j].l_pad = read_card8 (ifp, &err);
if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++;
/* if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++; */
if (indexed && (colormap[j].l_pixel > 255))
index_is_bad++;
@ -770,8 +774,8 @@ read_xwd_cols (FILE *ifp,
read_card16 (ifp, &err);
read_card32 (ifp, &err);
if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++;
/* if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++; */
if (indexed && (colormap[j].l_pixel > 255))
index_is_bad++;

View File

@ -675,8 +675,12 @@ read_xwd_cols (FILE *ifp,
colormap[j].l_flags = read_card8 (ifp, &err);
colormap[j].l_pad = read_card8 (ifp, &err);
if (colormap[j].l_flags > 7)
flag_is_bad++;
/* WindowMaker at 24bpp seems to insert a bogus value here.. we don't
* use flags, so just ignore it
*/
/* if (colormap[j].l_flags > 7)
flag_is_bad++; */
if (indexed && (colormap[j].l_pixel > 255))
index_is_bad++;
@ -705,8 +709,8 @@ read_xwd_cols (FILE *ifp,
colormap[j].l_flags = read_card8 (ifp, &err);
colormap[j].l_pad = read_card8 (ifp, &err);
if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++;
/* if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++; */
if (indexed && (colormap[j].l_pixel > 255))
index_is_bad++;
@ -735,8 +739,8 @@ read_xwd_cols (FILE *ifp,
colormap[j].l_flags = read_card8 (ifp, &err);
colormap[j].l_pad = read_card8 (ifp, &err);
if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++;
/* if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++; */
if (indexed && (colormap[j].l_pixel > 255))
index_is_bad++;
@ -770,8 +774,8 @@ read_xwd_cols (FILE *ifp,
read_card16 (ifp, &err);
read_card32 (ifp, &err);
if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++;
/* if ((colormap[j].l_flags == 0) || (colormap[j].l_flags > 7))
flag_is_bad++; */
if (indexed && (colormap[j].l_pixel > 255))
index_is_bad++;