Print this page
12724 update smatch to 0.6.1-rc1-il-5


 201 #define MAX_STRING 8191
 202 
 203 static inline struct token *containing_token(struct token **p)
 204 {
 205         void *addr = (char *)p - ((char *)&((struct token *)0)->next - (char *)0);
 206         return addr;
 207 }
 208 
 209 #define token_type(x) ((x)->pos.type)
 210 
 211 /*
 212  * Last token in the stream - points to itself.
 213  * This allows us to not test for NULL pointers
 214  * when following the token->next chain..
 215  */
 216 extern struct token eof_token_entry;
 217 #define eof_token(x) ((x) == &eof_token_entry)
 218 
 219 extern int init_stream(const char *, int fd, const char **next_path);
 220 extern const char *stream_name(int stream);

 221 extern struct ident *hash_ident(struct ident *);
 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 *);


 201 #define MAX_STRING 8191
 202 
 203 static inline struct token *containing_token(struct token **p)
 204 {
 205         void *addr = (char *)p - ((char *)&((struct token *)0)->next - (char *)0);
 206         return addr;
 207 }
 208 
 209 #define token_type(x) ((x)->pos.type)
 210 
 211 /*
 212  * Last token in the stream - points to itself.
 213  * This allows us to not test for NULL pointers
 214  * when following the token->next chain..
 215  */
 216 extern struct token eof_token_entry;
 217 #define eof_token(x) ((x) == &eof_token_entry)
 218 
 219 extern int init_stream(const char *, int fd, const char **next_path);
 220 extern const char *stream_name(int stream);
 221 struct ident *alloc_ident(const char *name, int len);
 222 extern struct ident *hash_ident(struct ident *);
 223 extern struct ident *built_in_ident(const char *);
 224 extern struct token *built_in_token(int, struct ident *);
 225 extern const char *show_special(int);
 226 extern const char *show_ident(const struct ident *);
 227 extern const char *show_string(const struct string *string);
 228 extern const char *show_token(const struct token *);
 229 extern const char *quote_token(const struct token *);
 230 extern struct token * tokenize(const char *, int, struct token *, const char **next_path);
 231 extern struct token * tokenize_buffer(void *, unsigned long, struct token **);
 232 
 233 extern void show_identifier_stats(void);
 234 extern void init_include_path(void);
 235 extern struct token *preprocess(struct token *);
 236 
 237 extern void store_all_tokens(struct token *token);
 238 extern struct token *pos_get_token(struct position pos);
 239 extern char *pos_ident(struct position pos);
 240 
 241 extern void store_macro_pos(struct token *);