add menu support to lcdproc client (currently hidden behind #ifdef LCDPROC_MENUS) -

patch provided by Andrew Foss
This commit is contained in:
marschap committed 2006-02-18 16:18:22 +00:00
1 parent dd66eac255
commit d77ada0bde
24 files changed
+619 -238

No files matched your search

+12 -2
View File
@@ -65,21 +65,31 @@ static char *numnames[MAX_CPUS] = { "one", "two", "three", "four", "five", "six"
// CPU screen shows info about percentage of the CPU being used
//
int
#ifdef LCDPROC_MENUS
cpu_smp_screen (int rep, int display, int * flags_ptr)
#else
cpu_smp_screen (int rep, int display)
#endif
{
#undef CPU_BUF_SIZE
#define CPU_BUF_SIZE 4
int i, j, n, z;
static int first = 1;
float value;
static float cpu[MAX_CPUS][CPU_BUF_SIZE + 1][5]; // last buffer is scratch
load_type load[MAX_CPUS];
int numprocs;
char buf[256];
char *graphsize;
#ifdef LCDPROC_MENUS
if ((*flags_ptr & INITIALIZED) == 0) {
*flags_ptr |= INITIALIZED;
#else
static int first = TRUE;
if (first) {
first = 0;
first = FALSE;
#endif
machine_get_smpload (load, &numprocs);