build: Don't include <config.h> in native programs when cross-compiling.
[bpt/guile.git] / libguile / validate.h
index 7169627..0bdc057 100644 (file)
@@ -3,46 +3,24 @@
 #ifndef SCM_VALIDATE_H
 #define SCM_VALIDATE_H
 
-/* Copyright (C) 1999,2000,2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2006, 2007, 2009,
+ *   2012 Free Software Foundation, Inc.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this software; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307 USA
- *
- * As a special exception, the Free Software Foundation gives permission
- * for additional uses of the text contained in its release of GUILE.
- *
- * The exception is that, if you link the GUILE library with other files
- * to produce an executable, this does not by itself cause the
- * resulting executable to be covered by the GNU General Public License.
- * Your use of that executable is in no way restricted on account of
- * linking the GUILE library code into it.
- *
- * This exception does not however invalidate any other reasons why
- * the executable file might be covered by the GNU General Public License.
- *
- * This exception applies only to the code released by the
- * Free Software Foundation under the name GUILE.  If you copy
- * code from other Free Software Foundation releases into a copy of
- * GUILE, as the General Public License permits, the exception does
- * not apply to the code that you add in this way.  To avoid misleading
- * anyone as to the status of such modified files, you must delete
- * this exception notice from them.
- *
- * If you write modifications of your own for GUILE, it is your choice
- * whether to permit this exception to apply to your modifications.
- * If you do not wish that, delete this exception notice.  */
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
 
 /* Written by Greg J. Badros <gjb@cs.washington.edu>, Dec-1999 */
 
 #define SCM_WRONG_TYPE_ARG(pos, obj) \
   do { scm_wrong_type_arg (FUNC_NAME, pos, obj); } while (0)
 
-#define SCM_NUM2SIZE(pos, arg) (scm_num2size (arg, pos, FUNC_NAME))
+#define SCM_NUM2SIZE(pos, arg) (scm_to_size_t (arg))
 
 #define SCM_NUM2SIZE_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2size (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_size_t (arg))
 
-#define SCM_NUM2PTRDIFF(pos, arg) (scm_num2ptrdiff (arg, pos, FUNC_NAME))
+#define SCM_NUM2PTRDIFF(pos, arg) (scm_to_ssize_t (arg))
 
 #define SCM_NUM2PTRDIFF_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2ptrdiff (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_ssize_t (arg))
 
-#define SCM_NUM2SHORT(pos, arg) (scm_num2short (arg, pos, FUNC_NAME))
+#define SCM_NUM2SHORT(pos, arg) (scm_to_short (arg))
 
 #define SCM_NUM2SHORT_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2short (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_short (arg))
 
-#define SCM_NUM2USHORT(pos, arg) (scm_num2ushort (arg, pos, FUNC_NAME))
+#define SCM_NUM2USHORT(pos, arg) (scm_to_ushort (arg))
 
 #define SCM_NUM2USHORT_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2ushort (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_ushort (arg))
 
-#define SCM_NUM2INT(pos, arg) (scm_num2int (arg, pos, FUNC_NAME))
+#define SCM_NUM2INT(pos, arg) (scm_to_int (arg))
 
 #define SCM_NUM2INT_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2int (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_int (arg))
 
-#define SCM_NUM2UINT(pos, arg) (scm_num2uint (arg, pos, FUNC_NAME))
+#define SCM_NUM2UINT(pos, arg) (scm_to_uint (arg))
 
 #define SCM_NUM2UINT_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2uint (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_uint (arg))
 
-#define SCM_NUM2ULONG(pos, arg) (scm_num2ulong (arg, pos, FUNC_NAME))
+#define SCM_NUM2ULONG(pos, arg) (scm_to_ulong (arg))
 
 #define SCM_NUM2ULONG_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2ulong (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_ulong (arg))
 
-#define SCM_NUM2LONG(pos, arg) (scm_num2long (arg, pos, FUNC_NAME))
+#define SCM_NUM2LONG(pos, arg) (scm_to_long (arg))
 
 #define SCM_NUM2LONG_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2long (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_long (arg))
 
-#define SCM_NUM2LONG_LONG(pos, arg) \
-  (scm_num2long_long (arg, pos, FUNC_NAME))
+#define SCM_NUM2LONG_LONG(pos, arg) (scm_to_long_long (arg))
 
 #define SCM_NUM2LONG_LONG_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2long_long (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_long_long (arg))
 
