lload for xenix

Bodo Rueskamp br at laura.UUCP
Tue May 30 20:44:57 AEST 1989


In article <30067 at conexch.UUCP> sandy at conexch.UUCP (Sandford Zelkovitz) writes:
>Below, is my ported version of lload.c for Xenix. The original code,
>by Lars Pensj from Myab Gothenburg, Sweden, was distributed in 
>alt.sources.

Diffs for Xenix 286 [ sizeof(int) != sizeof(long) !! ]:


*** lload.c	Tue May 30 12:34:15 1989
--- lload.c.orig	Tue May 30 12:34:20 1989
***************
*** 33,40
  
  
  /*  For Xenix:  compile as follows:  cc -Ox lload.c -lm -lx -o lload   */
- /*  For Xenix 286: compile as follows:
- 		cc -M2e -i -Ox lload.c -lm -lx -o lload		*/
  
  /*  Modified for Xenix by Sanford Zelkovitz    XBBS   714-898-8634     */
  /*  Modified for Xenix 286 by Bodo Rueskamp, <br at unido.uucp>  */

--- 33,38 -----
  
  
  /*  For Xenix:  compile as follows:  cc -Ox lload.c -lm -lx -o lload   */
  
  /*  Modified for Xenix by Sanford Zelkovitz    XBBS   714-898-8634     */
  
***************
*** 37,43
  		cc -M2e -i -Ox lload.c -lm -lx -o lload		*/
  
  /*  Modified for Xenix by Sanford Zelkovitz    XBBS   714-898-8634     */
- /*  Modified for Xenix 286 by Bodo Rueskamp, <br at unido.uucp>  */
  
  #include <fcntl.h>
  #ifdef M_XENIX

--- 35,40 -----
  /*  For Xenix:  compile as follows:  cc -Ox lload.c -lm -lx -o lload   */
  
  /*  Modified for Xenix by Sanford Zelkovitz    XBBS   714-898-8634     */
  
  #include <fcntl.h>
  #ifdef M_XENIX
***************
*** 46,52
  #include <nlist.h>
  #endif
  #include <stdio.h>
- #ifndef M_XENIX
  #include <stropts.h>
  #include <poll.h>
  #endif

--- 43,48 -----
  #include <nlist.h>
  #endif
  #include <stdio.h>
  #include <stropts.h>
  #include <poll.h>
  #include <math.h>
***************
*** 49,55
  #ifndef M_XENIX
  #include <stropts.h>
  #include <poll.h>
- #endif
  #include <math.h>
  #include <sys/types.h>
  #include <sys/param.h>

--- 45,50 -----
  #include <stdio.h>
  #include <stropts.h>
  #include <poll.h>
  #include <math.h>
  #include <sys/types.h>
  #include <sys/param.h>
***************
*** 169,175
  	 * Read the 'v' structure every time. It says how
  	 * many procs are used.
  	 */
! 	if (lseek(kmem, (long) v_p->n_value, 0) == -1) {
  	    perror("lseek v");
  	    exit(1);
  	}

--- 164,170 -----
  	 * Read the 'v' structure every time. It says how
  	 * many procs are used.
  	 */
! 	if (lseek(kmem, v_p->n_value, 0) == -1) {
  	    perror("lseek v");
  	    exit(1);
  	}
***************
*** 180,186
  	size = (struct proc *)v.ve_proc - (struct proc *)proc_p->n_value;
  	first_buf = buf_p->n_value;
  	last_buf = first_buf + v.v_buf * sizeof (struct buf);
! 	if (lseek(kmem, (long) proc_p->n_value, 0) == -1) {
  	    perror("lseek proc");
  	    exit(1);
  	}

--- 175,181 -----
  	size = (struct proc *)v.ve_proc - (struct proc *)proc_p->n_value;
  	first_buf = buf_p->n_value;
  	last_buf = first_buf + v.v_buf * sizeof (struct buf);
! 	if (lseek(kmem, proc_p->n_value, 0) == -1) {
  	    perror("lseek proc");
  	    exit(1);
  	}
***************
*** 233,239
  		   av[0]);
  	write(debug_fd, buff, strlen(buff));
  #endif
! 	(void)nap(sleeping * 1000L);
  	free(p);
      }
  }

--- 228,234 -----
  		   av[0]);
  	write(debug_fd, buff, strlen(buff));
  #endif
! 	(void)nap(sleeping * 1000);
  	free(p);
      }
  }



More information about the Alt.sources mailing list