osprey-gcc/libcpp/internal.h File Reference

#include "symtab.h"
#include "cpp-id-data.h"

Include dependency graph for internal.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Types

type  cset_converter
type  dummy
type  _cpp_buff
union  utoken
type  tokenrun
type  cpp_context
type  lexer_state
type  spec_nodes
type  _cpp_line_note
type  cpp_buffer
type  cpp_reader

Defines

#define HAVE_ICONV   0
#define BITS_PER_CPPCHAR_T   (CHAR_BIT * sizeof (cppchar_t))
#define VALID_SIGN(c, prevc)
#define CPP_OPTION(PFILE, OPTION)   ((PFILE)->opts.OPTION)
#define CPP_BUFFER(PFILE)   ((PFILE)->buffer)
#define CPP_BUF_COLUMN(BUF, CUR)   ((CUR) - (BUF)->line_base)
#define CPP_BUF_COL(BUF)   CPP_BUF_COLUMN(BUF, (BUF)->cur)
#define CPP_INCREMENT_LINE(PFILE, COLS_HINT)
#define CPP_STACK_MAX   200
#define DEFAULT_ALIGNMENT   offsetof (struct dummy, u)
#define CPP_ALIGN2(size, align)   (((size) + ((align) - 1)) & ~((align) - 1))
#define CPP_ALIGN(size)   CPP_ALIGN2 (size, DEFAULT_ALIGNMENT)
#define _cpp_mark_macro_used(NODE)
#define BUFF_ROOM(BUFF)   (size_t) ((BUFF)->limit - (BUFF)->cur)
#define BUFF_FRONT(BUFF)   ((BUFF)->cur)
#define BUFF_LIMIT(BUFF)   ((BUFF)->limit)
#define FIRST(c)   ((c)->u.iso.first)
#define LAST(c)   ((c)->u.iso.last)
#define CUR(c)   ((c)->u.trad.cur)
#define RLIMIT(c)   ((c)->u.trad.rlimit)
#define _dollar_ok(x)   ((x) == '$' && CPP_OPTION (pfile, dollars_in_ident))
#define is_idchar(x)   (ISIDNUM(x) || _dollar_ok(x))
#define is_numchar(x)   ISIDNUM(x)
#define is_idstart(x)   (ISIDST(x) || _dollar_ok(x))
#define is_numstart(x)   ISDIGIT(x)
#define is_hspace(x)   ISBLANK(x)
#define is_vspace(x)   IS_VSPACE(x)
#define is_nvspace(x)   IS_NVSPACE(x)
#define is_space(x)   IS_SPACE_OR_NUL(x)
#define CPP_PEDANTIC(PF)   CPP_OPTION (PF, pedantic)
#define CPP_WTRADITIONAL(PF)   CPP_OPTION (PF, warn_traditional)
#define DSC(str)   (const unsigned char *)str, sizeof str - 1

Typedefs

typedef int iconv_t
typedef bool(* convert_f )(iconv_t, const unsigned char *, size_t, struct _cpp_strbuf *)
typedef struct _cpp_buff _cpp_buff
typedef struct tokenrun tokenrun
typedef struct cpp_context cpp_context
typedef struct _cpp_line_note _cpp_line_note
typedef struct _cpp_file _cpp_file

Enumerations

enum  include_type {
  IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE,
  IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE,
  IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE,
  IT_INCLUDE, IT_INCLUDE_NEXT, IT_IMPORT, IT_CMDLINE
}

Functions/Subroutines

