From 99e01af883f1ef23dbff6432d45430a59cf2535e Mon Sep 17 00:00:00 2001 From: bernie Date: Fri, 10 Feb 2006 12:26:58 +0000 Subject: [PATCH] Check CONFIG_* constraints. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@494 38d2e660-2303-0410-9eaa-f027e97ec537 --- gfx/line.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gfx/line.c b/gfx/line.c index b3e74f03..41e00cc7 100755 --- a/gfx/line.c +++ b/gfx/line.c @@ -16,6 +16,9 @@ /*#* *#* $Log$ + *#* Revision 1.2 2006/02/10 12:26:58 bernie + *#* Check CONFIG_* constraints. + *#* *#* Revision 1.1 2006/01/24 02:17:49 bernie *#* Split out gfx.c into bitmap.c and line.c. *#* @@ -29,6 +32,14 @@ #include /* SWAP() */ #include /* CONFIG_GFX_CLIPPING */ +/* Configuration sanity checks */ +#if !defined(CONFIG_GFX_CLIPPING) || (CONFIG_GFX_CLIPPING != 0 && CONFIG_GFX_CLIPPING != 1) + #error CONFIG_GFX_CLIPPING must be defined to either 0 or 1 +#endif +#if !defined(CONFIG_GFX_VCOORDS) || (CONFIG_GFX_VCOORDS != 0 && CONFIG_GFX_VCOORDS != 1) + #error CONFIG_GFX_VCOORDS must be defined to either 0 or 1 +#endif + /*! * Draw a sloped line without performing clipping. * @@ -283,7 +294,7 @@ void gfx_rectFillC(Bitmap *bm, coord_t x1, coord_t y1, coord_t x2, coord_t y2, u if (y2 < bm->cr.ymin) y2 = bm->cr.ymin; if (y1 > bm->cr.ymax) y1 = bm->cr.ymax; if (y2 > bm->cr.ymax) y2 = bm->cr.ymax; -#endif +#endif /* CONFIG_GFX_CLIPPING */ /* NOTE: Code paths are duplicated for efficiency */ if (color) /* fill */ -- 2.25.1