Index: soft/giet_vm/applications/rosenfeld/nrc2/include/nrbool1.h
===================================================================
--- soft/giet_vm/applications/rosenfeld/nrc2/include/nrbool1.h	(revision 772)
+++ soft/giet_vm/applications/rosenfeld/nrc2/include/nrbool1.h	(revision 822)
@@ -11,18 +11,8 @@
 #define _NR_BOOL1_H_
 
-#ifdef __cplusplus
-#ifdef PRAGMA_VERBOSE
-#pragma message ("C++")
-#endif
-extern "C" {
-#endif
 
-#ifdef PRAGMA_VERBOSE
-//#pragma message("- include nrbool1.h")
-#endif
-
-/* ========================= */
-/* === Logical operation === */
-/* ========================= */
+/* ========================== */
+/* === Logical operations === */
+/* ========================== */
 
 /* ----------- */
@@ -30,15 +20,19 @@
 /* ----------- */
 /* Y = ! Y */
-IMAGE_EXPORT(void) not_bvector    (byte   *X, long ncl, long nch, byte   *Y);
-IMAGE_EXPORT(void) not_si8vector  (sint8  *X, long ncl, long nch, sint8  *Y);
-IMAGE_EXPORT(void) not_ui8vector  (uint8  *X, long ncl, long nch, uint8  *Y);
-IMAGE_EXPORT(void) not_si16vector (sint16 *X, long ncl, long nch, sint16 *Y);
-IMAGE_EXPORT(void) not_ui16vector (uint16 *X, long ncl, long nch, uint16 *Y);
-IMAGE_EXPORT(void) not_si32vector (sint32 *X, long ncl, long nch, sint32 *Y);
-IMAGE_EXPORT(void) not_ui32vector (uint32 *X, long ncl, long nch, uint32 *Y);
-IMAGE_EXPORT(void) not_si64vector (sint64 *X, long ncl, long nch, sint64 *Y);
-IMAGE_EXPORT(void) not_ui64vector (uint64 *X, long ncl, long nch, uint64 *Y);
-IMAGE_EXPORT(void) not_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   *Y);
-IMAGE_EXPORT(void) not_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  *Y);
+
+#define not_type_vector(t) \
+void short_name(t,not_,vector)(t * X, int32_t ncl, int32_t nch, t * Y)
+
+not_type_vector(int8_t);
+not_type_vector(uint8_t);
+not_type_vector(int16_t);
+not_type_vector(uint16_t);
+not_type_vector(int32_t);
+not_type_vector(uint32_t);
+not_type_vector(int64_t);
+not_type_vector(uint64_t);
+not_type_vector(rgb8);
+not_type_vector(rgbx8);
+
 
 /* ---------- */
@@ -47,27 +41,19 @@
 /* Z = X | Y */
 
-IMAGE_EXPORT(void) or_bvector    (byte   *X, long ncl, long nch, byte   *Y, byte    *Z);
-IMAGE_EXPORT(void) or_si8vector  (sint8  *X, long ncl, long nch, sint8  *Y, sint8   *Z);
-IMAGE_EXPORT(void) or_ui8vector  (uint8  *X, long ncl, long nch, uint8  *Y, uint8   *Z);
-IMAGE_EXPORT(void) or_si16vector (sint16 *X, long ncl, long nch, sint16 *Y, sint16  *Z);
-IMAGE_EXPORT(void) or_ui16vector (uint16 *X, long ncl, long nch, uint16 *Y, uint16  *Z);
-IMAGE_EXPORT(void) or_si32vector (sint32 *X, long ncl, long nch, sint32 *Y, sint32  *Z);
-IMAGE_EXPORT(void) or_ui32vector (uint32 *X, long ncl, long nch, uint32 *Y, uint32  *Z);
-IMAGE_EXPORT(void) or_si64vector (sint64 *X, long ncl, long nch, sint64 *Y, sint64  *Z);
-IMAGE_EXPORT(void) or_ui64vector (uint64 *X, long ncl, long nch, uint64 *Y, uint64  *Z);
-IMAGE_EXPORT(void) or_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   *Y, rgb8    *Z);
-IMAGE_EXPORT(void) or_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  *Y, rgbx8   *Z);
+#define or_type_vector(t) \
+void short_name(t,or_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
+void short_name(t,orc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
 
-IMAGE_EXPORT(void) orc_bvector    (byte   *X, long ncl, long nch, byte   y, byte    *Z);
-IMAGE_EXPORT(void) orc_si8vector  (sint8  *X, long ncl, long nch, sint8  y, sint8   *Z);
-IMAGE_EXPORT(void) orc_ui8vector  (uint8  *X, long ncl, long nch, uint8  y, uint8   *Z);
-IMAGE_EXPORT(void) orc_si16vector (sint16 *X, long ncl, long nch, sint16 y, sint16  *Z);
-IMAGE_EXPORT(void) orc_ui16vector (uint16 *X, long ncl, long nch, uint16 y, uint16  *Z);
-IMAGE_EXPORT(void) orc_si32vector (sint32 *X, long ncl, long nch, sint32 y, sint32  *Z);
-IMAGE_EXPORT(void) orc_ui32vector (uint32 *X, long ncl, long nch, uint32 y, uint32  *Z);
-IMAGE_EXPORT(void) orc_si64vector (sint64 *X, long ncl, long nch, sint64 y, sint64  *Z);
-IMAGE_EXPORT(void) orc_ui64vector (uint64 *X, long ncl, long nch, uint64 y, uint64  *Z);
-IMAGE_EXPORT(void) orc_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   y, rgb8    *Z);
-IMAGE_EXPORT(void) orc_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  y, rgbx8   *Z);
+or_type_vector(int8_t);
+or_type_vector(uint8_t);
+or_type_vector(int16_t);
+or_type_vector(uint16_t);
+or_type_vector(int32_t);
+or_type_vector(uint32_t);
+or_type_vector(int64_t);
+or_type_vector(uint64_t);
+or_type_vector(rgb8);
+or_type_vector(rgbx8);
+
 
 /* ----------- */
