* init.c (scm_boot_guile): Don't return the value of
[bpt/guile.git] / libguile / pairs.h
index bac63ae..ec074f7 100644 (file)
@@ -89,7 +89,6 @@ typedef SCM  huge *SCMPTR;
 #define SCM_PTR_LE(x, y) (!SCM_PTR_GT(x, y))
 #define SCM_PTR_GE(x, y) (!SCM_PTR_LT(x, y))
 
-#define SCM_EOL                SCM_BOOL_F
 #define SCM_NULLP(x)           (SCM_EOL == (x))
 #define SCM_NNULLP(x)          (SCM_EOL != (x))
 
@@ -102,8 +101,16 @@ typedef SCM  huge *SCMPTR;
 #define SCM_CAR(x) (((scm_cell *)(SCM2PTR(x)))->car)
 #define SCM_CDR(x) (((scm_cell *)(SCM2PTR(x)))->cdr)
 #define SCM_GCCDR(x) (~1L & SCM_CDR(x))
-#define SCM_SETCDR(x, v) SCM_CDR(x) = (SCM)(v)
-#define SCM_SETCAR(x, v) SCM_CAR(x) = (SCM)(v)
+#define SCM_SETCAR(x, v) (SCM_CAR(x) = (SCM)(v))
+#define SCM_SETCDR(x, v) (SCM_CDR(x) = (SCM)(v))
+
+#define SCM_CARLOC(x) (&SCM_CAR (x))
+#define SCM_CDRLOC(x) (&SCM_CDR (x))
+
+#define SCM_SETAND_CAR(x, y) (SCM_CAR (x) &= (y))
+#define SCM_SETAND_CDR(x, y) (SCM_CDR (x) &= (y))
+#define SCM_SETOR_CAR(x, y)  (SCM_CAR (x) |= (y))
+#define SCM_SETOR_CDR(x, y)  (SCM_CDR (x) |= (y))
 
 #define SCM_CAAR(OBJ)          SCM_CAR (SCM_CAR (OBJ))
 #define SCM_CDAR(OBJ)          SCM_CDR (SCM_CAR (OBJ))
@@ -137,6 +144,9 @@ typedef SCM  huge *SCMPTR;
 #define SCM_CDDDDR(OBJ)                SCM_CDR (SCM_CDR (SCM_CDR (SCM_CDR (OBJ))))
 
 
+#ifdef DEBUG_FREELIST
+#define SCM_NEWCELL(_into) (scm_debug_newcell (&_into))
+#else
 #define SCM_NEWCELL(_into) \
        { \
          if (SCM_IMP(scm_freelist)) \
@@ -148,23 +158,15 @@ typedef SCM  huge *SCMPTR;
               ++scm_cells_allocated; \
            } \
        }
+#endif
 
 \f
-#ifdef __STDC__
-extern SCM scm_cons (SCM x, SCM y);
-extern SCM scm_cons2 (SCM w, SCM x, SCM y);
-extern SCM scm_pair_p(SCM x);
-extern SCM scm_set_car_x(SCM pair, SCM value);
-extern SCM scm_set_cdr_x(SCM pair, SCM value);
-extern void scm_init_pairs (void);
-
-#else /* STDC */
-extern SCM scm_cons ();
-extern SCM scm_cons2 ();
-extern SCM scm_pair_p();
-extern SCM scm_set_car_x();
-extern SCM scm_set_cdr_x();
-extern void scm_init_pairs ();
-
-#endif /* STDC */
+
+extern SCM scm_cons SCM_P ((SCM x, SCM y));
+extern SCM scm_cons2 SCM_P ((SCM w, SCM x, SCM y));
+extern SCM scm_pair_p SCM_P ((SCM x));
+extern SCM scm_set_car_x SCM_P ((SCM pair, SCM value));
+extern SCM scm_set_cdr_x SCM_P ((SCM pair, SCM value));
+extern void scm_init_pairs SCM_P ((void));
+
 #endif  /* PAIRSH */