#include "c.h"
Include dependency graph for list.c:

Go to the source code of this file.
Functions | |
| List | append (void *x, List list) |
| int | length (List list) |
| void * | ltov (List *list, unsigned arena) |
Variables | |
| List | freenodes |
|
||||||||||||
|
Definition at line 7 of file list.c. References freenodes, list::link, List, NEW, PERM, and list::x. Referenced by attach(), bbfile(), bbincr(), compile(), compose(), compound(), dcllocal(), enumdcl(), filename(), ftype(), initinputs(), locus(), idStr::operator+=(), opt(), parameters(), path2list(), printproto(), prof_init(), tempname(), and use(). 00007 {
00008 List new;
00009
00010 if ((new = freenodes) != NULL)
00011 freenodes = freenodes->link;
00012 else
00013 NEW(new, PERM);
00014 if (list) {
00015 new->link = list->link;
00016 list->link = new;
00017 } else
00018 new->link = new;
00019 new->x = x;
00020 return new;
00021 }
|
|
|
||||||||||||
|
Definition at line 37 of file list.c. References array(), freenodes, i, length(), list::link, List, newarray, and list::x. Referenced by bbvars(), compose(), compound(), enumdcl(), ftype(), main(), parameters(), and printproto(). 00037 {
00038 int i = 0;
00039 void **array = newarray(length(*list) + 1, sizeof array[0], arena);
00040
00041 if (*list) {
00042 List lp = *list;
00043 do {
00044 lp = lp->link;
00045 array[i++] = lp->x;
00046 } while (lp != *list);
00047 #ifndef PURIFY
00048 lp = (*list)->link;
00049 (*list)->link = freenodes;
00050 freenodes = lp;
00051 #endif
00052 }
00053 *list = NULL;
00054 array[i] = NULL;
00055 return array;
00056 }
|
Here is the call graph for this function:

|
|
|
1.3.9.1