monitor diffs for xenix 386

Stu Heiss stu at jpusa1.UUCP
Thu Jul 20 01:45:12 AEST 1989


#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	README.386
#	inc.km.diffs
#	lib.makefile
#	monitor.diffs
# This archive created: Wed Jul 19 10:43:17 1989
# By:	stu (JPUSA - Chicago, IL)
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'README.386'" '(669 characters)'
if test -f 'README.386'
then
	echo shar: "will not over-write existing file 'README.386'"
else
sed 's/^X//' << \SHAR_EOFREADME.386 > 'README.386'
XThis is a first crack at porting monitor to xenix 386.
XThe code to display memory available doesn't work as
XI don't know how to do that.  I assume it requires tracing
Xthe sptmap and do read the map in but have not attempted
Xto do anything more with it.  If someone gets that part
Xworking, I'd like to see it.  The code for text is meaningless.
XI wanted to get this working with as few changes as
Xpossible.  Perhaps the author can really clean it up
Xproperly.  Everything else seems to work.
X
XTo put this together,
X 1) in the src directory, do 'patch < monitor.diffs'
X 2) in include/km, do 'patch < inc.km.diffs'
X 3) replace the lib/makefile with lib.makefile
Xand make.
SHAR_EOFREADME.386
if test 59329 -ne "`sum < 'README.386' | sed 's/ .*//'`"
then
	echo shar: "possible error transmitting 'README.386'" '(sum should have been 59329)'
	echo shar: "trying 'sum -r'"
	if test 44437 -ne "`sum -r < 'README.386' | sed 's/ .*//'`"
	then
		echo shar: "probable error transmitting 'README.386'" '(sum should have been 44437)'
	echo shar: "trying 'wc -c'"
		if test 669 -ne "`wc -c < 'README.386'`"
		then
			echo shar: "error transmitting 'README.386'" '(should have been 669 characters)'
		else
			echo shar: "wc was ok"
		fi
	fi
fi
chmod 644 'README.386'
fi
echo shar: "extracting 'inc.km.diffs'" '(2439 characters)'
if test -f 'inc.km.diffs'
then
	echo shar: "will not over-write existing file 'inc.km.diffs'"
else
sed 's/^X//' << \SHAR_EOFinc.km.diffs > 'inc.km.diffs'
XRCS file: RCS/monitor.h,v
Xretrieving revision 1.1
Xdiff -c2 -r1.1 monitor.h
X*** /tmp/,RCSt1a25925	Wed Jul 19 10:26:03 1989
X--- monitor.h	Tue Jul 18 19:34:27 1989
X***************
X*** 5,8
X  */
X  
X  #include <sys/sysmacros.h>
X  #include <sys/types.h>
X
X--- 5,11 -----
X  */
X  
X+ #if defined(M_XENIX) && defined(M_I386)
X+ #define XENIX386 (1)
X+ #endif
X  #include <sys/sysmacros.h>
X  #include <sys/types.h>
X***************
X*** 13,16
X  #include <sys/signal.h>
X  #include <sys/sysinfo.h>
X  #include <sys/proc.h>
X  #include <sys/user.h>
X
X--- 16,24 -----
X  #include <sys/signal.h>
X  #include <sys/sysinfo.h>
X+ #ifdef XENIX386
X+ #include <sys/page.h>
X+ #include <sys/seg.h>
X+ #include <sys/mmu.h>
X+ #endif
X  #include <sys/proc.h>
X  #include <sys/user.h>
X***************
X*** 71,74
X      long utsname;
X  #if XENIX
X      long coremap;
X      long mapent;
X
X--- 79,85 -----
X      long utsname;
X  #if XENIX
X+ #ifdef XENIX386
X+     long sptmap;
X+ #else
X      long coremap;
X  #endif
X***************
X*** 72,75
X  #if XENIX
X      long coremap;
X      long mapent;
X      long end;
X
X--- 83,87 -----
X  #else
X      long coremap;
X+ #endif
X      long mapent;
X      long end;
X***************
X*** 97,100
X  extern long           free_mem, free_max[];
X  extern int            free_wait;
X  #else
X  extern long	      sr_limit, sw_limit, sf_limit, se_limit;
X
X--- 109,115 -----
X  extern long           free_mem, free_max[];
X  extern int            free_wait;
X+ #ifdef XENIX386
X+ extern long	      sf_limit, se_limit;
X+ #endif
X  #else
X  extern long	      sr_limit, sw_limit, sf_limit, se_limit;
X***************
X*** 118,121
X  extern struct user    user_last, user_new, user_llast;
X  #if XENIX
X  extern struct map     coremap;
X  #endif
X
X--- 133,139 -----
X  extern struct user    user_last, user_new, user_llast;
X  #if XENIX
X+ #ifdef XENIX386
X+ extern struct map     sptmap;
X+ #else
X  extern struct map     coremap;
X  #endif
X***************
X*** 120,123
X  extern struct map     coremap;
X  #endif
X  extern SPTR	      sptr;
X  extern struct proc    *proc_buf;
X
X--- 138,142 -----
X  extern struct map     coremap;
X  #endif
X+ #endif
X  extern SPTR	      sptr;
X  extern struct proc    *proc_buf;
X***************
X*** 164,167
X  extern int  mode_misc();
X  extern int  mode_capacity();
X  #if SYSV
X  extern int  mode_scall();
X
X--- 183,189 -----
X  extern int  mode_misc();
X  extern int  mode_capacity();
X+ #ifdef XENIX386
X+ extern int  mode_scall();
X+ #endif
X  #if SYSV
X  extern int  mode_scall();
SHAR_EOFinc.km.diffs
if test 45909 -ne "`sum < 'inc.km.diffs' | sed 's/ .*//'`"
then
	echo shar: "possible error transmitting 'inc.km.diffs'" '(sum should have been 45909)'
	echo shar: "trying 'sum -r'"
	if test 54000 -ne "`sum -r < 'inc.km.diffs' | sed 's/ .*//'`"
	then
		echo shar: "probable error transmitting 'inc.km.diffs'" '(sum should have been 54000)'
	echo shar: "trying 'wc -c'"
		if test 2439 -ne "`wc -c < 'inc.km.diffs'`"
		then
			echo shar: "error transmitting 'inc.km.diffs'" '(should have been 2439 characters)'
		else
			echo shar: "wc was ok"
		fi
	fi
fi
chmod 644 'inc.km.diffs'
fi
echo shar: "extracting 'lib.makefile'" '(761 characters)'
if test -f 'lib.makefile'
then
	echo shar: "will not over-write existing file 'lib.makefile'"
