*** empty log message ***
[bpt/guile.git] / libguile / ramap.c
index 500611b..6794391 100644 (file)
@@ -515,7 +515,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore)
                if ((base + n) % SCM_LONG_BIT) /* trailing partial word */
                  ve[i] &= (~0L << ((base + n) % SCM_LONG_BIT));
              }
-           else if (SCM_TRUE_P (fill))
+           else if (SCM_EQ_P (fill, SCM_BOOL_T))
              {
                if (base % SCM_LONG_BIT)
                  ve[i++] |= ~0L << (base % SCM_LONG_BIT);
@@ -532,7 +532,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore)
            if (SCM_FALSEP (fill))
              for (i = base; n--; i += inc)
                ve[i / SCM_LONG_BIT] &= ~(1L << (i % SCM_LONG_BIT));
-           else if (SCM_TRUE_P (fill))
+           else if (SCM_EQ_P (fill, SCM_BOOL_T))
              for (i = base; n--; i += inc)
                ve[i / SCM_LONG_BIT] |= (1L << (i % SCM_LONG_BIT));
            else
@@ -543,7 +543,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore)
     case scm_tc7_uvect:
       { /* scope */
        unsigned long f = SCM_NUM2ULONG (2,fill);
-       unsigned long *ve = (long *) SCM_VELTS (ra);
+       unsigned long *ve = (unsigned long *) SCM_VELTS (ra);
 
        for (i = base; n--; i += inc)
          ve[i] = f;
@@ -808,19 +808,12 @@ racp (SCM src, SCM dst)
 }
 
 
-#if (SCM_DEBUG_DEPRECATED == 0)
-
-/* This name is obsolete.  Will go away in release 1.5.  */
-SCM_REGISTER_PROC(s_serial_array_copy_x, "serial-array-copy!", 2, 0, 0, scm_array_copy_x);
-
-#endif  /* SCM_DEBUG_DEPRECATED == 0 */
-
-
 SCM_REGISTER_PROC(s_array_copy_in_order_x, "array-copy-in-order!", 2, 0, 0, scm_array_copy_x);
 
 
 SCM_DEFINE (scm_array_copy_x, "array-copy!", 2, 0, 0,
            (SCM src, SCM dst),
+           "@deffnx primitive array-copy-in-order! src dst\n"
            "Copies every element from vector or array @var{source} to the\n"
            "corresponding element of @var{destination}.  @var{destination} must have\n"
            "the same rank as @var{source}, and be at least as large in each\n"
@@ -1498,19 +1491,12 @@ ramap_a (SCM ra0,SCM proc,SCM ras)
 }
 
 
-#if (SCM_DEBUG_DEPRECATED == 0)
-
-/* This name is obsolete.  Will go away in release 1.5.  */
-SCM_REGISTER_PROC(s_serial_array_map_x, "serial-array-map!", 2, 0, 1, scm_array_map_x);
-
-#endif  /* SCM_DEBUG_DEPRECATED == 0 */
-
-
 SCM_REGISTER_PROC(s_array_map_in_order_x, "array-map-in-order!", 2, 0, 1, scm_array_map_x);
 
 
 SCM_DEFINE (scm_array_map_x, "array-map!", 2, 0, 1,
            (SCM ra0, SCM proc, SCM lra),
+           "@deffnx primitive array-map-in-order! ra0 proc . lra\n"
            "@var{array1}, @dots{} must have the same number of dimensions as\n"
            "@var{array0} and have a range for each index which includes the range\n"
            "for the corresponding index in @var{array0}.  @var{proc} is applied to\n"
@@ -1520,6 +1506,7 @@ SCM_DEFINE (scm_array_map_x, "array-map!", 2, 0, 1,
 #define FUNC_NAME s_scm_array_map_x
 {
   SCM_VALIDATE_PROC (2,proc);
+  SCM_VALIDATE_REST_ARGUMENT (lra);
   switch (SCM_TYP7 (proc))
     {
     default:
@@ -1666,6 +1653,7 @@ SCM_DEFINE (scm_array_for_each, "array-for-each", 2, 0, 1,
 #define FUNC_NAME s_scm_array_for_each
 {
   SCM_VALIDATE_PROC (1,proc);
+  SCM_VALIDATE_REST_ARGUMENT (lra);
   scm_ramapc (rafe, proc, ra0, lra, FUNC_NAME);
   return SCM_UNSPECIFIED;
 }