-#define SCM_NUM2ULONG_LONG(pos, arg) \
-  (scm_num2ulong_long (arg, pos, FUNC_NAME))
+#define SCM_NUM2ULONG_LONG(pos, arg) (scm_to_ulong_long (arg))
 
 #define SCM_NUM2ULONG_LONG_DEF(pos, arg, def) \
-  (SCM_UNBNDP (arg) ? def : scm_num2ulong_long (arg, pos, FUNC_NAME))
+  (SCM_UNBNDP (arg) ? def : scm_to_ulong_long (arg))
 
-#define SCM_NUM2FLOAT(pos, arg) \
-  (scm_num2float (arg, pos, FUNC_NAME))
+#define SCM_NUM2FLOAT(pos, arg) ((float) scm_to_double (arg))
 
-#define SCM_NUM2DOUBLE(pos, arg) \
-  (scm_num2double (arg, pos, FUNC_NAME))
+#define SCM_NUM2DOUBLE(pos, arg) (scm_to_double (arg))
 
 #define SCM_OUT_OF_RANGE(pos, arg) \
-  do { scm_out_of_range_pos (FUNC_NAME, arg, SCM_MAKINUM (pos)); } while (0)
+  do { scm_out_of_range_pos (FUNC_NAME, arg, scm_from_int (pos)); } while (0)
 
-#define SCM_ASSERT_RANGE(pos, arg, f) \
-  do { if (!(f)) scm_out_of_range_pos (FUNC_NAME, arg, SCM_MAKINUM (pos)); } while (0)
+#define SCM_ASSERT_RANGE(pos, arg, f)                                  \
+  do { if (SCM_UNLIKELY (!(f)))                                        \
+         scm_out_of_range_pos (FUNC_NAME, arg, scm_from_int (pos)); }  \
+  while (0)
 
 #define SCM_MUST_MALLOC_TYPE(type) \
   ((type *) scm_must_malloc (sizeof (type), FUNC_NAME))
     SCM_ASSERT_TYPE (SCM_ ## pred (var), var, pos, FUNC_NAME, #pred); \
   } while (0)
 
