Deleted Added
full compact
print.c (83280) print.c (83366)
1/*-
2 * Copyright (c) 1990, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
37#endif
38static const char rcsid[] =
1/*-
2 * Copyright (c) 1990, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/bin/ps/print.c 83280 2001-09-10 07:19:26Z peter $";
39 "$FreeBSD: head/bin/ps/print.c 83366 2001-09-12 08:38:13Z julian $";
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/time.h>
44#include <sys/resource.h>
45#include <sys/proc.h>
46#include <sys/stat.h>
47

--- 116 unchanged lines hidden (view full) ---

164 (void)printf("%-*s", v->width, (s = k->ki_p->ki_login, *s) ? s : "-");
165}
166
167void
168state(k, ve)
169 KINFO *k;
170 VARENT *ve;
171{
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/time.h>
44#include <sys/resource.h>
45#include <sys/proc.h>
46#include <sys/stat.h>
47

--- 116 unchanged lines hidden (view full) ---

164 (void)printf("%-*s", v->width, (s = k->ki_p->ki_login, *s) ? s : "-");
165}
166
167void
168state(k, ve)
169 KINFO *k;
170 VARENT *ve;
171{
172 int flag, sflag;
172 int flag, sflag, tdflags;
173 char *cp;
174 VAR *v;
175 char buf[16];
176
177 v = ve->var;
178 flag = k->ki_p->ki_flag;
179 sflag = k->ki_p->ki_sflag;
173 char *cp;
174 VAR *v;
175 char buf[16];
176
177 v = ve->var;
178 flag = k->ki_p->ki_flag;
179 sflag = k->ki_p->ki_sflag;
180 tdflags = k->ki_p->ki_tdflags; /* XXXKSE */
180 cp = buf;
181
182 switch (k->ki_p->ki_stat) {
183
184 case SSTOP:
185 *cp = 'T';
186 break;
187
188 case SSLEEP:
181 cp = buf;
182
183 switch (k->ki_p->ki_stat) {
184
185 case SSTOP:
186 *cp = 'T';
187 break;
188
189 case SSLEEP:
189 if (sflag & PS_SINTR) /* interruptable (long) */
190 if (tdflags & TDF_SINTR) /* interruptable (long) */
190 *cp = k->ki_p->ki_slptime >= MAXSLP ? 'I' : 'S';
191 else
192 *cp = 'D';
193 break;
194
195 case SRUN:
196 case SIDL:
197 *cp = 'R';

--- 530 unchanged lines hidden ---
191 *cp = k->ki_p->ki_slptime >= MAXSLP ? 'I' : 'S';
192 else
193 *cp = 'D';
194 break;
195
196 case SRUN:
197 case SIDL:
198 *cp = 'R';

--- 530 unchanged lines hidden ---