Check CONFIG_* constraints.
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 10 Feb 2006 12:26:58 +0000 (12:26 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 10 Feb 2006 12:26:58 +0000 (12:26 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@494 38d2e660-2303-0410-9eaa-f027e97ec537

gfx/line.c

index b3e74f03a9f1d4d5e84bd9557d19e30052db78be..41e00cc7e44c411ec69064daed2296c38772f56c 100755 (executable)
@@ -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.
  *#*
 #include <cfg/macros.h>  /* SWAP() */
 #include <appconfig.h>   /* 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 */