_cpp_buff_cpp_get_buff (cpp_reader *, size_t)
void _cpp_release_buff (cpp_reader *, _cpp_buff *)
void _cpp_extend_buff (cpp_reader *, _cpp_buff **, size_t)
_cpp_buff_cpp_append_extend_buff (cpp_reader *, _cpp_buff *, size_t)
void _cpp_free_buff (_cpp_buff *)
unsigned char * _cpp_aligned_alloc (cpp_reader *, size_t)
unsigned char * _cpp_unaligned_alloc (cpp_reader *, size_t)
static int cpp_in_system_header (cpp_reader *)
int _cpp_begin_message (cpp_reader *, int, source_location, unsigned int)
void _cpp_free_definition (cpp_hashnode *)
bool _cpp_create_definition (cpp_reader *, cpp_hashnode *)
void _cpp_pop_context (cpp_reader *)
void _cpp_push_text_context (cpp_reader *, cpp_hashnode *, const unsigned char *, size_t)
bool _cpp_save_parameter (cpp_reader *, cpp_macro *, cpp_hashnode *)
bool _cpp_arguments_ok (cpp_reader *, cpp_macro *, const cpp_hashnode *, unsigned int)
const unsigned char * _cpp_builtin_macro_text (cpp_reader *, cpp_hashnode *)
int _cpp_warn_if_unused_macro (cpp_reader *, cpp_hashnode *, void *)
void _cpp_init_hashtable (cpp_reader *, hash_table *)
void _cpp_destroy_hashtable (cpp_reader *)
_cpp_file_cpp_find_file (cpp_reader *, const char *fname, cpp_dir *start_dir, bool fake)
bool _cpp_find_failed (_cpp_file *)
void _cpp_mark_file_once_only (cpp_reader *, struct _cpp_file *)
void _cpp_fake_include (cpp_reader *, const char *)
bool _cpp_stack_file (cpp_reader *, _cpp_file *, bool)
bool _cpp_stack_include (cpp_reader *, const char *, int, enum include_type)
int _cpp_compare_file_date (cpp_reader *, const char *, int)
void _cpp_report_missing_guards (cpp_reader *)
void _cpp_init_files (cpp_reader *)
void _cpp_cleanup_files (cpp_reader *)
void _cpp_pop_file_buffer (cpp_reader *, struct _cpp_file *)
bool _cpp_save_file_entries (cpp_reader *pfile, FILE *f)
bool _cpp_read_file_entries (cpp_reader *, FILE *)
bool _cpp_parse_expr (cpp_reader *)
struct op_cpp_expand_op_stack (cpp_reader *)
void _cpp_process_line_notes (cpp_reader *, int)
void _cpp_clean_line (cpp_reader *)
bool _cpp_get_fresh_line (cpp_reader *)
bool _cpp_skip_block_comment (cpp_reader *)
cpp_token_cpp_temp_token (cpp_reader *)
const cpp_token_cpp_lex_token (cpp_reader *)
cpp_token_cpp_lex_direct (cpp_reader *)
int _cpp_equiv_tokens (const cpp_token *, const cpp_token *)
void _cpp_init_tokenrun (tokenrun *, unsigned int)
void _cpp_maybe_push_include_file (cpp_reader *)
int _cpp_test_assertion (cpp_reader *, unsigned int *)
int _cpp_handle_directive (cpp_reader *, int)
void _cpp_define_builtin (cpp_reader *, const char *)
char ** _cpp_save_pragma_names (cpp_reader *)
void _cpp_restore_pragma_names (cpp_reader *, char **)
void _cpp_do__Pragma (cpp_reader *)
void _cpp_init_directives (cpp_reader *)
void _cpp_init_internal_pragmas (cpp_reader *)
void _cpp_do_file_change (cpp_reader *, enum lc_reason, const char *, unsigned int, unsigned int)
void _cpp_pop_buffer (cpp_reader *)
bool _cpp_scan_out_logical_line (cpp_reader *, cpp_macro *)
bool _cpp_read_logical_line_trad (cpp_reader *)
void _cpp_overlay_buffer (cpp_reader *pfile, const unsigned char *, size_t)
void _cpp_remove_overlay (cpp_reader *)
bool _cpp_create_trad_definition (cpp_reader *, cpp_macro *)
bool _cpp_expansions_different_trad (const cpp_macro *, const cpp_macro *)
unsigned char * _cpp_copy_replacement_text (const cpp_macro *, unsigned char *)
size_t _cpp_replacement_text_len (const cpp_macro *)
cppchar_t _cpp_valid_ucn (cpp_reader *, const unsigned char **, const unsigned char *, int)
void _cpp_destroy_iconv (cpp_reader *)
unsigned char * _cpp_convert_input (cpp_reader *, const char *, unsigned char *, size_t, size_t, off_t *)
const char * _cpp_default_encoding (void)
static int ustrcmp (const unsigned char *, const unsigned char *)
static int ustrncmp (const unsigned char *, const unsigned char *, size_t)
static size_t ustrlen (const unsigned char *)
static unsigned char * uxstrdup (const unsigned char *)
static unsigned char * ustrchr (const unsigned char *, int)
static int ufputs (const unsigned char *, FILE *)
static int ustrcspn (const unsigned char *, const char *)

