int init_errors(void) { MKFUNCTOR(error, 2); MKFUNCTOR(literal, 1); FUNCTOR_colon2 = PL_new_functor(PL_new_atom(":"), 2); return TRUE; }
static void init_errors() { FUNCTOR_error2 = MKFUNCTOR("error", 2); FUNCTOR_type_error2 = MKFUNCTOR("type_error", 2); FUNCTOR_domain_error2 = MKFUNCTOR("domain_error", 2); FUNCTOR_existence_error2 = MKFUNCTOR("existence_error", 2); FUNCTOR_permission_error3 = MKFUNCTOR("permission_error", 3); #ifdef O_DEBUG PL_register_foreign("http_stream_debug", 1, http_stream_debug, 0); #endif }
install_t install_snowball() { assert(sizeof(sb_symbol) == sizeof(char)); FUNCTOR_error2 = MKFUNCTOR("error", 2); FUNCTOR_type_error2 = MKFUNCTOR("type_error", 2); FUNCTOR_domain_error2 = MKFUNCTOR("domain_error", 2); PL_register_foreign("snowball", 3, snowball, 0); PL_register_foreign("snowball_algorithms", 1, snowball_algorithms, 0); #ifdef __WINDOWS__ stem_key_alloc(); #endif }
install_t install_turtle() { MKFUNCTOR(error, 2); MKFUNCTOR(type_error, 2); MKFUNCTOR(syntax_error, 1); MKFUNCTOR(stream, 4); MKFUNCTOR(representation_error, 1); ATOM_ = PL_new_atom(""); PL_register_foreign("turtle_name_start_char", 1, turtle_name_start_char, 0); PL_register_foreign("turtle_name", 1, turtle_name, 0); PL_register_foreign("turtle_read_name", 4, turtle_read_name, 0); PL_register_foreign("turtle_read_string", 4, turtle_read_string, 0); PL_register_foreign("turtle_read_relative_uri", 4, turtle_read_relative_uri, 0); PL_register_foreign("turtle_write_quoted_string", 2, turtle_write_quoted_string, 0); PL_register_foreign("turtle_write_uri", 2, turtle_write_uri, 0); }
install_t install_archive4pl(void) { MKATOM(close_parent); MKATOM(compression); MKATOM(filter); MKATOM(format); MKATOM(all); MKATOM(bzip2); MKATOM(compress); MKATOM(gzip); MKATOM(grzip); MKATOM(lrzip); MKATOM(lzip); MKATOM(lzma); MKATOM(lzop); MKATOM(none); MKATOM(rpm); MKATOM(uu); MKATOM(xz); ATOM_7zip = PL_new_atom("7zip"); MKATOM(ar); MKATOM(cab); MKATOM(cpio); MKATOM(empty); MKATOM(gnutar); MKATOM(iso9960); MKATOM(lha); MKATOM(mtree); MKATOM(rar); MKATOM(raw); MKATOM(tar); MKATOM(xar); MKATOM(zip); MKATOM(file); MKATOM(link); MKATOM(socket); MKATOM(character_device); MKATOM(block_device); MKATOM(directory); MKATOM(fifo); MKFUNCTOR(error, 2); MKFUNCTOR(archive_error, 2); MKFUNCTOR(filetype, 1); MKFUNCTOR(mtime, 1); MKFUNCTOR(size, 1); MKFUNCTOR(link_target, 1); MKFUNCTOR(format, 1); PL_register_foreign("archive_open_stream", 3, archive_open_stream, 0); PL_register_foreign("archive_property", 3, archive_property, 0); PL_register_foreign("archive_close", 1, archive_close, 0); PL_register_foreign("archive_next_header", 2, archive_next_header, 0); PL_register_foreign("archive_header_prop_", 2, archive_header_prop, 0); PL_register_foreign("archive_open_entry", 2, archive_open_entry, 0); }
install_t install_process() { #ifdef __WINDOWS__ win_init(); #endif MKATOM(stdin); MKATOM(stdout); MKATOM(stderr); MKATOM(std); MKATOM(null); MKATOM(process); MKATOM(detached); MKATOM(cwd); MKATOM(env); MKATOM(window); MKATOM(timeout); MKATOM(release); MKATOM(infinite); MKFUNCTOR(pipe, 1); MKFUNCTOR(error, 2); MKFUNCTOR(type_error, 2); MKFUNCTOR(domain_error, 2); MKFUNCTOR(process_error, 2); MKFUNCTOR(system_error, 2); MKFUNCTOR(resource_error, 1); MKFUNCTOR(exit, 1); MKFUNCTOR(killed, 1); FUNCTOR_eq2 = PL_new_functor(PL_new_atom("="), 2); PL_register_foreign("process_create", 2, process_create, 0); PL_register_foreign("process_wait", 3, process_wait, 0); PL_register_foreign("process_kill", 2, process_kill, 0); }