Added s48_list_{1,..,12}.

This commit is contained in:
mainzelm 2002-02-12 15:26:07 +00:00
parent 90445340fe
commit 4d8953162b
2 changed files with 182 additions and 0 deletions

View File

@ -937,6 +937,164 @@ s48_cons(s48_value v1, s48_value v2)
return obj;
}
s48_value
s48_list_1(s48_value v1)
{
return (s48_cons (v1, S48_NULL));
}
s48_value
s48_list_2(s48_value v1, s48_value v2)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_1 (v2);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_3(s48_value v1, s48_value v2, s48_value v3)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_2 (v2, v3);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_4(s48_value v1, s48_value v2, s48_value v3, s48_value v4)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_3 (v2, v3, v4);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_5(s48_value v1, s48_value v2, s48_value v3, s48_value v4, s48_value v5)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_4 (v2, v3, v4, v5);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_6(s48_value v1, s48_value v2, s48_value v3, s48_value v4, s48_value v5,
s48_value v6)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_5 (v2, v3, v4, v5, v6);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_7(s48_value v1, s48_value v2, s48_value v3, s48_value v4, s48_value v5,
s48_value v6, s48_value v7)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_6 (v2, v3, v4, v5, v6, v7);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_8(s48_value v1, s48_value v2, s48_value v3, s48_value v4, s48_value v5,
s48_value v6, s48_value v7, s48_value v8)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_7 (v2, v3, v4, v5, v6, v7, v8);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_9(s48_value v1, s48_value v2, s48_value v3, s48_value v4, s48_value v5,
s48_value v6, s48_value v7, s48_value v8, s48_value v9)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_8 (v2, v3, v4, v5, v6, v7, v8, v9);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_10(s48_value v1, s48_value v2, s48_value v3, s48_value v4, s48_value v5,
s48_value v6, s48_value v7, s48_value v8, s48_value v9, s48_value v10)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_9 (v2, v3, v4, v5, v6, v7, v8, v9, v10);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_11(s48_value v1, s48_value v2, s48_value v3, s48_value v4, s48_value v5,
s48_value v6, s48_value v7, s48_value v8, s48_value v9, s48_value v10,
s48_value v11)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_10 (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_list_12(s48_value v1, s48_value v2, s48_value v3, s48_value v4, s48_value v5,
s48_value v6, s48_value v7, s48_value v8, s48_value v9, s48_value v10,
s48_value v11, s48_value v12)
{
s48_value list = S48_UNSPECIFIC;
S48_DECLARE_GC_PROTECT(1);
S48_GC_PROTECT_1(v1);
list = s48_list_11 (v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);
list = s48_cons (v1, list);
S48_GC_UNPROTECT();
return list;
}
s48_value
s48_make_weak_pointer(s48_value value)
{

View File

@ -45,6 +45,30 @@ extern unsigned long s48_extract_unsigned_integer(s48_value);
extern s48_value s48_enter_double(double);
extern double s48_extract_double(s48_value);
extern s48_value s48_cons(s48_value, s48_value);
extern s48_value s48_list_1(s48_value);
extern s48_value s48_list_2(s48_value, s48_value);
extern s48_value s48_list_3(s48_value, s48_value, s48_value);
extern s48_value s48_list_4(s48_value, s48_value, s48_value, s48_value);
extern s48_value s48_list_5(s48_value, s48_value, s48_value, s48_value,
s48_value);
extern s48_value s48_list_6(s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value);
extern s48_value s48_list_7(s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value, s48_value);
extern s48_value s48_list_8(s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value, s48_value, s48_value);
extern s48_value s48_list_9(s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value, s48_value, s48_value,
s48_value);
extern s48_value s48_list_10(s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value);
extern s48_value s48_list_11(s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value, s48_value);
extern s48_value s48_list_12(s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value, s48_value, s48_value,
s48_value, s48_value, s48_value, s48_value);
extern s48_value s48_enter_string(char *);
extern char * s48_extract_string(s48_value);
extern s48_value s48_enter_substring(char *, int);