remove unused api

This commit is contained in:
Yuichi Nishiwaki 2017-04-09 23:44:32 +09:00
parent 01c817799b
commit 972e9eecc1
3 changed files with 5 additions and 29 deletions

View File

@ -752,25 +752,6 @@ pic_read(pic_state *pic, pic_value port)
return pic_protect(pic, val);
}
pic_value
pic_read_cstr(pic_state *pic, const char *str)
{
pic_value port = pic_fmemopen(pic, str, strlen(str), "r");
pic_value form, e;
pic_try {
form = pic_read(pic, port);
}
pic_catch(e) {
pic_fclose(pic, port);
pic_raise(pic, e);
}
pic_fclose(pic, port);
return form;
}
static pic_value
pic_read_read(pic_state *pic)
{

View File

@ -194,7 +194,6 @@ bool pic_dict_next(pic_state *, pic_value dict, int *iter, pic_value *key, pic_v
* ephemeron table
*/
bool pic_weak_p(pic_state *, pic_value);
pic_value pic_make_weak(pic_state *);
pic_value pic_weak_ref(pic_state *, pic_value weak, pic_value key);
void pic_weak_set(pic_state *, pic_value weak, pic_value key, pic_value val);
@ -261,16 +260,17 @@ typedef struct {
bool pic_eof_p(pic_state *, pic_value);
pic_value pic_eof_object(pic_state *);
bool pic_port_p(pic_state *, pic_value, const pic_port_type *type);
/* basic methods */
pic_value pic_funopen(pic_state *, void *cookie, const pic_port_type *type);
size_t pic_fread(pic_state *, void *ptr, size_t size, size_t count, pic_value port);
size_t pic_fwrite(pic_state *, const void *ptr, size_t size, size_t count, pic_value port);
long pic_fseek(pic_state *, pic_value port, long offset, int whence);
int pic_fclose(pic_state *, pic_value port);
/* error */
/* error handling */
void pic_clearerr(pic_state *, pic_value port);
int pic_feof(pic_state *, pic_value port);
int pic_ferror(pic_state *, pic_value port);
/* basic I/O */
/* character I/O */
int pic_fputc(pic_state *, int c, pic_value port);
int pic_fgetc(pic_state *, pic_value port);
int pic_fputs(pic_state *, const char *s, pic_value port);

View File

@ -12,19 +12,14 @@ extern "C" {
#if PIC_USE_LIBC
void *pic_default_allocf(void *, void *, size_t);
#endif
pic_value pic_read(pic_state *, pic_value port);
pic_value pic_read_cstr(pic_state *, const char *);
#if PIC_USE_STDIO
pic_value pic_fopen(pic_state *, FILE *, const char *mode);
#endif
pic_value pic_read(pic_state *, pic_value port);
pic_value pic_load(pic_state *, pic_value irep);
void pic_load_native(pic_state *pic, const char *);
/*
* library
*/