unify all headers into picrin.h

This commit is contained in:
Yuichi Nishiwaki 2015-05-28 23:57:10 +09:00
parent fa8226e581
commit 9b7eb2f996
39 changed files with 19 additions and 165 deletions

View File

@ -1,8 +1,4 @@
#include "picrin.h" #include "picrin.h"
#include "picrin/data.h"
#include "picrin/proc.h"
#include "picrin/pair.h"
#include "picrin/cont.h"
struct pic_cont { struct pic_cont {
jmp_buf jmp; jmp_buf jmp;

View File

@ -3,8 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/port.h"
#include "picrin/error.h"
PIC_NORETURN static void PIC_NORETURN static void
file_error(pic_state *pic, const char *msg) file_error(pic_state *pic, const char *msg)

View File

@ -3,9 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/port.h"
#include "picrin/error.h"
void void
pic_load(pic_state *pic, const char *filename) pic_load(pic_state *pic, const char *filename)

View File

@ -1,5 +1,4 @@
#include "picrin.h" #include "picrin.h"
#include "picrin/string.h"
void void
pic_str_set(pic_state *pic, pic_str *str, size_t i, char c) pic_str_set(pic_state *pic, pic_str *str, size_t i, char c)

View File

@ -5,9 +5,6 @@
#include <stdlib.h> #include <stdlib.h>
#include "picrin.h" #include "picrin.h"
#include "picrin/string.h"
#include "picrin/pair.h"
#include "picrin/cont.h"
static pic_value static pic_value
pic_system_cmdline(pic_state *pic) pic_system_cmdline(pic_state *pic)

View File

@ -6,9 +6,6 @@
forget to use the C++ extern "C" to get it to compile. forget to use the C++ extern "C" to get it to compile.
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/string.h"
#include "picrin/port.h"
#if PIC_READLINE_INCLUDE_DIR_SUFFIX == readline #if PIC_READLINE_INCLUDE_DIR_SUFFIX == readline
#include <readline/readline.h> #include <readline/readline.h>

View File

@ -1,8 +1,4 @@
#include "picrin.h" #include "picrin.h"
#include "picrin/data.h"
#include "picrin/pair.h"
#include "picrin/string.h"
#include "picrin/cont.h"
#include <regex.h> #include <regex.h>

View File

@ -51,7 +51,6 @@ When you use dynamic memory allocation inside C APIs, you must be caseful about
/** foo.c **/ /** foo.c **/
#include <stdlib.h> #include <stdlib.h>
#include "picrin.h" #include "picrin.h"
#include "picrin/data.h"
/* /*
* C-side API * C-side API

View File

@ -12,7 +12,6 @@ print <<EOL;
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/error.h"
EOL EOL

View File

@ -1,5 +1,4 @@
#include "picrin.h" #include "picrin.h"
#include "picrin/dict.h"
struct pic_dict * struct pic_dict *
pic_attr(pic_state *pic, pic_value obj) pic_attr(pic_state *pic, pic_value obj)

View File

@ -3,8 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/blob.h"
#include "picrin/pair.h"
struct pic_blob * struct pic_blob *
pic_make_blob(pic_state *pic, size_t len) pic_make_blob(pic_state *pic, size_t len)

View File

@ -3,10 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/vector.h"
#include "picrin/blob.h"
#include "picrin/string.h"
static bool static bool
str_equal_p(pic_state *pic, struct pic_string *str1, struct pic_string *str2) str_equal_p(pic_state *pic, struct pic_string *str1, struct pic_string *str2)

View File

@ -3,13 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/irep.h"
#include "picrin/proc.h"
#include "picrin/lib.h"
#include "picrin/macro.h"
#include "picrin/dict.h"
#include "picrin/symbol.h"
#if PIC_NONE_IS_FALSE #if PIC_NONE_IS_FALSE
# define OP_PUSHNONE OP_PUSHFALSE # define OP_PUSHNONE OP_PUSHFALSE

View File

@ -3,11 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/proc.h"
#include "picrin/cont.h"
#include "picrin/pair.h"
#include "picrin/data.h"
#include "picrin/error.h"
void void
pic_wind(pic_state *pic, struct pic_winder *here, struct pic_winder *there) pic_wind(pic_state *pic, struct pic_winder *here, struct pic_winder *there)

View File

@ -1,5 +1,4 @@
#include "picrin.h" #include "picrin.h"
#include "picrin/data.h"
struct pic_data * struct pic_data *
pic_data_alloc(pic_state *pic, const pic_data_type *type, void *userdata) pic_data_alloc(pic_state *pic, const pic_data_type *type, void *userdata)

View File

@ -3,9 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/string.h"
#include "picrin/error.h"
#include "picrin/proc.h"
pic_str * pic_str *
pic_get_backtrace(pic_state *pic) pic_get_backtrace(pic_state *pic)

View File

@ -3,11 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/dict.h"
#include "picrin/cont.h"
#include "picrin/pair.h"
#include "picrin/error.h"
#include "picrin/symbol.h"
struct pic_dict * struct pic_dict *
pic_make_dict(pic_state *pic) pic_make_dict(pic_state *pic)

View File

@ -3,13 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/proc.h"
#include "picrin/cont.h"
#include "picrin/data.h"
#include "picrin/string.h"
#include "picrin/error.h"
#include "picrin/port.h"
void void
pic_panic(pic_state PIC_UNUSED(*pic), const char *msg) pic_panic(pic_state PIC_UNUSED(*pic), const char *msg)

View File

@ -3,7 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/macro.h"
pic_value pic_value
pic_eval(pic_state *pic, pic_value program, struct pic_lib *lib) pic_eval(pic_state *pic, pic_value program, struct pic_lib *lib)

View File

@ -3,23 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/gc.h"
#include "picrin/pair.h"
#include "picrin/string.h"
#include "picrin/vector.h"
#include "picrin/irep.h"
#include "picrin/proc.h"
#include "picrin/port.h"
#include "picrin/blob.h"
#include "picrin/cont.h"
#include "picrin/error.h"
#include "picrin/macro.h"
#include "picrin/lib.h"
#include "picrin/data.h"
#include "picrin/dict.h"
#include "picrin/record.h"
#include "picrin/read.h"
#include "picrin/symbol.h"
union header { union header {
struct { struct {

View File

@ -246,11 +246,29 @@ pic_value pic_display(pic_state *, pic_value);
pic_value pic_fdisplay(pic_state *, pic_value, xFILE *); pic_value pic_fdisplay(pic_state *, pic_value, xFILE *);
#if DEBUG #if DEBUG
# include "picrin/port.h"
# define pic_debug(pic,obj) pic_fwrite(pic,obj,pic->xSTDERR->file) # define pic_debug(pic,obj) pic_fwrite(pic,obj,pic->xSTDERR->file)
# define pic_fdebug(pic,obj,file) pic_fwrite(pic,obj,file) # define pic_fdebug(pic,obj,file) pic_fwrite(pic,obj,file)
#endif #endif
#include "picrin/blob.h"
#include "picrin/cont.h"
#include "picrin/data.h"
#include "picrin/dict.h"
#include "picrin/error.h"
#include "picrin/gc.h"
#include "picrin/irep.h"
#include "picrin/lib.h"
#include "picrin/macro.h"
#include "picrin/pair.h"
#include "picrin/port.h"
#include "picrin/proc.h"
#include "picrin/read.h"
#include "picrin/record.h"
#include "picrin/string.h"
#include "picrin/symbol.h"
#include "picrin/read.h"
#include "picrin/vector.h"
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif

View File

@ -9,8 +9,6 @@
extern "C" { extern "C" {
#endif #endif
#include "picrin/cont.h"
struct pic_error { struct pic_error {
PIC_OBJECT_HEADER PIC_OBJECT_HEADER
pic_sym *type; pic_sym *type;

View File

@ -3,14 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/lib.h"
#include "picrin/pair.h"
#include "picrin/macro.h"
#include "picrin/error.h"
#include "picrin/string.h"
#include "picrin/proc.h"
#include "picrin/dict.h"
#include "picrin/symbol.h"
struct pic_lib * struct pic_lib *
pic_open_library(pic_state *pic, pic_value name) pic_open_library(pic_state *pic, pic_value name)

View File

@ -3,8 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/port.h"
#include "picrin/error.h"
void void
pic_load_port(pic_state *pic, struct pic_port *port) pic_load_port(pic_state *pic, struct pic_port *port)

View File

@ -3,15 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/string.h"
#include "picrin/proc.h"
#include "picrin/macro.h"
#include "picrin/lib.h"
#include "picrin/error.h"
#include "picrin/dict.h"
#include "picrin/cont.h"
#include "picrin/symbol.h"
pic_sym * pic_sym *
pic_add_rename(pic_state *pic, struct pic_senv *senv, pic_sym *sym) pic_add_rename(pic_state *pic, struct pic_senv *senv, pic_sym *sym)

View File

@ -3,9 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/string.h"
#include "picrin/cont.h"
#include "picrin/port.h"
#if ! PIC_ENABLE_FLOAT #if ! PIC_ENABLE_FLOAT
static pic_value static pic_value

View File

@ -3,7 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
pic_value pic_value
pic_cons(pic_state *pic, pic_value car, pic_value cdr) pic_cons(pic_state *pic, pic_value car, pic_value cdr)

View File

@ -3,11 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/proc.h"
#include "picrin/port.h"
#include "picrin/string.h"
#include "picrin/blob.h"
#include "picrin/error.h"
pic_value pic_value
pic_eof_object() pic_eof_object()

View File

@ -3,9 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/proc.h"
#include "picrin/irep.h"
struct pic_proc * struct pic_proc *
pic_make_proc(pic_state *pic, pic_func_t func, const char *name) pic_make_proc(pic_state *pic, pic_func_t func, const char *name)

View File

@ -3,15 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/read.h"
#include "picrin/error.h"
#include "picrin/pair.h"
#include "picrin/string.h"
#include "picrin/vector.h"
#include "picrin/blob.h"
#include "picrin/port.h"
#include "picrin/proc.h"
#include "picrin/symbol.h"
static pic_value read(pic_state *pic, struct pic_port *port, int c); static pic_value read(pic_state *pic, struct pic_port *port, int c);
static pic_value read_nullable(pic_state *pic, struct pic_port *port, int c); static pic_value read_nullable(pic_state *pic, struct pic_port *port, int c);

View File

@ -3,8 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/record.h"
#include "picrin/dict.h"
struct pic_record * struct pic_record *
pic_make_record(pic_state *pic, pic_value rectype) pic_make_record(pic_state *pic, pic_value rectype)

View File

@ -3,16 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/gc.h"
#include "picrin/read.h"
#include "picrin/proc.h"
#include "picrin/macro.h"
#include "picrin/cont.h"
#include "picrin/port.h"
#include "picrin/error.h"
#include "picrin/dict.h"
#include "picrin/pair.h"
#include "picrin/lib.h"
void void
pic_add_feature(pic_state *pic, const char *feature) pic_add_feature(pic_state *pic, const char *feature)

View File

@ -3,10 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/string.h"
#include "picrin/pair.h"
#include "picrin/port.h"
#include "picrin/error.h"
struct pic_chunk { struct pic_chunk {
char *str; char *str;

View File

@ -3,8 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/symbol.h"
#include "picrin/string.h"
pic_sym * pic_sym *
pic_make_symbol(pic_state *pic, pic_str *str) pic_make_symbol(pic_state *pic, pic_str *str)

View File

@ -3,8 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/proc.h"
static pic_value static pic_value
var_lookup(pic_state *pic, pic_value var) var_lookup(pic_state *pic, pic_value var)

View File

@ -3,9 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/vector.h"
#include "picrin/string.h"
#include "picrin/pair.h"
struct pic_vector * struct pic_vector *
pic_make_vec(pic_state *pic, size_t len) pic_make_vec(pic_state *pic, size_t len)

View File

@ -3,19 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/string.h"
#include "picrin/vector.h"
#include "picrin/proc.h"
#include "picrin/port.h"
#include "picrin/irep.h"
#include "picrin/blob.h"
#include "picrin/lib.h"
#include "picrin/macro.h"
#include "picrin/error.h"
#include "picrin/dict.h"
#include "picrin/record.h"
#include "picrin/symbol.h"
#define GET_OPERAND(pic,n) ((pic)->ci->fp[(n)]) #define GET_OPERAND(pic,n) ((pic)->ci->fp[(n)])

View File

@ -3,15 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/port.h"
#include "picrin/pair.h"
#include "picrin/string.h"
#include "picrin/vector.h"
#include "picrin/blob.h"
#include "picrin/dict.h"
#include "picrin/record.h"
#include "picrin/proc.h"
#include "picrin/symbol.h"
static bool static bool
is_tagged(pic_state *pic, pic_sym *tag, pic_value pair) is_tagged(pic_state *pic, pic_sym *tag, pic_value pair)

View File

@ -3,8 +3,6 @@
*/ */
#include "picrin.h" #include "picrin.h"
#include "picrin/pair.h"
#include "picrin/error.h"
void pic_init_contrib(pic_state *); void pic_init_contrib(pic_state *);
void pic_load_piclib(pic_state *); void pic_load_piclib(pic_state *);