#include "config.h"#include "system.h"#include "cpplib.h"#include "cpphash.h"#include "obstack.h"

Go to the source code of this file.
Data Types | |
| type | answer |
| type | if_stack |
| type | pragma_entry |
| type | directive |
Defines | |
| #define | KANDR 0 |
| #define | STDC89 1 |
| #define | EXTENSION 2 |
| #define | COND (1 << 0) |
| #define | IF_COND (1 << 1) |
| #define | INCL (1 << 2) |
| #define | IN_I (1 << 3) |
| #define | EXPAND (1 << 4) |
| #define | DIRECTIVE_TABLE |
| #define | D(name, t, o, f) static void CONCAT2(do_,name) PARAMS ((cpp_reader *)); |
| #define | D(n, tag, o, f) tag, |
| #define | D(name, t, origin, flags) |
| #define | SEEN_EOL() (pfile->cur_token[-1].type == CPP_EOF) |
Typedefs | |
| typedef void pragma_cb | PARAMS ((cpp_reader *)) |
| typedef struct directive | directive |
Enumerations | |
| enum | { N_DIRECTIVES } |
Functions/Subroutines | |
| static void skip_rest_of_line | PARAMS ((cpp_reader *)) |
| static void end_directive | PARAMS ((cpp_reader *, int)) |
| static void directive_diagnostics | PARAMS ((cpp_reader *, const directive *, int)) |
| static void run_directive | PARAMS ((cpp_reader *, int, const char *, size_t)) |
| static void push_conditional | PARAMS ((cpp_reader *, int, int, const cpp_hashnode *)) |
| static unsigned int read_flag | PARAMS ((cpp_reader *, unsigned int)) |
| static uchar *dequote_string | PARAMS ((cpp_reader *, const uchar *, unsigned int)) |
| static int strtoul_for_line | PARAMS ((const uchar *, unsigned int, unsigned long *)) |
| static void do_diagnostic | PARAMS ((cpp_reader *, int, int)) |
| static void do_include_common | PARAMS ((cpp_reader *, enum include_type)) |
| static struct pragma_entry *lookup_pragma_entry | PARAMS ((struct pragma_entry *, const cpp_hashnode *pragma)) |
| static struct pragma_entry *insert_pragma_entry | PARAMS ((cpp_reader *, struct pragma_entry **, const cpp_hashnode *, pragma_cb)) |
| static void destringize_and_run | PARAMS ((cpp_reader *, const cpp_string *)) |
| static int parse_answer | PARAMS ((cpp_reader *, struct answer **, int)) |
| static struct answer **find_answer | PARAMS ((cpp_hashnode *, const struct answer *)) |
| static void handle_assertion | PARAMS ((cpp_reader *, const char *, int)) |
| static void | skip_rest_of_line (cpp_reader *pfile) |
| static void | check_eol (cpp_reader *pfile) |
| static void | start_directive (cpp_reader *pfile) |
| static void | end_directive (cpp_reader *pfile, int skip_line) |
| static void | prepare_directive_trad (cpp_reader *pfile) |
| static void | directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented) |
| int | _cpp_handle_directive (cpp_reader *pfile, int indented) |
| static void | run_directive (cpp_reader *pfile, int dir_no, const char *buf, size_t count) |
| static cpp_hashnode * | lex_macro_node (cpp_reader *pfile) |
| static void | do_define (cpp_reader *pfile) |
| static void | do_undef (cpp_reader *pfile) |
| static const cpp_token * | glue_header_name (cpp_reader *pfile) |
| static const cpp_token * | parse_include (cpp_reader *pfile) |
| static void | do_include_common (cpp_reader *pfile, enum include_type type) |
| static void | do_include (cpp_reader *pfile) |
| static void | do_import (cpp_reader *pfile) |
| static void | do_include_next (cpp_reader *pfile) |
| static unsigned int | read_flag (cpp_reader *pfile, unsigned int last) |
| static uchar * | dequote_string (cpp_reader *pfile, const uchar *str, unsigned int len) |
| static int | strtoul_for_line (uchar *str, unsigned int len, unsigned long *nump) const |
| static void | do_line (cpp_reader *pfile) |
| static void | do_linemarker (cpp_reader *pfile) |
| void | _cpp_do_file_change (cpp_reader *pfile, enum lc_reason reason, const char *to_file, unsigned int file_line, unsigned int sysp) |
| static void | do_diagnostic (cpp_reader *pfile, int code, int print_dir) |
| static void | do_error (cpp_reader *pfile) |
| static void | do_warning (cpp_reader *pfile) |
| static void | do_ident (cpp_reader *pfile) |
| static struct pragma_entry * | lookup_pragma_entry (struct pragma_entry *chain, const cpp_hashnode *pragma) |
| static struct pragma_entry * | insert_pragma_entry (cpp_reader *pfile, struct pragma_entry **chain, const cpp_hashnode *pragma, pragma_cb handler) |
| void | cpp_register_pragma (cpp_reader *pfile, const char *space, const char *name, pragma_cb handler) |
| void | _cpp_init_internal_pragmas (cpp_reader *pfile) |
| static void | do_pragma (cpp_reader *pfile) |
| static void | do_pragma_once (cpp_reader *pfile) |
| static void | do_pragma_poison (cpp_reader *pfile) |
| static void | do_pragma_system_header (cpp_reader *pfile) |
| static void | do_pragma_dependency (cpp_reader *pfile) |
| static const cpp_token * | get_token_no_padding (cpp_reader *pfile) |
| static const cpp_token * | get__Pragma_string (cpp_reader *pfile) |
| static void | destringize_and_run (cpp_reader *pfile, const cpp_string *in) |
| void | _cpp_do__Pragma (cpp_reader *pfile) |
| static void | do_sccs (pfile) |
| static void | do_ifdef (cpp_reader *pfile) |
| static void | do_ifndef (cpp_reader *pfile) |
| static void | do_if (cpp_reader *pfile) |
| static void | do_else (cpp_reader *pfile) |
| static void | do_elif (cpp_reader *pfile) |
| static void | do_endif (cpp_reader *pfile) |
| static void | push_conditional (cpp_reader *pfile, int skip, int type, const cpp_hashnode *cmacro) |
| static int | parse_answer (cpp_reader *pfile, struct answer **answerp, int type) |
| static cpp_hashnode * | parse_assertion (cpp_reader *pfile, struct answer **answerp, int type) |
| static struct answer ** | find_answer (cpp_hashnode *node, const struct answer *candidate) |
| int | _cpp_test_assertion (cpp_reader *pfile, unsigned int *value) |
| static void | do_assert (cpp_reader *pfile) |
| static void | do_unassert (cpp_reader *pfile) |
| void | cpp_define (cpp_reader *pfile, const char *str) |
| void | _cpp_define_builtin (cpp_reader *pfile, const char *str) |
| void | cpp_undef (cpp_reader *pfile, const char *macro) |
| void | cpp_assert (cpp_reader *pfile, const char *str) |
| void | cpp_unassert (cpp_reader *pfile, const char *str) |
| static void | handle_assertion (cpp_reader *pfile, const char *str, int type) |
| unsigned int | cpp_errors (cpp_reader *pfile) |
| cpp_options * | cpp_get_options (cpp_reader *pfile) |
| cpp_callbacks * | cpp_get_callbacks (cpp_reader *pfile) |
| struct line_maps * | cpp_get_line_maps (cpp_reader *pfile) |
| void | cpp_set_callbacks (cpp_reader *pfile, cpp_callbacks *cb) |
| cpp_buffer * | cpp_push_buffer (cpp_reader *pfile, const uchar *buffer, size_t len, int from_stage3, int return_at_eof) |
| void | _cpp_pop_buffer (cpp_reader *pfile) |
| void | _cpp_init_directives (cpp_reader *pfile) |
Variables | |
| static const directive | dtable [] |
| static const directive | linemarker_dir |
| #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)
| #define EXPAND (1 << 4) |
Definition at line 80 of file cpplib.c.
Referenced by cvrt_exp_to_pdg(), and prepare_directive_trad().
| #define EXTENSION 2 |
| #define IN_I (1 << 3) |
| #define KANDR 0 |
| #define SEEN_EOL | ( | ) | (pfile->cur_token[-1].type == CPP_EOF) |
Definition at line 202 of file cpplib.c.
Referenced by check_eol(), check_eol_return_comments(), and skip_rest_of_line().
| typedef void directive_handler PARAMS((cpp_reader *)) |
| void _cpp_define_builtin | ( | cpp_reader * | pfile, | |
| const char * | str | |||
| ) |
| void _cpp_do__Pragma | ( | cpp_reader * | pfile | ) |
| 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 916 of file cpplib.c.
Referenced by _cpp_pop_buffer(), _cpp_stack_file(), cpp_change_file(), cpp_make_system_header(), do_line(), do_linemarker(), and stack_include_file().
| int _cpp_handle_directive | ( | cpp_reader * | pfile, | |
| int | indented | |||
| ) |
Definition at line 345 of file cpplib.c.
Referenced by _cpp_lex_token(), _cpp_scan_out_logical_line(), and scan_out_logical_line().
| void _cpp_init_directives | ( | cpp_reader * | pfile | ) |
| void _cpp_init_internal_pragmas | ( | cpp_reader * | pfile | ) |
| void _cpp_pop_buffer | ( | cpp_reader * | pfile | ) |
Definition at line 1948 of file cpplib.c.
Referenced by _cpp_get_fresh_line(), _cpp_read_logical_line_trad(), builtin_macro(), continue_after_nul(), cpp_read_state(), destringize_and_run(), paste_tokens(), and run_directive().
| int _cpp_test_assertion | ( | cpp_reader * | pfile, | |
| unsigned int * | value | |||
| ) |
| static void check_eol | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 221 of file cpplib.c.
References _cpp_lex_token(), cpp_error(), DL_PEDWARN, and SEEN_EOL.
Referenced by do_assert(), do_else(), do_endif(), do_ident(), do_ifdef(), do_ifndef(), do_include_common(), do_line(), do_linemarker(), do_pragma_once(), do_pragma_system_header(), do_unassert(), do_undef(), and parse_include().
| void cpp_assert | ( | cpp_reader * | pfile, | |
| const char * | str | |||
| ) |
| void cpp_define | ( | cpp_reader * | pfile, | |
| const char * | str | |||
| ) |
Definition at line 1786 of file cpplib.c.
Referenced by builtin_define_std(), builtin_define_type_max(), builtin_define_with_hex_fp_value(), builtin_define_with_int_value(), builtin_define_with_value(), builtin_define_with_value_n(), c_cpp_builtins(), cb_register_builtins(), finish_options(), process_file(), and read_scan_file().
| unsigned int cpp_errors | ( | cpp_reader * | pfile | ) |
Definition at line 1878 of file cpplib.c.
Referenced by c_common_post_options(), and read_scan_file().
| cpp_callbacks* cpp_get_callbacks | ( | cpp_reader * | pfile | ) |
Definition at line 1894 of file cpplib.c.
Referenced by c_common_init(), c_common_no_more_pch(), c_common_post_options(), c_common_read_pch(), cp_lexer_new_main(), darwin_register_frameworks(), init_c_lex(), init_pp_output(), read_scan_file(), and setup_callbacks().
| struct line_maps* cpp_get_line_maps | ( | cpp_reader * | pfile | ) | [read] |
| cpp_options* cpp_get_options | ( | cpp_reader * | pfile | ) |
Definition at line 1886 of file cpplib.c.
Referenced by _cpp_find_file(), c_common_handle_option(), c_common_init_options(), c_common_pch_pragma(), c_common_valid_pch(), cp_lexer_new_main(), init_pp_output(), interpret_integer(), pp_file_change(), preprocess_file(), read_scan_file(), reader_init(), register_include_chains(), and remove_duplicates().
| cpp_buffer* cpp_push_buffer | ( | cpp_reader * | pfile, | |
| const uchar * | buffer, | |||
| size_t | len, | |||
| int | from_stage3, | |||
| int | return_at_eof | |||
| ) |
Definition at line 1921 of file cpplib.c.
References BOL, CPP_OPTION, memset, and xobnew.
Referenced by _cpp_stack_file(), builtin_macro(), cpp_read_state(), destringize_and_run(), paste_tokens(), read_scan_file(), run_directive(), and stack_include_file().
| void cpp_register_pragma | ( | cpp_reader * | pfile, | |
| const char * | space, | |||
| const char * | name, | |||
| pragma_cb | handler | |||
| ) |
Definition at line 1029 of file cpplib.c.
References abort, cpp_error(), cpp_lookup(), DL_ICE, insert_pragma_entry(), pragma_entry::is_nspace, lookup_pragma_entry(), node, NODE_NAME, NULL, pragma_entry::space, strlen(), pragma_entry::u, and U.
Referenced by _cpp_init_internal_pragmas(), c_register_pragma(), c_register_pragma_with_expansion(), init_cp_pragma(), and init_pragma().
| 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 | |||
| ) |
| static uchar* dequote_string | ( | cpp_reader * | pfile, | |
| const uchar * | str, | |||
| unsigned int | len | |||
| ) | [static] |
Definition at line 748 of file cpplib.c.
References _cpp_unaligned_alloc(), c, cpp_parse_escape(), dst, result, and uchar.
Referenced by do_line(), and do_linemarker().
| static void destringize_and_run | ( | cpp_reader * | pfile, | |
| const cpp_string * | in | |||
| ) | [static] |
Definition at line 1268 of file cpplib.c.
References alloca, dest, free(), cpp_string::len, result, run_directive(), src, cpp_string::text, and xnew.
Referenced by _cpp_do__Pragma().
| static void directive_diagnostics | ( | cpp_reader * | pfile, | |
| const directive * | dir, | |||
| int | indented | |||
| ) | [static] |
Definition at line 306 of file cpplib.c.
References cpp_error(), CPP_PEDANTIC, CPP_WTRADITIONAL, DL_PEDWARN, DL_WARNING, EXTENSION, KANDR, directive::name, directive::origin, and T_ELIF.
Referenced by _cpp_handle_directive().
| static void do_assert | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1713 of file cpplib.c.
References cpp_hashnode::answers, BUFF_FRONT, check_eol(), cpp_error(), DL_WARNING, find_answer(), 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 519 of file cpplib.c.
References _cpp_create_definition(), CPP_OPTION, lex_macro_node(), and node.
| static void do_diagnostic | ( | cpp_reader * | pfile, | |
| int | code, | |||
| int | print_dir | |||
| ) | [static] |
Definition at line 933 of file cpplib.c.
References _cpp_begin_message(), cpp_output_line(), and fprintf().
Referenced by do_error(), do_pragma_dependency(), and do_warning().
| static void do_elif | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1447 of file cpplib.c.
References _cpp_parse_expr(), cpp_error(), cpp_error_with_line(), DL_ERROR, cpp_buffer::if_stack, if_stack::line, if_stack::mi_cmacro, NULL, if_stack::skip_elses, T_ELIF, T_ELSE, and if_stack::type.
| static void do_else | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1413 of file cpplib.c.
References check_eol(), cpp_error(), cpp_error_with_line(), CPP_OPTION, DL_ERROR, cpp_buffer::if_stack, if_stack::line, if_stack::mi_cmacro, NULL, if_stack::skip_elses, T_ELSE, if_stack::type, and if_stack::was_skipping.
| static void do_endif | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1483 of file cpplib.c.
References check_eol(), cpp_error(), CPP_OPTION, DL_ERROR, cpp_buffer::if_stack, if_stack::mi_cmacro, if_stack::next, NULL, obstack_free, and if_stack::was_skipping.
| static void do_error | ( | cpp_reader * | pfile | ) | [static] |
| static void do_ident | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 967 of file cpplib.c.
References check_eol(), cpp_error(), cpp_get_token(), DL_ERROR, str, cpp_token::str, and cpp_token::val.
| static void do_if | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1398 of file cpplib.c.
References _cpp_parse_expr(), push_conditional(), skip, and T_IF.
| static void do_ifdef | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1349 of file cpplib.c.
References _cpp_mark_macro_used, check_eol(), lex_macro_node(), node, NT_MACRO, push_conditional(), skip, and T_IFDEF.
| static void do_ifndef | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1371 of file cpplib.c.
References _cpp_mark_macro_used, check_eol(), lex_macro_node(), node, NT_MACRO, push_conditional(), skip, and T_IFNDEF.
| static void do_import | ( | cpp_reader * | pfile | ) | [static] |
| static void do_include | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 697 of file cpplib.c.
References do_include_common(), and IT_INCLUDE.
Referenced by do_include_next().
| static void do_include_common | ( | cpp_reader * | pfile, | |
| enum include_type | type | |||
| ) | [static] |
Definition at line 657 of file cpplib.c.
References _cpp_execute_include(), check_eol(), cpp_error(), CPP_OPTION, CPP_STACK_MAX, DL_ERROR, DL_WARNING, IT_IMPORT, IT_INCLUDE, IT_INCLUDE_NEXT, parse_include(), and skip_rest_of_line().
Referenced by do_import(), do_include(), and do_include_next().
| static void do_include_next | ( | cpp_reader * | pfile | ) | [static] |
| static void do_line | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 797 of file cpplib.c.
References _cpp_do_file_change(), check_eol(), cpp_error(), cpp_get_token(), CPP_OPTION, CPP_PEDANTIC, cpp_token_as_text(), dequote_string(), DL_ERROR, DL_PEDWARN, LC_RENAME, cpp_string::len, skip_rest_of_line(), cpp_token::str, strtoul_for_line(), cpp_string::text, token, and cpp_token::val.
| static void do_linemarker | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 845 of file cpplib.c.
References _cpp_backup_tokens(), _cpp_do_file_change(), _cpp_fake_include(), check_eol(), cpp_error(), cpp_get_token(), cpp_token_as_text(), dequote_string(), DL_ERROR, LC_ENTER, LC_LEAVE, LC_RENAME, cpp_string::len, read_flag(), skip_rest_of_line(), cpp_token::str, strtoul_for_line(), cpp_string::text, token, and cpp_token::val.
| static void do_pragma | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1093 of file cpplib.c.
References _cpp_backup_tokens(), count, cpp_get_token(), pragma_entry::handler, pragma_entry::is_nspace, lookup_pragma_entry(), cpp_token::node, NULL, p, pragma_entry::space, token, pragma_entry::u, and cpp_token::val.
Referenced by destringize_and_run().
| static void do_pragma_dependency | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1205 of file cpplib.c.
References _cpp_backup_tokens(), _cpp_compare_file_date(), cpp_error(), cpp_get_token(), cpp_token_as_text(), DL_WARNING, do_diagnostic(), ordering, and parse_include().
Referenced by _cpp_init_internal_pragmas().
| static void do_pragma_once | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1130 of file cpplib.c.
References _cpp_never_reread(), check_eol(), cpp_error(), CPP_OPTION, DL_WARNING, NULL, and warn_deprecated.
Referenced by _cpp_init_internal_pragmas().
| static void do_pragma_poison | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1147 of file cpplib.c.
References _cpp_free_definition(), _cpp_lex_token(), cpp_error(), DL_ERROR, DL_WARNING, cpp_hashnode::flags, cpp_token::node, NODE_DIAGNOSTIC, NODE_NAME, NODE_POISONED, NT_MACRO, and cpp_token::val.
Referenced by _cpp_init_internal_pragmas().
| static void do_pragma_system_header | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1185 of file cpplib.c.
References check_eol(), cpp_error(), cpp_make_system_header(), DL_WARNING, cpp_buffer::prev, and skip_rest_of_line().
Referenced by _cpp_init_internal_pragmas().
| static void do_unassert | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1747 of file cpplib.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 539 of file cpplib.c.
References _cpp_free_definition(), _cpp_warn_if_unused_macro(), check_eol(), cpp_error(), CPP_OPTION, DL_WARNING, cpp_hashnode::flags, lex_macro_node(), node, NODE_NAME, NODE_WARN, NT_MACRO, NULL, and warn_unused_macros.
| static void do_warning | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 958 of file cpplib.c.
References DL_WARNING_SYSHDR, and do_diagnostic().
Referenced by c_cannot_inline_tree_fn(), and inlinable_function_p().
| static void end_directive | ( | cpp_reader * | pfile, | |
| int | skip_line | |||
| ) | [static] |
Definition at line 244 of file cpplib.c.
References _cpp_remove_overlay(), CPP_OPTION, discard_comments(), skip_rest_of_line(), and T_DEFINE.
Referenced by _cpp_handle_directive(), ANL_REGION_CONSTRUCT::_userEndParallel(), destringize_and_run(), and run_directive().
| static struct answer** find_answer | ( | cpp_hashnode * | node, | |
| const struct answer * | candidate | |||
| ) | [static, read] |
Definition at line 1659 of file cpplib.c.
References _cpp_equiv_tokens(), answer::count, answer::first, i, answer::next, and result.
Referenced by _cpp_test_assertion(), do_assert(), do_unassert(), and test_assertion().
| static const cpp_token* get__Pragma_string | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1247 of file cpplib.c.
References get_token_no_padding(), and NULL.
Referenced by _cpp_do__Pragma().
| static const cpp_token* get_token_no_padding | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 1233 of file cpplib.c.
References cpp_get_token(), and result.
Referenced by get__Pragma_string(), glue_header_name(), and parse_include().
| static const cpp_token* glue_header_name | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 566 of file cpplib.c.
References _cpp_temp_token(), _cpp_unaligned_alloc(), cpp_error(), cpp_spell_token(), cpp_token_len(), DL_ERROR, cpp_token::flags, free(), get_token_no_padding(), len, cpp_string::len, memcpy, NULL, PREV_WHITE, PTR, cpp_token::str, cpp_string::text, token, cpp_token::val, xmalloc(), and xrealloc().
Referenced by parse_include().
| static void handle_assertion | ( | cpp_reader * | pfile, | |
| const char * | str, | |||
| int | type | |||
| ) | [static] |
Definition at line 1852 of file cpplib.c.
References alloca, buf, count, memcpy, p, run_directive(), strchr, and strlen().
Referenced by cpp_assert(), and cpp_unassert().
| static struct pragma_entry* insert_pragma_entry | ( | cpp_reader * | pfile, | |
| struct pragma_entry ** | chain, | |||
| const cpp_hashnode * | pragma, | |||
| pragma_cb | handler | |||
| ) | [static, read] |
Definition at line 998 of file cpplib.c.
References _cpp_aligned_alloc(), and NULL.
Referenced by cpp_register_pragma(), and register_pragma().
| static cpp_hashnode* lex_macro_node | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 482 of file cpplib.c.
References _cpp_lex_token(), cpp_error(), DL_ERROR, cpp_token::flags, cpp_hashnode::flags, NAMED_OP, node, cpp_token::node, NODE_NAME, NODE_POISONED, NULL, token, and cpp_token::val.
Referenced by do_define(), do_ifdef(), do_ifndef(), and do_undef().
| static struct pragma_entry* lookup_pragma_entry | ( | struct pragma_entry * | chain, | |
| const cpp_hashnode * | pragma | |||
| ) | [static, read] |
Definition at line 984 of file cpplib.c.
Referenced by cpp_register_pragma(), do_pragma(), register_pragma(), and register_pragma_1().
| static void handle_assertion PARAMS | ( | (cpp_reader *, const char *, int) | ) | [static] |
| static struct answer** find_answer PARAMS | ( | (cpp_hashnode *, const struct answer *) | ) | [static, read] |
| static int parse_answer PARAMS | ( | (cpp_reader *, struct answer **, int) | ) | [static] |
| static void destringize_and_run PARAMS | ( | (cpp_reader *, const cpp_string *) | ) | [static] |
| static struct pragma_entry* insert_pragma_entry PARAMS | ( | (cpp_reader *, struct pragma_entry **, const cpp_hashnode *, pragma_cb) | ) | [static, read] |
| static struct pragma_entry* lookup_pragma_entry PARAMS | ( | (struct pragma_entry *, const cpp_hashnode *pragma) | ) | [static, read] |
| static void do_include_common PARAMS | ( | (cpp_reader *, enum include_type) | ) | [static] |
| static void do_diagnostic PARAMS | ( | (cpp_reader *, int, int) | ) | [static] |
| static uchar* dequote_string PARAMS | ( | (cpp_reader *, const uchar *, unsigned int) | ) | [static] |
| static unsigned int read_flag PARAMS | ( | (cpp_reader *, unsigned int) | ) | [static] |
| static void push_conditional PARAMS | ( | (cpp_reader *, int, int, const cpp_hashnode *) | ) | [static] |
| static void run_directive PARAMS | ( | (cpp_reader *, int, const char *, size_t) | ) | [static] |
| static void directive_diagnostics PARAMS | ( | (cpp_reader *, const directive *, int) | ) | [static] |
| static void end_directive PARAMS | ( | (cpp_reader *, int) | ) | [static] |
| static void skip_rest_of_line PARAMS | ( | (cpp_reader *) | ) | [static] |
| static int parse_answer | ( | cpp_reader * | pfile, | |
| struct answer ** | answerp, | |||
| int | type | |||
| ) | [static] |
Definition at line 1545 of file cpplib.c.
References _cpp_backup_tokens(), _cpp_extend_buff(), BUFF_FRONT, BUFF_ROOM, answer::count, cpp_error(), cpp_get_token(), dest, DL_ERROR, first, cpp_token::flags, answer::next, NULL, PREV_WHITE, T_IF, T_UNASSERT, and token.
Referenced by parse_assertion().
| static cpp_hashnode* parse_assertion | ( | cpp_reader * | pfile, | |
| struct answer ** | answerp, | |||
| int | type | |||
| ) | [static] |
Definition at line 1624 of file cpplib.c.
References alloca, cpp_error(), cpp_get_token(), cpp_lookup(), DL_ERROR, len, memcpy, cpp_token::node, NODE_LEN, NODE_NAME, parse_answer(), result, sym, and cpp_token::val.
Referenced by _cpp_test_assertion(), do_assert(), do_unassert(), and test_assertion().
| static const cpp_token* parse_include | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 619 of file cpplib.c.
References cpp_error(), dir, DL_ERROR, get_token_no_padding(), glue_header_name(), cpp_string::len, NULL, cpp_token::str, U, and cpp_token::val.
Referenced by do_include_common(), and do_pragma_dependency().
| static void prepare_directive_trad | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 277 of file cpplib.c.
References _cpp_overlay_buffer(), _cpp_read_logical_line_trad(), EXPAND, T_DEFINE, T_ELIF, and T_IF.
Referenced by _cpp_handle_directive(), and run_directive().
| static void push_conditional | ( | cpp_reader * | pfile, | |
| int | skip, | |||
| int | type, | |||
| const cpp_hashnode * | cmacro | |||
| ) | [static] |
Definition at line 1515 of file cpplib.c.
References cpp_buffer::if_stack, if_stack::line, if_stack::mi_cmacro, if_stack::next, if_stack::skip_elses, if_stack::type, if_stack::was_skipping, and xobnew.
Referenced by do_if(), do_ifdef(), and do_ifndef().
| static unsigned int read_flag | ( | cpp_reader * | pfile, | |
| unsigned int | last | |||
| ) | [static] |
Definition at line 722 of file cpplib.c.
References _cpp_lex_token(), cpp_error(), cpp_token_as_text(), DL_ERROR, cpp_string::len, cpp_token::str, cpp_string::text, token, and cpp_token::val.
Referenced by do_linemarker().
| static void run_directive | ( | cpp_reader * | pfile, | |
| int | dir_no, | |||
| const char * | buf, | |||
| size_t | count | |||
| ) | [static] |
Definition at line 455 of file cpplib.c.
References _cpp_pop_buffer(), CPP_OPTION, cpp_push_buffer(), end_directive(), NULL, prepare_directive_trad(), start_directive(), uchar, and void.
Referenced by _cpp_define_builtin(), cpp_define(), cpp_handle_deferred_pragma(), cpp_undef(), destringize_and_run(), handle_assertion(), make_assertion(), make_definition(), and make_undef().
| static void skip_rest_of_line | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 206 of file cpplib.c.
References _cpp_lex_token(), _cpp_pop_context(), and SEEN_EOL.
Referenced by do_include_common(), do_line(), do_linemarker(), do_pragma_system_header(), and end_directive().
| static void start_directive | ( | cpp_reader * | pfile | ) | [static] |
Definition at line 231 of file cpplib.c.
Referenced by _cpp_handle_directive(), destringize_and_run(), and run_directive().
Initial value:
{
DIRECTIVE_TABLE
}
Definition at line 187 of file cpplib.c.
Referenced by expand_invoke(), invoke_build_dtable(), and make_class_data().
const directive linemarker_dir [static] |
1.5.6