add PIC_USE_LIBRARY flag

This commit is contained in:
Yuichi Nishiwaki
2017-04-03 22:09:19 +09:00
parent e273cba24d
commit 92bbf28621
8 changed files with 221 additions and 140 deletions
+1
View File
@@ -10,6 +10,7 @@
/** enable specific features */
/* #define PIC_USE_WRITE 1 */
/* #define PIC_USE_LIBRARY 1 */
/** essential external functions */
/* #define PIC_JMPBUF jmp_buf */
+2
View File
@@ -29,9 +29,11 @@ pic_value pic_fopen(pic_state *, FILE *, const char *mode);
* library
*/
#if PIC_USE_LIBRARY
void pic_deflibrary(pic_state *, const char *lib);
void pic_in_library(pic_state *, const char *lib);
void pic_export(pic_state *, int n, ...);
#endif
/* for debug */
+4
View File
@@ -16,6 +16,10 @@
# define PIC_USE_WRITE 1
#endif
#ifndef PIC_USE_LIBRARY
# define PIC_USE_LIBRARY 1
#endif
#ifndef PIC_JMPBUF
# include <setjmp.h>
# define PIC_JMPBUF jmp_buf