unify all headers into picrin.h
This commit is contained in:
parent
fa8226e581
commit
9b7eb2f996
|
@ -1,8 +1,4 @@
|
|||
#include "picrin.h"
|
||||
#include "picrin/data.h"
|
||||
#include "picrin/proc.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/cont.h"
|
||||
|
||||
struct pic_cont {
|
||||
jmp_buf jmp;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/port.h"
|
||||
#include "picrin/error.h"
|
||||
|
||||
PIC_NORETURN static void
|
||||
file_error(pic_state *pic, const char *msg)
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/port.h"
|
||||
#include "picrin/error.h"
|
||||
|
||||
void
|
||||
pic_load(pic_state *pic, const char *filename)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "picrin.h"
|
||||
#include "picrin/string.h"
|
||||
|
||||
void
|
||||
pic_str_set(pic_state *pic, pic_str *str, size_t i, char c)
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/string.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/cont.h"
|
||||
|
||||
static pic_value
|
||||
pic_system_cmdline(pic_state *pic)
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
forget to use the C++ extern "C" to get it to compile.
|
||||
*/
|
||||
#include "picrin.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/string.h"
|
||||
#include "picrin/port.h"
|
||||
|
||||
#if PIC_READLINE_INCLUDE_DIR_SUFFIX == readline
|
||||
#include <readline/readline.h>
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
#include "picrin.h"
|
||||
#include "picrin/data.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/string.h"
|
||||
#include "picrin/cont.h"
|
||||
|
||||
#include <regex.h>
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ When you use dynamic memory allocation inside C APIs, you must be caseful about
|
|||
/** foo.c **/
|
||||
#include <stdlib.h>
|
||||
#include "picrin.h"
|
||||
#include "picrin/data.h"
|
||||
|
||||
/*
|
||||
* C-side API
|
||||
|
|
|
@ -12,7 +12,6 @@ print <<EOL;
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/error.h"
|
||||
|
||||
EOL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "picrin.h"
|
||||
#include "picrin/dict.h"
|
||||
|
||||
struct pic_dict *
|
||||
pic_attr(pic_state *pic, pic_value obj)
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/blob.h"
|
||||
#include "picrin/pair.h"
|
||||
|
||||
struct pic_blob *
|
||||
pic_make_blob(pic_state *pic, size_t len)
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/vector.h"
|
||||
#include "picrin/blob.h"
|
||||
#include "picrin/string.h"
|
||||
|
||||
static bool
|
||||
str_equal_p(pic_state *pic, struct pic_string *str1, struct pic_string *str2)
|
||||
|
|
|
@ -3,13 +3,6 @@
|
|||
*/
|
||||
|
||||
#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
|
||||
# define OP_PUSHNONE OP_PUSHFALSE
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/proc.h"
|
||||
#include "picrin/cont.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/data.h"
|
||||
#include "picrin/error.h"
|
||||
|
||||
void
|
||||
pic_wind(pic_state *pic, struct pic_winder *here, struct pic_winder *there)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "picrin.h"
|
||||
#include "picrin/data.h"
|
||||
|
||||
struct pic_data *
|
||||
pic_data_alloc(pic_state *pic, const pic_data_type *type, void *userdata)
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/string.h"
|
||||
#include "picrin/error.h"
|
||||
#include "picrin/proc.h"
|
||||
|
||||
pic_str *
|
||||
pic_get_backtrace(pic_state *pic)
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
*/
|
||||
|
||||
#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 *
|
||||
pic_make_dict(pic_state *pic)
|
||||
|
|
|
@ -3,13 +3,6 @@
|
|||
*/
|
||||
|
||||
#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
|
||||
pic_panic(pic_state PIC_UNUSED(*pic), const char *msg)
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/macro.h"
|
||||
|
||||
pic_value
|
||||
pic_eval(pic_state *pic, pic_value program, struct pic_lib *lib)
|
||||
|
|
|
@ -3,23 +3,6 @@
|
|||
*/
|
||||
|
||||
#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 {
|
||||
struct {
|
||||
|
|
|
@ -246,11 +246,29 @@ pic_value pic_display(pic_state *, pic_value);
|
|||
pic_value pic_fdisplay(pic_state *, pic_value, xFILE *);
|
||||
|
||||
#if DEBUG
|
||||
# include "picrin/port.h"
|
||||
# define pic_debug(pic,obj) pic_fwrite(pic,obj,pic->xSTDERR->file)
|
||||
# define pic_fdebug(pic,obj,file) pic_fwrite(pic,obj,file)
|
||||
#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)
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "picrin/cont.h"
|
||||
|
||||
struct pic_error {
|
||||
PIC_OBJECT_HEADER
|
||||
pic_sym *type;
|
||||
|
|
|
@ -3,14 +3,6 @@
|
|||
*/
|
||||
|
||||
#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 *
|
||||
pic_open_library(pic_state *pic, pic_value name)
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/port.h"
|
||||
#include "picrin/error.h"
|
||||
|
||||
void
|
||||
pic_load_port(pic_state *pic, struct pic_port *port)
|
||||
|
|
|
@ -3,15 +3,6 @@
|
|||
*/
|
||||
|
||||
#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_add_rename(pic_state *pic, struct pic_senv *senv, pic_sym *sym)
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/string.h"
|
||||
#include "picrin/cont.h"
|
||||
#include "picrin/port.h"
|
||||
|
||||
#if ! PIC_ENABLE_FLOAT
|
||||
static pic_value
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/pair.h"
|
||||
|
||||
pic_value
|
||||
pic_cons(pic_state *pic, pic_value car, pic_value cdr)
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
*/
|
||||
|
||||
#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_eof_object()
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/proc.h"
|
||||
#include "picrin/irep.h"
|
||||
|
||||
struct pic_proc *
|
||||
pic_make_proc(pic_state *pic, pic_func_t func, const char *name)
|
||||
|
|
|
@ -3,15 +3,6 @@
|
|||
*/
|
||||
|
||||
#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_nullable(pic_state *pic, struct pic_port *port, int c);
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/record.h"
|
||||
#include "picrin/dict.h"
|
||||
|
||||
struct pic_record *
|
||||
pic_make_record(pic_state *pic, pic_value rectype)
|
||||
|
|
|
@ -3,16 +3,6 @@
|
|||
*/
|
||||
|
||||
#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
|
||||
pic_add_feature(pic_state *pic, const char *feature)
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/string.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/port.h"
|
||||
#include "picrin/error.h"
|
||||
|
||||
struct pic_chunk {
|
||||
char *str;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/symbol.h"
|
||||
#include "picrin/string.h"
|
||||
|
||||
pic_sym *
|
||||
pic_make_symbol(pic_state *pic, pic_str *str)
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/proc.h"
|
||||
|
||||
static pic_value
|
||||
var_lookup(pic_state *pic, pic_value var)
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/vector.h"
|
||||
#include "picrin/string.h"
|
||||
#include "picrin/pair.h"
|
||||
|
||||
struct pic_vector *
|
||||
pic_make_vec(pic_state *pic, size_t len)
|
||||
|
|
|
@ -3,19 +3,6 @@
|
|||
*/
|
||||
|
||||
#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)])
|
||||
|
||||
|
|
|
@ -3,15 +3,6 @@
|
|||
*/
|
||||
|
||||
#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
|
||||
is_tagged(pic_state *pic, pic_sym *tag, pic_value pair)
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
*/
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/pair.h"
|
||||
#include "picrin/error.h"
|
||||
|
||||
void pic_init_contrib(pic_state *);
|
||||
void pic_load_piclib(pic_state *);
|
||||
|
|
Loading…
Reference in New Issue