Variables

unsigned char _cpp_trigraph_map [UCHAR_MAX+1]


Define Documentation

#define _cpp_mark_macro_used ( NODE   ) 

Value:

do {          \
  if ((NODE)->type == NT_MACRO && !((NODE)->flags & NODE_BUILTIN))  \
    (NODE)->value.macro->used = 1; } while (0)

Definition at line 93 of file internal.h.

#define _dollar_ok (  )     ((x) == '$' && CPP_OPTION (pfile, dollars_in_ident))

Definition at line 453 of file internal.h.

#define BITS_PER_CPPCHAR_T   (CHAR_BIT * sizeof (cppchar_t))

Definition at line 53 of file internal.h.

#define BUFF_FRONT ( BUFF   )     ((BUFF)->cur)

Definition at line 114 of file internal.h.

#define BUFF_LIMIT ( BUFF   )     ((BUFF)->limit)

Definition at line 115 of file internal.h.

#define BUFF_ROOM ( BUFF   )     (size_t) ((BUFF)->limit - (BUFF)->cur)

Definition at line 113 of file internal.h.

#define CPP_ALIGN ( size   )     CPP_ALIGN2 (size, DEFAULT_ALIGNMENT)

Definition at line 91 of file internal.h.

#define CPP_ALIGN2 ( size,
align   )     (((size) + ((align) - 1)) & ~((align) - 1))

Definition at line 90 of file internal.h.

#define CPP_BUF_COL ( BUF   )     CPP_BUF_COLUMN(BUF, (BUF)->cur)

Definition at line 65 of file internal.h.

#define CPP_BUF_COLUMN ( BUF,
CUR   )     ((CUR) - (BUF)->line_base)

Definition at line 64 of file internal.h.

#define CPP_BUFFER ( PFILE   )     ((PFILE)->buffer)

Definition at line 63 of file internal.h.

#define CPP_INCREMENT_LINE ( PFILE,
COLS_HINT   ) 

Value:

do { \
    const struct line_maps *line_table = PFILE->line_table; \
    const struct line_map *map = &line_table->maps[line_table->used-1]; \
    unsigned int line = SOURCE_LINE (map, line_table->highest_line); \
    linemap_line_start (PFILE->line_table, line + 1, COLS_HINT); \
  } while (0)

Definition at line 67 of file internal.h.

Referenced by _cpp_lex_direct(), _cpp_process_line_notes(), _cpp_scan_out_logical_line(), and _cpp_skip_block_comment().

#define CPP_OPTION ( PFILE,
OPTION   )     ((PFILE)->opts.OPTION)

Definition at line 62 of file internal.h.

#define CPP_PEDANTIC ( PF   )     CPP_OPTION (PF, pedantic)

Definition at line 481 of file internal.h.

#define CPP_STACK_MAX   200

Definition at line 76 of file internal.h.

#define CPP_WTRADITIONAL ( PF   )     CPP_OPTION (PF, warn_traditional)

Definition at line 482 of file internal.h.

#define CUR ( c   )     ((c)->u.trad.cur)

Definition at line 137 of file internal.h.

#define DEFAULT_ALIGNMENT   offsetof (struct dummy, u)

Definition at line 89 of file internal.h.

#define DSC ( str   )     (const unsigned char *)str, sizeof str - 1

Definition at line 576 of file internal.h.

#define FIRST ( c   )     ((c)->u.iso.first)

Definition at line 135 of file internal.h.

#define HAVE_ICONV   0

Definition at line 36 of file internal.h.

#define is_hspace (  )     ISBLANK(x)

Definition at line 459 of file internal.h.

#define is_idchar (  )     (ISIDNUM(x) || _dollar_ok(x))