-#define SCM_MAKE_VALIDATE_MSG(pos, var, pred, msg) \
+#define SCM_I_MAKE_VALIDATE_MSG2(pos, var, pred, msg) \
   do { \
-    SCM_ASSERT_TYPE (SCM_ ## pred (var), var, pos, FUNC_NAME, msg); \
+    SCM_ASSERT_TYPE (pred (var), var, pos, FUNC_NAME, msg); \
   } while (0)
 
+#define SCM_MAKE_VALIDATE_MSG(pos, var, pred, msg) \
+  SCM_I_MAKE_VALIDATE_MSG2 (pos, var, SCM_ ## pred, msg)
+
+
 \f
 
 #define SCM_VALIDATE_REST_ARGUMENT(x) \
 
 #define SCM_VALIDATE_NIM(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, NIMP, "non-immediate")
 
-#define SCM_VALIDATE_BOOL(pos, flag) SCM_MAKE_VALIDATE_MSG(pos, flag, BOOLP, "boolean")
+#define SCM_VALIDATE_BOOL(pos, flag) \
+  do { \
+    SCM_ASSERT_TYPE (scm_is_bool (flag), flag, pos, FUNC_NAME, "boolean"); \
+  } while (0)
 
 #define SCM_VALIDATE_BOOL_COPY(pos, flag, cvar) \
   do { \
-    SCM_ASSERT (SCM_BOOLP (flag), flag, pos, FUNC_NAME); \
-    cvar = SCM_EQ_P (flag, SCM_BOOL_T) ? 1 : 0; \
+    SCM_ASSERT (scm_is_bool (flag), flag, pos, FUNC_NAME); \
+    cvar = scm_to_bool (flag); \
   } while (0)
 
+#define SCM_VALIDATE_BYTEVECTOR(_pos, _obj)                    \
+  SCM_ASSERT_TYPE (SCM_BYTEVECTOR_P (_obj), (_obj), (_pos),    \
+                  FUNC_NAME, "bytevector")
+
 #define SCM_VALIDATE_CHAR(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, CHARP, "character")
 
 #define SCM_VALIDATE_CHAR_COPY(pos, scm, cvar) \
     cvar = SCM_CHAR (scm); \
   } while (0)
 
-#define SCM_VALIDATE_STRING(pos, str) SCM_MAKE_VALIDATE_MSG (pos, str, STRINGP, "string")
-
-#define SCM_VALIDATE_STRING_COPY(pos, str, cvar) \
+#define SCM_VALIDATE_STRING(pos, str) \
   do { \
-    SCM_ASSERT (SCM_STRINGP (str), str, pos, FUNC_NAME); \
-    cvar = SCM_STRING_CHARS(str); \
-  } while (0)
-
-/* validate a string and optional start/end arguments which default to
-   0/string-len.  this is unrelated to the old shared substring
-   support, so please do not deprecate it :) */
-#define SCM_VALIDATE_SUBSTRING_SPEC_COPY(pos_str, str, c_str, \
-                                         pos_start, start, c_start,\
-                                         pos_end, end, c_end) \
-  do {\
-    SCM_VALIDATE_STRING_COPY (pos_str, str, c_str);\
-    SCM_VALIDATE_INUM_DEF_COPY (pos_start, start, 0, c_start);\
-    SCM_VALIDATE_INUM_DEF_COPY (pos_end, end, SCM_STRING_LENGTH (str), c_end);\
-    SCM_ASSERT_RANGE (pos_start, start,\
-                      0 <= c_start \
-                      && (size_t) c_start <= SCM_STRING_LENGTH (str));\
-    SCM_ASSERT_RANGE (pos_end, end,\
-                     c_start <= c_end \
-                      && (size_t) c_end <= SCM_STRING_LENGTH (str));\
+    SCM_ASSERT_TYPE (scm_is_string (str), str, pos, FUNC_NAME, "string"); \
   } while (0)
 
 #define SCM_VALIDATE_REAL(pos, z) SCM_MAKE_VALIDATE_MSG (pos, z, REALP, "real")
 
 #define SCM_VALIDATE_NUMBER(pos, z) SCM_MAKE_VALIDATE_MSG (pos, z, NUMBERP, "number")
 
-#define SCM_VALIDATE_INUM(pos, k) SCM_MAKE_VALIDATE_MSG (pos, k, INUMP, "exact integer")
-
-#define SCM_VALIDATE_INUM_COPY(pos, k, cvar) \
-  do { \
-    SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
-    cvar = SCM_INUM (k); \
-  } while (0)
-
 #define SCM_VALIDATE_USHORT_COPY(pos, k, cvar) \
   do { \
     cvar = SCM_NUM2USHORT (pos, k); \
     cvar = SCM_NUM2DOUBLE (pos, k); \
   } while (0)
 
-#define SCM_VALIDATE_BIGINT(pos, k) SCM_MAKE_VALIDATE_MSG (pos, k, BIGP, "bignum")
-
-#define SCM_VALIDATE_INUM_MIN(pos, k, min) \
-  do { \
-    SCM_ASSERT (SCM_INUMP(k), k, pos, FUNC_NAME); \
-    SCM_ASSERT_RANGE (pos, k, (SCM_INUM (k) >= min)); \
-  } while (0)
-
-#define SCM_VALIDATE_INUM_MIN_COPY(pos, k, min, cvar) \
-  do { \
-    SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
-    SCM_ASSERT_RANGE (pos, k, (SCM_INUM (k) >= min)); \
-    cvar = SCM_INUM (k); \
-  } while (0)
-
-#define SCM_VALIDATE_INUM_MIN_DEF_COPY(pos, k, min, default, cvar) \
-  do { \
-    if (SCM_UNBNDP (k)) \
-      k = SCM_MAKINUM (default); \
-    SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
-    SCM_ASSERT_RANGE (pos, k, (SCM_INUM (k) >= min)); \
-    cvar = SCM_INUM (k); \
-  } while (0)
-
-#define SCM_VALIDATE_INUM_DEF(pos, k, default) \
-  do { \
-    if (SCM_UNBNDP (k)) \
-      k = SCM_MAKINUM (default); \
-    else SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
-  } while (0)
-
-#define SCM_VALIDATE_INUM_DEF_COPY(pos, k, default, cvar) \
-  do { \
-    if (SCM_UNBNDP (k)) \
-      { \
-        k = SCM_MAKINUM (default); \
-        cvar = default; \
-      } \
-    else \
-      { \
-        SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
-        cvar = SCM_INUM (k); \
-      } \
-  } while (0)
-
 #define SCM_VALIDATE_DOUBLE_DEF_COPY(pos, k, default, cvar) \
   do { \
     if (SCM_UNBNDP (k)) \
       } \
   } while (0)
 
