#include "extern.h"#include "trees.h"#include "types.h"#include "memory.h"#include "print.h"#include "modules.h"#include "login.h"Go to the source code of this file.
| #define DOTDOT ": " |
Definition at line 10 of file print.c.
Referenced by pretty_list(), pretty_psi_term(), and pretty_tag_or_psi_term().
| #define INFIX 1 |
| #define POSTFIX 3 |
| #define PREFIX 2 |
| long all_symbol | ( | char * | s | ) |
| long check_legal_cons | ( | ptr_psi_term | t, | |
| ptr_definition | t_type | |||
| ) |
Definition at line 658 of file print.c.
References count_features(), featcmp(), find(), one, and two.
Referenced by pretty_list(), and pretty_psi_term().
| long check_opargs | ( | ptr_node | n | ) |
| void check_pointer | ( | ptr_psi_term | p | ) |
Definition at line 233 of file print.c.
References wl_node::data, deref_ptr, find(), go_through(), heap_insert(), intcmp(), no_name, and NULL.
Referenced by display_couple(), go_through_tree(), main_pred_write(), and print_resid_message().
| long count_features | ( | ptr_node | t | ) |
| void display_couple | ( | ptr_psi_term | u, | |
| char * | s, | |||
| ptr_psi_term | v | |||
| ) |
Definition at line 1539 of file print.c.
References buffer, check_pointer(), const_quote, end_tab(), FALSE, gen_sym_counter, heap_pointer, indent, insert_variables(), listing_flag, mark_tab(), MAX_PRECEDENCE, new_tab(), NULL, output_stream, pretty_output(), pretty_tag_or_psi_term(), prettyf(), TRUE, var_tree, work_out_length(), write_canon, and write_resids.
| void display_psi | ( | FILE * | s, | |
| ptr_psi_term | t | |||
| ) |
| void display_psi_stderr | ( | ptr_psi_term | t | ) |
Definition at line 1461 of file print.c.
References main_display_psi_term(), and outfile.
Referenced by parse_list().
| void display_psi_stdout | ( | ptr_psi_term | t | ) |
Definition at line 1450 of file print.c.
References main_display_psi_term(), and outfile.
Referenced by show().
| void display_psi_stream | ( | ptr_psi_term | t | ) |
Definition at line 1472 of file print.c.
References main_display_psi_term(), outfile, and output_stream.
Referenced by c_listing(), and list_special().
| void do_pretty_attr | ( | ptr_node | t, | |
| ptr_tab_brk | tab, | |||
| long * | cnt, | |||
| long | two, | |||
| long | depth | |||
| ) |
Definition at line 1131 of file print.c.
References COMMA_PREC, display_modules, extract_module_from_name(), mark_tab(), wl_module::module_name, pretty_tag_or_psi_term(), prettyf(), prettyf_quote(), str_to_int(), and strip_module_name().
Referenced by pretty_attr().
| void end_tab | ( | ) |
Definition at line 513 of file print.c.
References buffer, heap_alloc(), indent, and wl_item::str.
Referenced by display_couple(), main_display_psi_term(), main_pred_write(), mark_tab(), print_resid_message(), and print_variables().
| void forbid_variables | ( | ptr_node | n | ) |
Definition at line 325 of file print.c.
References deref_ptr, heap_insert(), intcmp(), and wl_node::key.
Referenced by print_variables().
| void go_through | ( | ptr_psi_term | t | ) |
| void go_through | ( | ) |
Referenced by check_pointer(), and main_display_psi_term().
| void go_through_tree | ( | ptr_node | t | ) |
Definition at line 256 of file print.c.
References check_pointer().
Referenced by go_through(), main_pred_write(), and print_variables().
| long has_non_alpha | ( | char * | s | ) |
| char* heap_nice_name | ( | ) |
Definition at line 76 of file print.c.
References gen_sym_counter, heap_copy_string(), perr(), and STRLEN.
Referenced by unique_name().
| void init_print | ( | ) |
| void insert_variables | ( | ptr_node | vars, | |
| long | force | |||
| ) |
Definition at line 298 of file print.c.
References wl_node::data, deref_ptr, find(), and intcmp().
Referenced by display_couple(), main_display_psi_term(), main_pred_write(), print_resid_message(), and print_variables().
| long is_integer | ( | char * | s | ) |
| void listing_pred_write | ( | ptr_node | n, | |
| long | fflag | |||
| ) |
Definition at line 1364 of file print.c.
References const_quote, FALSE, func_flag, indent, listing_flag, main_pred_write(), outfile, output_stream, PRINT_DEPTH, print_depth, TRUE, write_canon, write_corefs, write_resids, and write_stderr.
Referenced by c_listing().
| void main_display_psi_term | ( | ptr_psi_term | t | ) |
Definition at line 1493 of file print.c.
References buffer, const_quote, deref_ptr, end_tab(), FALSE, gen_sym_counter, go_through(), heap_pointer, indent, insert_variables(), listing_flag, mark_tab(), MAX_PRECEDENCE, new_tab(), NULL, pretty_output(), pretty_tag_or_psi_term(), TRUE, var_tree, work_out_length(), write_canon, and write_resids.
| void main_display_psi_term | ( | ) |
Referenced by display_psi(), display_psi_stderr(), display_psi_stdout(), and display_psi_stream().
| void main_pred_write | ( | ptr_node | n | ) |
Definition at line 1398 of file print.c.
References buffer, check_pointer(), end_tab(), FALSE, gen_sym_counter, go_through_tree(), heap_pointer, indent, insert_variables(), main_pred_write(), mark_tab(), MAX_PRECEDENCE, new_tab(), NULL, pretty_output(), pretty_tag_or_psi_term(), var_tree, work_out_length(), write_attributes(), and write_corefs.
| void main_pred_write | ( | ) |
Referenced by listing_pred_write(), main_pred_write(), and pred_write().
| void mark_tab | ( | ptr_tab_brk | t | ) |
Definition at line 529 of file print.c.
References end_tab(), and wl_item::tab.
Referenced by display_couple(), do_pretty_attr(), main_display_psi_term(), main_pred_write(), pretty_list(), pretty_variables(), print_resid_message(), print_variables(), and write_attributes().
| void new_tab | ( | ptr_tab_brk * | t | ) |
Definition at line 541 of file print.c.
References FALSE, and HEAP_ALLOC.
Referenced by display_couple(), main_display_psi_term(), main_pred_write(), pretty_attr(), pretty_list(), print_resid_message(), and print_variables().
| long no_quote | ( | char * | s | ) |
Definition at line 439 of file print.c.
References all_symbol(), FALSE, ISALPHA, LOWER, SINGLE, and TRUE.
Referenced by prettyf_quote().
| long opcheck | ( | ptr_psi_term | t, | |
| long * | prec, | |||
| operator * | type | |||
| ) |
Definition at line 856 of file print.c.
References check_opargs(), fx, fy, INFIX, wl_operator_data::next, NOTOP, NULL, POSTFIX, wl_operator_data::precedence, PREFIX, xf, xfx, xfy, yf, and yfx.
Referenced by pretty_psi_with_ops(), and pretty_variables().
| void pred_write | ( | ptr_node | n | ) |
Definition at line 1388 of file print.c.
References FALSE, listing_flag, main_pred_write(), outfile, output_stream, and write_stderr.
Referenced by generic_write().
| void pretty_attr | ( | ptr_node | t, | |
| long | depth | |||
| ) |
Definition at line 1202 of file print.c.
References do_pretty_attr(), new_tab(), prettyf(), and two_or_more().
| void pretty_attr | ( | ) |
Referenced by pretty_psi_term().
| void pretty_list | ( | ptr_psi_term | t, | |
| long | depth | |||
| ) |
Definition at line 678 of file print.c.
References alist, wl_psi_term::attr_list, check_legal_cons(), COMMA_PREC, wl_node::data, deref_ptr, disj_nil, disjunction, DOTDOT, equal_types, FALSE, find(), get_two_args(), intcmp(), wl_definition::keyword, mark_tab(), MAX_PRECEDENCE, new_tab(), nil, NULL, overlap_type(), pretty_symbol(), pretty_tag_or_psi_term(), prettyf(), print_depth, TRUE, wl_psi_term::type, and wl_definition::type.
Referenced by pretty_psi_term().
| void pretty_output | ( | ) |
Definition at line 1222 of file print.c.
References wl_tab_brk::broken, wl_tab_brk::column, outfile, wl_tab_brk::printed, wl_item::str, wl_item::tab, and TRUE.
Referenced by display_couple(), main_display_psi_term(), main_pred_write(), and print_variables().
| void pretty_psi_term | ( | ptr_psi_term | t, | |
| long | sprec, | |||
| long | depth | |||
| ) |
Definition at line 994 of file print.c.
References wl_goal::a, alist, buf, check_legal_cons(), cut, deref_ptr, disj_nil, disjunction, display_persistent, DOTDOT, eof, equal_types, FALSE, wl_residuation::goal, heap_pointer, integer, wl_definition::keyword, wl_residuation::next, nil, wl_goal::pending, pretty_attr(), pretty_list(), pretty_psi_term(), pretty_psi_with_ops(), pretty_quote_symbol(), pretty_symbol(), prettyf(), prettyf_quoted_string(), print_depth, PRINT_POWER, PRINT_SPLIT, quoted_string, real, REAL, seg_format, stream, STRLEN, sub_type(), sys_bytedata, wl_definition::type, WL_MAXINT, and write_canon.
| void pretty_psi_term | ( | ) |
Referenced by pretty_psi_term(), pretty_tag_or_psi_term(), and pretty_variables().
| long pretty_psi_with_ops | ( | ptr_psi_term | t, | |
| long | sprec, | |||
| long | depth | |||
| ) |
Definition at line 888 of file print.c.
References deref_ptr, FALSE, func_flag, fx, fy, get_two_args(), INFIX, listing_flag, MAX_PRECEDENCE, opcheck(), POSTFIX, PREFIX, pretty_quote_symbol(), pretty_tag_or_psi_term(), prettyf(), TRUE, write_canon, xf, xfx, xfy, yf, and yfx.
Referenced by pretty_psi_term().
| void pretty_tag_or_psi_term | ( | ptr_psi_term | p, | |
| long | sprec, | |||
| long | depth | |||
| ) |
Definition at line 778 of file print.c.
References COLON_PREC, wl_node::data, deref_ptr, DOTDOT, FALSE, find(), heap_insert(), intcmp(), is_top, no_name, NULL, pretty_psi_term(), prettyf(), and unique_name().
| void pretty_tag_or_psi_term | ( | ) |
| void pretty_variables | ( | ptr_node | n, | |
| ptr_tab_brk | tab | |||
| ) |
Definition at line 1244 of file print.c.
References wl_node::data, deref_ptr, eqsym, find(), intcmp(), mark_tab(), MAX_PRECEDENCE, wl_definition::op_data, opcheck(), wl_operator_data::precedence, pretty_psi_term(), and prettyf().
Referenced by print_variables().
| void prettyf | ( | char * | s | ) |
Definition at line 463 of file print.c.
References FALSE, and prettyf_inner().
Referenced by display_couple(), do_pretty_attr(), pretty_attr(), pretty_list(), pretty_psi_term(), pretty_psi_with_ops(), pretty_quote_symbol(), pretty_symbol(), pretty_tag_or_psi_term(), pretty_variables(), print_resid_message(), and print_variables().
| void prettyf_inner | ( | char * | s, | |
| long | q, | |||
| char | c | |||
| ) |
Definition at line 365 of file print.c.
References buffer, indent, and outfile.
Referenced by prettyf(), prettyf_quote(), and prettyf_quoted_string().
| void prettyf_quote | ( | char * | s | ) |
Definition at line 490 of file print.c.
References const_quote, no_quote(), and prettyf_inner().
Referenced by do_pretty_attr(), and pretty_quote_symbol().
| void prettyf_quoted_string | ( | char * | s | ) |
Definition at line 470 of file print.c.
References const_quote, and prettyf_inner().
Referenced by pretty_psi_term().
| void print_bin | ( | long | b | ) |
Definition at line 150 of file print.c.
References INT_SIZE, and outfile.
Referenced by print_code().
| void print_code | ( | FILE * | s, | |
| ptr_int_list | c | |||
| ) |
Definition at line 167 of file print.c.
References wl_int_list::next, NOT_CODED, outfile, print_bin(), and wl_int_list::value.
| void print_operator_kind | ( | FILE * | s, | |
| operator | kind | |||
| ) |
| void print_resid_message | ( | ptr_psi_term | t, | |
| ptr_resid_list | r | |||
| ) |
Definition at line 1585 of file print.c.
References buffer, check_pointer(), const_quote, end_tab(), FALSE, gen_sym_counter, heap_pointer, indent, insert_variables(), listing_flag, mark_tab(), MAX_PRECEDENCE, new_tab(), wl_resid_list::next, NULL, outfile, pretty_tag_or_psi_term(), prettyf(), TRUE, wl_resid_list::var, var_tree, write_canon, and write_resids.
Referenced by do_residuation().
| long print_variables | ( | long | printflag | ) |
Definition at line 1294 of file print.c.
References buffer, const_quote, end_tab(), FALSE, forbid_variables(), gen_sym_counter, go_through_tree(), heap_pointer, indent, insert_variables(), listing_flag, mark_tab(), new_tab(), NULL, outfile, output_stream, pretty_output(), pretty_variables(), prettyf(), TRUE, var_tree, work_out_length(), write_canon, and write_resids.
Referenced by c_print_variables(), and what_next_aim().
| long str_to_int | ( | char * | s | ) |
Definition at line 123 of file print.c.
References DIGIT.
Referenced by do_pretty_attr(), and make_feature_list().
| long strpos | ( | long | pos, | |
| char * | str | |||
| ) |
| long two_or_more | ( | ptr_node | t | ) |
| GENERIC unique_name | ( | ) |
Definition at line 108 of file print.c.
References find(), heap_nice_name(), name, and var_tree.
Referenced by pretty_tag_or_psi_term().
| void work_out_length | ( | ) |
Definition at line 573 of file print.c.
References wl_tab_brk::broken, wl_tab_brk::column, FALSE, NULL, page_width, wl_tab_brk::printed, wl_item::str, strpos(), wl_item::tab, and TRUE.
Referenced by display_couple(), main_display_psi_term(), main_pred_write(), and print_variables().
| void write_attributes | ( | ptr_node | n, | |
| ptr_tab_brk | tab | |||
| ) |
Definition at line 1344 of file print.c.
References mark_tab(), MAX_PRECEDENCE, and pretty_tag_or_psi_term().
Referenced by main_pred_write().
| char* buffer |
Definition at line 40 of file print.c.
Referenced by apply1_internal(), display_couple(), end_tab(), GetIntOption(), init_memory(), lazy_project_internal(), main_display_psi_term(), main_pred_write(), my_wait_on_feature_internal(), prettyf_inner(), print_resid_message(), print_variables(), regexp_execute_internal(), and wait_on_feature_internal().
| long const_quote = TRUE |
Definition at line 27 of file print.c.
Referenced by c_pwrite(), c_pwriteq(), c_write(), c_write_canonical(), c_write_err(), c_writeq(), c_writeq_err(), display_couple(), listing_pred_write(), main_display_psi_term(), prettyf_quote(), prettyf_quoted_string(), print_resid_message(), and print_variables().
| long display_persistent = FALSE |
long func_flag [static] |
Definition at line 51 of file print.c.
Referenced by listing_pred_write(), and pretty_psi_with_ops().
| long gen_sym_counter |
Definition at line 33 of file print.c.
Referenced by display_couple(), heap_nice_name(), main_display_psi_term(), main_pred_write(), print_resid_message(), and print_variables().
| long indent = FALSE |
Definition at line 26 of file print.c.
Referenced by c_pwrite(), c_pwriteq(), c_write(), c_write_canonical(), c_write_err(), c_writeq(), c_writeq_err(), display_couple(), end_tab(), listing_pred_write(), main_display_psi_term(), main_pred_write(), prettyf_inner(), print_resid_message(), and print_variables().
long listing_flag [static] |
Definition at line 47 of file print.c.
Referenced by display_couple(), listing_pred_write(), main_display_psi_term(), pred_write(), pretty_psi_with_ops(), print_resid_message(), and print_variables().
| char* name = "symbol" |
Definition at line 39 of file print.c.
Referenced by collect_symbols(), cuserid_internal(), gethostname_internal(), unify_pterm_result(), and unique_name().
| char* no_name = "pointer" |
| FILE* outfile |
Definition at line 55 of file print.c.
Referenced by display_psi(), display_psi_stderr(), display_psi_stdout(), display_psi_stream(), listing_pred_write(), pred_write(), pretty_output(), prettyf_inner(), print_bin(), print_code(), print_resid_message(), and print_variables().
| long page_width = PAGE_WIDTH |
| item pretty_things[PRETTY_SIZE] |
| long print_depth = PRINT_DEPTH |
Definition at line 25 of file print.c.
Referenced by c_print_depth(), listing_pred_write(), pretty_list(), and pretty_psi_term().
| char seg_format[PRINT_POWER+4] |
char vcid[] = "$Id: print.c,v 1.4 1995/01/14 00:27:20 duchier Exp $" [static] |
| long write_canon = FALSE |
Definition at line 29 of file print.c.
Referenced by c_pwrite(), c_pwriteq(), c_write(), c_write_canonical(), c_write_err(), c_writeq(), c_writeq_err(), display_couple(), listing_pred_write(), main_display_psi_term(), pretty_psi_term(), pretty_psi_with_ops(), print_resid_message(), and print_variables().
| long write_corefs = TRUE |
Definition at line 31 of file print.c.
Referenced by c_pwrite(), c_pwriteq(), c_write(), c_write_canonical(), c_write_err(), c_writeq(), c_writeq_err(), listing_pred_write(), and main_pred_write().
| long write_resids = FALSE |
Definition at line 28 of file print.c.
Referenced by c_pwrite(), c_pwriteq(), c_write(), c_write_canonical(), c_write_err(), c_writeq(), c_writeq_err(), display_couple(), listing_pred_write(), main_display_psi_term(), print_resid_message(), and print_variables().
| long write_stderr = FALSE |
Definition at line 30 of file print.c.
Referenced by c_pwrite(), c_pwriteq(), c_write(), c_write_canonical(), c_write_err(), c_writeq(), c_writeq_err(), listing_pred_write(), and pred_write().
1.5.4