1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-14 14:44:32 -04:00

New function colspan_is_in_box()

This commit is contained in:
Kalle Olavi Niemitalo 2006-09-02 19:05:26 +03:00 committed by Kalle Olavi Niemitalo
parent 216495188a
commit e2685ae7b2

View File

@ -28,6 +28,13 @@ col_is_in_box(struct box *box, int x)
return (x >= box->x && x < box->x + box->width); return (x >= box->x && x < box->x + box->width);
} }
/* Mainly intended for use with double-width characters. */
static inline int
colspan_is_in_box(struct box *box, int x, int span)
{
return (x >= box->x && x + span <= box->x + box->width);
}
static inline void static inline void
set_box(struct box *box, int x, int y, int width, int height) set_box(struct box *box, int x, int y, int width, int height)