Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/17/84; site hao.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!mhuxn!houxm!ihnp4!zehntel!hplabs!hao!pag
From: pag@hao.UUCP (Peter Gross)
Newsgroups: net.sources.bugs
Subject: Re: System Monitoring Program (MON)
Message-ID: <1288@hao.UUCP>
Date: Wed, 5-Dec-84 01:32:56 EST
Article-I.D.: hao.1288
Posted: Wed Dec  5 01:32:56 1984
Date-Received: Fri, 7-Dec-84 02:14:12 EST
References: <6317@brl-tgr.ARPA>
Distribution: net
Organization: High Altitude Obs./NCAR, Boulder CO
Lines: 78

vm.c in the mon distribution won't compile on a non-dual-cpu Vax.
My diffs follow.

--peter gross
hao!pag

*** /tmp/,RCSt1003602	Tue Dec  4 23:27:28 1984
--- vm.c	Tue Dec  4 23:27:04 1984
***************
*** 1,3
  /*
   *      V M
   *

--- 1,5 -----
+ static char *rcsid = "$Header: vm.c,v 1.2 84/12/04 23:24:41 pag Exp $";
+ 
  /*
   *      V M
   *
***************
*** 8,13
   *      printing.  This makes it very difficult to change the screen
   *      format.  A better solution would be to move all the prints
   *      into a screen update function.
   */
  
  #include "mon.h"

--- 10,23 -----
   *      printing.  This makes it very difficult to change the screen
   *      format.  A better solution would be to move all the prints
   *      into a screen update function.
+  *
+  * $Log:	vm.c,v $
+  * Revision 1.2  84/12/04  23:24:41  pag
+  * Workaround to get mon running:  vm.c wouldn't compile on a non-dual
+  * Vax because on those machines v_swtch2 is undefined.  Added an ifdef
+  * around this code.
+  * 
+  * 
   */
  
  #include "mon.h"
***************
*** 77,82
  	/* Display CPU info */
          mvprintw(CPUY+1,4,"%4d  %4d", (rate.v_intr) - hz, rate.v_syscall);
          mvprintw(CPUY+1,17,"%4d", rate.v_swtch);
  	if (dualcpu)
  	        mvprintw(CPUY+1,30,"%4d", rate.v_swtch2);
          cputime();

--- 87,93 -----
  	/* Display CPU info */
          mvprintw(CPUY+1,4,"%4d  %4d", (rate.v_intr) - hz, rate.v_syscall);
          mvprintw(CPUY+1,17,"%4d", rate.v_swtch);
+ #ifdef HAVE_DUAL_CPU
  	if (dualcpu)
  	        mvprintw(CPUY+1,30,"%4d", rate.v_swtch2);
  #endif
***************
*** 79,84
          mvprintw(CPUY+1,17,"%4d", rate.v_swtch);
  	if (dualcpu)
  	        mvprintw(CPUY+1,30,"%4d", rate.v_swtch2);
          cputime();
  
  	/* Display additional stuff */

--- 90,96 -----
  #ifdef HAVE_DUAL_CPU
  	if (dualcpu)
  	        mvprintw(CPUY+1,30,"%4d", rate.v_swtch2);
+ #endif
          cputime();
  
  	/* Display additional stuff */