Move code

This commit is contained in:
Lassi Kortela 2020-02-13 23:51:51 +02:00
parent 1e0cb9d68a
commit cbbf3e4be1
3 changed files with 26 additions and 24 deletions

24
c/env.c
View File

@ -12,6 +12,30 @@
#include "scheme.h"
value_t envst_language(void)
{
struct accum acc = ACCUM_EMPTY;
accum_elt(&acc, symbol("language"));
accum_name_value(&acc, "implementation-name",
string_from_cstr("Up Scheme"));
accum_name_value(&acc, "implementation-version",
string_from_cstr("0.1.0"));
return acc.list;
}
value_t envst_language_c(void)
{
struct accum acc = ACCUM_EMPTY;
accum_elt(&acc, symbol("language"));
accum_name_value(&acc, "implementation-name",
string_from_cstr(SCHEME_C_COMPILER_NAME));
accum_name_value(&acc, "implementation-version",
string_from_cstr(SCHEME_C_COMPILER_VERSION));
return acc.list;
}
static value_t get_features_list(void)
{
static struct accum acc;

View File

@ -32,30 +32,6 @@ static const struct utsname *get_global_uname(void)
const char *env_get_os_name(void) { return get_global_uname()->sysname; }
static value_t envst_language(void)
{
struct accum acc = ACCUM_EMPTY;
accum_elt(&acc, symbol("language"));
accum_name_value(&acc, "implementation-name",
string_from_cstr("Up Scheme"));
accum_name_value(&acc, "implementation-version",
string_from_cstr("0.1.0"));
return acc.list;
}
static value_t envst_language_c(void)
{
struct accum acc = ACCUM_EMPTY;
accum_elt(&acc, symbol("language"));
accum_name_value(&acc, "implementation-name",
string_from_cstr(SCHEME_C_COMPILER_NAME));
accum_name_value(&acc, "implementation-version",
string_from_cstr(SCHEME_C_COMPILER_VERSION));
return acc.list;
}
static value_t envst_os(void)
{
struct accum acc = ACCUM_EMPTY;

View File

@ -1005,6 +1005,8 @@ const char *env_get_os_name(void);
// env.c
value_t envst_language(void);
value_t envst_language_c(void);
value_t get_version_alist(void);
value_t builtin_features(value_t *args, uint32_t nargs);
value_t builtin_version_alist(value_t *args, uint32_t nargs);