import repl libraries by default

This commit is contained in:
Yuichi Nishiwaki 2014-01-08 15:38:47 +09:00
parent dccc234fd9
commit fbffa4697a
1 changed files with 18 additions and 0 deletions

View File

@ -29,6 +29,20 @@ print_help(void)
puts(help);
}
void
import_repllib(pic_state *pic)
{
int ai = pic_gc_arena_preserve(pic);
pic_import(pic, pic_parse(pic, "(scheme base)"));
#if DEBUG
puts("* imported repl libraries");
#endif
pic_gc_arena_restore(pic, ai);
}
int exit_status;
void
@ -273,6 +287,10 @@ main(int argc, char *argv[], char **envp)
parse_opt(argc, argv);
if (mode == INTERACTIVE_MODE || mode == ONE_LINER_MODE) {
import_repllib(pic);
}
switch (mode) {
case NO_MODE:
puts("logic flaw");