*** ./machine/m_svr5.c.osr6	Tue Feb 26 20:39:40 2008
--- ./machine/m_svr5.c	Tue Mar 18 13:32:14 2008
***************
*** 33,44 ****
  /* 
   * top - a top users display for Unix
   *
!  * SYNOPSIS:  For Intel based System V Release 5 (Unixware7)
   * 
   * DESCRIPTION:
   * System V release 5 for i[3456]86
   * Works for:
!  * i586-sco-sysv5uw7  i386 SCO UNIX_SVR5 (UnixWare 7)
   * 
   * LIBS:  -lelf -lmas
   * 
--- 33,44 ----
  /* 
   * top - a top users display for Unix
   *
!  * SYNOPSIS:  For Intel based System V Release 5 (Unixware 7 and OpenServer 6)
   * 
   * DESCRIPTION:
   * System V release 5 for i[3456]86
   * Works for:
!  * i586-sco-sysv5  i386 SCO UNIX_SVR5 (UnixWare 7 and OpenServer 6)
   * 
   * LIBS:  -lelf -lmas
   * 
***************
*** 48,53 ****
--- 48,54 ----
   *          David Cutter       <dpc@grail.com>
   *          Andrew Herbert     <andrew@werple.apana.org.au>
   *          Robert Boucher     <boucher@sofkin.ca>
+  *          Ronald Joe Record  <rr@sco.com>
   */
  
  /* build config
***************
*** 226,232 ****
  
  /* fwd dcls */
  static int kmet_init(void );
! static int get_cpustates(int *new);
  
  
  int
--- 227,233 ----
  
  /* fwd dcls */
  static int kmet_init(void );
! static int get_cpustates(long *new);
  
  
  int
***************
*** 326,332 ****
    register int i;
    static long swap_total;
    static long swap_free;
!   int new_states[CPUSTATES];
  
    get_cpustates(new_states);
  
--- 327,333 ----
    register int i;
    static long swap_total;
    static long swap_free;
!   static long new_states[CPUSTATES];
  
    get_cpustates(new_states);
  
***************
*** 1023,1028 ****
--- 1024,1030 ----
  }
  
  
+ int
  get_swapinfo(long *total, long *fr)
  {
      register int cnt, i;
***************
*** 1041,1047 ****
      {
  	*total = 0;
  	*fr = 0;
! 	return;
      }
      swt->swt_n = cnt;
  
--- 1043,1049 ----
      {
  	*total = 0;
  	*fr = 0;
! 	return (-1);
      }
      swt->swt_n = cnt;
  
***************
*** 1076,1081 ****
--- 1078,1084 ----
      *total = t;
      *fr = f;
      free(swt);
+     return (0);
  }
  
  
***************
*** 1128,1134 ****
      uint32 ressz ) ;
  
  
! static int get_cpustates(int *new)
  {
      new[0] = (int)kmet_get_cpu( MPC_CPU_IDLE, "idle");
      new[1] = (int)kmet_get_cpu( MPC_CPU_USR,  "usr");
--- 1131,1137 ----
      uint32 ressz ) ;
  
  
! static int get_cpustates(long *new)
  {
      new[0] = (int)kmet_get_cpu( MPC_CPU_IDLE, "idle");
      new[1] = (int)kmet_get_cpu( MPC_CPU_USR,  "usr");
*** ./machine/m_svr5.man.osr6	Tue Feb 26 20:39:40 2008
--- ./machine/m_svr5.man	Tue Mar 18 13:34:00 2008
***************
*** 1,4 ****
  .SH "SVR5 CREDITS"
  The SVR5 port was generated by Mike Hopkirk from the SVR42 port by David Cutter
! with lots of help from Kurt Gollhardt and Doug Souders 
  
--- 1,5 ----
  .SH "SVR5 CREDITS"
  The SVR5 port was generated by Mike Hopkirk from the SVR42 port by David Cutter
! with lots of help from Kurt Gollhardt, Ron Record, and Doug Souders.
! It has since been maintained by Ronald Joe Record <rr@sco.com>
  
*** ./.defaults.osr6	Tue Mar 18 13:32:14 2008
--- ./.defaults	Tue Mar 18 13:32:14 2008
***************
*** 0 ****
--- 1,20 ----
+ set module = 'svr5'
+ set LoadMax = '5.0'
+ set topn = '-1'
+ set NominalTopn = '18'
+ set delay = '5'
+ set owner = 'root'
+ set group = 'mem'
+ set mode = '2711'
+ set random = '0'
+ set TableSize = '37'
+ set bindir = '/usr/bin'
+ set mandir = '/usr/man/man1'
+ set manext = '1'
+ set mansty = 'man'
+ set Cmdshell = '/bin/sh'
+ set Cmdcc = 'cc'
+ set Cmdawk = 'awk'
+ set Cmdinstall = './install'
+ set cdefs = '-O'
+ set ColourDef = 'yes'
*** ./Install-OSR6.osr6	Tue Mar 18 13:32:14 2008
--- ./Install-OSR6	Tue Mar 18 13:32:14 2008
***************
*** 0 ****
--- 1,13 ----
+ #!/bin/sh
+ 
+ MOUT=mout-install
+ D=/u/tmp/top
+ DESTDIR=$D
+ export DESTDIR
+ 
+ [ -f $MOUT ] && mv $MOUT $MOUT-prev
+ [ -d $D ] && rm -rf $D
+ mkdir -p $D/usr/bin
+ mkdir -p $D/usr/man/man1
+ make install DESTDIR=$D 2>&1 | tee $MOUT
+ 
*** ./hash.c.osr6	Tue Feb 26 20:39:41 2008
--- ./hash.c	Tue Mar 18 13:32:14 2008
***************
*** 151,157 ****
      llistitem *qi;
  
      qi = (llistitem *)malloc(sizeof(llistitem) + size);
!     qi->datum = ((void *)qi + sizeof(llistitem));
      return qi;
  }
  
--- 151,157 ----
      llistitem *qi;
  
      qi = (llistitem *)malloc(sizeof(llistitem) + size);
!     qi->datum = ((int)qi + sizeof(llistitem));
      return qi;
  }
  
*** ./configure.osr6	Tue Feb 26 20:39:40 2008
--- ./configure	Tue Mar 18 13:32:14 2008
***************
*** 6351,6402 ****
  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  ac_compiler_gnu=$ac_cv_c_compiler_gnu
  
-  ac_save_CFLAGS="$CFLAGS"
- for ac_arg in "-pedantic  % -Wall"          "-xstrconst % -v"             "-std1      % -verbose -w0 -warnprotos"    "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd"    "-ansi -ansiE % -fullwarn"    "+ESlit     % +w1"            "-Xc        % -pvctl,fullmsg"    "-h conform % -h msglevel 2"    #
- do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-    cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- 
- int
- main ()
- {
- return 0;
-   ;
-   return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
-   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-   *) ac_try_echo=$ac_try;;
- esac
- eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-   (eval "$ac_compile") 2>conftest.er1
-   ac_status=$?
-   grep -v '^ *+' conftest.er1 >conftest.err
-   rm -f conftest.er1
-   cat conftest.err >&5
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); } && {
- 	 test -z "$ac_c_werror_flag" ||
- 	 test ! -s conftest.err
-        } && test -s conftest.$ac_objext; then
-   ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
- else
-   echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- 
- 
- fi
- 
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-  CFLAGS="$ac_save_CFLAGS"
   ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--- 6351,6356 ----
