Lines Matching defs:list

2  * Do C preprocessing, based on a token list gathered by
105 /* Expand symbol 'sym' at '*list' */
209 static int expand_one_symbol(struct token **list)
211 struct token *token = *list;
228 rc = expand(list, sym);
247 static void expand_list(struct token **list)
250 while (!eof_token(next = scan_next(list))) {
251 if (token_type(next) != TOKEN_IDENT || expand_one_symbol(list))
252 list = &next->next;
387 sparse_error(what->pos, "unterminated argument list invoking macro \"%s\"",
394 static struct token *dup_list(struct token *list)
399 while (!eof_token(list)) {
401 *newtok = *list;
404 list = list->next;
602 static struct token **copy(struct token **where, struct token *list, int *count)
605 while (!eof_token(list)) {
608 token = dup_token(list, &list->pos);
610 token = list;
615 list = list->next;
642 static struct token **substitute(struct token **list, struct token *body, struct arg *args)
644 struct position *base_pos = &(*list)->pos;
729 * added something into the list, so containing_token() is OK.
731 if (state == Concat && merge(containing_token(list), added)) {
732 *list = added->next;
734 list = tail;
736 *list = added;
737 list = tail;
741 *list = &eof_token_entry;
742 return list;
745 static int expand(struct token **list, struct symbol *sym)
748 struct token *token = *list;
774 tail = substitute(list, expansion, args);
781 (*list)->pos.newline = token->pos.newline;
782 (*list)->pos.whitespace = token->pos.whitespace;
871 * -idirafter dir adds dir to the end of the list
923 static int do_include_path(const char **pptr, struct token **list, struct token *token, const char *filename, int flen)
928 if (!try_include(token->pos, path, filename, flen, list, pptr))
945 static int handle_include_path(struct stream *stream, struct token **list, struct token *token, int how)
971 if (try_include(token->pos, "", filename, flen, list, includepath))
991 if (do_include_path(path, list, token, filename, flen))
997 static int handle_include(struct stream *stream, struct token **list, struct token *token)
999 return handle_include_path(stream, list, token, 0);
1002 static int handle_include_next(struct stream *stream, struct token **list, struct token *token)
1004 return handle_include_path(stream, list, token, 1);
1007 static int handle_argv_include(struct stream *stream, struct token **list, struct token *token)
1009 return handle_include_path(stream, list, token, 2);
1086 static struct token *parse_arguments(struct token *list)
1088 struct token *arg = list->next, *next = list;
1089 struct argcount *count = &list->count;
1091 set_arg_count(list);
1095 list->next = &eof_token_entry;
1171 sparse_error(arg->pos, "\"%s\" may not appear in macro parameter list",
1175 sparse_error(arg->pos, "missing ')' in macro parameter list");
1615 struct token **list = where, **beginning = NULL;
1619 while (!eof_token(p = scan_next(list))) {
1626 beginning = list;
1629 if (!expand_one_symbol(list))
1656 *list = p->next;
1659 list = &p->next;
1884 /* Add to end on includepath list - no pointer updates */
2204 warning(start->pos, "directive in macro's argument list");
2229 static void do_preprocess(struct token **list)
2233 while (!eof_token(next = scan_next(list))) {
2238 preprocessor_line(stream, list);
2254 *list = next->next;
2258 *list = next->next;
2265 *list = next->next;
2271 expand_one_symbol(list))
2272 list = &next->next;