main.c (126775) | main.c (158160) |
---|---|
1/*- 2 * Copyright (c) 1980, 1992, 1993 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 --- 19 unchanged lines hidden (view full) --- 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> 35 | 1/*- 2 * Copyright (c) 1980, 1992, 1993 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 --- 19 unchanged lines hidden (view full) --- 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> 35 |
36__FBSDID("$FreeBSD: head/usr.bin/systat/main.c 126775 2004-03-09 11:57:28Z dwmalone $"); | 36__FBSDID("$FreeBSD: head/usr.bin/systat/main.c 158160 2006-04-30 04:26:46Z bde $"); |
37 38#ifdef lint 39static const char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; 40#endif 41 42#ifndef lint 43static const char copyright[] = 44"@(#) Copyright (c) 1980, 1992, 1993\n\ --- 100 unchanged lines hidden (view full) --- 145 */ 146 initscr(); 147 CMDLINE = LINES - 1; 148 wnd = (*curcmd->c_open)(); 149 if (wnd == NULL) { 150 warnx("couldn't initialize display"); 151 die(0); 152 } | 37 38#ifdef lint 39static const char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; 40#endif 41 42#ifndef lint 43static const char copyright[] = 44"@(#) Copyright (c) 1980, 1992, 1993\n\ --- 100 unchanged lines hidden (view full) --- 145 */ 146 initscr(); 147 CMDLINE = LINES - 1; 148 wnd = (*curcmd->c_open)(); 149 if (wnd == NULL) { 150 warnx("couldn't initialize display"); 151 die(0); 152 } |
153 wload = newwin(1, 0, 3, 20); | 153 wload = newwin(1, 0, 1, 20); |
154 if (wload == NULL) { 155 warnx("couldn't set up load average window"); 156 die(0); 157 } 158 gethostname(hostname, sizeof (hostname)); 159 size = sizeof(clkinfo); 160 if (sysctlbyname("kern.clockrate", &clkinfo, &size, NULL, 0) 161 || size != sizeof(clkinfo)) { --- 16 unchanged lines hidden (view full) --- 178 179 return EXIT_SUCCESS; 180} 181 182void 183labels() 184{ 185 if (curcmd->c_flags & CF_LOADAV) { | 154 if (wload == NULL) { 155 warnx("couldn't set up load average window"); 156 die(0); 157 } 158 gethostname(hostname, sizeof (hostname)); 159 size = sizeof(clkinfo); 160 if (sysctlbyname("kern.clockrate", &clkinfo, &size, NULL, 0) 161 || size != sizeof(clkinfo)) { --- 16 unchanged lines hidden (view full) --- 178 179 return EXIT_SUCCESS; 180} 181 182void 183labels() 184{ 185 if (curcmd->c_flags & CF_LOADAV) { |
186 mvaddstr(2, 20, | 186 mvaddstr(0, 20, |
187 "/0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10"); | 187 "/0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10"); |
188 mvaddstr(3, 5, "Load Average"); | 188 mvaddstr(1, 5, "Load Average"); |
189 } 190 (*curcmd->c_label)(); 191#ifdef notdef 192 mvprintw(21, 25, "CPU usage on %s", hostname); 193#endif 194 refresh(); 195} 196 --- 102 unchanged lines hidden --- | 189 } 190 (*curcmd->c_label)(); 191#ifdef notdef 192 mvprintw(21, 25, "CPU usage on %s", hostname); 193#endif 194 refresh(); 195} 196 --- 102 unchanged lines hidden --- |