diff dw.h @ 987:297f2e790e57

Added a DW_RESOURCE() macro for typecasting parameters to HICN and for doing bounds checking. Fixed a typo in the template file while I was fixing comments.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 07 May 2011 06:06:19 +0000
parents 87dc0f5f96d0
children cb81c08bd8c3
line wrap: on
line diff
--- a/dw.h	Sat May 07 05:14:06 2011 +0000
+++ b/dw.h	Sat May 07 06:06:19 2011 +0000
@@ -1402,6 +1402,9 @@
 #define DW_HTML_STOP       5
 #define DW_HTML_PRINT      6
 
+/* Macro for casting resource IDs to HICN */
+#define DW_RESOURCE(a) (a < 65536 ? (HICN)a : (HICN)0)
+
 #ifndef API
 #define API
 #endif