Go to the source code of this file.
Macros | |
#define | MAKE_PUBLIC 1 |
#define | MAKE_PRIVATE 2 |
#define | MAKE_FEATURE_PRIVATE 3 |
long all_public_symbols | ( | ) |
Definition at line 1349 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, wl_goal::bbbb_1, deref_ptr, first_definition, get_module(), get_two_args(), wl_definition::keyword, wl_keyword::module, wl_definition::next, NULL, wl_keyword::public, push_goal(), stack_cons(), stack_nil(), stack_psi_term(), TRUE, wl_psi_term::type, and unify.
long c_alias | ( | ) |
Definition at line 1164 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, wl_keyword::combined_name, wl_keyword::definition, deref_ptr, Errorline(), FALSE, get_two_args(), hash_lookup(), wl_definition::keyword, wl_module::module_name, wl_keyword::symbol, wl_module::symbol_table, TRUE, wl_psi_term::type, and warningline().
long c_current_module | ( | ) |
Definition at line 956 of file modules.c.
References wl_goal::aaaa_1, aim, wl_goal::bbbb_1, deref_ptr, heap_copy_string(), wl_module::module_name, NULL, push_goal(), quoted_string, resid_aim, stack_psi_term(), TRUE, wl_psi_term::type, unify, and wl_psi_term::value_3.
long c_display_modules | ( | ) |
Definition at line 723 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, deref_ptr, display_modules, Errorline(), FALSE, get_two_args(), lf_false, lf_true, TRUE, and wl_psi_term::type.
long c_display_persistent | ( | ) |
Definition at line 759 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, deref_ptr, display_persistent, Errorline(), FALSE, get_two_args(), lf_false, lf_true, TRUE, and wl_psi_term::type.
long c_module_access | ( | ) |
Definition at line 993 of file modules.c.
References wl_goal::aaaa_1, aim, deref_ptr, FALSE, and warningline().
long c_open_module | ( | ) |
Definition at line 514 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, deref_ptr, Errorline(), FALSE, and open_module_tree().
long c_private | ( | ) |
Definition at line 697 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, deref_ptr, Errorline(), FALSE, MAKE_PRIVATE, traverse_tree(), and TRUE.
long c_private_feature | ( | ) |
Definition at line 1288 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, deref_ptr, Errorline(), FALSE, MAKE_FEATURE_PRIVATE, traverse_tree(), and TRUE.
long c_public | ( | ) |
Definition at line 671 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, deref_ptr, Errorline(), FALSE, MAKE_PUBLIC, traverse_tree(), and TRUE.
long c_replace | ( | ) |
Definition at line 917 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, wl_node::data, deref_ptr, Errorline(), FALSE, FEATCMP, find(), get_two_args(), NULL, replace(), three, TRUE, and wl_psi_term::type.
long c_set_module | ( | ) |
Definition at line 483 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, create_module(), deref_ptr, Errorline(), FALSE, get_two_args(), set_current_module(), string_val(), and TRUE.
long c_trace_input | ( | ) |
Definition at line 795 of file modules.c.
References wl_goal::aaaa_1, aim, wl_psi_term::attr_list, deref_ptr, Errorline(), FALSE, get_two_args(), lf_false, lf_true, trace_input, TRUE, and wl_psi_term::type.
ptr_module create_module | ( | char * | module | ) |
Definition at line 67 of file modules.c.
References find_module(), hash_create(), HEAP_ALLOC, heap_copy_string(), heap_insert(), input_file_name, NULL, and STRCMP.
ptr_module extract_module_from_name | ( | char * | str | ) |
Definition at line 111 of file modules.c.
References create_module(), legal_in_name(), and NULL.
ptr_module find_module | ( | char * | module | ) |
Definition at line 48 of file modules.c.
References wl_node::data, FEATCMP, find(), and NULL.
int get_module | ( | ptr_psi_term | psi, |
ptr_module * | module | ||
) |
Definition at line 1207 of file modules.c.
References deref_ptr, Errorline(), FALSE, find_module(), NULL, overlap_type(), quoted_string, and TRUE.
int global_unify | ( | ptr_psi_term | u, |
ptr_psi_term | v | ||
) |
Definition at line 1035 of file modules.c.
References wl_psi_term::attr_list, c_abort(), deref_ptr, Errorline(), FALSE, glb(), global_unify_attr(), heap_pointer, overlap_type(), push_psi_ptr_value(), quoted_string, REAL, real, release_resid(), traceline(), TRUE, wl_psi_term::type, and wl_psi_term::value_3.
Definition at line 1117 of file modules.c.
References wl_node::data, dummy_printf(), FALSE, featcmp(), global_unify(), wl_node::key, wl_node::left, NULL, wl_node::right, and TRUE.
void init_modules | ( | ) |
int make_feature_private | ( | ptr_psi_term | term | ) |
Definition at line 1239 of file modules.c.
References wl_keyword::combined_name, wl_keyword::definition, deref_ptr, hash_lookup(), wl_definition::keyword, wl_keyword::private_feature, wl_keyword::public, wl_module::symbol_table, TRUE, update_symbol(), and warningline().
char* make_module_token | ( | ptr_module | module, |
char * | str | ||
) |
Definition at line 185 of file modules.c.
References extract_module_from_name(), and module_buffer.
long make_public | ( | ptr_psi_term | term, |
long | bool | ||
) |
Definition at line 600 of file modules.c.
References wl_keyword::combined_name, wl_keyword::definition, deref_ptr, hash_lookup(), wl_definition::keyword, wl_keyword::module, new_definition(), wl_keyword::public, wl_keyword::symbol, wl_module::symbol_table, TRUE, update_symbol(), and warningline().
ptr_definition new_definition | ( | ptr_keyword | key | ) |
Definition at line 215 of file modules.c.
References wl_definition::already_loaded, wl_definition::always_check, wl_definition::children, wl_definition::code, wl_definition::date, wl_definition::evaluate_args, FALSE, first_definition, wl_definition::global_value, HEAP_ALLOC, wl_definition::init_value, wl_definition::keyword, wl_definition::next, NOT_CODED, NULL, wl_definition::op_data, wl_definition::parents, wl_definition::properties, wl_definition::protected, wl_definition::rule, TRUE, wl_definition::type_def, and undef.
void open_module_one | ( | ptr_psi_term | t, |
int * | onefailed | ||
) |
Definition at line 550 of file modules.c.
References wl_keyword::combined_name, wl_keyword::definition, Errorline(), FALSE, find_module(), hash_lookup(), HEAP_ALLOC, wl_int_list::next, wl_module::open_modules, wl_keyword::public, string_val(), wl_keyword::symbol, wl_module::symbol_table, TRUE, and wl_int_list::value_1.
void open_module_tree | ( | ptr_node | n, |
int * | onefailed | ||
) |
Definition at line 533 of file modules.c.
References open_module_one().
void pretty_quote_symbol | ( | ptr_keyword | k | ) |
Definition at line 464 of file modules.c.
References wl_keyword::definition, display_modules, wl_definition::keyword, prettyf(), and prettyf_quote().
void pretty_symbol | ( | ptr_keyword | k | ) |
Definition at line 446 of file modules.c.
References wl_keyword::definition, display_modules, wl_definition::keyword, and prettyf().
char* print_symbol | ( | ptr_keyword | k | ) |
OBSOLETE ptr_psi_term get_function_value(module,symbol)
ptr_module module; char *symbol;
{ ptr_node n; ptr_definition def; ptr_psi_term result=NULL; ptr_pair_list rule;
n=find(STRCMP,make_module_token(module,symbol),symbol_table); if(n) def=(ptr_definition)n->data; if(def && def->type==function) { rule=def->rule; while (rule && (!rule->aaaa_1 || !rule->bbbb_1)) rule=rule->next; if(rule) { result=(ptr_psi_term)rule->bbbb_1; deref_ptr(result); } } }
if(!result) Errorline("error in definition of '%s'\n",module_buffer);
return result; }
Definition at line 429 of file modules.c.
References wl_keyword::combined_name, wl_keyword::definition, display_modules, and wl_definition::keyword.
void rec_replace | ( | ptr_definition | old, |
ptr_definition | new, | ||
ptr_psi_term | term | ||
) |
Definition at line 846 of file modules.c.
References wl_psi_term::attr_list, def_ptr, deref_ptr, insert_translation(), int_ptr, NULL, push_ptr_value(), replace_attr(), translate(), wl_psi_term::type, and wl_psi_term::value_3.
void replace | ( | ptr_definition | old, |
ptr_definition | new, | ||
ptr_psi_term | term | ||
) |
void replace_attr | ( | ptr_node | old_attr, |
ptr_psi_term | term, | ||
ptr_definition | old, | ||
ptr_definition | new | ||
) |
Definition at line 875 of file modules.c.
References wl_psi_term::attr_list, wl_keyword::combined_name, wl_node::data, FEATCMP, wl_node::key, wl_definition::keyword, wl_node::left, wl_keyword::private_feature, rec_replace(), wl_node::right, stack_insert(), and wl_keyword::symbol.
ptr_module set_current_module | ( | ptr_module | module | ) |
char* string_val | ( | ptr_psi_term | term | ) |
char* strip_module_name | ( | char * | str | ) |
void traverse_tree | ( | ptr_node | n, |
int | flag | ||
) |
Definition at line 640 of file modules.c.
References deref_ptr, FALSE, MAKE_FEATURE_PRIVATE, make_feature_private(), MAKE_PRIVATE, make_public(), MAKE_PUBLIC, and TRUE.
ptr_definition update_feature | ( | ptr_module | module, |
char * | feature | ||
) |
Definition at line 1315 of file modules.c.
References current_module, wl_keyword::definition, extract_module_from_name(), hash_lookup(), NULL, wl_keyword::private_feature, and update_symbol().
ptr_definition update_symbol | ( | ptr_module | module, |
char * | symbol | ||
) |
Definition at line 264 of file modules.c.
References wl_keyword::combined_name, current_module, wl_keyword::definition, error_psi_term, Errorline(), extract_module_from_name(), FALSE, hash_insert(), hash_lookup(), HEAP_ALLOC, heap_copy_string(), make_module_token(), wl_keyword::module, new_definition(), wl_int_list::next, NULL, wl_keyword::private_feature, wl_keyword::public, strip_module_name(), wl_keyword::symbol, wl_module::symbol_table, wl_psi_term::type, wl_int_list::value_1, and warningline().
ptr_module bi_module =NULL |
ptr_module current_module =NULL |
ptr_module no_module =NULL |
ptr_module syntax_module =NULL |
ptr_module sys_module =NULL |
ptr_module user_module =NULL |
ptr_module x_module = NULL |