i_fill_hatch_t *fill = mymalloc(sizeof(i_fill_hatch_t)); /* checked 14jul05 tonyc */
*fill = hatch_fill_proto;
- /* Some Sun C didn't like the condition expressions that were here.
- See https://rt.cpan.org/Ticket/Display.html?id=21944
- */
- if (fg)
+ if (fg && bg) {
fill->fg = *fg;
- else
- fill->fg = fcolor_to_color(ffg);
- if (bg)
fill->bg = *bg;
- else
+ fill->ffg = color_to_fcolor(fg);
+ fill->fbg = color_to_fcolor(bg);
+ }
+ else if (ffg && fbg) {
+ fill->fg = fcolor_to_color(ffg);
fill->bg = fcolor_to_color(fbg);
- if (ffg)
fill->ffg = *ffg;
- else
- fill->ffg = color_to_fcolor(fg);
- if (fbg)
fill->fbg = *fbg;
- else
- fill->fbg = color_to_fcolor(bg);
+ }
+ else {
+ assert(0);
+ /* NOTREACHED */
+ }
+
if (combine) {
i_get_combine(combine, &fill->base.combine, &fill->base.combinef);
}