From 4483f8224aefc982a336dfff76611c1fee77e6c4 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 8 Sep 2014 19:38:19 +0900 Subject: [PATCH] flatten the library hierarchy (again) --- eval.c | 4 +--- file.c | 14 ++++++-------- load.c | 4 +--- system.c | 12 +++++------- time.c | 8 +++----- 5 files changed, 16 insertions(+), 26 deletions(-) diff --git a/eval.c b/eval.c index 5a037c94..d8712760 100644 --- a/eval.c +++ b/eval.c @@ -33,7 +33,5 @@ pic_eval_eval(pic_state *pic) void pic_init_eval(pic_state *pic) { - pic_deflibrary (pic, "(scheme eval)") { - pic_defun(pic, "eval", pic_eval_eval); - } + pic_defun(pic, "eval", pic_eval_eval); } diff --git a/file.c b/file.c index befac195..22dd76e9 100644 --- a/file.c +++ b/file.c @@ -108,12 +108,10 @@ pic_file_delete(pic_state *pic) void pic_init_file(pic_state *pic) { - pic_deflibrary (pic, "(scheme file)") { - pic_defun(pic, "open-input-file", pic_file_open_input_file); - pic_defun(pic, "open-input-binary-file", pic_file_open_input_binary_file); - pic_defun(pic, "open-output-file", pic_file_open_output_file); - pic_defun(pic, "open-output-binary-file", pic_file_open_output_binary_file); - pic_defun(pic, "file-exists?", pic_file_exists_p); - pic_defun(pic, "delete-file", pic_file_delete); - } + pic_defun(pic, "open-input-file", pic_file_open_input_file); + pic_defun(pic, "open-input-binary-file", pic_file_open_input_binary_file); + pic_defun(pic, "open-output-file", pic_file_open_output_file); + pic_defun(pic, "open-output-binary-file", pic_file_open_output_binary_file); + pic_defun(pic, "file-exists?", pic_file_exists_p); + pic_defun(pic, "delete-file", pic_file_delete); } diff --git a/load.c b/load.c index 6823764b..83deb212 100644 --- a/load.c +++ b/load.c @@ -73,7 +73,5 @@ pic_load_load(pic_state *pic) void pic_init_load(pic_state *pic) { - pic_deflibrary (pic, "(scheme load)") { - pic_defun(pic, "load", pic_load_load); - } + pic_defun(pic, "load", pic_load_load); } diff --git a/system.c b/system.c index 20203d27..e9096a2b 100644 --- a/system.c +++ b/system.c @@ -126,11 +126,9 @@ pic_system_getenvs(pic_state *pic) void pic_init_system(pic_state *pic) { - pic_deflibrary (pic, "(scheme process-context)") { - pic_defun(pic, "command-line", pic_system_cmdline); - pic_defun(pic, "exit", pic_system_exit); - pic_defun(pic, "emergency-exit", pic_system_emergency_exit); - pic_defun(pic, "get-environment-variable", pic_system_getenv); - pic_defun(pic, "get-environment-variables", pic_system_getenvs); - } + pic_defun(pic, "command-line", pic_system_cmdline); + pic_defun(pic, "exit", pic_system_exit); + pic_defun(pic, "emergency-exit", pic_system_emergency_exit); + pic_defun(pic, "get-environment-variable", pic_system_getenv); + pic_defun(pic, "get-environment-variables", pic_system_getenvs); } diff --git a/time.c b/time.c index 8e42dc8e..43d770b3 100644 --- a/time.c +++ b/time.c @@ -41,9 +41,7 @@ pic_jiffies_per_second(pic_state *pic) void pic_init_time(pic_state *pic) { - pic_deflibrary (pic, "(scheme time)") { - pic_defun(pic, "current-second", pic_current_second); - pic_defun(pic, "current-jiffy", pic_current_jiffy); - pic_defun(pic, "jiffies-per-second", pic_jiffies_per_second); - } + pic_defun(pic, "current-second", pic_current_second); + pic_defun(pic, "current-jiffy", pic_current_jiffy); + pic_defun(pic, "jiffies-per-second", pic_jiffies_per_second); }