Definition at line 455 of file internal.h.

#define is_idstart (  )     (ISIDST(x) || _dollar_ok(x))

Definition at line 457 of file internal.h.

#define is_numchar (  )     ISIDNUM(x)

Definition at line 456 of file internal.h.

#define is_numstart (  )     ISDIGIT(x)

Definition at line 458 of file internal.h.

#define is_nvspace (  )     IS_NVSPACE(x)

Definition at line 461 of file internal.h.

#define is_space (  )     IS_SPACE_OR_NUL(x)

Definition at line 462 of file internal.h.

#define is_vspace (  )     IS_VSPACE(x)

Definition at line 460 of file internal.h.

#define LAST ( c   )     ((c)->u.iso.last)

Definition at line 136 of file internal.h.

#define RLIMIT ( c   )     ((c)->u.trad.rlimit)

Definition at line 138 of file internal.h.

#define VALID_SIGN ( c,
prevc   ) 

Value:

(((c) == '+' || (c) == '-') && \
   ((prevc) == 'e' || (prevc) == 'E' \
    || (((prevc) == 'p' || (prevc) == 'P') \
        && CPP_OPTION (pfile, extended_numbers))))

Definition at line 56 of file internal.h.


Typedef Documentation

Definition at line 98 of file internal.h.

Definition at line 505 of file internal.h.

Definition at line 231 of file internal.h.

typedef bool(* convert_f)(iconv_t, const unsigned char *, size_t, struct _cpp_strbuf *)

Definition at line 45 of file internal.h.

Definition at line 140 of file internal.h.

typedef int iconv_t

Definition at line 37 of file internal.h.

Definition at line 127 of file internal.h.


Enumeration Type Documentation

Enumerator:
IT_INCLUDE 
IT_INCLUDE_NEXT 
IT_IMPORT 
IT_CMDLINE 
IT_INCLUDE 
IT_INCLUDE_NEXT 
IT_IMPORT 
IT_CMDLINE 
IT_INCLUDE 
IT_INCLUDE_NEXT 
IT_IMPORT 
IT_CMDLINE 
IT_INCLUDE 
IT_INCLUDE_NEXT 
IT_IMPORT 
IT_CMDLINE 

Definition at line 118 of file internal.h.


Function Documentation

unsigned char* _cpp_aligned_alloc ( cpp_reader ,
size_t   
)

Definition at line 2332 of file cpplex.c.

_cpp_buff* _cpp_append_extend_buff ( cpp_reader ,
_cpp_buff ,
size_t   
)

Definition at line 2253 of file cpplex.c.

bool _cpp_arguments_ok ( cpp_reader ,
cpp_macro ,
const cpp_hashnode ,
unsigned  int 
)

Definition at line 523 of file cppmacro.c.

int _cpp_begin_message ( cpp_reader ,
int  ,
source_location  ,
unsigned  int 
)

Definition at line 73 of file cpperror.c.

const unsigned char* _cpp_builtin_macro_text ( cpp_reader ,
cpp_hashnode  
)

Definition at line 129 of file cppmacro.c.

void _cpp_clean_line ( cpp_reader  ) 

void _cpp_cleanup_files ( cpp_reader  ) 

Definition at line 1012 of file files.c.

int _cpp_compare_file_date ( cpp_reader ,
const char *  ,
int   
)

Definition at line 1097 of file files.c.

unsigned char* _cpp_convert_input ( cpp_reader ,
const char *  ,
unsigned char *  ,
size_t  ,
size_t  ,
off_t  
)

Definition at line 1429 of file charset.c.

unsigned char* _cpp_copy_replacement_text ( const cpp_macro ,
unsigned char *   
)

Definition at line 784 of file traditional.c.

bool _cpp_create_definition ( cpp_reader ,
cpp_hashnode  
)

Definition at line 1546 of file cppmacro.c.

bool _cpp_create_trad_definition ( cpp_reader ,
cpp_macro  
)

Definition at line 1075 of file cpptrad.c.

const char* _cpp_default_encoding ( void   ) 

Definition at line 1480 of file charset.c.

void _cpp_define_builtin ( cpp_reader ,
const char *   
)

Definition at line 1816 of file cpplib.c.

void _cpp_destroy_hashtable ( cpp_reader  ) 

Definition at line 81 of file cpphash.c.

void _cpp_destroy_iconv ( cpp_reader  ) 

Definition at line 708 of file charset.c.

void _cpp_do__Pragma ( cpp_reader  ) 

Definition at line 1328 of file cpplib.c.

void _cpp_do_file_change ( cpp_reader ,
enum  lc_reason,
const char *  ,
unsigned  int,
unsigned  int 
)

Definition at line 916 of file cpplib.c.

int _cpp_equiv_tokens ( const cpp_token ,
const cpp_token  
)

Definition at line 1304 of file lex.c.

struct op* _cpp_expand_op_stack ( cpp_reader  )  [read]

Definition at line 1007 of file cppexp.c.

bool _cpp_expansions_different_trad ( const cpp_macro ,
const cpp_macro  
)

Definition at line 1069 of file traditional.c.

void _cpp_extend_buff ( cpp_reader ,
_cpp_buff **  ,
size_t   
)

Definition at line 2272 of file cpplex.c.

void _cpp_fake_include ( cpp_reader ,
const char *   
)

Definition at line 224 of file cppfiles.c.

bool _cpp_find_failed ( _cpp_file  ) 

Definition at line 373 of file files.c.

_cpp_file* _cpp_find_file ( cpp_reader ,
const char *  fname,
cpp_dir start_dir,
bool  fake 
)

void _cpp_free_buff ( _cpp_buff  ) 

Definition at line 2288 of file cpplex.c.

void _cpp_free_definition ( cpp_hashnode  ) 

Definition at line 1294 of file cppmacro.c.

_cpp_buff* _cpp_get_buff ( cpp_reader ,
size_t   
)

Definition at line 2222 of file cpplex.c.

bool _cpp_get_fresh_line ( cpp_reader  ) 

Definition at line 771 of file lex.c.

Referenced by _cpp_lex_direct(), _cpp_read_logical_line_trad(), and _cpp_scan_out_logical_line().

int _cpp_handle_directive ( cpp_reader ,
int   
)

Definition at line 345 of file cpplib.c.

void _cpp_init_directives ( cpp_reader  ) 

Definition at line 1990 of file cpplib.c.

void _cpp_init_files ( cpp_reader  ) 

Definition at line 1001 of file files.c.

void _cpp_init_hashtable ( cpp_reader ,
hash_table  
)

Definition at line 50 of file cpphash.c.

void _cpp_init_internal_pragmas ( cpp_reader  ) 

Definition at line 1075 of file cpplib.c.

void _cpp_init_tokenrun ( tokenrun ,
unsigned  int 
)

Definition at line 791 of file cpplex.c.

cpp_token* _cpp_lex_direct ( cpp_reader  ) 

Definition at line 1098 of file cpplex.c.

const cpp_token* _cpp_lex_token ( cpp_reader  ) 

Definition at line 931 of file cpplex.c.

void _cpp_mark_file_once_only ( cpp_reader ,
struct _cpp_file  
)

Definition at line 740 of file files.c.

void _cpp_maybe_push_include_file ( cpp_reader  ) 

Referenced by _cpp_pop_buffer().

void _cpp_overlay_buffer ( cpp_reader pfile,
const unsigned char *  ,
size_t   
)

Definition at line 331 of file cpptrad.c.

bool _cpp_parse_expr ( cpp_reader  ) 

Definition at line 711 of file cppexp.c.

void _cpp_pop_buffer ( cpp_reader  ) 

Definition at line 1948 of file cpplib.c.

void _cpp_pop_context ( cpp_reader  ) 

Definition at line 1083 of file cppmacro.c.

void _cpp_pop_file_buffer ( cpp_reader ,
struct _cpp_file  
)

Definition at line 1131 of file files.c.

void _cpp_process_line_notes ( cpp_reader ,
int   
)

void _cpp_push_text_context ( cpp_reader ,
cpp_hashnode ,
const unsigned char *  ,
size_t   
)

Definition at line 1012 of file cppmacro.c.

bool _cpp_read_file_entries ( cpp_reader ,
FILE  
)

bool _cpp_read_logical_line_trad ( cpp_reader  ) 

Definition at line 364 of file cpptrad.c.

void _cpp_release_buff ( cpp_reader ,
_cpp_buff  
)

Definition at line 2208 of file cpplex.c.

void _cpp_remove_overlay ( cpp_reader  ) 

Definition at line 350 of file cpptrad.c.

size_t _cpp_replacement_text_len ( const cpp_macro  ) 

Definition at line 754 of file traditional.c.

void _cpp_report_missing_guards ( cpp_reader  ) 

Definition at line 647 of file cppfiles.c.

void _cpp_restore_pragma_names ( cpp_reader ,
char **   
)

Definition at line 1148 of file directives.c.

bool _cpp_save_file_entries ( cpp_reader pfile,
FILE f 
)

Definition at line 1435 of file files.c.

bool _cpp_save_parameter ( cpp_reader ,
cpp_macro ,
cpp_hashnode  
)

Definition at line 1306 of file cppmacro.c.

char** _cpp_save_pragma_names ( cpp_reader  ) 

Definition at line 1119 of file directives.c.

bool _cpp_scan_out_logical_line ( cpp_reader ,
cpp_macro  
)

bool _cpp_skip_block_comment ( cpp_reader  ) 

Definition at line 317 of file lex.c.

Referenced by _cpp_lex_direct(), and copy_comment().

bool _cpp_stack_file ( cpp_reader ,
_cpp_file ,
bool   
)

Definition at line 698 of file files.c.

bool _cpp_stack_include ( cpp_reader ,
const char *  ,
int  ,
enum  include_type 
)

Definition at line 809 of file files.c.

cpp_token* _cpp_temp_token ( cpp_reader  ) 

Definition at line 820 of file cpplex.c.

int _cpp_test_assertion ( cpp_reader ,
unsigned int *   
)

Definition at line 1688 of file cpplib.c.

unsigned char* _cpp_unaligned_alloc ( cpp_reader ,
size_t   
)

Definition at line 2302 of file cpplex.c.

cppchar_t _cpp_valid_ucn ( cpp_reader ,
const unsigned char **  ,
const unsigned char *  ,
int   
)

int _cpp_warn_if_unused_macro ( cpp_reader ,
cpp_hashnode ,
void  
)

static int cpp_in_system_header ( cpp_reader pfile  )  [inline, static]

Definition at line 477 of file internal.h.

References cpp_reader::buffer, and cpp_buffer::sysp.

Referenced by _cpp_begin_message(), _cpp_builtin_macro_text(), and _cpp_lex_direct().

static int ufputs ( const unsigned char *  s,
FILE f 
) [inline, static]

Definition at line 628 of file internal.h.

References fputs().

static unsigned char * ustrchr ( const unsigned char *  s1,
int  c 
) [inline, static]

Definition at line 622 of file internal.h.

References strchr.

Referenced by cpp_read_state(), and do_pragma().

static int ustrcmp ( const unsigned char *  s1,
const unsigned char *  s2 
) [inline, static]

Definition at line 592 of file internal.h.

References strcmp().

static int ustrcspn ( const unsigned char *  s1,
const char *  s2 
) [inline, static]

Definition at line 604 of file internal.h.

References strcspn().

Referenced by cpp_read_state().

static size_t ustrlen ( const unsigned char *  s1  )  [inline, static]

Definition at line 610 of file internal.h.

References strlen().

Referenced by builtin_macro(), cpp_valid_state(), push_replacement_text(), save_macros(), and write_macdef().

static int ustrncmp ( const unsigned char *  s1,
const unsigned char *  s2,
size_t  n 
) [inline, static]

Definition at line 598 of file internal.h.

References strncmp().

Referenced by _cpp_create_definition().

static unsigned char * uxstrdup ( const unsigned char *  s1  )  [inline, static]

Definition at line 616 of file internal.h.

References xstrdup().


Variable Documentation

unsigned char _cpp_trigraph_map[UCHAR_MAX+1]


Generated on Wed Apr 8 14:55:52 2009 for Open64 by  doxygen 1.5.6