#include "config.h"#include "system.h"#include "cpplib.h"#include "internal.h"#include "mkdeps.h"#include "obstack.h"

Go to the source code of this file.
| #define COND (1 << 0) |
Definition at line 70 of file directives.c.
Value:
Definition at line 177 of file directives.c.
Definition at line 177 of file directives.c.
| #define DIRECTIVE_TABLE |
Value:
D(define, T_DEFINE = 0, KANDR, IN_I) /* 270554 */ \ D(include, T_INCLUDE, KANDR, INCL | EXPAND) /* 52262 */ \ D(endif, T_ENDIF, KANDR, COND) /* 45855 */ \ D(ifdef, T_IFDEF, KANDR, COND | IF_COND) /* 22000 */ \ D(if, T_IF, KANDR, COND | IF_COND | EXPAND) /* 18162 */ \ D(else, T_ELSE, KANDR, COND) /* 9863 */ \ D(ifndef, T_IFNDEF, KANDR, COND | IF_COND) /* 9675 */ \ D(undef, T_UNDEF, KANDR, IN_I) /* 4837 */ \ D(line, T_LINE, KANDR, EXPAND) /* 2465 */ \ D(elif, T_ELIF, STDC89, COND | EXPAND) /* 610 */ \ D(error, T_ERROR, STDC89, 0) /* 475 */ \ D(pragma, T_PRAGMA, STDC89, IN_I) /* 195 */ \ D(warning, T_WARNING, EXTENSION, 0) /* 22 */ \ D(include_next, T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND) /* 19 */ \ D(ident, T_IDENT, EXTENSION, IN_I) /* 11 */ \ D(import, T_IMPORT, EXTENSION, INCL | EXPAND) /* 0 ObjC */ \ D(assert, T_ASSERT, EXTENSION, 0) /* 0 SVR4 */ \ D(unassert, T_UNASSERT, EXTENSION, 0) /* 0 SVR4 */ \ D(sccs, T_SCCS, EXTENSION, 0)
Definition at line 141 of file directives.c.
| #define EXPAND (1 << 4) |
Definition at line 74 of file directives.c.
| #define EXTENSION 2 |
Definition at line 61 of file directives.c.
| #define IF_COND (1 << 1) |
Definition at line 71 of file directives.c.
| #define IN_I (1 << 3) |
Definition at line 73 of file directives.c.
| #define INCL (1 << 2) |
Definition at line 72 of file directives.c.
| #define KANDR 0 |
Definition at line 59 of file directives.c.
| #define SEEN_EOL | ( | ) | (pfile->cur_token[-1].type == CPP_EOF) |
Definition at line 195 of file directives.c.
| #define STDC89 1 |
Definition at line 60 of file directives.c.
Definition at line 78 of file directives.c.
| typedef void(* directive_handler)(cpp_reader *) |
Definition at line 77 of file directives.c.
| typedef void(* pragma_cb)(cpp_reader *) |
Definition at line 42 of file directives.c.
| anonymous enum |
| void _cpp_define_builtin | ( | cpp_reader * | pfile, | |
| const char * | str | |||
| ) |
Definition at line 1939 of file directives.c.
References alloca, buf, len, memcpy, run_directive(), strlen(), and T_DEFINE.
| void _cpp_do__Pragma | ( | cpp_reader * | pfile | ) |
Definition at line 1435 of file directives.c.
References CPP_DL_ERROR, cpp_error(), destringize_and_run(), cpp_reader::directive_result, get__Pragma_string(), cpp_token::str, and cpp_token::val.
| void _cpp_do_file_change | ( | cpp_reader * | pfile, | |
| enum lc_reason | reason, | |||
| const char * | to_file, | |||
| unsigned int | file_line, | |||
| unsigned int | sysp | |||
| ) |
Definition at line 907 of file directives.c.
References cpp_reader::cb, cpp_callbacks::file_change, cpp_reader::line_table, linemap_add(), linemap_line_start(), map, NULL, and line_map::to_line.
| int _cpp_handle_directive | ( | cpp_reader * | pfile, | |
| int | indented | |||
| ) |
Definition at line 333 of file directives.c.
References _cpp_backup_tokens(), _cpp_lex_token(), lexer_state::angled_headers, CLK_ASM, COND, CPP_DL_ERROR, CPP_DL_PEDWARN, cpp_error(), CPP_OPTION, CPP_PEDANTIC, cpp_token_as_text(), dir, cpp_reader::directive, directive_diagnostics(), cpp_hashnode::directive_index, lexer_state::directive_wants_padding, lexer_state::discarding_output, end_directive(), directive::flags, directive::handler, IF_COND, IN_I, cpp_reader::mi_valid, cpp_token::node, lexer_state::parsing_args, pedantic, prepare_directive_trad(), lexer_state::prevent_expansion, skip, lexer_state::skipping, start_directive(), cpp_reader::state, and cpp_token::val.
| void _cpp_init_directives | ( | cpp_reader * | pfile | ) |
Definition at line 2093 of file directives.c.
References cpp_lookup(), cpp_hashnode::directive_index, i, int, length, N_DIRECTIVES, and node.
| void _cpp_init_internal_pragmas | ( | cpp_reader * | pfile | ) |
Definition at line 1070 of file directives.c.
References do_pragma_dependency(), do_pragma_once(), do_pragma_poison(), do_pragma_system_header(), and register_pragma().
| void _cpp_pop_buffer | ( | cpp_reader * | pfile | ) |
Definition at line 2059 of file directives.c.
References _cpp_do_file_change(), _cpp_pop_file_buffer(), cpp_reader::buffer, cpp_reader::buffer_ob, CPP_DL_ERROR, cpp_error_with_line(), cpp_buffer::file, free(), cpp_buffer::if_stack, LC_LEAVE, if_stack::line, directive::name, if_stack::next, cpp_buffer::notes, obstack_free, cpp_buffer::prev, lexer_state::skipping, cpp_reader::state, and if_stack::type.
| void _cpp_restore_pragma_names | ( | cpp_reader * | pfile, | |
| char ** | saved | |||
| ) |
| char** _cpp_save_pragma_names | ( | cpp_reader * | pfile | ) |
| int _cpp_test_assertion | ( | cpp_reader * | pfile, | |
| unsigned int * | value | |||
| ) |
Definition at line 1806 of file directives.c.
References _cpp_backup_tokens(), cpp_reader::cur_token, find_answer(), node, NT_ASSERTION, parse_assertion(), and T_IF.
| static void check_eol | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 213 of file directives.c.
References _cpp_lex_token(), CPP_DL_PEDWARN, cpp_error(), cpp_reader::directive, directive::name, and SEEN_EOL.
| static int count_registered_pragmas | ( | struct pragma_entry * | pe | ) | [static] |
Definition at line 1086 of file directives.c.
References pragma_entry::is_nspace, pragma_entry::next, NULL, pragma_entry::space, and pragma_entry::u.
Referenced by _cpp_save_pragma_names(), and count_registered_pragmas().
| void cpp_assert | ( | cpp_reader * | pfile, | |
| const char * | str | |||
| ) |
| void cpp_define | ( | cpp_reader * | pfile, | |
| const char * | str | |||
| ) |
| unsigned int cpp_errors | ( | cpp_reader * | pfile | ) |
| cpp_callbacks* cpp_get_callbacks | ( | cpp_reader * | pfile | ) |
| struct deps* cpp_get_deps | ( | cpp_reader * | pfile | ) | [read] |
Definition at line 2026 of file directives.c.
Referenced by handle_deferred_opts(), and reader_init().
| cpp_options* cpp_get_options | ( | cpp_reader * | pfile | ) |
| void cpp_handle_deferred_pragma | ( | cpp_reader * | pfile, | |
| const cpp_string * | s | |||
| ) |
Definition at line 1449 of file directives.c.
References cpp_reader::cb, cpp_reader::context, CPP_OPTION, cpp_reader::cur_run, cpp_reader::cur_token, lexer_state::in_deferred_pragma, int, cpp_string::len, cpp_callbacks::line_change, cpp_context::macro, NULL, cpp_context::prev, run_directive(), cpp_reader::state, cpp_string::text, void, XDELETE, and XNEW.
Referenced by cp_lexer_handle_pragma().
| cpp_buffer* cpp_push_buffer | ( | cpp_reader * | pfile, | |
| const uchar * | buffer, | |||
| size_t | len, | |||
| int | from_stage3 | |||
| ) |
Definition at line 2037 of file directives.c.
| void cpp_register_pragma | ( | cpp_reader * | pfile, | |
| const char * | space, | |||
| const char * | name, | |||
| pragma_cb | handler, | |||
| bool | allow_expansion | |||
| ) |
| void cpp_set_callbacks | ( | cpp_reader * | pfile, | |
| cpp_callbacks * | cb | |||
| ) |
| void cpp_unassert | ( | cpp_reader * | pfile, | |
| const char * | str | |||
| ) |
| void cpp_undef | ( | cpp_reader * | pfile, | |
| const char * | macro | |||
| ) |
Definition at line 1950 of file directives.c.
References alloca, buf, len, memcpy, run_directive(), strlen(), and T_UNDEF.
| void cpp_undef_all | ( | cpp_reader * | pfile | ) |
| static void destringize_and_run | ( | cpp_reader * | pfile, | |
| const cpp_string * | in | |||
| ) | [static] |
Definition at line 1376 of file directives.c.
References alloca, cpp_reader::cb, cpp_reader::context, cpp_reader::cur_run, cpp_reader::cur_token, dest, cpp_string::len, cpp_callbacks::line_change, cpp_context::macro, cpp_context::prev, result, run_directive(), src, cpp_string::text, XDELETE, and XNEW.
| static void directive_diagnostics | ( | cpp_reader * | pfile, | |
| const directive * | dir, | |||
| int | indented | |||
| ) | [static] |
Definition at line 297 of file directives.c.
References CPP_DL_PEDWARN, CPP_DL_WARNING, cpp_error(), CPP_PEDANTIC, CPP_WTRADITIONAL, EXTENSION, KANDR, directive::name, directive::origin, lexer_state::skipping, cpp_reader::state, and T_ELIF.
| static void do_assert | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1829 of file directives.c.
References cpp_reader::a_buff, ht::alloc_subobject, cpp_hashnode::answers, BUFF_FRONT, check_eol(), CPP_DL_WARNING, cpp_error(), find_answer(), cpp_reader::hash_table, memcpy, answer::next, node, NODE_NAME, NT_ASSERTION, parse_assertion(), T_ASSERT, and cpp_hashnode::value.
| static void do_define | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 508 of file directives.c.
References _cpp_create_definition(), cpp_reader::cb, CPP_OPTION, cpp_callbacks::define, cpp_reader::directive_line, lex_macro_node(), node, lexer_state::save_comments, and cpp_reader::state.
| static void do_diagnostic | ( | cpp_reader * | pfile, | |
| int | code, | |||
| int | print_dir | |||
| ) | [static] |
Definition at line 923 of file directives.c.
References _cpp_begin_message(), cpp_output_line(), cpp_reader::cur_token, cpp_reader::directive, fprintf(), directive::name, lexer_state::prevent_expansion, and cpp_reader::state.
| static void do_elif | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1578 of file directives.c.
References _cpp_parse_expr(), cpp_reader::buffer, CPP_DL_ERROR, cpp_error(), cpp_error_with_line(), cpp_buffer::if_stack, if_stack::line, if_stack::mi_cmacro, NULL, if_stack::skip_elses, lexer_state::skipping, cpp_reader::state, T_ELIF, T_ELSE, and if_stack::type.
| static void do_else | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1545 of file directives.c.
References cpp_reader::buffer, check_eol(), CPP_DL_ERROR, cpp_error(), cpp_error_with_line(), CPP_OPTION, cpp_buffer::if_stack, if_stack::line, if_stack::mi_cmacro, NULL, if_stack::skip_elses, lexer_state::skipping, cpp_reader::state, T_ELSE, if_stack::type, and if_stack::was_skipping.
| static void do_endif | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1613 of file directives.c.
References cpp_reader::buffer, cpp_reader::buffer_ob, check_eol(), CPP_DL_ERROR, cpp_error(), CPP_OPTION, cpp_buffer::if_stack, cpp_reader::mi_cmacro, if_stack::mi_cmacro, cpp_reader::mi_valid, if_stack::next, NULL, obstack_free, lexer_state::skipping, cpp_reader::state, and if_stack::was_skipping.
| static void do_error | ( | cpp_reader * | pfile | ) | [static] |
| static void do_ident | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 950 of file directives.c.
References cpp_reader::cb, check_eol(), CPP_DL_ERROR, cpp_error(), cpp_get_token(), cpp_reader::directive_line, cpp_callbacks::ident, str, cpp_token::str, and cpp_token::val.
| static void do_if | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1531 of file directives.c.
References _cpp_parse_expr(), cpp_reader::mi_ind_cmacro, push_conditional(), skip, lexer_state::skipping, cpp_reader::state, and T_IF.
| static void do_ifdef | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1484 of file directives.c.
References _cpp_mark_macro_used, check_eol(), lex_macro_node(), node, NT_MACRO, push_conditional(), skip, lexer_state::skipping, cpp_reader::state, and T_IFDEF.
| static void do_ifndef | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1505 of file directives.c.
References _cpp_mark_macro_used, check_eol(), lex_macro_node(), node, NT_MACRO, push_conditional(), skip, lexer_state::skipping, cpp_reader::state, and T_IFNDEF.
| static void do_import | ( | cpp_reader * | pfile | ) | [static] |
| static void do_include | ( | cpp_reader * | pfile | ) | [static] |
| static void do_include_common | ( | cpp_reader * | pfile, | |
| enum include_type | type | |||
| ) | [static] |
Definition at line 662 of file directives.c.
References _cpp_stack_include(), cpp_reader::cb, CPP_DL_ERROR, cpp_error(), CPP_STACK_MAX, line_maps::depth, cpp_reader::directive, cpp_reader::directive_line, free(), cpp_callbacks::include, cpp_reader::line_table, directive::name, parse_include(), and skip_rest_of_line().
| static void do_include_next | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 710 of file directives.c.
References cpp_reader::buffer, CPP_DL_WARNING, cpp_error(), do_include_common(), IT_INCLUDE, IT_INCLUDE_NEXT, and cpp_buffer::prev.
| static void do_line | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 774 of file directives.c.
References _cpp_do_file_change(), check_eol(), CPP_DL_ERROR, CPP_DL_PEDWARN, cpp_error(), cpp_get_token(), cpp_interpret_string_notranslate(), CPP_OPTION, CPP_PEDANTIC, cpp_token_as_text(), LC_RENAME, cpp_string::len, cpp_reader::line_table, line_table, map, line_maps::maps, s, skip_rest_of_line(), cpp_token::str, strtoul_for_line(), line_map::sysp, cpp_string::text, line_map::to_file, token, line_maps::used, and cpp_token::val.
| static void do_linemarker | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 830 of file directives.c.
References _cpp_backup_tokens(), _cpp_do_file_change(), _cpp_fake_include(), cpp_reader::buffer, check_eol(), CPP_DL_ERROR, cpp_error(), cpp_get_token(), cpp_interpret_string_notranslate(), cpp_token_as_text(), LC_ENTER, LC_LEAVE, LC_RENAME, cpp_string::len, cpp_reader::line_table, line_table, map, line_maps::maps, read_flag(), s, skip_rest_of_line(), cpp_token::str, strtoul_for_line(), line_map::sysp, cpp_buffer::sysp, cpp_string::text, line_map::to_file, token, line_maps::used, and cpp_token::val.
| static void do_pragma | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1164 of file directives.c.
References _cpp_backup_tokens(), _cpp_unaligned_alloc(), pragma_entry::allow_expansion, cpp_reader::cb, count, CPP_BUFFER, cpp_get_token(), CPP_OPTION, cpp_reader::cur_token, cpp_callbacks::def_pragma, cpp_reader::directive_line, cpp_reader::directive_result, cpp_token::flags, pragma_entry::handler, lexer_state::in_deferred_pragma, pragma_entry::is_internal, pragma_entry::is_nspace, cpp_string::len, cpp_callbacks::line_change, lookup_pragma_entry(), memcpy, NO_EXPAND, cpp_token::node, NULL, p, cpp_reader::pragmas, lexer_state::prevent_expansion, s, pragma_entry::space, cpp_reader::state, cpp_token::str, cpp_string::text, token, pragma_entry::u, uchar, ustrchr(), and cpp_token::val.
| static void do_pragma_dependency | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1315 of file directives.c.
References _cpp_backup_tokens(), _cpp_compare_file_date(), CPP_DL_WARNING, cpp_error(), cpp_get_token(), do_diagnostic(), free(), ordering, and parse_include().
| static void do_pragma_once | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1246 of file directives.c.
References _cpp_mark_file_once_only(), cpp_reader::buffer, check_eol(), CPP_DL_WARNING, cpp_error(), cpp_buffer::file, NULL, and cpp_buffer::prev.
| static void do_pragma_poison | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1258 of file directives.c.
References _cpp_free_definition(), _cpp_lex_token(), CPP_DL_ERROR, CPP_DL_WARNING, cpp_error(), cpp_hashnode::flags, cpp_token::node, NODE_DIAGNOSTIC, NODE_NAME, NODE_POISONED, NT_MACRO, lexer_state::poisoned_ok, cpp_reader::state, and cpp_token::val.
| static void do_pragma_system_header | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1296 of file directives.c.
References cpp_reader::buffer, check_eol(), CPP_DL_WARNING, cpp_error(), cpp_make_system_header(), cpp_buffer::prev, and skip_rest_of_line().
| static void do_sccs | ( | cpp_reader *pfile | ATTRIBUTE_UNUSED | ) | [static] |
Definition at line 1478 of file directives.c.
| static void do_unassert | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1873 of file directives.c.
References _cpp_free_definition(), cpp_hashnode::answers, check_eol(), find_answer(), answer::next, node, NT_ASSERTION, NT_VOID, p, parse_assertion(), T_UNASSERT, and cpp_hashnode::value.
| static void do_undef | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 527 of file directives.c.
References _cpp_free_definition(), _cpp_warn_if_unused_macro(), cpp_reader::cb, check_eol(), CPP_DL_WARNING, cpp_error(), CPP_OPTION, cpp_reader::directive_line, cpp_hashnode::flags, lex_macro_node(), node, NODE_NAME, NODE_WARN, NT_MACRO, NULL, cpp_callbacks::undef, and warn_unused_macros.
| static void do_warning | ( | cpp_reader * | pfile | ) | [static] |
| static void end_directive | ( | cpp_reader * | pfile, | |
| int | skip_line | |||
| ) | [static] |
Definition at line 235 of file directives.c.
References _cpp_remove_overlay(), lexer_state::angled_headers, tokenrun::base, cpp_reader::base_run, CPP_OPTION, cpp_reader::cur_run, cpp_reader::cur_token, cpp_reader::directive, discard_comments(), lexer_state::in_directive, lexer_state::in_expression, cpp_reader::keep_tokens, lexer_state::prevent_expansion, lexer_state::save_comments, skip_rest_of_line(), cpp_reader::state, and T_DEFINE.
| static struct answer ** find_answer | ( | cpp_hashnode * | node, | |
| const struct answer * | candidate | |||
| ) | [static, read] |
Definition at line 1779 of file directives.c.
References _cpp_equiv_tokens(), cpp_hashnode::answers, answer::count, answer::first, i, answer::next, result, and cpp_hashnode::value.
| static const cpp_token * get__Pragma_string | ( | cpp_reader * | pfile | ) | [static] |
| static const cpp_token * get_token_no_padding | ( | cpp_reader * | pfile | ) | [static] |
| static char * glue_header_name | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 580 of file directives.c.
References CPP_DL_ERROR, cpp_error(), cpp_spell_token(), cpp_token_len(), cpp_token::flags, get_token_no_padding(), len, PREV_WHITE, token, uchar, xmalloc(), and xrealloc().
| static void handle_assertion | ( | cpp_reader * | pfile, | |
| const char * | str, | |||
| int | type | |||
| ) | [static] |
Definition at line 1975 of file directives.c.
References alloca, buf, count, memcpy, p, run_directive(), strchr, and strlen().
| static struct pragma_entry * insert_pragma_entry | ( | cpp_reader * | pfile, | |
| struct pragma_entry ** | chain, | |||
| const cpp_hashnode * | pragma, | |||
| pragma_cb | handler, | |||
| bool | allow_expansion, | |||
| bool | internal | |||
| ) | [static, read] |
| static cpp_hashnode * lex_macro_node | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 472 of file directives.c.
References _cpp_lex_token(), CPP_DL_ERROR, cpp_error(), cpp_reader::directive, cpp_token::flags, cpp_hashnode::flags, spec_nodes::n_defined, directive::name, NAMED_OP, node, cpp_token::node, NODE_NAME, NODE_POISONED, NULL, cpp_reader::spec_nodes, token, and cpp_token::val.
| static struct pragma_entry * lookup_pragma_entry | ( | struct pragma_entry * | chain, | |
| const cpp_hashnode * | pragma | |||
| ) | [static, read] |
Definition at line 966 of file directives.c.
References pragma_entry::next, and pragma_entry::pragma.
| static int parse_answer | ( | cpp_reader * | pfile, | |
| struct answer ** | answerp, | |||
| int | type | |||
| ) | [static] |
Definition at line 1671 of file directives.c.
References _cpp_backup_tokens(), _cpp_extend_buff(), cpp_reader::a_buff, BUFF_FRONT, BUFF_ROOM, answer::count, CPP_DL_ERROR, cpp_error(), cpp_get_token(), dest, first, cpp_token::flags, answer::next, NULL, PREV_WHITE, T_IF, T_UNASSERT, and token.
| static cpp_hashnode * parse_assertion | ( | cpp_reader * | pfile, | |
| struct answer ** | answerp, | |||
| int | type | |||
| ) | [static] |
Definition at line 1747 of file directives.c.
References alloca, CPP_DL_ERROR, cpp_error(), cpp_get_token(), cpp_lookup(), len, memcpy, cpp_token::node, NODE_LEN, NODE_NAME, parse_answer(), lexer_state::prevent_expansion, result, cpp_reader::state, sym, and cpp_token::val.
| static const char * parse_include | ( | cpp_reader * | pfile, | |
| int * | pangle_brackets | |||
| ) | [static] |
Definition at line 623 of file directives.c.
References check_eol(), CPP_DL_ERROR, cpp_error(), dir, cpp_reader::directive, get_token_no_padding(), glue_header_name(), cpp_string::len, memcpy, directive::name, NULL, cpp_token::str, cpp_string::text, U, cpp_token::val, and xmalloc().
| static void prepare_directive_trad | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 266 of file directives.c.
References _cpp_overlay_buffer(), _cpp_scan_out_logical_line(), cpp_reader::base, cpp_reader::cur, cpp_reader::directive, EXPAND, directive::flags, lexer_state::in_expression, NULL, cpp_reader::out, lexer_state::prevent_expansion, lexer_state::skipping, cpp_reader::state, T_DEFINE, T_ELIF, and T_IF.
| static void push_conditional | ( | cpp_reader * | pfile, | |
| int | skip, | |||
| int | type, | |||
| const cpp_hashnode * | cmacro | |||
| ) | [static] |
Definition at line 1644 of file directives.c.
References cpp_reader::buffer, cpp_reader::buffer_ob, cpp_reader::directive_line, cpp_buffer::if_stack, if_stack::line, cpp_reader::mi_cmacro, if_stack::mi_cmacro, cpp_reader::mi_valid, if_stack::next, if_stack::skip_elses, lexer_state::skipping, cpp_reader::state, if_stack::type, if_stack::was_skipping, and XOBNEW.
| static unsigned int read_flag | ( | cpp_reader * | pfile, | |
| unsigned int | last | |||
| ) | [static] |
Definition at line 730 of file directives.c.
References _cpp_lex_token(), CPP_DL_ERROR, cpp_error(), cpp_token_as_text(), cpp_string::len, cpp_token::str, cpp_string::text, token, and cpp_token::val.
| static void register_pragma | ( | cpp_reader * | pfile, | |
| const char * | space, | |||
| const char * | name, | |||
| pragma_cb | handler, | |||
| bool | allow_expansion, | |||
| bool | internal | |||
| ) | [static] |
Definition at line 1013 of file directives.c.
References abort, CPP_DL_ICE, cpp_error(), cpp_lookup(), insert_pragma_entry(), pragma_entry::is_nspace, lookup_pragma_entry(), node, NODE_NAME, NULL, cpp_reader::pragmas, pragma_entry::space, strlen(), pragma_entry::u, and U.
Referenced by _cpp_init_internal_pragmas(), and cpp_register_pragma().
| static char ** restore_registered_pragmas | ( | cpp_reader * | pfile, | |
| struct pragma_entry * | pe, | |||
| char ** | sd | |||
| ) | [static] |
Definition at line 1131 of file directives.c.
References cpp_lookup(), free(), pragma_entry::is_nspace, pragma_entry::next, NULL, pragma_entry::pragma, pragma_entry::space, strlen(), pragma_entry::u, and U.
Referenced by _cpp_restore_pragma_names(), and restore_registered_pragmas().
| static void run_directive | ( | cpp_reader * | pfile, | |
| int | dir_no, | |||
| const char * | buf, | |||
| size_t | count | |||
| ) | [static] |
Definition at line 446 of file directives.c.
References _cpp_clean_line(), _cpp_pop_buffer(), cpp_reader::buffer, CPP_OPTION, cpp_push_buffer(), cpp_reader::directive, end_directive(), cpp_buffer::file, directive::handler, NULL, prepare_directive_trad(), cpp_buffer::prev, start_directive(), and uchar.
| static char ** save_registered_pragmas | ( | struct pragma_entry * | pe, | |
| char ** | sd | |||
| ) | [static] |
Definition at line 1102 of file directives.c.
References HT_LEN, HT_STR, cpp_hashnode::ident, pragma_entry::is_nspace, pragma_entry::next, NULL, pragma_entry::pragma, pragma_entry::space, pragma_entry::u, and xmemdup().
Referenced by _cpp_save_pragma_names(), and save_registered_pragmas().
| static void skip_rest_of_line | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 199 of file directives.c.
References _cpp_lex_token(), _cpp_pop_context(), cpp_reader::context, cpp_context::prev, and SEEN_EOL.
| static void start_directive | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 222 of file directives.c.
References cpp_reader::directive_line, cpp_reader::directive_result, line_maps::highest_line, lexer_state::in_directive, cpp_reader::line_table, lexer_state::save_comments, and cpp_reader::state.
| static int undefine_macros | ( | cpp_reader *pfile | ATTRIBUTE_UNUSED, | |
| cpp_hashnode * | h, | |||
| void *data_p | ATTRIBUTE_UNUSED | |||
| ) | [static] |
Definition at line 557 of file directives.c.
References cpp_hashnode::flags, NODE_BUILTIN, NODE_DISABLED, NODE_POISONED, and NT_VOID.
| static int undefine_macros | ( | cpp_reader * | , | |
| cpp_hashnode * | , | |||
| void * | ||||
| ) | [static] |
Referenced by cpp_undef_all().
const directive linemarker_dir [static] |
1.5.6