-/* [low, high) */
-#define SCM_VALIDATE_INUM_RANGE(pos, k, low, high) \
-  do { SCM_ASSERT(SCM_INUMP(k), k, pos, FUNC_NAME); \
-       SCM_ASSERT_RANGE(pos, k, \
-                        (SCM_INUM (k) >= low && \
-                         SCM_INUM (k) < high)); \
-     } while (0)
+#define SCM_VALIDATE_NULL(pos, scm) \
+  SCM_I_MAKE_VALIDATE_MSG2 (pos, scm, scm_is_null, "empty list")
 
-#define SCM_VALIDATE_INUM_RANGE_COPY(pos, k, low, high, cvar) \
-  do { \
-    SCM_ASSERT (SCM_INUMP (k), k, pos, FUNC_NAME); \
-    SCM_ASSERT_RANGE (pos, k, low <= SCM_INUM (k) && SCM_INUM (k) < high); \
-    cvar = SCM_INUM (k); \
-  } while (0)
+#define SCM_VALIDATE_NULL_OR_NIL(pos, scm) \
+  SCM_MAKE_VALIDATE_MSG (pos, scm, NULL_OR_NIL_P, "empty list")
 
-#define SCM_VALIDATE_NULL(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, NULLP, "null")
-
-#define SCM_VALIDATE_NULL_OR_NIL(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, NULL_OR_NIL_P, "null")
-
-#define SCM_VALIDATE_CONS(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, CONSP, "pair")
+#define SCM_VALIDATE_CONS(pos, scm) \
+  SCM_I_MAKE_VALIDATE_MSG2 (pos, scm, scm_is_pair, "pair")
 
 #define SCM_VALIDATE_LIST(pos, lst) \
   do { \
 
 #define SCM_VALIDATE_ALISTCELL(pos, alist) \
   do { \
-    SCM_ASSERT (SCM_CONSP (alist) && SCM_CONSP (SCM_CAR (alist)), \
+    SCM_ASSERT (scm_is_pair (alist) && scm_is_pair (SCM_CAR (alist)), \
                 alist, pos, FUNC_NAME); \
   } while (0)
 
 #define SCM_VALIDATE_ALISTCELL_COPYSCM(pos, alist, cvar) \
   do { \
-    SCM_ASSERT (SCM_CONSP (alist), alist, pos, FUNC_NAME); \
+    SCM_ASSERT (scm_is_pair (alist), alist, pos, FUNC_NAME); \
     cvar = SCM_CAR (alist); \
-    SCM_ASSERT (SCM_CONSP (cvar), alist, pos, FUNC_NAME); \
+    SCM_ASSERT (scm_is_pair (cvar), alist, pos, FUNC_NAME); \
   } while (0)
 
 #define SCM_VALIDATE_OPORT_VALUE(pos, port) \
 
 #define SCM_VALIDATE_SMOB(pos, obj, type) \
   do { \
-    SCM_ASSERT (SCM_TYP16_PREDICATE (scm_tc16_ ## type, obj), \
+    SCM_ASSERT (SCM_SMOB_PREDICATE (scm_tc16_ ## type, obj), \
                 obj, pos, FUNC_NAME); \
   } while (0)
 
 #define SCM_VALIDATE_THUNK(pos, thunk) \
   do { \
-    SCM_ASSERT (!SCM_FALSEP (scm_thunk_p (thunk)), thunk, pos, FUNC_NAME); \
+    SCM_ASSERT (scm_is_true (scm_thunk_p (thunk)), thunk, pos, FUNC_NAME); \
   } while (0)
 
-#define SCM_VALIDATE_SYMBOL(pos, sym) SCM_MAKE_VALIDATE_MSG (pos, sym, SYMBOLP, "symbol")
+#define SCM_VALIDATE_SYMBOL(pos, str) \
+  do { \
+    SCM_ASSERT_TYPE (scm_is_symbol (str), str, pos, FUNC_NAME, "symbol"); \
+  } while (0)
 
 #define SCM_VALIDATE_VARIABLE(pos, var) SCM_MAKE_VALIDATE_MSG (pos, var, VARIABLEP, "variable")
 
-#define SCM_VALIDATE_MEMOIZED(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, MEMOIZEDP, "memoized code")
-
-#define SCM_VALIDATE_CLOSURE(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, CLOSUREP, "closure")
+#define SCM_VALIDATE_MEMOIZED(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, MEMOIZED_P, "memoized code")
 
 #define SCM_VALIDATE_PROC(pos, proc) \
   do { \
-    SCM_ASSERT (SCM_EQ_P (scm_procedure_p (proc), SCM_BOOL_T), proc, pos, FUNC_NAME); \
+    SCM_ASSERT (scm_is_true (scm_procedure_p (proc)), proc, pos, FUNC_NAME); \
   } while (0)
 
 #define SCM_VALIDATE_NULLORCONS(pos, env) \
   do { \
-    SCM_ASSERT (SCM_NULLP (env) || SCM_CONSP (env), env, pos, FUNC_NAME); \
+    SCM_ASSERT (scm_is_null (env) || scm_is_pair (env), env, pos, FUNC_NAME); \
   } while (0)
 
 #define SCM_VALIDATE_HOOK(pos, a) SCM_MAKE_VALIDATE_MSG (pos, a, HOOKP, "hook")
 #define SCM_VALIDATE_OPOUTSTRPORT(pos, port) \
   SCM_MAKE_VALIDATE_MSG (pos, port, OPOUTSTRPORTP, "open output string port")
 
-#define SCM_VALIDATE_FLUID(pos, fluid) SCM_MAKE_VALIDATE_MSG (pos, fluid, FLUIDP, "fluid")
+#define SCM_VALIDATE_FLUID(pos, fluid) \
+  SCM_I_MAKE_VALIDATE_MSG2 (pos, fluid, scm_is_fluid, "fluid")
 
 #define SCM_VALIDATE_KEYWORD(pos, v) SCM_MAKE_VALIDATE_MSG (pos, v, KEYWORDP, "keyword")
 
 #define SCM_VALIDATE_ARRAY(pos, v) \
   do { \
     SCM_ASSERT (!SCM_IMP (v) \
-                && !SCM_FALSEP (scm_array_p (v, SCM_UNDEFINED)), \
+                && scm_is_true (scm_array_p (v, SCM_UNDEFINED)), \
                 v, pos, FUNC_NAME); \
   } while (0)
 
-#define SCM_VALIDATE_VECTOR(pos, v) SCM_MAKE_VALIDATE_MSG (pos, v, VECTORP, "vector")
+#define SCM_VALIDATE_VECTOR(pos, v) \
+  do { \
+    SCM_ASSERT (scm_is_simple_vector (v), v, pos, FUNC_NAME); \
+  } while (0)
 
 #define SCM_VALIDATE_VECTOR_OR_DVECTOR(pos, v) \
   do { \
-    SCM_ASSERT ((SCM_VECTORP (v) \
-                || (!SCM_IMP (v) && SCM_TYP7 (v) == scm_tc7_dvect)), \
+    SCM_ASSERT ((scm_is_simple_vector (v) \
+                || (scm_is_true (scm_f64vector_p (v)))), \
                 v, pos, FUNC_NAME); \
   } while (0)
 
 
 #define SCM_VALIDATE_VTABLE(pos, v) \
   do { \
-    SCM_ASSERT (!SCM_IMP (v) && !SCM_FALSEP (scm_struct_vtable_p (v)), \
-                v, pos, FUNC_NAME); \
+    SCM_ASSERT (scm_is_true (scm_struct_vtable_p (v)), v, pos, FUNC_NAME); \
   } while (0)
 
 #define SCM_VALIDATE_VECTOR_LEN(pos, v, len) \
   do { \
-    SCM_ASSERT (SCM_VECTORP (v) && len == SCM_VECTOR_LENGTH (v), v, pos, FUNC_NAME); \
+    SCM_ASSERT (scm_is_vector (v) && len == scm_c_vector_length (v), v, pos, FUNC_NAME); \
   } while (0)
 
+
 #endif  /* SCM_VALIDATE_H */
 
 /*