• Home
  • Raw
  • Download

Lines Matching refs:toybuf

411       if (strcmp(typos[toybuf[i]].name, typos[toybuf[i+1]].name)>0) {  in help_fields()
412 k = toybuf[i]; in help_fields()
413 toybuf[i] = toybuf[i+1]; in help_fields()
414 toybuf[i+1] = k; in help_fields()
422 t = (void *)(typos+toybuf[i]); in help_fields()
446 for (i = 0; i<jump; i++) toybuf[i] = PS_COMM+i; in help_help()
452 for (i = 0; i<ARRAY_LEN(typos)-jump; i++) toybuf[i] = i+(i>=PS_COMM)*jump; in help_help()
504 char *buf = toybuf+sizeof(toybuf)-260, *out = buf, *s; in string_field()
705 struct procpid *tb = (void *)toybuf; in get_ps()
758 len = sizeof(toybuf)-(buf-toybuf); in get_ps()
868 len = sizeof(toybuf)-256*(ARRAY_LEN(fetch)-j)-(buf-toybuf)-260; in get_ps()
984 s = xmalloc(buf-toybuf); in get_ps()
986 memcpy(s, toybuf, buf-toybuf); in get_ps()
1012 sprintf(toybuf, "/proc/%u/task", pid); in get_threads()
1013 new->child = dirtree_flagread(toybuf, DIRTREE_SHUTUP|DIRTREE_PROC, get_ps); in get_threads()
1158 if (strstart(&str, strcpy(toybuf, "/dev/"))) len -= 5; in parse_rest()
1167 end = toybuf + sprintf(toybuf, "/dev/%s", num ? "pts/" : "tty"); in parse_rest()
1170 xstat(toybuf, &st); in parse_rest()
1225 memccpy(toybuf, string_field(ta, field), 0, 2048); in ksort()
1226 toybuf[2048] = 0; in ksort()
1227 ret = strcmp(toybuf, string_field(tb, field)); in ksort()
1313 sprintf(not_o = toybuf+128, in ps_main()
1318 sprintf(not_o = toybuf+128, in ps_main()
1321 sprintf(toybuf, not_o, FLAG(T) ? "PID,TID," : "PID,"); in ps_main()
1325 default_ko(toybuf, &TT.fields, "bad -o", TT.ps.o); in ps_main()
1347 TT.bits = get_headers(TT.fields, toybuf, sizeof(toybuf)); in ps_main()
1348 if (!FLAG(M)) printf("%.*s\n", TT.width, toybuf); in ps_main()
1370 get_headers(TT.fields, toybuf, sizeof(toybuf)); in ps_main()
1371 printf("%.*s\n", TT.width, toybuf); in ps_main()
1436 if (FLAG(b)) puts(toybuf); in header_line()
1438 printf("%s%-*.*s%s\r\n", rev?"\033[7m":"", rev?TT.width:0, TT.width, toybuf, in header_line()
1475 TT.bits = get_headers(TT.fields, toybuf, sizeof(toybuf)); in top_common()
1492 if (readfile("/proc/stat", pos = toybuf, sizeof(toybuf))) { in top_common()
1559 char *hr0 = toybuf+sizeof(toybuf)-32, *hr1 = hr0-32, *hr2 = hr1-32, in top_common()
1574 sprintf(toybuf, in top_common()
1580 if (readfile("/proc/meminfo", toybuf, sizeof(toybuf))) { in top_common()
1582 pos = strafter(toybuf, (char *[]){"MemTotal:","\nMemFree:", in top_common()
1591 sprintf(toybuf, " Mem: %9s total, %9s used, %9s free, %9s buffers", in top_common()
1599 sprintf(toybuf, " Swap: %9s total, %9s used, %9s free, %9s cached", in top_common()
1604 pos = toybuf; in top_common()
1628 pos = stpcpy(toybuf, "Totals:"); in top_common()
1639 pos += snprintf(pos, sizeof(toybuf)/2-(pos-toybuf), in top_common()
1647 get_headers(TT.fields, pos = toybuf, sizeof(toybuf)); in top_common()
1651 if (isspace(was) && !isspace(is) && i++==TT.sortpos && pos!=toybuf) in top_common()
1762 sprintf(toybuf, "%cID,USER,%s%%CPU,%%MEM,TIME+,%s", FLAG(H) ? 'T' : 'P', in top_main()
1766 top_setup(toybuf, "-%CPU,-ETIME,-PID"); in top_main()
1823 if (!s) sprintf(s = toybuf, "%d", TT.pgrep.signal); in do_pgk()
1868 TT.pgrep.snapshot = xmemdup(toybuf, (name+strlen(name)+1)-toybuf); in match_pgrep()