Lines Matching +defs:list +defs:var
14 * notice, this list of conditions and the following disclaimer.
16 * notice, this list of conditions and the following disclaimer in the
46 * notice, this list of conditions and the following disclaimer.
48 * notice, this list of conditions and the following disclaimer in the
179 /* Reference count of list membership and several other places */
228 CandidateList list;
254 Suffix_Reassign(Suffix **var, Suffix *suff)
256 if (*var != NULL)
257 (*var)->refCount--;
258 *var = suff;
264 Suffix_Unassign(Suffix **var)
266 if (*var != NULL)
267 (*var)->refCount--;
268 *var = NULL;
358 SuffixList_Unref(SuffixList *list, Suffix *suff)
360 SuffixListNode *ln = Lst_FindDatum(list, suff);
362 Lst_Remove(list, ln);
392 /* Remove the suffix from the list, and free if it is otherwise unused. */
394 SuffixList_Remove(SuffixList *list, Suffix *suff)
396 SuffixList_Unref(list, suff);
406 * Insert the suffix into the list, keeping the list ordered by suffix
410 SuffixList_Insert(SuffixList *list, Suffix *suff)
415 for (ln = list->first; ln != NULL; ln = ln->next) {
422 DEBUG2(SUFF, "inserting \"%s\" (%d) at end of list\n",
424 Lst_Append(list, Suffix_Ref(suff));
428 Lst_InsertBefore(list, ln, Suffix_Ref(suff));
462 * Nuke the list of suffixes but keep all transformation rules around. The
463 * transformation graph is destroyed in this process, but we leave the list
465 * function is called when a line '.SUFFIXES:' with an empty suffixes list is
556 * Add the transformation rule to the list of rules and place the
565 * The created or existing transformation node in the transforms list
584 * old list of commands so they can be filled in again. We
660 * Called from Suff_AddSuffix to search through the list of
705 * During Suff_AddSuffix, search through the list of existing targets and find
803 /* Add the suffix to the end of the list of known suffixes. */
916 Lst_Init(&cs->list);
922 Lst_Done(&cs->list);
929 Lst_Append(&cs->list, cand);
936 if (Lst_FindDatum(&cs->list, cand) == NULL)
937 Lst_Append(&cs->list, cand);
941 CandidateSearcher_MoveAll(CandidateSearcher *cs, CandidateList *list)
944 Lst_MoveAll(&cs->list, list);
950 CandidateList_PrintAddrs(CandidateList *list)
954 for (ln = list->first; ln != NULL; ln = ln->next) {
981 /* Add a new candidate to the list. */
983 CandidateList_Add(CandidateList *list, char *srcName, Candidate *targ,
989 Lst_Append(list, cand);
993 debug_printf("%s add suff %p:%s candidate %p:%s to list %p:",
994 debug_tag, targ, targ->file, cand, cand->file, list);
995 CandidateList_PrintAddrs(list);
1000 * Add all candidates to the list that can be formed by applying a suffix to
1004 CandidateList_AddCandidatesFor(CandidateList *list, Candidate *cand)
1016 CandidateList_Add(list, bmake_strdup(cand->prefix),
1020 CandidateList_Add(list, str_concat2(cand->prefix, suff->name),
1026 * Free the first candidate in the list that is not referenced anymore.
1035 debug_printf("cleaning list %p:", srcs);
1058 debug_printf("free: list %p src %p:%s children %d\n",
1069 debug_printf("keep: list %p src %p:%s children %d:",
1091 debug_printf("remove from list %p src %p:%s\n",
1219 * Fetch next expansion off the list and find its GNode
1238 * Now that the source is expanded, remove it from the list of
1248 * add those nodes to the members list.
1302 * Stuff left over -- add it to the list too
1313 * The expanded node is removed from the parent's list of children, and the
1338 * children list.
1382 * The source is expanded now, so remove it from the list of children,
1443 * are added to the target node's commands list. The target also inherits all
1500 * Rather than searching through the entire list, we just look at
1564 * search over the suffix list, backtracking for each one.
1812 * Using the list of possible sources built up from the target
1893 * We now have a list of candidates headed by 'bottom' and linked via
1900 * suffix. Note that this causes the commands list of the original
1953 while (RemoveCandidate(&cs->list))
1955 assert(Lst_IsEmpty(&cs->list));
2038 * doesn't actually go on the suffix list or everyone will think