Exemplo n.º 1
0
   SLANG_END_ICONST_TABLE
};

#define DUMMY_ONIG_TYPE 0
#define O DUMMY_ONIG_TYPE
#define I SLANG_INT_TYPE
#define V SLANG_VOID_TYPE
#define S SLANG_STRING_TYPE
static SLang_Intrin_Fun_Type Onig_Intrinsics [] =
{
   MAKE_INTRINSIC_0("onig_version", do_onig_version, S),
   MAKE_INTRINSIC_0("onig_new", do_onig_new, V),
   MAKE_INTRINSIC_0("onig_search", do_onig_search, I),
   MAKE_INTRINSIC_2("onig_nth_match", nth_match, V, O, I),
   MAKE_INTRINSIC_3("onig_nth_substr", nth_substr, V, O, S, I),
   MAKE_INTRINSIC_0("onig_set_warn_func", set_warn_func, V),
   MAKE_INTRINSIC_0("onig_set_verb_warn_func", set_verb_warn_func, V),
   MAKE_INTRINSIC_0("onig_get_encodings", get_encodings, V),
   MAKE_INTRINSIC_0("onig_get_syntaxes", get_syntaxes, V),
   /* MAKE_INTRINSIC_1("slang_to_pcre", slang_to_pcre, V, S), */
   SLANG_END_INTRIN_FUN_TABLE
};
#undef V
#undef S
#undef I
#undef O

