Index: soft/giet_vm/applications/rosenfeld/nrc2/include/nrsort1.h
===================================================================
--- soft/giet_vm/applications/rosenfeld/nrc2/include/nrsort1.h	(revision 772)
+++ soft/giet_vm/applications/rosenfeld/nrc2/include/nrsort1.h	(revision 826)
@@ -11,34 +11,30 @@
 #define _NRSORT1_H_
 
-#ifdef __cplusplus
-#ifdef PRAGMA_VERBOSE
-#pragma message ("C++")
-#endif
-extern "C" {
-#endif
+#define extractnz_boundaries_type_vector(t) \
+void short_name(t,extractnz_boundaries_,vector)(t * v, int32_t nl, int32_t nh, int32_t * nlnz, int32_t * nhnz);
 
-#ifdef PRAGMA_VERBOSE
-//#pragma message("- include nrsort1.h")
-#endif
+extractnz_boundaries_type_vector(int8_t);
+extractnz_boundaries_type_vector(uint8_t);
+extractnz_boundaries_type_vector(int16_t);
+extractnz_boundaries_type_vector(uint16_t);
+extractnz_boundaries_type_vector(int32_t);
+extractnz_boundaries_type_vector(uint32_t);
+extractnz_boundaries_type_vector(int64_t);
+extractnz_boundaries_type_vector(uint64_t);
+extractnz_boundaries_type_vector(float);
+extractnz_boundaries_type_vector(double);
 
-IMAGE_EXPORT(void) extractnz_boundaries_ui8vector (uint8   *v, long nl, long nh, long *nlnz, long *nhnz);
-IMAGE_EXPORT(void) extractnz_boundaries_si16vector(sint16  *v, long nl, long nh, long *nlnz, long *nhnz);
-IMAGE_EXPORT(void) extractnz_boundaries_ui16vector(uint16  *v, long nl, long nh, long *nlnz, long *nhnz);
-IMAGE_EXPORT(void) extractnz_boundaries_si32vector(sint32  *v, long nl, long nh, long *nlnz, long *nhnz);
-IMAGE_EXPORT(void) extractnz_boundaries_ui32vector(uint32  *v, long nl, long nh, long *nlnz, long *nhnz);
-IMAGE_EXPORT(void) extractnz_boundaries_f32vector (float32 *v, long nl, long nh, long *nlnz, long *nhnz, float32 epsillon);
-IMAGE_EXPORT(void) extractnz_boundaries_f64vector (float64 *v, long nl, long nh, long *nlnz, long *nhnz, float64 epsillon);
-    
-IMAGE_EXPORT(void) sort_index_dvector_selection     (double *key, long nl, long nh, int *index);
 
-IMAGE_EXPORT(void) sort_index_ivector_selection_min (int    *key, long nl, long nh, int *index);
-IMAGE_EXPORT(void) sort_index_ivector_selection_max (int    *key, long nl, long nh, int *index);
-IMAGE_EXPORT(void) sort_index_ivector_selection_kmin(int    *key, long nl, long nh, int *index, int k);
-IMAGE_EXPORT(void) sort_index_ivector_selection_kmax(int    *key, long nl, long nh, int *index, int k);
 
-IMAGE_EXPORT(void) sort_index_vector_selection_min (float    *key, long nl, long nh, int *index);
-IMAGE_EXPORT(void) sort_index_vector_selection_max (float    *key, long nl, long nh, int *index);
-IMAGE_EXPORT(void) sort_index_vector_selection_kmin(float    *key, long nl, long nh, int *index, int k);
-IMAGE_EXPORT(void) sort_index_vector_selection_kmax(float    *key, long nl, long nh, int *index, int k);
+void sort_index_f64vector_selection(double * key, int32_t nl, int32_t nh, int32_t * index);
+void sort_index_ivector_selection_min(int32_t * key, int32_t nl, int32_t nh, int32_t * index);
+void sort_index_ivector_selection_max(int32_t * key, int32_t nl, int32_t nh, int32_t * index);
+void sort_index_vector_selection_min(float * key, int32_t nl, int32_t nh, int32_t * index);
+void sort_index_vector_selection_max(float * key, int32_t nl, int32_t nh, int32_t * index);
+void sort_index_vector_selection_kmin(float * key, int32_t nl, int32_t nh, int32_t * index, int32_t k);
+void sort_index_ivector_selection_kmin(int32_t * key, int32_t nl, int32_t nh, int32_t * index, int32_t k);
+void sort_index_vector_selection_kmax(float * key, int32_t nl, int32_t nh, int32_t * index, int32_t k);
+void sort_index_ivector_selection_kmax(int32_t * key, int32_t nl, int32_t nh, int32_t * index, int32_t k);
+void sort_bvector_selection_min(int8_t * v, int32_t nl, int32_t nh);
 
 /*
@@ -46,16 +42,13 @@
  */
 
-IMAGE_EXPORT(void) sort_bvector_selection_min(byte *v, long nl, long nh);
 
 /* ======================================================================== */
 /* == Select = order/rank filter = median ================================= */
 /* ======================================================================== */
+int8_t select_bvector(int8_t * v, int32_t nl, int32_t nh, int32_t k);
+rgb8 select_rgb8vector(rgb8 * v, int32_t nl, int32_t nh, int32_t k);
 
-IMAGE_EXPORT(byte) select_bvector   (byte *v, long nl, long nh, long k);
-IMAGE_EXPORT(rgb8) select_rgb8vector(rgb8 *v, long nl, long nh, long k);
 
-#ifdef __cplusplus
-}
-#endif
 
 #endif /* _NRSORT1_H_ */
+
