Lines Matching defs:fields
16 * Select by session id is -s not -g. Posix doesn't say truncated fields
28 * Added a bunch of new -o fields posix doesn't mention, and we don't
77 -n Show numeric USER and GROUP -w Wide output (don't truncate fields)
214 void *fields, *kfields;
221 // Linked list of -o fields selected for display, in order, with :len and =title
237 * we replace several fields with don't use with other data. */
262 // end of /proc/$PID/stat fields
275 /* In addition to slot[], carevup contains 6 string fields to display
283 unsigned short offset[6]; // offset of fields in str[] (skip CMD, always 0)
295 * to fit, numerical fields are padded but not truncated (although
296 * the display code reclaims unused padding from later fields to try to
340 // String fields (-1 is procpid->str, rest are str+offset[1-slot])
400 // Show sorted "-o help" text for fields listed in toybuf[len]
521 // String fields
563 // Output days-hours:mins:secs, skipping non-required fields with zero
564 // TIME has 3 required fields, ETIME has 2. (Posix!) TIME+ is from top
636 // Display process data that get_ps() read from /proc, formatting via TT.fields
643 // Loop through fields to display
644 for (field = TT.fields; field; field = field->next) {
651 if (field != TT.fields) {
656 // Don't truncate number fields, but try to reclaim extra offset from later
657 // fields that can naturally be shorter
668 // If later fields have slack space, take back overflow
732 // Parent also shows up as a thread, but we need to reread task/stat fields
743 // parse oddball fields: the first field is same as new->name (skip it)
744 // and the second and third (name and state) are the only non-numeric fields.
753 // All remaining fields should be numeric, parse them into slot[] array
754 // (skipping first 3 stat fields and first slot[], both were handled above)
768 // Overwrite useless/obsolete stat fields with more interesting data.
1102 // posix requires alternate names for some fields
1260 // fields from dirtree leaf nodes. (top diffs old & new array to show changes)
1271 static void default_ko(char *s, void *fields, char *err, struct arg_list *arg)
1278 WOULD_EXIT(x, comma_args(arg ? arg : &def, fields, err, parse_ko));
1318 // Figure out which fields to display
1331 // Init TT.fields. This only uses toybuf if TT.ps.o is NULL
1332 if (FLAG(Z)) default_ko("LABEL", &TT.fields, 0, 0);
1333 default_ko(toybuf, &TT.fields, "bad -o", TT.ps.o);
1336 if (TT.fields) TT.fields = ((struct ofields *)TT.fields)->prev;
1337 comma_args(TT.ps.O, &TT.fields, "bad -O", parse_ko);
1338 if (TT.fields) TT.fields = ((struct ofields *)TT.fields)->next;
1340 dlist_terminate(TT.fields);
1342 // -f and -n change the meaning of some fields
1346 for (field = TT.fields; field; field = field->next) {
1353 // Calculate seen fields bit array, and if we aren't deferring printing
1355 TT.bits = get_headers(TT.fields, toybuf, sizeof(toybuf));
1370 for (field = TT.fields; field; field = field->next) {
1378 get_headers(TT.fields, toybuf, sizeof(toybuf));
1399 llist_traverse(TT.fields, free);
1407 // select which of the -o fields to sort by
1415 for (field = TT.fields; field; field = field->next) {
1473 if (!TT.fields) perror_exit("no -o");
1483 TT.bits = get_headers(TT.fields, toybuf, sizeof(toybuf));
1634 for (field = TT.fields; field; field = field->next) {
1652 get_headers(TT.fields, pos = toybuf, sizeof(toybuf));
1755 default_ko(defo, &TT.fields, "bad -o", TT.top.o);
1756 dlist_terminate(TT.fields);
1773 struct ofields *field = TT.fields;