From: bernie Date: Fri, 10 Feb 2006 12:26:58 +0000 (+0000) Subject: Check CONFIG_* constraints. X-Git-Tag: 1.0.0~747 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=99e01af883f1ef23dbff6432d45430a59cf2535e;p=bertos.git Check CONFIG_* constraints. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@494 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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 */