return SLpath_is_absolute_path (s); } #if 0 static void set_path_delimiter (int *d) { (void) SLpath_set_delimiter (*d); } #endif static SLang_Intrin_Fun_Type Path_Name_Table [] = { MAKE_INTRINSIC_S("set_slang_load_path", set_load_path, SLANG_VOID_TYPE), MAKE_INTRINSIC_0("get_slang_load_path", get_load_path, SLANG_STRING_TYPE), MAKE_INTRINSIC_0("path_get_delimiter", get_path_delimiter, SLANG_VOID_TYPE), /* MAKE_INTRINSIC_I("path_set_delimiter", set_path_delimiter, SLANG_VOID_TYPE), */ MAKE_INTRINSIC_SS("path_concat", path_concat, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("path_extname", path_extname, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("path_dirname", path_dirname, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("path_basename", path_basename, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("path_basename_sans_extname", path_basename_sans_extname, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("path_sans_extname", path_sans_extname, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("path_is_absolute", path_is_absolute_path, SLANG_INT_TYPE), SLANG_END_INTRIN_FUN_TABLE }; int SLang_init_ospath (void) { if (-1 == SLadd_intrin_fun_table(Path_Name_Table, "__OSPATH__")) return -1; return 0;
MAKE_INTRINSIC_0("__is_callable", is_callable_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_0("__is_numeric", is_numeric_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_0("__is_datatype_numeric", is_datatype_numeric_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_1("__is_initialized", _pSLang_is_ref_initialized, SLANG_INT_TYPE, SLANG_REF_TYPE), MAKE_INTRINSIC_S("__get_reference", intrin_get_reference, SLANG_VOID_TYPE), MAKE_INTRINSIC_1("__uninitialize", uninitialize_ref_intrin, SLANG_VOID_TYPE, SLANG_REF_TYPE), MAKE_INTRINSIC_0("__is_same", is_same_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_0("__class_type", class_type_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_0("__class_id", class_id_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_1("__datatype", datatype_intrinsic, SLANG_VOID_TYPE, SLANG_SLTYPE_INT_TYPE), MAKE_INTRINSIC_0("_eqs", eqs_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_S("get_doc_string_from_file", get_doc_string_intrin, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("add_doc_file", add_doc_file_intrin, SLANG_VOID_TYPE), MAKE_INTRINSIC_0("get_doc_files", get_doc_files_intrin, SLANG_VOID_TYPE), MAKE_INTRINSIC_0("set_doc_files", set_doc_files_intrin, SLANG_VOID_TYPE), MAKE_INTRINSIC_SS("autoload", autoload_intrinsic, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("is_defined", is_defined_intrin, SLANG_INT_TYPE), MAKE_INTRINSIC_0("string", _pSLstring_intrinsic, SLANG_VOID_TYPE), MAKE_INTRINSIC_0("uname", uname_cmd, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("getenv", intrin_getenv_cmd, SLANG_VOID_TYPE), #ifdef HAVE_PUTENV MAKE_INTRINSIC_0("putenv", intrin_putenv, SLANG_VOID_TYPE), #endif MAKE_INTRINSIC_0("evalfile", load_file, SLANG_INT_TYPE), MAKE_INTRINSIC_I("char", char_cmd, SLANG_VOID_TYPE), MAKE_INTRINSIC_0("eval", load_string, SLANG_VOID_TYPE), MAKE_INTRINSIC_0("dup", do_dup, SLANG_VOID_TYPE), MAKE_INTRINSIC_0("integer", intrin_integer, SLANG_VOID_TYPE), MAKE_INTRINSIC_S("system", system_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_S("system_intr", system_intr_intrinsic, SLANG_INT_TYPE), MAKE_INTRINSIC_0("_apropos", intrin_apropos, SLANG_VOID_TYPE),