PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | nitems(x) (sizeof((x)) / sizeof((x)[0])) |
Functions | |
void | add_typename (const char *) |
void | alloc_typenames (void) |
int | compute_code_target (void) |
int | compute_label_target (void) |
int | count_spaces (int, char *) |
int | count_spaces_until (int, char *, char *) |
int | lexi (struct parser_state *) |
void | diag2 (int, const char *) |
void | diag3 (int, const char *, int) |
void | diag4 (int, const char *, int, int) |
void | dump_line (void) |
int | lookahead (void) |
void | lookahead_reset (void) |
void | fill_buffer (void) |
void | parse (int) |
void | pr_comment (void) |
void | set_defaults (void) |
void | set_option (char *) |
void | set_profile (const char *) |
void add_typename | ( | const char * | key | ) |
Definition at line 687 of file lexi.c.
References err(), sort-test::key, realloc, typename_count, typename_top, and typenames.
Referenced by add_typedefs_from_file(), and set_option().
void alloc_typenames | ( | void | ) |
int compute_code_target | ( | void | ) |
Definition at line 223 of file io.c.
References continuation_indent, count_spaces(), parser_state::ind_level, parser_state::ind_size, parser_state::ind_stmt, lineup_to_parens, lineup_to_parens_always, max_col, parser_state::paren_level, paren_target, ps, and s_code.
Referenced by dump_line(), main(), and pr_comment().
int compute_label_target | ( | void | ) |
Definition at line 252 of file io.c.
References case_ind, parser_state::ind_level, parser_state::ind_size, label_offset, parser_state::pcase, ps, and s_lab.
Referenced by dump_line(), and pr_comment().
int count_spaces | ( | int | cur, |
char * | buffer | ||
) |
Definition at line 550 of file io.c.
References count_spaces_until(), and cur.
Referenced by compute_code_target(), dump_line(), and pr_comment().
int count_spaces_until | ( | int | cur, |
char * | buffer, | ||
char * | end | ||
) |
Definition at line 517 of file io.c.
References buf, cur, and tabsize.
Referenced by count_spaces(), main(), and pr_comment().
void diag2 | ( | int | level, |
const char * | msg | ||
) |
void diag3 | ( | int | level, |
const char * | msg, | ||
int | a | ||
) |
void diag4 | ( | int | level, |
const char * | msg, | ||
int | a, | ||
int | b | ||
) |
void dump_line | ( | void | ) |
Definition at line 61 of file io.c.
References parser_state::bl_line, blanklines_after_declarations, parser_state::block_init, parser_state::block_init_level, code_lines, parser_state::com_col, parser_state::com_lines, combuf, parser_state::comment_delta, comment_open, compute_code_target(), compute_label_target(), count_spaces(), parser_state::decl_on_line, parser_state::dumped_decl_indent, e_code, e_com, e_lab, fprintf, i, parser_state::i_l_follow, parser_state::in_decl, parser_state::in_stmt, parser_state::ind_level, parser_state::ind_stmt, inhibit_formatting, parser_state::just_saw_decl, parser_state::n_comment_delta, n_real_blanklines, parser_state::out_lines, output, parser_state::p_l_follow, pad_output(), parser_state::paren_indents, parser_state::paren_level, paren_target, parser_state::pcase, postfix_blankline_requested, prefix_blankline_requested, parser_state::procname, ps, s_code, s_com, s_lab, suppress_blanklines, swallow_optional_blanklines, tabsize, and parser_state::use_ff.
Referenced by fill_buffer(), main(), and pr_comment().
void fill_buffer | ( | void | ) |
Definition at line 346 of file io.c.
References be_save, bp_save, buf_end, buf_ptr, dump_line(), e_code, e_com, e_lab, errx(), fill_buffer(), had_eof, i, in_buffer, in_buffer_limit, inhibit_formatting, input, lookahead_bp_save, lookahead_buf, lookahead_end, lookahead_ptr, lookahead_start, n_real_blanklines, output, postfix_blankline_requested, prefix_blankline_requested, realloc, s_code, s_com, s_lab, size, and suppress_blanklines.
Referenced by fill_buffer(), lexi(), main(), and pr_comment().
int lexi | ( | struct parser_state * | state | ) |
Definition at line 216 of file lexi.c.
References alphanum, auto_typedefs, BACKSLASH, binary_op, buf_end, buf_ptr, casestmt, chartype, CHECK_SIZE_TOKEN, colon, comma, comment, decl, diag2(), e_token, fill_buffer(), form_feed, funcname, had_eof, ident, is_func_definition(), lbrace, len, line_no, lparen, newline, period, postop, preesc, question, rbrace, rparen, templ::rwcode, s_token, semicolon, sp_nparen, sp_paren, specials, storage, strcmp_type(), strpfx, structure, swstmt, token, type_def, typename_top, typenames, and unary_op.
Referenced by main().
int lookahead | ( | void | ) |
Definition at line 275 of file io.c.
References be_save, errx(), i, input, lookahead_bp_save, lookahead_buf, lookahead_buf_end, lookahead_end, lookahead_ptr, lookahead_start, malloc, and realloc.
Referenced by is_func_definition().
void lookahead_reset | ( | void | ) |
Definition at line 320 of file io.c.
References bp_save, lookahead_bp_save, lookahead_ptr, and lookahead_start.
Referenced by is_func_definition().
void parse | ( | int | tk | ) |
Definition at line 49 of file parse.c.
References break_comma, btype_2, case_ind, parser_state::case_indent, parser_state::cstk, decl, diag2(), dohead, dolit, e_code, parser_state::else_if, elsehead, elselit, errx(), forstmt, i, parser_state::i_l_follow, ifhead, ifstmt, parser_state::il, parser_state::ind_level, lbrace, parser_state::ljust_decl, nitems, parser_state::p_stack, printf, ps, rbrace, reduce(), s_code, parser_state::search_brace, semicolon, stmt, stmtl, swstmt, token, parser_state::tos, and whilestmt.
void pr_comment | ( | void | ) |
Definition at line 79 of file pr_comment.c.
References blanklines_before_blockcomments, block_comment_max_col, parser_state::box_com, buf_end, buf_ptr, CHECK_SIZE_COM, parser_state::col_1, parser_state::com_col, parser_state::com_ind, comment_delimiter_on_blankline, parser_state::comment_delta, compute_code_target(), compute_label_target(), count_spaces(), count_spaces_until(), parser_state::decl_com_ind, parser_state::decl_on_line, dump_line(), e_code, e_com, e_lab, else_endif_com_ind, fill_buffer(), format_block_comments, format_col1_comments, had_eof, if(), in_buffer, parser_state::ind_level, parser_state::ind_size, parser_state::just_saw_decl, parser_state::last_nl, parser_state::last_token, lbrace, line_no, max_col, parser_state::n_comment_delta, parser_state::out_coms, prefix_blankline_requested, printf, ps, s_code, s_com, s_lab, save_com, sc_buf, sc_size, star_comment_cont, start, tabsize, parser_state::unindent_displace, and parser_state::use_ff.
Referenced by main().
void set_defaults | ( | void | ) |
Definition at line 246 of file args.c.
References parser_state::case_indent, pro::p_default, pro::p_name, pro::p_obj, pro::p_type, PRO_SPECIAL, and ps.
Referenced by main().
void set_option | ( | char * | arg | ) |
Definition at line 261 of file args.c.
References add_typedefs_from_file(), add_typename(), arg, parser_state::case_indent, CLI, eqin(), errx(), exit(), IGN, INDENT_VERSION, input, KEY, KEY_FILE, OFF, option_source, output, pro::p_name, pro::p_obj, pro::p_special, pro::p_type, printf, PRO_BOOL, PRO_INT, PRO_SPECIAL, ps, STDIN, generate_unaccent_rules::stdout, and VERSION.
Referenced by scan_profile().
void set_profile | ( | const char * | profile_name | ) |
Definition at line 176 of file args.c.
References MAXPGPATH, option_source, scan_profile(), and snprintf.
Referenced by main().