static void destroy_onig (SLtype type, VOID_STAR f)
{
   (void) type;
Exemplo n.º 2
0
static void setsockopt_intrin (void)
{
   getset_sockopt (1);
}
static void getsockopt_intrin (void)
{
   getset_sockopt (0);
}

#define I SLANG_INT_TYPE
#define V SLANG_VOID_TYPE
#define F SLANG_FILE_FD_TYPE
static SLang_Intrin_Fun_Type Module_Intrinsics [] =
{
   MAKE_INTRINSIC_3("socket", socket_intrin, V, I, I, I),
#ifdef HAVE_SOCKETPAIR
   MAKE_INTRINSIC_3("socketpair", socketpair_intrin, V, I, I, I),
#endif
   MAKE_INTRINSIC_0("connect", connect_intrin, V),
   MAKE_INTRINSIC_0("bind", bind_intrin, V),
   MAKE_INTRINSIC_2("listen", listen_intrin, V, F, I),
   MAKE_INTRINSIC_0("accept", accept_intrin, V),
   MAKE_INTRINSIC_0("getsockopt", getsockopt_intrin, V),
   MAKE_INTRINSIC_0("setsockopt", setsockopt_intrin, V),
   SLANG_END_INTRIN_FUN_TABLE
};
#undef F
#undef V
#undef I
#define DUMMY_TERMIOS_TYPE ((unsigned int)-1)
#define T DUMMY_TERMIOS_TYPE
#define F SLANG_FILE_FD_TYPE
#define I SLANG_INT_TYPE
#define V SLANG_VOID_TYPE
#define U SLANG_UINT_TYPE
static SLang_Intrin_Fun_Type Termios_Intrinsics [] =
{
    MAKE_INTRINSIC_1("tcdrain", tcdrain_intrin, I, F),
    MAKE_INTRINSIC_2("tcflow", tcflow_intrin, I, F, I),
    MAKE_INTRINSIC_2("tcflush", tcflush_intrin, I, F, I),
    MAKE_INTRINSIC_1("tcgetpgrp", tcgetpgrp_intrin, I, F),
    MAKE_INTRINSIC_2("tcsetpgrp", tcsetpgrp_intrin, I, F, I),
    MAKE_INTRINSIC_2("tcsendbreak", tcsendbreak_intrin, I, F, I),
    MAKE_INTRINSIC_1("tcgetattr", tcgetattr_intrin, V, F),
    MAKE_INTRINSIC_3("tcsetattr", tcsetattr_intrin, I, F, I, T),
    MAKE_INTRINSIC_1("cfgetispeed", cfgetispeed_intrin, V, T),
    MAKE_INTRINSIC_1("cfgetospeed", cfgetospeed_intrin, V, T),
    MAKE_INTRINSIC_2("cfsetispeed", cfsetispeed_intrin, I, T, U),
    MAKE_INTRINSIC_2("cfsetospeed", cfsetospeed_intrin, I, T, U),
    MAKE_INTRINSIC_1("termios_get_oflag", termios_get_oflag, I, T),
    MAKE_INTRINSIC_1("termios_get_iflag", termios_get_iflag, I, T),
    MAKE_INTRINSIC_1("termios_get_cflag", termios_get_cflag, I, T),
    MAKE_INTRINSIC_1("termios_get_lflag", termios_get_lflag, I, T),
    MAKE_INTRINSIC_1("termios_get_cc", termios_get_cc, V, T),
    MAKE_INTRINSIC_2("termios_set_oflag", termios_set_oflag, V, T, I),
    MAKE_INTRINSIC_2("termios_set_iflag", termios_set_iflag, V, T, I),
    MAKE_INTRINSIC_2("termios_set_cflag", termios_set_cflag, V, T, I),
    MAKE_INTRINSIC_2("termios_set_lflag", termios_set_lflag, V, T, I),
    MAKE_INTRINSIC_0("termios_set_cc", termios_set_cc, V),
Exemplo n.º 4
0
#define I SLANG_INT_TYPE
#define V SLANG_VOID_TYPE
#define F SLANG_FILE_FD_TYPE
#define B SLANG_BSTRING_TYPE
#define R SLANG_REF_TYPE
#define U SLANG_UINT_TYPE
#define S SLANG_STRING_TYPE
#define L SLANG_LONG_TYPE
static SLang_Intrin_Fun_Type Fd_Name_Table [] =
{
   MAKE_INTRINSIC_0("fileno", posix_fileno, V),
   MAKE_INTRINSIC_0("_fileno", posix_fileno_int, I),
   MAKE_INTRINSIC_0("isatty", posix_isatty, I),
   MAKE_INTRINSIC_0("open", posix_open, V),
   MAKE_INTRINSIC_3("read", posix_read, V, F, R, U),
   MAKE_INTRINSIC_3("lseek", posix_lseek, SLANG_C_OFF_T_TYPE, F, SLANG_C_OFF_T_TYPE, I),
   MAKE_INTRINSIC_2("fdopen", posix_fdopen, V, F, S),
   MAKE_INTRINSIC_2("write", posix_write, V, F, B),
   MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F),
   MAKE_INTRINSIC_2("dup2_fd", posix_dup2, I, F, I),
   MAKE_INTRINSIC_1("close", posix_close, I, F),
   MAKE_INTRINSIC_1("_close", posix_close_fd, I, I),
#if defined(TTYNAME_R)
   MAKE_INTRINSIC_0("ttyname", posix_ttyname, V),
#endif
   SLANG_END_INTRIN_FUN_TABLE
};
#undef I
#undef V
#undef F
Exemplo n.º 5
0
 */
#define V SLANG_VOID_TYPE
#define I SLANG_INT_TYPE
#define S SLANG_STRING_TYPE
#define D SLANG_DOUBLE_TYPE
#define R SLANG_REF_TYPE
static SLang_Intrin_Fun_Type Module_Intrinsics [] =
{
   MAKE_INTRINSIC_4("_pgarro", _pgarro, V, D, D, D, D),
   MAKE_INTRINSIC_I("_pgask", _pgask, V),
   MAKE_INTRINSIC_0("_pgaxis", _pgaxis, V),
   MAKE_INTRINSIC_7("_pgband", _pgband, I, I, I, D, D, R, R, R),
   MAKE_INTRINSIC_0("_pgbbuf", _pgbbuf, V),
   MAKE_INTRINSIC_I("_pgbin", _pgbin, V),
   MAKE_INTRINSIC_6("_pgbox", _pgbox, V, S, D, I, S, D, I),
   MAKE_INTRINSIC_3("_pgcirc", _pgcirc, V, D, D, D),
   MAKE_INTRINSIC_0("_pgclos", _pgclos, V),
   MAKE_INTRINSIC_1("_pgconb", _pgconb, V, D),
   MAKE_INTRINSIC_3("_pgconl", _pgconl, V, S, I, I),
   MAKE_INTRINSIC_0("_pgconf", _pgconf, V),
   MAKE_INTRINSIC_0("_pgcons", _pgcons, V),
   MAKE_INTRINSIC_1("_pgcont", _pgcont, V, I),
   /* MAKE_INTRINSIC_0("_pgconx", _pgconx, V), */

   MAKE_INTRINSIC_2("_pgctab", _pgctab, V, D, D),
   MAKE_INTRINSIC_0("_pgcurs", _pgcurs, I),
   MAKE_INTRINSIC_2("_pgdraw", _pgdraw, V, D, D),
   MAKE_INTRINSIC_0("_pgebuf", _pgebuf, V),
   MAKE_INTRINSIC_0("_pgend", _pgend, V),
   MAKE_INTRINSIC_6("_pgenv", _pgenv, V, D,D,D,D,I,I),
   MAKE_INTRINSIC_0("_pgeras", _pgeras, V),