else
sed 's/^X//' << \SHAR_EOFlib.makefile > 'lib.makefile'
X#TARGETS = Mmonlib
X#
X#Mmonlib:
X#	@make -f makeMmonlib
X
XLIB = ./Slibmon.a
XIKMDIR = ../include
XSDIR = ./
XCFLAGS = -I$(IKMDIR) # -Ox -Mme2 -LARGE
XLIBOBJS = $(LIB)(docmd.o)\
X	  $(LIB)(string1.o)\
X	  $(LIB)(string2.o)\
X	  $(LIB)(scrops1.o)\
X	  $(LIB)(scrhelp.o)\
X	  $(LIB)(scrin1.o)\
X	  $(LIB)(scrin2.o)\
X	  $(LIB)(scrinput.o)\
X	  $(LIB)(scrout1.o)\
X	  $(LIB)(scrout2.o)\
X	  $(LIB)(scrout3.o)\
X	  $(LIB)(scrout4.o)\
X	  $(LIB)(scrout5.o)\
X	  $(LIB)(scrout6.o)\
X	  $(LIB)(scrout7.o)\
X	  $(LIB)(scrout8.o)\
X	  $(LIB)(scrout9.o)\
X	  $(LIB)(rdspec.o)\
X	  $(LIB)(termcap.o)\
X	  $(LIB)(tgoto.o)\
X	  $(LIB)(tputs.o)
X
X$(LIB):	$(LIBOBJS)
X	ranlib $(LIB)
X	@echo $(LIB) is now up to date
X
X.c.a:
X	$(CC) -c $(CFLAGS) $<
X	@ar rv $@ $*.o
X#	size $*.o
X	@rm -f $*.o
X
X.PRECIOUS:	$(LIB)
X
SHAR_EOFlib.makefile
if test 50191 -ne "`sum < 'lib.makefile' | sed 's/ .*//'`"
then
	echo shar: "possible error transmitting 'lib.makefile'" '(sum should have been 50191)'
	echo shar: "trying 'sum -r'"
	if test 01256 -ne "`sum -r < 'lib.makefile' | sed 's/ .*//'`"
	then
		echo shar: "probable error transmitting 'lib.makefile'" '(sum should have been 01256)'
	echo shar: "trying 'wc -c'"
		if test 761 -ne "`wc -c < 'lib.makefile'`"
		then
			echo shar: "error transmitting 'lib.makefile'" '(should have been 761 characters)'
		else
			echo shar: "wc was ok"
		fi
	fi
fi
chmod 644 'lib.makefile'
fi
echo shar: "extracting 'monitor.diffs'" '(31607 characters)'
if test -f 'monitor.diffs'
then
	echo shar: "will not over-write existing file 'monitor.diffs'"