@@ -76,27 +62,19 @@
 /* Z = X ^ Y */
 
-IMAGE_EXPORT(void) xor_bvector    (byte   *X, long ncl, long nch, byte   *Y, byte    *Z);
-IMAGE_EXPORT(void) xor_si8vector  (sint8  *X, long ncl, long nch, sint8  *Y, sint8   *Z);
-IMAGE_EXPORT(void) xor_ui8vector  (uint8  *X, long ncl, long nch, uint8  *Y, uint8   *Z);
-IMAGE_EXPORT(void) xor_si16vector (sint16 *X, long ncl, long nch, sint16 *Y, sint16  *Z);
-IMAGE_EXPORT(void) xor_ui16vector (uint16 *X, long ncl, long nch, uint16 *Y, uint16  *Z);
-IMAGE_EXPORT(void) xor_si32vector (sint32 *X, long ncl, long nch, sint32 *Y, sint32  *Z);
-IMAGE_EXPORT(void) xor_ui32vector (uint32 *X, long ncl, long nch, uint32 *Y, uint32  *Z);
-IMAGE_EXPORT(void) xor_si64vector (sint64 *X, long ncl, long nch, sint64 *Y, sint64  *Z);
-IMAGE_EXPORT(void) xor_ui64vector (uint64 *X, long ncl, long nch, uint64 *Y, uint64  *Z);
-IMAGE_EXPORT(void) xor_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   *Y, rgb8    *Z);
-IMAGE_EXPORT(void) xor_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  *Y, rgbx8   *Z);
+#define xor_type_vector(t) \
+void short_name(t,xor_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
+void short_name(t,xorc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
 
-IMAGE_EXPORT(void) xorc_bvector    (byte   *X, long ncl, long nch, byte   y, byte    *Z);
-IMAGE_EXPORT(void) xorc_si8vector  (sint8  *X, long ncl, long nch, sint8  y, sint8   *Z);
-IMAGE_EXPORT(void) xorc_ui8vector  (uint8  *X, long ncl, long nch, uint8  y, uint8   *Z);
-IMAGE_EXPORT(void) xorc_si16vector (sint16 *X, long ncl, long nch, sint16 y, sint16  *Z);
-IMAGE_EXPORT(void) xorc_ui16vector (uint16 *X, long ncl, long nch, uint16 y, uint16  *Z);
-IMAGE_EXPORT(void) xorc_si32vector (sint32 *X, long ncl, long nch, sint32 y, sint32  *Z);
-IMAGE_EXPORT(void) xorc_ui32vector (uint32 *X, long ncl, long nch, uint32 y, uint32  *Z);
-IMAGE_EXPORT(void) xorc_si64vector (sint64 *X, long ncl, long nch, sint64 y, sint64  *Z);
-IMAGE_EXPORT(void) xorc_ui64vector (uint64 *X, long ncl, long nch, uint64 y, uint64  *Z);
-IMAGE_EXPORT(void) xorc_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   y, rgb8    *Z);
-IMAGE_EXPORT(void) xorc_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  y, rgbx8   *Z);
+xor_type_vector(int8_t);
+xor_type_vector(uint8_t);
+xor_type_vector(int16_t);
+xor_type_vector(uint16_t);
+xor_type_vector(int32_t);
+xor_type_vector(uint32_t);
+xor_type_vector(int64_t);
+xor_type_vector(uint64_t);
+xor_type_vector(rgb8);
+xor_type_vector(rgbx8);
+
 
 /* ----------- */
