add libraries function
This commit is contained in:
parent
474a625349
commit
7653cb4bb1
18
src/init.c
18
src/init.c
|
@ -24,6 +24,20 @@ pic_features(pic_state *pic)
|
|||
return features;
|
||||
}
|
||||
|
||||
static pic_value
|
||||
pic_libraries(pic_state *pic)
|
||||
{
|
||||
pic_value libs = pic_nil_value(), lib;
|
||||
|
||||
pic_get_args(pic, "");
|
||||
|
||||
pic_for_each (lib, pic->libs) {
|
||||
libs = pic_cons(pic, pic_car(pic, lib), libs);
|
||||
}
|
||||
|
||||
return libs;
|
||||
}
|
||||
|
||||
void pic_init_bool(pic_state *);
|
||||
void pic_init_pair(pic_state *);
|
||||
void pic_init_port(pic_state *);
|
||||
|
@ -96,10 +110,12 @@ pic_init_core(pic_state *pic)
|
|||
pic_init_lib(pic); DONE;
|
||||
|
||||
pic_load_piclib(pic); DONE;
|
||||
|
||||
pic_init_contrib(pic); DONE;
|
||||
|
||||
pic_defun(pic, "features", pic_features);
|
||||
}
|
||||
|
||||
pic_deflibrary (pic, "(picrin library)") {
|
||||
pic_defun(pic, "libraries", pic_libraries);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue