Print this page
11972 resync smatch


  63 };
  64 
  65 extern int input_stream_nr;
  66 extern struct stream *input_streams;
  67 extern unsigned int tabstop;
  68 extern int no_lineno;
  69 extern int *hash_stream(const char *name);
  70 
  71 struct ident {
  72         struct ident *next;     /* Hash chain of identifiers */
  73         struct symbol *symbols; /* Pointer to semantic meaning list */
  74         unsigned char len;      /* Length of identifier name */
  75         unsigned char tainted:1,
  76                       reserved:1,
  77                       keyword:1;
  78         char name[];            /* Actual identifier */
  79 };
  80 
  81 enum token_type {
  82         TOKEN_EOF,

  83         TOKEN_ERROR,
  84         TOKEN_IDENT,
  85         TOKEN_ZERO_IDENT,
  86         TOKEN_NUMBER,
  87         TOKEN_CHAR,
  88         TOKEN_CHAR_EMBEDDED_0,
  89         TOKEN_CHAR_EMBEDDED_1,
  90         TOKEN_CHAR_EMBEDDED_2,
  91         TOKEN_CHAR_EMBEDDED_3,
  92         TOKEN_WIDE_CHAR,
  93         TOKEN_WIDE_CHAR_EMBEDDED_0,
  94         TOKEN_WIDE_CHAR_EMBEDDED_1,
  95         TOKEN_WIDE_CHAR_EMBEDDED_2,
  96         TOKEN_WIDE_CHAR_EMBEDDED_3,
  97         TOKEN_STRING,
  98         TOKEN_WIDE_STRING,
  99         TOKEN_SPECIAL,
 100         TOKEN_STREAMBEGIN,
 101         TOKEN_STREAMEND,
 102         TOKEN_MACRO_ARGUMENT,


 221 extern struct ident *built_in_ident(const char *);
 222 extern struct token *built_in_token(int, struct ident *);
 223 extern const char *show_special(int);
 224 extern const char *show_ident(const struct ident *);
 225 extern const char *show_string(const struct string *string);
 226 extern const char *show_token(const struct token *);
 227 extern const char *quote_token(const struct token *);
 228 extern struct token * tokenize(const char *, int, struct token *, const char **next_path);
 229 extern struct token * tokenize_buffer(void *, unsigned long, struct token **);
 230 
 231 extern void show_identifier_stats(void);
 232 extern void init_include_path(void);
 233 extern struct token *preprocess(struct token *);
 234 
 235 extern void store_all_tokens(struct token *token);
 236 extern struct token *pos_get_token(struct position pos);
 237 extern char *pos_ident(struct position pos);
 238 
 239 extern void store_macro_pos(struct token *);
 240 extern char *get_macro_name(struct position pos);


 241 
 242 static inline int match_op(struct token *token, unsigned int op)
 243 {
 244         return token->pos.type == TOKEN_SPECIAL && token->special == op;
 245 }
 246 
 247 static inline int match_ident(struct token *token, struct ident *id)
 248 {
 249         return token->pos.type == TOKEN_IDENT && token->ident == id;
 250 }
 251 
 252 #endif


  63 };
  64 
  65 extern int input_stream_nr;
  66 extern struct stream *input_streams;
  67 extern unsigned int tabstop;
  68 extern int no_lineno;
  69 extern int *hash_stream(const char *name);
  70 
  71 struct ident {
  72         struct ident *next;     /* Hash chain of identifiers */
  73         struct symbol *symbols; /* Pointer to semantic meaning list */
  74         unsigned char len;      /* Length of identifier name */
  75         unsigned char tainted:1,
  76                       reserved:1,
  77                       keyword:1;
  78         char name[];            /* Actual identifier */
  79 };
  80 
  81 enum token_type {
  82         TOKEN_EOF,
  83         TOKEN_BAD,
  84         TOKEN_ERROR,
  85         TOKEN_IDENT,
  86         TOKEN_ZERO_IDENT,
  87         TOKEN_NUMBER,
  88         TOKEN_CHAR,
  89         TOKEN_CHAR_EMBEDDED_0,
  90         TOKEN_CHAR_EMBEDDED_1,
  91         TOKEN_CHAR_EMBEDDED_2,
  92         TOKEN_CHAR_EMBEDDED_3,
  93         TOKEN_WIDE_CHAR,
  94         TOKEN_WIDE_CHAR_EMBEDDED_0,
  95         TOKEN_WIDE_CHAR_EMBEDDED_1,
  96         TOKEN_WIDE_CHAR_EMBEDDED_2,
  97         TOKEN_WIDE_CHAR_EMBEDDED_3,
  98         TOKEN_STRING,
  99         TOKEN_WIDE_STRING,
 100         TOKEN_SPECIAL,
 101         TOKEN_STREAMBEGIN,
 102         TOKEN_STREAMEND,
 103         TOKEN_MACRO_ARGUMENT,


 222 extern struct ident *built_in_ident(const char *);
 223 extern struct token *built_in_token(int, struct ident *);
 224 extern const char *show_special(int);
 225 extern const char *show_ident(const struct ident *);
 226 extern const char *show_string(const struct string *string);
 227 extern const char *show_token(const struct token *);
 228 extern const char *quote_token(const struct token *);
 229 extern struct token * tokenize(const char *, int, struct token *, const char **next_path);
 230 extern struct token * tokenize_buffer(void *, unsigned long, struct token **);
 231 
 232 extern void show_identifier_stats(void);
 233 extern void init_include_path(void);
 234 extern struct token *preprocess(struct token *);
 235 
 236 extern void store_all_tokens(struct token *token);
 237 extern struct token *pos_get_token(struct position pos);
 238 extern char *pos_ident(struct position pos);
 239 
 240 extern void store_macro_pos(struct token *);
 241 extern char *get_macro_name(struct position pos);
 242 extern char *get_inner_macro(struct position pos);
 243 extern struct string_list *get_all_macros(struct position pos);
 244 
 245 static inline int match_op(struct token *token, unsigned int op)
 246 {
 247         return token->pos.type == TOKEN_SPECIAL && token->special == op;
 248 }
 249 
 250 static inline int match_ident(struct token *token, struct ident *id)
 251 {
 252         return token->pos.type == TOKEN_IDENT && token->ident == id;
 253 }
 254 
 255 #endif