@@ -105,32 +83,29 @@
 /* Z = X & Y */
 
-IMAGE_EXPORT(void) and_bvector    (byte   *X, long ncl, long nch, byte   *Y, byte    *Z);
-IMAGE_EXPORT(void) and_si8vector  (sint8  *X, long ncl, long nch, sint8  *Y, sint8   *Z);
-IMAGE_EXPORT(void) and_ui8vector  (uint8  *X, long ncl, long nch, uint8  *Y, uint8   *Z);
-IMAGE_EXPORT(void) and_si16vector (sint16 *X, long ncl, long nch, sint16 *Y, sint16  *Z);
-IMAGE_EXPORT(void) and_ui16vector (uint16 *X, long ncl, long nch, uint16 *Y, uint16  *Z);
-IMAGE_EXPORT(void) and_si32vector (sint32 *X, long ncl, long nch, sint32 *Y, sint32  *Z);
-IMAGE_EXPORT(void) and_ui32vector (uint32 *X, long ncl, long nch, uint32 *Y, uint32  *Z);
-IMAGE_EXPORT(void) and_si64vector (sint64 *X, long ncl, long nch, sint64 *Y, sint64  *Z);
-IMAGE_EXPORT(void) and_ui64vector (uint64 *X, long ncl, long nch, uint64 *Y, uint64  *Z);
-IMAGE_EXPORT(void) and_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   *Y, rgb8    *Z);
-IMAGE_EXPORT(void) and_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  *Y, rgbx8   *Z);
+#define and_type_vector(t) \
+void short_name(t,and_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
+void short_name(t,andc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
 
-IMAGE_EXPORT(void) andc_bvector    (byte   *X, long ncl, long nch, byte   y, byte    *Z);
-IMAGE_EXPORT(void) andc_si8vector  (sint8  *X, long ncl, long nch, sint8  y, sint8   *Z);
-IMAGE_EXPORT(void) andc_ui8vector  (uint8  *X, long ncl, long nch, uint8  y, uint8   *Z);
-IMAGE_EXPORT(void) andc_si16vector (sint16 *X, long ncl, long nch, sint16 y, sint16  *Z);
-IMAGE_EXPORT(void) andc_ui16vector (uint16 *X, long ncl, long nch, uint16 y, uint16  *Z);
-IMAGE_EXPORT(void) andc_si32vector (sint32 *X, long ncl, long nch, sint32 y, sint32  *Z);
-IMAGE_EXPORT(void) andc_ui32vector (uint32 *X, long ncl, long nch, uint32 y, uint32  *Z);
-IMAGE_EXPORT(void) andc_si64vector (sint64 *X, long ncl, long nch, sint64 y, sint64  *Z);
-IMAGE_EXPORT(void) andc_ui64vector (uint64 *X, long ncl, long nch, uint64 y, uint64  *Z);
-IMAGE_EXPORT(void) andc_rgb8vector (rgb8   *X, long ncl, long nch, rgb8   y, rgb8    *Z);
-IMAGE_EXPORT(void) andc_rgbx8vector(rgbx8  *X, long ncl, long nch, rgbx8  y, rgbx8   *Z);
+and_type_vector(int8_t);
+and_type_vector(uint8_t);
+and_type_vector(int16_t);
+and_type_vector(uint16_t);
+and_type_vector(int32_t);
+and_type_vector(uint32_t);
+and_type_vector(int64_t);
+and_type_vector(uint64_t);
+and_type_vector(rgb8);
+and_type_vector(rgbx8);
 
 
-#ifdef __cplusplus
-}
-#endif
+#endif // _NR_BOOL1_H_
 
-#endif // _NR_BOOL1_H_
+// Local Variables:
+// tab-width: 4
+// c-basic-offset: 4
+// c-file-offsets:((innamespace . 0)(inline-open . 0))
+// indent-tabs-mode: nil
+// End:
+
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+
