2 ===================================================================
3 RCS file: /cvs/DragonFly/src/contrib/top/top.c,v
4 retrieving revision 1.2
5 diff -u -p -u -r1.2 top.c
6 --- top.c 17 Jun 2003 04:24:07 -0000 1.2
7 +++ top.c 4 Jun 2004 12:09:22 -0000
8 @@ -193,9 +193,9 @@ char *argv[];
12 - static char command_chars[] = "\f qh?en#sdkriIuto";
13 + static char command_chars[] = "\f qh?en#sdkriIutTOSo";
15 - static char command_chars[] = "\f qh?en#sdkriIut";
16 + static char command_chars[] = "\f qh?en#sdkriIutTOSO";
18 /* these defines enumerate the "strchr"s of the commands in command_chars */
20 @@ -215,8 +215,11 @@ char *argv[];
21 #define CMD_idletog2 13
23 #define CMD_selftog 15
24 +#define CMD_threads 16
25 +#define CMD_othreads 17
26 +#define CMD_system 18
32 /* set the buffer for stdout */
33 @@ -245,6 +248,8 @@ char *argv[];
38 + ps.only_threads = No;
42 @@ -271,7 +276,7 @@ char *argv[];
46 - while ((i = getopt(ac, av, "SIbinquvs:d:U:o:t")) != EOF)
47 + while ((i = getopt(ac, av, "SITONbinquvs:d:U:o:t")) != EOF)
51 @@ -301,6 +306,14 @@ char *argv[];
56 + ps.only_threads = !ps.only_threads; /* only threads */
60 + ps.threads = !ps.threads; /* show threads */
63 case 'i': /* go interactive regardless */
66 @@ -928,6 +941,31 @@ restart:
71 + ps.threads = !ps.threads;
72 + new_message(MT_standout | MT_delayed,
73 + " %sisplaying threads.",
74 + ps.threads ? "D" : "Not d");
79 + ps.only_threads = !ps.only_threads;
80 + new_message(MT_standout | MT_delayed,
82 + "Only displaying threads." :
83 + "Displaying threads and processes.");
88 + ps.system = !ps.system;
89 + new_message(MT_standout | MT_delayed,
90 + " %sisplaying system processes.",
91 + ps.system ? "D" : "Not d");
96 new_message(MT_standout,
97 "Username to show: ");