MCPcopy Create free account
hub / github.com/NetHack/NetHack / trace_procs_chain

Function trace_procs_chain

win/chain/wc_trace.c:119–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117};
118
119void *
120trace_procs_chain(
121 int cmd,
122 int n,
123 void *me,
124 void *nextprocs,
125 void *nextdata)
126{
127 struct trace_data *tdp = 0;
128
129 switch (cmd) {
130 case WINCHAIN_ALLOC:
131 tdp = (struct trace_data *) alloc(sizeof *tdp);
132 tdp->nprocs = 0;
133 tdp->ndata = 0;
134 tdp->linknum = n;
135 break;
136 case WINCHAIN_INIT:
137 tdp = me;
138 tdp->nprocs = nextprocs;
139 tdp->ndata = nextdata;
140 break;
141 default:
142 panic("trace_procs_chain: bad cmd\n");
143 /*NOTREACHED*/
144 }
145 return tdp;
146}
147
148void
149trace_procs_init(int dir)

Callers

nothing calls this directly

Calls 2

allocFunction · 0.50
panicFunction · 0.50

Tested by

no test coverage detected