Lines Matching refs:tp

80 	struct tacct *tp;
132 while ((tp = getleast()) != NULL) /* get least uid of all files, */
133 sumcurr(tp); /* sum all entries for that uid, */
147 struct tacct *tp, *least;
150 for (tp = tb; tp <= &tb[nfile]; tp++) {
151 if (tp->ta_name[0] == '\0')
154 tp->ta_uid < least->ta_uid ||
155 ((tp->ta_uid == least->ta_uid) &&
157 (strncmp(tp->ta_name, least->ta_name, NSZ) < 0)))
158 least = tp;
164 * sumcurr sums all entries with same uid/name (into tp->tacct record)
168 sumcurr(struct tacct *tp)
173 memcpy(&tc, tp, sizeof(struct tacct));
174 tacctadd(&tt, tp); /* gets total of all uids */
175 getnext(tp-&tb[0]); /* get next one in same file */
176 while (tp <= &tb[nfile])
177 if (tp->ta_name[0] != '\0' &&
178 tp->ta_uid == tc.ta_uid &&
179 (uidsum || EQN(tp->ta_name, tc.ta_name))) {
180 tacctadd(&tc, tp);
181 tacctadd(&tt, tp);
182 getnext(tp-&tb[0]);
184 tp++; /* look at next file */
206 output(struct tacct *tp)
209 prtacct(tp);
211 fwrite(tp, sizeof(*tp), 1, stdout);
220 struct tacct *tp;
222 tp = &tb[i];
223 tp->ta_name[0] = '\0';
229 &tp->ta_uid,
230 tp->ta_name,
231 &tp->ta_cpu[0], &tp->ta_cpu[1],
232 &tp->ta_kcore[0], &tp->ta_kcore[1],
233 &tp->ta_con[0], &tp->ta_con[1],
234 &tp->ta_du,
235 &tp->ta_pc,
236 &tp->ta_sc,
237 &tp->ta_dc,
238 &tp->ta_fee) != EOF)
241 if (fread(tp, sizeof(*tp), 1, fl[i]) == 1)
253 prtacct(struct tacct *tp)
256 tp->ta_uid,
258 tp->ta_name,
259 tp->ta_cpu[0], tp->ta_cpu[1],
260 tp->ta_kcore[0], tp->ta_kcore[1],
261 tp->ta_con[0], tp->ta_con[1],
262 tp->ta_du,
263 tp->ta_pc,
264 tp->ta_sc,
265 tp->ta_dc,
266 tp->ta_fee);