* __scm.h: Added debug option SCM_DEBUG_REST_ARGUMENTS.
* eval.c: Make sure all parameter lists for map and for-each have the
same length. Also, removed redundant parameter checks.
+2000-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * __scm.h: Added SCM_DEBUG as default debug option. (Thanks to
+ Keisuke Nishida for the suggestion.) Added debug option
+ SCM_DEBUG_REST_ARGUMENTS.
+
+ * eval.c (scm_map, scm_for_each): Make sure all lists have the
+ same length. Also, removed redundant parameter checks.
+
2000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
* Makefile.am: Let 'make clean' remove *.x and *.doc files.
* stime.c (scm_strftime): don't reset TZ if zone is an empty
string. append a "0" to the zone for TZ.
-
+
2000-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
* numbers.c (scm_logbit_p, scm_bit_extract): Reordered dispatch
*/
+/* The value of SCM_DEBUG determines the default for most of the not yet
+ * defined debugging options. This allows, for example, to enable most of the
+ * debugging options by simply defining SCM_DEBUG as 1.
+ */
+#ifndef SCM_DEBUG
+#define SCM_DEBUG 0
+#endif
+
/* If SCM_DEBUG_DEPRECATED is set to 1, deprecated code is not compiled. This
* can be used by developers to get rid of references to deprecated code.
*/
#ifndef SCM_DEBUG_DEPRECATED
-#define SCM_DEBUG_DEPRECATED 0
+#define SCM_DEBUG_DEPRECATED SCM_DEBUG
+#endif
+
+/* If SCM_DEBUG_REST_ARGUMENTS is set to 1, functions that take rest arguments
+ * will check whether the rest arguments actually form a proper list.
+ * Otherwise it is assumed that the rest arguments form a proper list and only
+ * the parameters themselves, which are given as rest arguments, are checked.
+ */
+#ifndef SCM_DEBUG_REST_ARGUMENTS
+#define SCM_DEBUG_REST_ARGUMENTS SCM_DEBUG
#endif
/* Use this for _compile time_ type checking only, since the compiled result
* will be quite inefficient. The right way to make use of this option is to
* do a 'make clean; make CFLAGS=-DSCM_DEBUG_TYPING_STRICTNESS=1', fix your
* errors, and then do 'make clean; make'.
-*/
+ */
#ifndef SCM_DEBUG_TYPING_STRICTNESS
#define SCM_DEBUG_TYPING_STRICTNESS 0
#endif
SCM *pres = &res;
SCM *ve = &args; /* Keep args from being optimized away. */
- if (SCM_NULLP (arg1))
- return res;
len = scm_ilength (arg1);
SCM_GASSERTn (len >= 0,
g_map, scm_cons2 (proc, arg1, args), SCM_ARG2, s_map);
{
while (SCM_NIMP (arg1))
{
- SCM_GASSERT2 (SCM_CONSP (arg1), g_map, proc, arg1, SCM_ARG2, s_map);
*pres = scm_cons (scm_apply (proc, SCM_CAR (arg1), scm_listofnull),
SCM_EOL);
pres = SCM_CDRLOC (*pres);
{
SCM *ve = &args; /* Keep args from being optimized away. */
long i, len;
- if SCM_NULLP (arg1)
- return SCM_UNSPECIFIED;
len = scm_ilength (arg1);
SCM_GASSERTn (len >= 0, g_for_each, scm_cons2 (proc, arg1, args),
SCM_ARG2, s_for_each);
{
while SCM_NIMP (arg1)
{
- SCM_GASSERT2 (SCM_CONSP (arg1),
- g_for_each, proc, arg1, SCM_ARG2, s_for_each);
scm_apply (proc, SCM_CAR (arg1), scm_listofnull);
arg1 = SCM_CDR (arg1);
}