X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/0f2d19dd46f83f41177f61d585732b32a866d613..9dcf6a02943b4900ad8f8dff3286f8f84d4732ab:/libguile/pairs.c diff --git a/libguile/pairs.c b/libguile/pairs.c index 26cd3da1f..619529e64 100644 --- a/libguile/pairs.c +++ b/libguile/pairs.c @@ -42,104 +42,75 @@ #include #include "_scm.h" -#ifdef __STDC__ -#include -#define var_start(x, y) va_start(x, y) -#else -#include -#define var_start(x, y) va_start(x) -#endif - - /* {Pairs} */ SCM_PROC(s_cons, "cons", 2, 0, 0, scm_cons); -#ifdef __STDC__ -SCM -scm_cons (SCM x, SCM y) -#else + SCM scm_cons (x, y) SCM x; SCM y; -#endif { register SCM z; SCM_NEWCELL (z); - SCM_CAR (z) = x; - SCM_CDR (z) = y; + SCM_SETCAR (z, x); + SCM_SETCDR (z, y); return z; } -#ifdef __STDC__ -SCM -scm_cons2 (SCM w, SCM x, SCM y) -#else + SCM scm_cons2 (w, x, y) SCM w; SCM x; SCM y; -#endif { register SCM z; SCM_NEWCELL (z); - SCM_CAR (z) = x; - SCM_CDR (z) = y; + SCM_SETCAR (z, x); + SCM_SETCDR (z, y); x = z; SCM_NEWCELL (z); - SCM_CAR (z) = w; - SCM_CDR (z) = x; + SCM_SETCAR (z, w); + SCM_SETCDR (z, x); return z; } SCM_PROC(s_pair_p, "pair?", 1, 0, 0, scm_pair_p); -#ifdef __STDC__ -SCM -scm_pair_p(SCM x) -#else + SCM scm_pair_p(x) SCM x; -#endif { if SCM_IMP(x) return SCM_BOOL_F; return SCM_CONSP(x) ? SCM_BOOL_T : SCM_BOOL_F; } SCM_PROC(s_set_car_x, "set-car!", 2, 0, 0, scm_set_car_x); -#ifdef __STDC__ -SCM -scm_set_car_x(SCM pair, SCM value) -#else + SCM scm_set_car_x(pair, value) SCM pair; SCM value; -#endif { SCM_ASSERT(SCM_NIMP(pair) && SCM_CONSP(pair), pair, SCM_ARG1, s_set_car_x); - SCM_CAR(pair) = value; + SCM_SETCAR (pair, value); return value; } SCM_PROC(s_set_cdr_x, "set-cdr!", 2, 0, 0, scm_set_cdr_x); -#ifdef __STDC__ -SCM -scm_set_cdr_x(SCM pair, SCM value) -#else + SCM scm_set_cdr_x(pair, value) SCM pair; SCM value; -#endif { SCM_ASSERT(SCM_NIMP(pair) && SCM_CONSP(pair), pair, SCM_ARG1, s_set_cdr_x); - SCM_CDR(pair) = value; + SCM_SETCDR (pair, value); return value; } @@ -182,13 +153,9 @@ static scm_iproc cxrs[] = }; -#ifdef __STDC__ -void -scm_init_pairs (void) -#else + void scm_init_pairs () -#endif { scm_init_iprocs(cxrs, scm_tc7_cxr); #include "pairs.x"