else
sed 's/^X//' << \SHAR_EOFmonitor.diffs > 'monitor.diffs'
XRCS file: RCS/makefile,v
Xretrieving revision 1.1
Xdiff -c2 -r1.1 makefile
X*** /tmp/,RCSt1a25903	Wed Jul 19 10:25:23 1989
X--- makefile	Wed Jul 19 03:08:51 1989
X***************
X*** 1,4
X  #
X! # Makefile for XENIX 286 version of monitor.
X  # Don't forget to go to the ./lib directory and make the library!
X  #
X
X--- 1,4 -----
X  #
X! # Makefile for XENIX 386 version of monitor.
X  # Don't forget to go to the ./lib directory and make the library!
X  #
X***************
X*** 4,8
X  #
X  
X! LIB = ./lib/Mlibmon.a
X  IKMDIR = ./include
X  
X
X--- 4,8 -----
X  #
X  
X! LIB = ./lib/Slibmon.a
X  IKMDIR = ./include
X  CFLAGS = -I$(IKMDIR) -g # -Ox -Mme2 -LARGE -F 600
X***************
X*** 6,9
X  LIB = ./lib/Mlibmon.a
X  IKMDIR = ./include
X  
X  monitor:	monitor1.o\
X
X--- 6,10 -----
X  LIB = ./lib/Slibmon.a
X  IKMDIR = ./include
X+ CFLAGS = -I$(IKMDIR) -g # -Ox -Mme2 -LARGE -F 600
X  
X  monitor:	monitor1.o\
X***************
X*** 12,16
X  	montop.o\
X  	$(MONLIB)
X! 	cc -o monitor -Mm -F 600 monitor1.o monitor2.o monproc.o montop.o $(LIB)
X  
X  monitor1.o:	monitor1.c
X
X--- 13,17 -----
X  	montop.o\
X  	$(MONLIB)
X! 	cc -o monitor $(CFLAGS) monitor1.o monitor2.o monproc.o montop.o $(LIB)
X  
X  hindex:	hindex.o\
X***************
X*** 14,29
X  	cc -o monitor -Mm -F 600 monitor1.o monitor2.o monproc.o montop.o $(LIB)
X  
X- monitor1.o:	monitor1.c
X- 	cc -c -Ox -Mme2 -LARGE -I$(IKMDIR) monitor1.c
X- 	
X- monitor2.o:	monitor2.c
X- 	cc -c -Ox -Mme2 -LARGE -I$(IKMDIR) monitor2.c
X- 	
X- monproc.o:	monproc.c
X- 	cc -c -Ox -Mme2 -LARGE -I$(IKMDIR) monproc.c
X- 
X- montop.o:	montop.c
X- 	cc -c -Ox -Mme2 -LARGE -I$(IKMDIR) montop.c
X- 
X  hindex:	hindex.o\
X  	$(KMLIB)
X
X--- 15,18 -----
X  	cc -o monitor $(CFLAGS) monitor1.o monitor2.o monproc.o montop.o $(LIB)
X  
X  hindex:	hindex.o\
X  	$(KMLIB)
X***************
X*** 28,34
X  hindex:	hindex.o\
X  	$(KMLIB)
X! 	cc -o hindex -Mm hindex.o $(LIB)
X! 
X! hindex.o:	hindex.c
X! 	cc -c -Ox -Mme2 -I$(IKMDIR) hindex.c
X  
X
X--- 17,20 -----
X  hindex:	hindex.o\
X  	$(KMLIB)
X! 	cc -o hindex $(CFLAGS) hindex.o $(LIB)
X  
X===================================================================
XRCS file: RCS/monitor1.c,v
Xretrieving revision 1.1
Xdiff -c2 -r1.1 monitor1.c
X*** /tmp/,RCSt1a25903	Wed Jul 19 10:25:24 1989
X--- monitor1.c	Tue Jul 18 19:32:03 1989
X***************
X*** 33,36
X  #include <km/monitor.h>		/* must come after defs.h and scrops.h */
X  
X  #ifdef XENIX
X  #define	KERNEL		"/xenix"
X
X--- 33,40 -----
X  #include <km/monitor.h>		/* must come after defs.h and scrops.h */
X  
X+ #if defined(M_XENIX) && defined(M_I386)
X+ #define XENIX386 (1)
X+ #endif
X+ 
X  #ifdef XENIX
X  #define	KERNEL		"/xenix"
X***************
X*** 48,51
X  #define O_DSTFLAG	"_Dstflag"
X  #define O_UTSNAME	"_utsname"
X  #define O_COREMAP	"_coremap"
X  #define O_END		"_end"
X
X--- 52,58 -----
X  #define O_DSTFLAG	"_Dstflag"
X  #define O_UTSNAME	"_utsname"
X+ #ifdef XENIX386
X+ #define O_SPTMAP	"_sptmap"
X+ #else
X  #define O_COREMAP	"_coremap"
X  #define O_END		"_end"
X***************
X*** 50,53
X  #define O_COREMAP	"_coremap"
X  #define O_END		"_end"
X  #else
X  #define KERNEL		"/unix"
X
X--- 57,61 -----
X  #define O_COREMAP	"_coremap"
X  #define O_END		"_end"
X+ #endif
X  #else
X  #define KERNEL		"/unix"
X***************
X*** 85,88
X  int	       free_wait;
X  long	       fm_limit = 10;
X  #else
X  long	       sr_limit = 10, sw_limit = 10, sf_limit = 10, se_limit = 10;
X
X--- 93,99 -----
X  int	       free_wait;
X  long	       fm_limit = 10;
X+ #ifdef XENIX386
X+ long	       sf_limit = 10, se_limit = 10;
X+ #endif
X  #else
X  long	       sr_limit = 10, sw_limit = 10, sf_limit = 10, se_limit = 10;
X***************
X*** 90,93
X  long	       aq_limit = 10, as_limit = 10, aw_limit = 10, bc_limit = 10;
X  #endif
X  #ifdef SYSV
X  long           idle_usage;
X
X--- 101,107 -----
X  long	       aq_limit = 10, as_limit = 10, aw_limit = 10, bc_limit = 10;
X  #endif
X+ #ifdef XENIX386
X+ long           idle_usage;
X+ #endif
X  #ifdef SYSV
X  long           idle_usage;
X***************
X*** 106,109
X  struct user    user_last, user_new, user_llast;
X  #ifdef XENIX
X  struct map     coremap;
X  #endif
X
X--- 120,126 -----
X  struct user    user_last, user_new, user_llast;
X  #ifdef XENIX
X+ #ifdef XENIX386
X+ struct map     sptmap;
X+ #else
X  struct map     coremap;
X  #endif
X***************
X*** 108,111
X  struct map     coremap;
X  #endif
X  SPTR	       sptr;
X  struct proc    *proc_buf;
X
X--- 125,129 -----
X  struct map     coremap;
X  #endif
X+ #endif
X  SPTR	       sptr;
X  struct proc    *proc_buf;
X***************
X*** 131,134
X      O_DSTFLAG, 0, 0,
X      O_UTSNAME, 0, 0,
X      O_COREMAP, 0, 0,
X      O_END, 0, 0,
X
X--- 149,155 -----
X      O_DSTFLAG, 0, 0,
X      O_UTSNAME, 0, 0,
X+ #ifdef XENIX386
X+     O_SPTMAP, 0, 0,
X+ #else
X      O_COREMAP, 0, 0,
X      O_END, 0, 0,
X***************
X*** 133,136
X      O_COREMAP, 0, 0,
X      O_END, 0, 0,
X      "", 0, 0
X  #else
X
X--- 154,158 -----
X      O_COREMAP, 0, 0,
X      O_END, 0, 0,
X+ #endif
X      "", 0, 0
X  #else
X***************
X*** 188,191
X      0, "I/O Monitor", mode_IO, 0, 0, "io", 0, 0,
X      0, "Capacity Monitor", mode_capacity, 0, 0, "capacity", 0, 0,
X  #ifdef SYSV
X      0, "System Call Monitor", mode_scall, 0, 0, "scall", 0, 0,
X
X--- 210,216 -----
X      0, "I/O Monitor", mode_IO, 0, 0, "io", 0, 0,
X      0, "Capacity Monitor", mode_capacity, 0, 0, "capacity", 0, 0,
X+ #ifdef XENIX386
X+     0, "System Call Monitor", mode_scall, 0, 0, "scall", 0, 0,
X+ #endif
X  #ifdef SYSV
X      0, "System Call Monitor", mode_scall, 0, 0, "scall", 0, 0,
X***************
X*** 507,510
X  }
X  
X  int read_mapent()
X  {
X
X--- 532,538 -----
X  }
X  
X+ #ifdef XENIX386
X+ /* not yet */
X+ #else
X  int read_mapent()
X  {
X***************
X*** 519,522
X    return(FALSE);
X  }
X  
X  int read_text()
X
X--- 547,551 -----
X    return(FALSE);
X  }
X+ #endif
X  
X  #ifdef XENIX386
X***************
X*** 520,523
X  }
X  
X  int read_text()
X  {
X
X--- 549,555 -----
X  #endif
X  
X+ #ifdef XENIX386
X+ int read_text() { return 0; }
X+ #else
X  int read_text()
X  {
X***************
X*** 530,533
X    return(FALSE);
X  }
X  
X  int read_file()
X
X--- 562,566 -----
X    return(FALSE);
X  }
X+ #endif
X  
X  int read_file()
X***************
X*** 534,537
X  {
X  #ifdef XENIX
X    lseek(mfd, offsets.file, 0);
X    if (read(mfd, file_buf, file_size) == file_size)
X
X--- 567,574 -----
X  {
X  #ifdef XENIX
X+ #ifdef XENIX386
X+   lseek(kfd, offsets.file, 0);
X+   if (read(kfd, file_buf, file_size) == file_size)
X+ #else
X    lseek(mfd, offsets.file, 0);
X    if (read(mfd, file_buf, file_size) == file_size)
X***************
X*** 536,539
X    lseek(mfd, offsets.file, 0);
X    if (read(mfd, file_buf, file_size) == file_size)
X  #else
X    lseek(kfd, offsets.file, 0);
X
X--- 573,577 -----
X    lseek(mfd, offsets.file, 0);
X    if (read(mfd, file_buf, file_size) == file_size)
X+ #endif
X  #else
X    lseek(kfd, offsets.file, 0);
X***************
X*** 550,553
X    sptr.what = SPTR_INODE;
X  #ifdef XENIX
X    lseek(mfd, offsets.inode, 0);
X    if (read(mfd, sptr.where.inode, inode_size) == inode_size)
X
X--- 588,595 -----
X    sptr.what = SPTR_INODE;
X  #ifdef XENIX
X+ #ifdef XENIX386
X+   lseek(kfd, offsets.inode, 0);
X+   if (read(kfd, sptr.where.inode, inode_size) == inode_size)
X+ #else
X    lseek(mfd, offsets.inode, 0);
X    if (read(mfd, sptr.where.inode, inode_size) == inode_size)
X***************
X*** 552,555
X    lseek(mfd, offsets.inode, 0);
X    if (read(mfd, sptr.where.inode, inode_size) == inode_size)
X  #else
X    lseek(kfd, offsets.inode, 0);
X
X--- 594,598 -----
X    lseek(mfd, offsets.inode, 0);
X    if (read(mfd, sptr.where.inode, inode_size) == inode_size)
X+ #endif
X  #else
X    lseek(kfd, offsets.inode, 0);
X***************
X*** 567,570
X    long          now;
X    REGISTER SPTR ptr;
X  #ifdef SYSV
X    long		idle_time;
X
X--- 610,616 -----
X    long          now;
X    REGISTER SPTR ptr;
X+ #ifdef XENIX386
X+   long		idle_time;
X+ #endif
X  #ifdef SYSV
X    long		idle_time;
X***************
X*** 595,598
X    read(kfd, &si_new, sizeof(si_new));
X  #ifdef XENIX
X    read_mapent();
X    ptr = sptr;
X
X--- 641,650 -----
X    read(kfd, &si_new, sizeof(si_new));
X  #ifdef XENIX
X+ #ifdef XENIX386
X+ /* not yet */
X+   free_mem = 0;
X+   for (i = 0; i < 5; i++)
X+     free_max[i] = 0;
X+ #else
X    read_mapent();
X    ptr = sptr;
X***************
X*** 619,622
X      free_max[i] = mstob(free_max[i]);
X  #endif
X    read_text();
X    ptr = sptr;
X
X--- 671,675 -----
X      free_max[i] = mstob(free_max[i]);
X  #endif
X+ #endif
X    read_text();
X    ptr = sptr;
X***************
X*** 622,625
X    ptr = sptr;
X    ntext = 0;
X    for (i = v_buf.v_text; i; i--)
X      {
X
X--- 675,681 -----
X    ptr = sptr;
X    ntext = 0;
X+ #ifdef XENIX386
X+ /* no text */
X+ #else
X    for (i = v_buf.v_text; i; i--)
X      {
X***************
X*** 627,630
X  	ntext++;
X      }
X    read_file();
X    ptr.where.file = file_buf;
X
X--- 683,687 -----
X  	ntext++;
X      }
X+ #endif
X    read_file();
X    ptr.where.file = file_buf;
X***************
X*** 657,660
X        ptr.where.proc++;
X      }
X  #ifdef SYSV
X    idle_time = si_new.cpu[CPU_IDLE] - si_last.cpu[CPU_IDLE];
X
X--- 714,725 -----
X        ptr.where.proc++;
X      }
X+ #ifdef XENIX386
X+   idle_time = si_new.cpu[CPU_IDLE] - si_last.cpu[CPU_IDLE];
X+   if (time_interval - idle_time)
X+     idle_usage = (idle_time * cpu_total) / (time_interval - idle_time);
X+   else
X+     idle_usage = 1000000;			/* swamp anything else */
X+   cpu_total += idle_usage;
X+ #endif
X  #ifdef SYSV
X    idle_time = si_new.cpu[CPU_IDLE] - si_last.cpu[CPU_IDLE];
X***************
X*** 726,729
X        if (!(offsets.proc = name_list[3].n_value))
X          errexit("proc not found\n");
X        if (!(offsets.text = name_list[4].n_value))
X          errexit("text not found\n");
X
X--- 791,797 -----
X        if (!(offsets.proc = name_list[3].n_value))
X          errexit("proc not found\n");
X+ #ifdef XENIX386
X+ 	/* no text */
X+ #else
X        if (!(offsets.text = name_list[4].n_value))
X          errexit("text not found\n");
X***************
X*** 728,731
X        if (!(offsets.text = name_list[4].n_value))
X          errexit("text not found\n");
X        if (!(offsets.file = name_list[5].n_value))
X          errexit("file not found\n");
X
X--- 796,800 -----
X        if (!(offsets.text = name_list[4].n_value))
X          errexit("text not found\n");
X+ #endif
X        if (!(offsets.file = name_list[5].n_value))
X          errexit("file not found\n");
X***************
X*** 743,746
X          errexit("utsname not found\n");
X  #ifdef XENIX
X        if (!(offsets.coremap = name_list[12].n_value))
X          errexit("coremap not found\n");
X
X--- 812,819 -----
X          errexit("utsname not found\n");
X  #ifdef XENIX
X+ #ifdef XENIX386
X+       if (!(offsets.sptmap = name_list[12].n_value))
X+         errexit("sptmap not found\n");
X+ #else
X        if (!(offsets.coremap = name_list[12].n_value))
X          errexit("coremap not found\n");
X***************
X*** 747,750
X        if (!(offsets.end = name_list[13].n_value))
X          errexit("end not found\n");
X  
X  /*
X
X--- 820,824 -----
X        if (!(offsets.end = name_list[13].n_value))
X          errexit("end not found\n");
X+ #endif
X  
X  /*
X***************
X*** 787,790
X        (read(kfd, &utsname, sizeof(utsname)) != ERROR) &&
X  #ifdef XENIX
X        (lseek(kfd, offsets.coremap, 0) != ERROR) &&
X        (read(kfd, &coremap, sizeof(coremap)) != ERROR))
X
X--- 861,868 -----
X        (read(kfd, &utsname, sizeof(utsname)) != ERROR) &&
X  #ifdef XENIX
X+ #ifdef XENIX386
X+       (lseek(kfd, offsets.sptmap, 0) != ERROR) &&
X+       (read(kfd, &sptmap, sizeof(sptmap)) != ERROR))
X+ #else
X        (lseek(kfd, offsets.coremap, 0) != ERROR) &&
X        (read(kfd, &coremap, sizeof(coremap)) != ERROR))
X***************
X*** 789,792
X        (lseek(kfd, offsets.coremap, 0) != ERROR) &&
X        (read(kfd, &coremap, sizeof(coremap)) != ERROR))
X  #else
X        (lseek(kfd, offsets.gdstat, 0) != ERROR) &&
X
X--- 867,871 -----
X        (lseek(kfd, offsets.coremap, 0) != ERROR) &&
X        (read(kfd, &coremap, sizeof(coremap)) != ERROR))
X+ #endif
X  #else
X        (lseek(kfd, offsets.gdstat, 0) != ERROR) &&
X***************
X*** 805,808
X        if (!(file_buf = (struct file*)malloc(file_size)))
X  	return(FALSE);
X        text_size = v_buf.v_text * sizeof(struct text);
X  #ifdef XENIX
X
X--- 884,890 -----
X        if (!(file_buf = (struct file*)malloc(file_size)))
X  	return(FALSE);
X+ #ifdef XENIX386
X+       text_size = 0;
X+ #else
X        text_size = v_buf.v_text * sizeof(struct text);
X  #endif
X***************
X*** 806,809
X  	return(FALSE);
X        text_size = v_buf.v_text * sizeof(struct text);
X  #ifdef XENIX
X        temp = (unsigned int)coremap.mpent;
X
X--- 888,892 -----
X  #else
X        text_size = v_buf.v_text * sizeof(struct text);
X+ #endif
X  #ifdef XENIX
X  #ifdef XENIX386
X***************
X*** 807,810
X        text_size = v_buf.v_text * sizeof(struct text);
X  #ifdef XENIX
X        temp = (unsigned int)coremap.mpent;
X        offsets.mapent = (long)temp;
X
X--- 890,898 -----
X  #endif
X  #ifdef XENIX
X+ #ifdef XENIX386
X+ /* not yet */
X+       offsets.mapent = 0;
X+       mapent_size = 0;
X+ #else
X        temp = (unsigned int)coremap.mpent;
X        offsets.mapent = (long)temp;
X***************
X*** 813,816
X        offsets.inode += offsets.end + offsets.mem;
X  #endif
X        inode_size = v_buf.v_inode * sizeof(struct inode);
X        max_size = text_size;
X
X--- 901,905 -----
X        offsets.inode += offsets.end + offsets.mem;
X  #endif
X+ #endif
X        inode_size = v_buf.v_inode * sizeof(struct inode);
X        max_size = text_size;
X***************
X*** 899,903
X    char *argv[];
X  {
X!   int           c, errflg = 0;
X    struct passwd *pwent;
X  
X
X--- 988,992 -----
X    char *argv[];
X  {
X!   int           sflg = 0, c, errflg = 0;
X    struct passwd *pwent;
X  
X***************
X*** 905,909
X  
X    rdspec();
X!   while ((c = getopt(argc, argv, "ai:u:")) != EOF)
X      {
X        switch (c)
X
X--- 994,998 -----
X  
X    rdspec();
X!   while ((c = getopt(argc, argv, "sai:u:")) != EOF)
X      {
X        switch (c)
X***************
X*** 909,912
X        switch (c)
X  	{
X  	  case 'a' :
X  	    all_procs = TRUE;
X
X--- 998,1002 -----
X        switch (c)
X  	{
X+ 	  case 's' : ++sflg; break;
X  	  case 'a' :
X  	    all_procs = TRUE;
X***************
X*** 928,932
X    if (errflg)
X      {
X!       fprintf(stderr, "usage: %s [-a] [-i sample interval] [-u user name]\n", basename(argv[0]));
X        exit(1);
X      }
X
X--- 1018,1022 -----
X    if (errflg)
X      {
X!       fprintf(stderr, "usage: %s [-as] [-i sample interval] [-u user name]\n", basename(argv[0]));
X        exit(1);
X      }
X***************
X*** 947,950
X  	    }
X            setup();
X            do_scr(&main_menu);
X            setdown();
X
X--- 1037,1041 -----
X  	    }
X            setup();
X+ 	  if (sflg) have_standout = 0;
X            do_scr(&main_menu);
X            setdown();
X===================================================================
XRCS file: RCS/monitor2.c,v
Xretrieving revision 1.1
Xdiff -c2 -r1.1 monitor2.c
X*** /tmp/,RCSt1a25903	Wed Jul 19 10:25:27 1989
X--- monitor2.c	Wed Jul 19 10:22:16 1989
X***************
X*** 30,33
X  #include <km/monitor.h>		/* must come after defs.h and scrops.h */
X  
X  extern int setup_mode();	/* forward reference */
X  extern int plot_data();
X
X--- 30,37 -----
X  #include <km/monitor.h>		/* must come after defs.h and scrops.h */
X  
X+ #if defined(M_XENIX) && defined(M_I386)
X+ #define XENIX386 (1)
X+ #endif
X+ 
X  extern int setup_mode();	/* forward reference */
X  extern int plot_data();
X***************
X*** 193,196
X  }
X  
X  #ifdef SYSV
X  void plot_scall()
X
X--- 197,209 -----
X  }
X  
X+ #ifdef XENIX386
X+ void plot_scall()
X+ {
X+   bar_persec(LINE_1, COL_1, (si_new.syscall - si_last.syscall), &sc_limit, 10L);
X+   bar_persec(LINE_2, COL_1, (si_new.sysfork - si_last.sysfork), &sf_limit, 10L);
X+   bar_persec(LINE_2, COL_2, (si_new.systrap - si_last.systrap), &se_limit, 10L);
X+ }
X+ #endif
X+ 
X  #ifdef SYSV
X  void plot_scall()
X***************
X*** 229,236
X  int plot_data()
X  {
X- #ifdef SYSV
X-   int i;
X- #endif
X- 
X    if (!read_data(FALSE))
X      return(FALSE);
X
X--- 242,245 -----
X  int plot_data()
X  {
X    if (!read_data(FALSE))
X      return(FALSE);
X***************
X*** 253,256
X  	plot_capacity();
X  	break;
X  #ifdef SYSV
X        case 5 :
X
X--- 262,270 -----
X  	plot_capacity();
X  	break;
X+ #ifdef XENIX386
X+       case 5 :
X+ 	plot_scall();
X+ 	break;
X+ #endif
X  #ifdef SYSV
X        case 5 :
X***************
X*** 302,305
X    printw ("Max processes per user     : %-8d", v_buf.v_maxup);
X    move(LINE_1 + 11, COL_1);
X    printw ("Max open text segments     : %-8d", v_buf.v_text);
X    move(LINE_1 + 12, COL_1);
X
X--- 316,322 -----
X    printw ("Max processes per user     : %-8d", v_buf.v_maxup);
X    move(LINE_1 + 11, COL_1);
X+ #ifdef XENIX386
X+   printw ("Max open text segments     : %-8d", 0);
X+ #else
X    printw ("Max open text segments     : %-8d", v_buf.v_text);
X  #endif
X***************
X*** 303,306
X    move(LINE_1 + 11, COL_1);
X    printw ("Max open text segments     : %-8d", v_buf.v_text);
X    move(LINE_1 + 12, COL_1);
X    printw ("Max timeout calls          : %-8d", v_buf.v_call);
X
X--- 320,324 -----
X  #else
X    printw ("Max open text segments     : %-8d", v_buf.v_text);
X+ #endif
X    move(LINE_1 + 12, COL_1);
X    printw ("Max timeout calls          : %-8d", v_buf.v_call);
X***************
X*** 424,427
X  #endif
X    	chart_capacity(LINE_2, COL_1, "Process Count", pr_limit, (long)v_buf.v_proc);
X    	chart_capacity(LINE_2, COL_2, "Open Text Segment Count", tx_limit, (long)v_buf.v_text);
X    	chart_capacity(LINE_3, COL_1, "Open File Count", of_limit, (long)v_buf.v_file);
X
X--- 442,448 -----
X  #endif
X    	chart_capacity(LINE_2, COL_1, "Process Count", pr_limit, (long)v_buf.v_proc);
X+ #ifdef XENIX386
X+   	chart_capacity(LINE_2, COL_2, "Open Text Segment Count", tx_limit, (long)0);
X+ #else
X    	chart_capacity(LINE_2, COL_2, "Open Text Segment Count", tx_limit, (long)v_buf.v_text);
X  #endif
X***************
X*** 425,428
X    	chart_capacity(LINE_2, COL_1, "Process Count", pr_limit, (long)v_buf.v_proc);
X    	chart_capacity(LINE_2, COL_2, "Open Text Segment Count", tx_limit, (long)v_buf.v_text);
X    	chart_capacity(LINE_3, COL_1, "Open File Count", of_limit, (long)v_buf.v_file);
X    	chart_capacity(LINE_3, COL_2, "Open Inode Count", in_limit, (long)v_buf.v_inode); 
X
X--- 446,450 -----
X  #else
X    	chart_capacity(LINE_2, COL_2, "Open Text Segment Count", tx_limit, (long)v_buf.v_text);
X+ #endif
X    	chart_capacity(LINE_3, COL_1, "Open File Count", of_limit, (long)v_buf.v_file);
X    	chart_capacity(LINE_3, COL_2, "Open Inode Count", in_limit, (long)v_buf.v_inode); 
X***************
X*** 428,431
X    	chart_capacity(LINE_3, COL_2, "Open Inode Count", in_limit, (long)v_buf.v_inode); 
X  	break;
X  #ifdef SYSV
X        case 5 :
X
X--- 450,461 -----
X    	chart_capacity(LINE_3, COL_2, "Open Inode Count", in_limit, (long)v_buf.v_inode); 
X  	break;
X+ #ifdef XENIX386
X+       case 5 :
X+   	mode_scr.head = " System Call Monitor ";
X+   	chart_absolute(LINE_1, COL_1, "System Calls / Second", sc_limit);
X+   	chart_absolute(LINE_2, COL_1, "Forks / Second", sf_limit);
X+   	chart_absolute(LINE_2, COL_2, "Traps / Second", se_limit);
X+ 	break;
X+ #endif
X  #ifdef SYSV
X        case 5 :
X***************
X*** 514,517
X    return(TRUE);
X  }
X  
X  #ifdef SYSV
X
X--- 544,555 -----
X    return(TRUE);
X  }
X+ 
X+ #ifdef XENIX386
X+ int mode_scall()
X+ {
X+   set_mode(5);
X+   return(TRUE);
X+ }
X+ #endif
X  
X  #ifdef SYSV
X===================================================================
XRCS file: RCS/monproc.c,v
Xretrieving revision 1.1
Xdiff -c2 -r1.1 monproc.c
X*** /tmp/,RCSt1a25903	Wed Jul 19 10:25:29 1989
X--- monproc.c	Tue Jul 18 19:00:09 1989
X***************
X*** 44,47
X  #include <km/monitor.h>		/* must come after defs.h and scrops.h */
X  
X  #define PROC_NORM    " (Q)uit, (T)op, (U)ser, (W)hen, (Z)ap, <SPACE> to backup or selection "
X  #define PROC_MORE    " (Q)uit, (T)op, (U)ser, (S)witch, (W)hen, (Z)ap, <SPACE> to backup "
X
X--- 44,51 -----
X  #include <km/monitor.h>		/* must come after defs.h and scrops.h */
X  
X+ #if defined(M_XENIX) && defined(M_I386)
X+ #define XENIX386 (1)
X+ #endif
X+ 
X  #define PROC_NORM    " (Q)uit, (T)op, (U)ser, (W)hen, (Z)ap, <SPACE> to backup or selection "
X  #define PROC_MORE    " (Q)uit, (T)op, (U)ser, (S)witch, (W)hen, (Z)ap, <SPACE> to backup "
X***************
X*** 318,321
X    else if (status == SRUN)
X      addstr("Running  ");
X    else
X      addstr("Unknown  ");
X
X--- 322,337 -----
X    else if (status == SRUN)
X      addstr("Running  ");
X+ #ifdef SIDL
X+   else if (status == SIDL)
X+     addstr("Creating ");
X+ #endif
X+ #ifdef SZOMB
X+   else if (status == SZOMB)
X+     addstr("Zombie   ");
X+ #endif
X+ #ifdef SSTOP
X+   else if (status == SSTOP)
X+     addstr("Stopped  ");
X+ #endif
X    else
X      addstr("Unknown  ");
X***************
X*** 385,388
X  }
X  
X  struct text *get_text(tptr)
X    struct text *tptr;
X
X--- 401,407 -----
X  }
X  
X+ #ifdef XENIX386
X+ int get_tcount() { return 0; }
X+ #else
X  struct text *get_text(tptr)
X    struct text *tptr;
X***************
X*** 411,414
X    return(0);
X  }
X  
X  struct file *get_file(fptr)
X
X--- 430,434 -----
X    return(0);
X  }
X+ #endif
X  
X  struct file *get_file(fptr)
X***************
X*** 419,422
X    if (fptr)
X      {
X        i = (int)((((long)fptr & 0x0ffff) + offsets.end + offsets.mem - 
X  	  offsets.file) / (long)sizeof(struct file));
X
X--- 439,446 -----
X    if (fptr)
X      {
X+ #ifdef XENIX386
X+       i = (int)((((long)fptr) - 
X+ 	  offsets.file) / (long)sizeof(struct file));
X+ #else
X        i = (int)((((long)fptr & 0x0ffff) + offsets.end + offsets.mem - 
X  	  offsets.file) / (long)sizeof(struct file));
X***************
X*** 421,424
X        i = (int)((((long)fptr & 0x0ffff) + offsets.end + offsets.mem - 
X  	  offsets.file) / (long)sizeof(struct file));
X        if (i > v_buf.v_file)
X  	return((struct file*)0);
X
X--- 445,449 -----
X        i = (int)((((long)fptr & 0x0ffff) + offsets.end + offsets.mem - 
X  	  offsets.file) / (long)sizeof(struct file));
X+ #endif
X        if (i > v_buf.v_file)
X  	return((struct file*)0);
X***************
X*** 436,439
X    if (iptr)
X      {
X        i = (int)((((long)iptr & 0x0ffff) + offsets.end + offsets.mem - 
X  	  offsets.inode) / (long)sizeof(struct inode));
X
X--- 461,468 -----
X    if (iptr)
X      {
X+ #ifdef XENIX386
X+       i = (int)((((long)iptr) - 
X+ 	  offsets.inode) / (long)sizeof(struct inode));
X+ #else
X        i = (int)((((long)iptr & 0x0ffff) + offsets.end + offsets.mem - 
X  	  offsets.inode) / (long)sizeof(struct inode));
X***************
X*** 438,441
X        i = (int)((((long)iptr & 0x0ffff) + offsets.end + offsets.mem - 
X  	  offsets.inode) / (long)sizeof(struct inode));
X        if (i > v_buf.v_inode)
X  	return((struct inode*)0);
X
X--- 467,471 -----
X        i = (int)((((long)iptr & 0x0ffff) + offsets.end + offsets.mem - 
X  	  offsets.inode) / (long)sizeof(struct inode));
X+ #endif
X        if (i > v_buf.v_inode)
X  	return((struct inode*)0);
X***************
X*** 552,555
X    for (i = 0, mod_count = 0; (i < NSIG) && (mod_count < (LINES - 17)); i++)
X      {
X        if (user_ptr->u_signal[i] == (int (far *)())0)
X  	;
X
X--- 582,588 -----
X    for (i = 0, mod_count = 0; (i < NSIG) && (mod_count < (LINES - 17)); i++)
X      {
X+ #ifdef XENIX386
X+ #define far
X+ #endif
X        if (user_ptr->u_signal[i] == (int (far *)())0)
X  	;
X***************
X*** 695,698
X      {
X  #ifdef XENIX
X        text_size = user_new.u_tsize * 512L;
X        data_size = user_new.u_dsize * 512L;
X
X--- 728,736 -----
X      {
X  #ifdef XENIX
X+ #ifdef XENIX386
X+       text_size = user_new.u_tsize;
X+       data_size = user_new.u_dsize;
X+       stack_size = user_new.u_ssize;
X+ #else
X        text_size = user_new.u_tsize * 512L;
X        data_size = user_new.u_dsize * 512L;
X***************
X*** 698,701
X        data_size = user_new.u_dsize * 512L;
X        stack_size = user_new.u_ssize * 512L;
X  #else
X        text_size = user_new.u_tsize * NBPC;
X
X--- 736,740 -----
X        data_size = user_new.u_dsize * 512L;
X        stack_size = user_new.u_ssize * 512L;
X+ #endif
X  #else
X        text_size = user_new.u_tsize * NBPC;
X***************
X*** 703,706
X        stack_size = user_new.u_ssize * NBPC;
X  #endif
X        text_count = get_tcount(pbuf.p_textp);
X        move(LINE_1, COL_1 + 18);
X
X--- 742,748 -----
X        stack_size = user_new.u_ssize * NBPC;
X  #endif
X+ #ifdef XENIX386
X+       text_count = 0;
X+ #else
X        text_count = get_tcount(pbuf.p_textp);
X  #endif
X***************
X*** 704,707
X  #endif
X        text_count = get_tcount(pbuf.p_textp);
X        move(LINE_1, COL_1 + 18);
X        put_perms(user_new.u_cmask);
X
X--- 746,750 -----
X  #else
X        text_count = get_tcount(pbuf.p_textp);
X+ #endif
X        move(LINE_1, COL_1 + 18);
X        put_perms(user_new.u_cmask);
X***************
X*** 709,712
X        printw("%-10ld", user_new.u_limit);
X        move(LINE_1 + 2, COL_1 + 18);
X        printw("%ld/%-15d", text_size, text_count);
X        move(LINE_1 + 3, COL_1 + 18);
X
X--- 752,758 -----
X        printw("%-10ld", user_new.u_limit);
X        move(LINE_1 + 2, COL_1 + 18);
X+ #ifdef XENIX386
X+       printw("%-10ld", text_size);
X+ #else
X        printw("%ld/%-15d", text_size, text_count);
X  #endif
X***************
X*** 710,713
X        move(LINE_1 + 2, COL_1 + 18);
X        printw("%ld/%-15d", text_size, text_count);
X        move(LINE_1 + 3, COL_1 + 18);
X        printw("%-10ld", data_size);
X
X--- 756,760 -----
X  #else
X        printw("%ld/%-15d", text_size, text_count);
X+ #endif
X        move(LINE_1 + 3, COL_1 + 18);
X        printw("%-10ld", data_size);
X***************
X*** 739,742
X      		{
X  #ifdef XENIX
X        		  offsets.user = pbuf.p_addr.p_caddr * 512L;
X  #else
X
X--- 786,792 -----
X      		{
X  #ifdef XENIX
X+ #ifdef XENIX386
X+ 		  offsets.user = pbuf.p_addr[0].te_frameno * NBPC;
X+ #else
X        		  offsets.user = pbuf.p_addr.p_caddr * 512L;
X  #endif
X***************
X*** 740,743
X  #ifdef XENIX
X        		  offsets.user = pbuf.p_addr.p_caddr * 512L;
X  #else
X        		  offsets.user = (pbuf.p_addr[0] * (long)NBPC) + 0x600L;
X
X--- 790,794 -----
X  #else
X        		  offsets.user = pbuf.p_addr.p_caddr * 512L;
X+ #endif
X  #else
X        		  offsets.user = (pbuf.p_addr[0] * (long)NBPC) + 0x600L;
X***************
X*** 748,751
X      		{
X  #ifdef XENIX
X        		  offsets.user = (pbuf.p_addr.p_daddr + swplo) * BSIZE;
X  #else
X
X--- 799,805 -----
X      		{
X  #ifdef XENIX
X+ #ifdef XENIX386
X+ 		  offsets.user = pbuf.p_addr[0].te_frameno * NBPC;
X+ #else
X        		  offsets.user = (pbuf.p_addr.p_daddr + swplo) * BSIZE;
X  #endif
X***************
X*** 749,752
X  #ifdef XENIX
X        		  offsets.user = (pbuf.p_addr.p_daddr + swplo) * BSIZE;
X  #else
X        		  offsets.user = (pbuf.p_swaddr + swplo) * BSIZE;
X
X--- 803,807 -----
X  #else
X        		  offsets.user = (pbuf.p_addr.p_daddr + swplo) * BSIZE;
X+ #endif
X  #else
X        		  offsets.user = (pbuf.p_swaddr + swplo) * BSIZE;
X***************
X*** 992,995
X        stack_size = user_last.u_ssize * NBPC;
X  #endif
X        text_count = get_tcount(pbuf.p_textp);
X        move(LINE_1, COL_1);
X
X--- 1047,1053 -----
X        stack_size = user_last.u_ssize * NBPC;
X  #endif
X+ #ifdef XENIX386
X+       text_count = 0;
X+ #else
X        text_count = get_tcount(pbuf.p_textp);
X  #endif
X***************
X*** 993,996
X  #endif
X        text_count = get_tcount(pbuf.p_textp);
X        move(LINE_1, COL_1);
X        addstr("Umask Value     : ");
X
X--- 1051,1055 -----
X  #else
X        text_count = get_tcount(pbuf.p_textp);
X+ #endif
X        move(LINE_1, COL_1);
X        addstr("Umask Value     : ");
X***************
X*** 1004,1007
X        addstr("Text Size       : ");
X        move(LINE_1 + 2, COL_1 + 18);
X        printw("%ld/%-15d", text_size, text_count);
X        move(LINE_1 + 3, COL_1);
X
X--- 1063,1069 -----
X        addstr("Text Size       : ");
X        move(LINE_1 + 2, COL_1 + 18);
X+ #ifdef XENIX386
X+       printw("%-10ld", text_size);
X+ #else
X        printw("%ld/%-15d", text_size, text_count);
X  #endif
X***************
X*** 1005,1008
X        move(LINE_1 + 2, COL_1 + 18);
X        printw("%ld/%-15d", text_size, text_count);
X        move(LINE_1 + 3, COL_1);
X        addstr("Data Size       : ");
X
X--- 1067,1071 -----
X  #else
X        printw("%ld/%-15d", text_size, text_count);
X+ #endif
X        move(LINE_1 + 3, COL_1);
X        addstr("Data Size       : ");
X***************
X*** 1072,1075
X    if (extra)
X      {
X        percent = (int)((pptr->p_cpu * 100) / cpu_total);
X        if (percent > 100)
X
X--- 1135,1139 -----
X    if (extra)
X      {
X+       if (cpu_total == 0) percent = 100; else
X        percent = (int)((pptr->p_cpu * 100) / cpu_total);
X        if (percent > 100)
X***************
X*** 1159,1162
X      		    {
X  #ifdef XENIX
X        		      offsets.user = proc_ptr->p_addr.p_caddr * 512L;
X  #else
X
X--- 1223,1229 -----
X      		    {
X  #ifdef XENIX
X+ #ifdef XENIX386
X+ 		      offsets.user = proc_ptr->p_addr[0].te_frameno * NBPC;
X+ #else
X        		      offsets.user = proc_ptr->p_addr.p_caddr * 512L;
X  #endif
X***************
X*** 1160,1163
X  #ifdef XENIX
X        		      offsets.user = proc_ptr->p_addr.p_caddr * 512L;
X  #else
X        		      offsets.user = (proc_ptr->p_addr[0] * (long)NBPC) + 0x600L;
X
X--- 1227,1231 -----
X  #else
X        		      offsets.user = proc_ptr->p_addr.p_caddr * 512L;
X+ #endif
X  #else
X        		      offsets.user = (proc_ptr->p_addr[0] * (long)NBPC) + 0x600L;
X***************
X*** 1168,1171
X      		    {
X  #ifdef XENIX
X        		      offsets.user = (proc_ptr->p_addr.p_daddr + swplo) * BSIZE;
X  #else
X
X--- 1236,1242 -----
X      		    {
X  #ifdef XENIX
X+ #ifdef XENIX386
X+ 		      offsets.user = proc_ptr->p_addr[0].te_frameno * NBPC;
X+ #else
X        		      offsets.user = (proc_ptr->p_addr.p_daddr + swplo) * BSIZE;
X  #endif
X***************
X*** 1169,1172
X  #ifdef XENIX
X        		      offsets.user = (proc_ptr->p_addr.p_daddr + swplo) * BSIZE;
X  #else
X        		      offsets.user = (proc_ptr->p_swaddr + swplo) * BSIZE;
X
X--- 1240,1244 -----
X  #else
X        		      offsets.user = (proc_ptr->p_addr.p_daddr + swplo) * BSIZE;
X+ #endif
X  #else
X        		      offsets.user = (proc_ptr->p_swaddr + swplo) * BSIZE;
X===================================================================
XRCS file: RCS/montop.c,v
Xretrieving revision 1.1
Xdiff -c2 -r1.1 montop.c
X*** /tmp/,RCSt1a25903	Wed Jul 19 10:25:31 1989
X--- montop.c	Tue Jul 18 18:59:18 1989
X***************
X*** 28,31
X  #include <km/monitor.h>		/* must come after defs.h and scrops.h */
X  
X  #define TLINE_1		2
X  #define TCOL_1		2
X
X--- 28,35 -----
X  #include <km/monitor.h>		/* must come after defs.h and scrops.h */
X  
X+ #if defined(M_XENIX) && defined(M_I386)
X+ #define XENIX386 (1)
X+ #endif
X+ 
X  #define TLINE_1		2
X  #define TCOL_1		2
X***************
X*** 189,192
X          {
X  #ifdef XENIX
X            offsets.user = proc_ptr->p_addr.p_caddr * 512L;
X  #else
X
X--- 193,199 -----
X          {
X  #ifdef XENIX
X+ #ifdef XENIX386
X+           offsets.user = proc_ptr->p_addr[0].te_frameno * NBPC;
X+ #else
X            offsets.user = proc_ptr->p_addr.p_caddr * 512L;
X  #endif
X***************
X*** 190,193
X  #ifdef XENIX
X            offsets.user = proc_ptr->p_addr.p_caddr * 512L;
X  #else
X            offsets.user = (proc_ptr->p_addr[0] * (long)NBPC) + 0x600L;
X
X--- 197,201 -----
X  #else
X            offsets.user = proc_ptr->p_addr.p_caddr * 512L;
X+ #endif
X  #else
X            offsets.user = (proc_ptr->p_addr[0] * (long)NBPC) + 0x600L;
X***************
X*** 198,201
X          {
X  #ifdef XENIX
X            offsets.user = (proc_ptr->p_addr.p_daddr + swplo) * BSIZE;
X  #else
X
X--- 206,212 -----
X          {
X  #ifdef XENIX
X+ #ifdef XENIX386
X+           offsets.user = proc_ptr->p_addr[0].te_frameno * NBPC;
X+ #else
X            offsets.user = (proc_ptr->p_addr.p_daddr + swplo) * BSIZE;
X  #endif
X***************
X*** 199,202
X  #ifdef XENIX
X            offsets.user = (proc_ptr->p_addr.p_daddr + swplo) * BSIZE;
X  #else
X            offsets.user = (proc_ptr->p_swaddr + swplo) * BSIZE;
X
X--- 210,214 -----
X  #else
X            offsets.user = (proc_ptr->p_addr.p_daddr + swplo) * BSIZE;
X+ #endif
X  #else
X            offsets.user = (proc_ptr->p_swaddr + swplo) * BSIZE;
SHAR_EOFmonitor.diffs
if test 6063 -ne "`sum < 'monitor.diffs' | sed 's/ .*//'`"
then
	echo shar: "possible error transmitting 'monitor.diffs'" '(sum should have been 6063)'
	echo shar: "trying 'sum -r'"
	if test 10373 -ne "`sum -r < 'monitor.diffs' | sed 's/ .*//'`"
	then
		echo shar: "probable error transmitting 'monitor.diffs'" '(sum should have been 10373)'
	echo shar: "trying 'wc -c'"
		if test 31607 -ne "`wc -c < 'monitor.diffs'`"
		then
			echo shar: "error transmitting 'monitor.diffs'" '(should have been 31607 characters)'
		else
			echo shar: "wc was ok"
		fi
	fi
fi
chmod 644 'monitor.diffs'
fi
exit 0
#	End of shell archive
-- 
Stu Heiss - gargoyle.uchicago.edu!jpusa1.uucp!stu, stu at jpusa1.chi.il.us



More information about the Comp.unix.xenix mailing list