X11R4 patch for SCO XENIX (part01)

Chain Lee chain at paul.rutgers.edu
Mon Jan 7 13:21:10 AEST 1991


*** X11R4.ORIG/mit/lib/Xt/Create.c	Sat Jan  5 22:07:35 1991
--- X11R4/mit/lib/Xt/Create.c	Sat Nov  3 18:07:00 1990
***************
*** 29,35 ****
  #include "StringDefs.h"
  #include "Shell.h"
  #include "ShellP.h"
- #include <stdio.h>
  
  static String XtNxtCreateWidget = "xtCreateWidget";
  static String XtNxtCreatePopupShell = "xtCreatePopupShell";
--- 29,34 ----
*** X11R4.ORIG/mit/lib/Xt/Imakefile	Sat Jan  5 22:06:54 1991
--- X11R4/mit/lib/Xt/Imakefile	Sat Nov  3 18:05:55 1990
***************
*** 1,13 ****
  #include <Library.tmpl>
  
  #ifdef BandAidCompiler
! #include BandAidCompiler
  #endif
  
  #if UnalignedReferencesAllowed
    ALIGN_DEFINES = -DUNALIGNED
  #endif
!         DEFINES = AllocateLocalDefines $(ALIGN_DEFINES)
      APP_DEFINES = -DXAPPLOADDIR=\"$(XAPPLOADDIR)$(PATHSEP)\"
       DB_DEFINES = -DERRORDB=\"$(LIBDIR)/XtErrorDB\"
     SRCH_DEFINES = \
--- 1,14 ----
  #include <Library.tmpl>
  
  #ifdef BandAidCompiler
! #include "BandAidCompiler"
  #endif
  
  #if UnalignedReferencesAllowed
    ALIGN_DEFINES = -DUNALIGNED
  #endif
!   LOCAL_DEFINES = -DXFILESEARCHPATHDEFAULT=\"$(LIBDIR)/%L/%T/%N%S\:$(LIBDIR)/%l/%T/%N%S\:$(LIBDIR)/%T/%N%S\"
!         DEFINES = AllocateLocalDefines $(ALIGN_DEFINES) $(LOCAL_DEFINES)
      APP_DEFINES = -DXAPPLOADDIR=\"$(XAPPLOADDIR)$(PATHSEP)\"
       DB_DEFINES = -DERRORDB=\"$(LIBDIR)/XtErrorDB\"
     SRCH_DEFINES = \
*** X11R4.ORIG/mit/lib/X/sysV/Berklib.c	Sat Jan  5 22:08:30 1991
--- X11R4/mit/lib/X/sysV/Berklib.c	Thu Nov 15 22:51:16 1990
***************
*** 1,13 ****
- /* $XConsortium: Berklib.c,v 1.4 90/08/27 15:29:40 swick Exp $ */
- 
  /*
   * This file is used by System V based systems.
   */
  
  #include <sys/types.h>
  
  /*
!  * These are routines found in BSD and not found in many SysV's.  They are
   * included so that some clients can compile.
   */
  
--- 1,60 ----
  /*
   * This file is used by System V based systems.
   */
  
  #include <sys/types.h>
+ #include <sys/timeb.h>
+ #include <time.h>
+ #include <errno.h>
  
+ #ifndef __TIMEVAL__
+ struct timeval {
+     long tv_sec;
+     long tv_usec;
+ };
+ struct timezone {
+     int tz_minuteswest;
+     int tz_dsttime;
+ };
+ #endif /* __TIMEVAL__ */
+ 
+ extern int errno;
+ 
+ int
+ gettimeofday(tp, tzp)
+ struct timeval *tp;
+ struct timezone *tzp;
+ {
+ 	long clock;
+ 	static struct timeb	Now, *now;
+ 	static struct tm	LocalNow, *localnow;
+ 
+ 	now = &Now;
+ 	localnow = &LocalNow;
+ 
+ 	clock = time(0);
+ 	localnow = localtime(&clock);
+ 
+ 	ftime(now);
+ 
+ 	if (tzp != (struct timezone *)0) {
+ 		tzp->tz_minuteswest = (int)(localnow->tm_tzadj/60);
+ 		tzp->tz_dsttime = (int)(localnow->tm_isdst);
+ 	}
+ 
+ 	tp->tv_sec = (long)(now->time);
+ 	tp->tv_usec = (long)(1000 * (long)(now->millitm));
+ 
+ 	return(0);
+ }
+ 
+ getdtablesize()
+ {
+ 	return 60;
+ }
+ 
  /*
!  * These are routines fould in BDS and not found in HP-UX.  They are
   * included so that some clients can compile.
   */
  
***************
*** 73,92 ****
      return i;
  }
  
- char * 
- index (s, c)
- char *s, c;
- {
-     return ((char *) strchr (s, c));
- }
- 
- char * 
- rindex (s, c)
- char *s, c;
- {
-     return ((char *) strrchr (s, c));
- }
- 
  /*
   * insque, remque - insert/remove element from a queue
   *
--- 120,125 ----
***************
*** 158,164 ****
  }
  
  
! #ifdef hpux
  
  /** on hpux 5.n, readv/writev don't work on sockets;
   ** Even on 6.0, we'll keep these routines around for doing
--- 191,197 ----
  }
  
  
! #if defined(hpux) || defined(xenix)
  
  /** on hpux 5.n, readv/writev don't work on sockets;
   ** Even on 6.0, we'll keep these routines around for doing
***************
*** 166,172 ****
--- 199,219 ----
   ** demo to blow up.)
   **/
  
+ #if defined(xenix)
+ #define	swWritev	writev
+ #define	swReadv		readv
+ 
+ #ifndef __IOVEC__
+ struct iovec {
+ 	caddr_t iov_base;
+ 	int iov_len;
+ };
+ #endif
+ #endif
+ 
+ #if defined(hpux)
  #include <sys/uio.h>
+ #endif
  
  #define min(x,y) ((x)>(y)?(y):(x))
  
***************
*** 198,224 ****
  	return(0);
  }
  
! #endif /* hpux */
! 
! /*
!  * gettimeofday emulation
!  * Caution -- emulation is incomplete
!  *  - has only second, not microsecond, resolution.
!  *  - does not return timezone info.
!  */
! 
! #if defined(USG) && !defined(CRAY)
! int gettimeofday (tvp, tzp)
!     struct timeval *tvp;
!     struct timezone *tzp;
! {
!     time (&tvp->tv_sec);
!     tvp->tv_usec = 0L;
! 
!     if (tzp) {
! 	fprintf( stderr,
! 		 "Warning: gettimeofday() emulation does not return timezone\n"
! 		);
!     }
! }
! #endif
--- 245,248 ----
  	return(0);
  }
  
! #endif /* hpux || xenix */
*** X11R4.ORIG/mit/lib/X/XConnDis.c	Sat Dec  9 19:10:33 1989
--- X11R4/mit/lib/X/XConnDis.c	Wed Jan  2 17:06:01 1991
***************
*** 267,273 ****
  			   familyp, saddrlenp, saddrp)) < 0)
        goto bad;
  
- 
      /*
       * Set the connection non-blocking since we use select() to block; also
       * set close-on-exec so that programs that fork() doesn't get confused.
--- 267,272 ----
***************
*** 346,351 ****
--- 345,351 ----
   */
  #include <sys/socket.h>
  
+ #ifndef BSD_SOCKET_EMULATION
  #ifndef hpux
  #ifdef apollo			/* nest if(n)defs because makedepend is broken */
  #ifndef NO_TCP_H
***************
*** 355,360 ****
--- 355,361 ----
  #include <netinet/tcp.h>
  #endif /* apollo */
  #endif
+ #endif
  void bcopy();
  #endif /* NEED_BSDISH */
  
***************
*** 415,421 ****
--- 416,425 ----
  
  
  #ifdef UNIXCONN
+ 
+ #ifndef BSD_SOCKET_EMULATION
  #include <sys/un.h>
+ #endif
  
  #ifndef X_UNIX_PATH
  #ifdef hpux
***************
*** 446,453 ****
  #endif
  
      unaddr.sun_family = AF_UNIX;
      sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay);
! 
      addr = (struct sockaddr *) &unaddr;
      addrlen = strlen(unaddr.sun_path) + sizeof(unaddr.sun_family);
  
--- 450,460 ----
  #endif
  
      unaddr.sun_family = AF_UNIX;
+ #ifdef BSD_SOCKET_EMULATION
+     sprintf (unaddr.sun_path, "%d", idisplay);
+ #else
      sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay);
! #endif
      addr = (struct sockaddr *) &unaddr;
      addrlen = strlen(unaddr.sun_path) + sizeof(unaddr.sun_family);
  
***************
*** 465,471 ****
  	if ((fd = socket ((int) addr->sa_family, SOCK_STREAM, 0)) < 0) {
  	    return -1;
  	}
! 
  	if (connect (fd, addr, addrlen) < 0) {
  	    int olderrno = errno;
  	    (void) close (fd);
--- 472,486 ----
  	if ((fd = socket ((int) addr->sa_family, SOCK_STREAM, 0)) < 0) {
  	    return -1;
  	}
! #ifdef BSD_SOCKET_EMULATION
!     {
! 	struct sockaddr_un myaddr;
! 	myaddr.sun_family = AF_UNIX;
! 	sprintf(myaddr.sun_path, "%d", getpid());
! 	if (bind(fd, &myaddr, strlen(myaddr.sun_path) + 2) < 0)
! 	    return -1;
!     }
! #endif
  	if (connect (fd, addr, addrlen) < 0) {
  	    int olderrno = errno;
  	    (void) close (fd);
***************
*** 688,704 ****
--- 703,730 ----
  {
      unsigned long r_mask[MSKCNT];
      unsigned long w_mask[MSKCNT];
+     unsigned long e_mask[MSKCNT];
      int nfound;
  
      CLEARBITS(r_mask);
      CLEARBITS(w_mask);
+     CLEARBITS(e_mask);
  
      while (1) {
  	BITSET(r_mask, dpy->fd);
          BITSET(w_mask, dpy->fd);
+         BITSET(e_mask, dpy->fd);
  
  	do {
+ #if BSD_SOCKET_EMULATION
+ 	    nfound = select (dpy->fd + 1, r_mask, w_mask, e_mask, NULL);
+ 	    if (ANYSET(e_mask)) {
+ 	    	nfound = -1;
+ 	    	errno = EPIPE;
+ 	    }
+ #else
  	    nfound = select (dpy->fd + 1, r_mask, w_mask, NULL, NULL);
+ #endif
  	    if (nfound < 0 && errno != EINTR)
  		_XIOError(dpy);
  	} while (nfound <= 0);
***************
*** 746,757 ****
    Display *dpy;
  {
      unsigned long r_mask[MSKCNT];
      int result;
! 	
      CLEARBITS(r_mask);
      do {
  	BITSET(r_mask, dpy->fd);
  	result = select(dpy->fd + 1, r_mask, NULL, NULL, NULL);
  	if (result == -1 && errno != EINTR) _XIOError(dpy);
      } while (result <= 0);
  }
--- 772,797 ----
    Display *dpy;
  {
      unsigned long r_mask[MSKCNT];
+     unsigned long w_mask[MSKCNT];
+     unsigned long e_mask[MSKCNT];
      int result;
! 
      CLEARBITS(r_mask);
+     CLEARBITS(w_mask);
+     CLEARBITS(e_mask);
      do {
  	BITSET(r_mask, dpy->fd);
+ 	BITSET(e_mask, dpy->fd);
+ #if BSD_SOCKET_EMULATION
+ 	result = select(dpy->fd + 1, r_mask, w_mask, e_mask, NULL);
+ 	if (ANYSET(e_mask)) {
+ 	    result = -1;
+ 	    errno = EPIPE;
+ 	}
+ #else
  	result = select(dpy->fd + 1, r_mask, NULL, NULL, NULL);
+ 
+ #endif
  	if (result == -1 && errno != EINTR) _XIOError(dpy);
      } while (result <= 0);
  }
***************
*** 795,797 ****
--- 835,847 ----
      (void) WritevToServer (dpy->fd, iovarray, niov);
      return;
  }
+ 
+ #ifdef xenix
+ static void
+ dummy()
+ {
+ 	extern void ___lib_x_globals();
+ 
+ 	___lib_x_globals();
+ }
+ #endif
*** X11R4.ORIG/mit/lib/X/globals.c	Fri Jun 16 16:57:02 1989
--- X11R4/mit/lib/X/globals.c	Sat Oct  6 16:12:20 1990
***************
*** 172,177 ****
--- 172,182 ----
   * to be inserted BELOW this point!!!
   */
  
+ #ifdef xenix
+ /* Force brain-damaged MS linker to load this module */
+ void	___lib_x_globals(){}
+ #endif
+ 
  /*
   * NOTE: any additional external definition NEED
   * to be inserted ABOVE this point!!!
*** X11R4.ORIG/mit/lib/X/Xlibos.h	Mon Dec 18 13:45:55 1989
--- X11R4/mit/lib/X/Xlibos.h	Wed Jan  2 14:22:42 1991
***************
*** 17,23 ****
--- 17,37 ----
  #define MSKCNT ((MAXSOCKS + 31) / 32)
  
  #else
+ 
+ #ifdef xenix
  /*
+  * Xenix sysV 2.3.2
+  */
+ #include <sys/ioctl.h>
+ #include <sys/param.h>
+ 
+ #define BytesReadable(fd, ptr) ioctl ((fd), FIONREAD, (ptr))
+ #define MALLOC_0_RETURNS_NULL
+ #define MSKCNT ((NOFILE + 31) / 32)	/* size of bit array */
+ 
+ #else
+ 
+ /*
   * 4.2BSD-based systems
   */
  #include <netinet/in.h>
***************
*** 28,33 ****
--- 42,49 ----
  
  #define BytesReadable(fd, ptr) ioctl ((fd), FIONREAD, (ptr))
  #define MSKCNT ((NOFILE + 31) / 32)	/* size of bit array */
+ 
+ #endif /* xenix */
  #endif /* att else bsdish */
  
  
***************
*** 196,205 ****
--- 212,224 ----
   */
  #ifdef USG
  #if !defined(CRAY) && !defined(umips)
+ #ifndef __IOVEC__
+ #define __IOVEC__
  struct iovec {
      caddr_t iov_base;
      int iov_len;
  };
+ #endif
  #ifndef __TIMEVAL__
  #define __TIMEVAL__
  struct timeval {			/* BSD has in <sys/time.h> */
***************
*** 239,244 ****
--- 258,268 ----
  
  
  #ifndef USG
+ #define _XReadV readv
+ #define _XWriteV writev
+ #endif
+ 
+ #ifdef xenix
  #define _XReadV readv
  #define _XWriteV writev
  #endif
*** X11R4.ORIG/mit/lib/X/Berklib.c	Sun Jan  6 00:53:26 1991
--- X11R4/mit/lib/X/Berklib.c	Thu Nov 15 22:51:16 1990
***************
*** 0 ****
--- 1,248 ----
+ /*
+  * This file is used by System V based systems.
+  */
+ 
+ #include <sys/types.h>
+ #include <sys/timeb.h>
+ #include <time.h>
+ #include <errno.h>
+ 
+ #ifndef __TIMEVAL__
+ struct timeval {
+     long tv_sec;
+     long tv_usec;
+ };
+ struct timezone {
+     int tz_minuteswest;
+     int tz_dsttime;
+ };
+ #endif /* __TIMEVAL__ */
+ 
+ extern int errno;
+ 
+ int
+ gettimeofday(tp, tzp)
+ struct timeval *tp;
+ struct timezone *tzp;
+ {
+ 	long clock;
+ 	static struct timeb	Now, *now;
+ 	static struct tm	LocalNow, *localnow;
+ 
+ 	now = &Now;
+ 	localnow = &LocalNow;
+ 
+ 	clock = time(0);
+ 	localnow = localtime(&clock);
+ 
+ 	ftime(now);
+ 
+ 	if (tzp != (struct timezone *)0) {
+ 		tzp->tz_minuteswest = (int)(localnow->tm_tzadj/60);
+ 		tzp->tz_dsttime = (int)(localnow->tm_isdst);
+ 	}
+ 
+ 	tp->tv_sec = (long)(now->time);
+ 	tp->tv_usec = (long)(1000 * (long)(now->millitm));
+ 
+ 	return(0);
+ }
+ 
+ getdtablesize()
+ {
+ 	return 60;
+ }
+ 
+ /*
+  * These are routines fould in BDS and not found in HP-UX.  They are
+  * included so that some clients can compile.
+  */
+ 
+ bcopy (b1, b2, length)
+ register unsigned char *b1, *b2;
+ register length;
+ {
+     if (b1 < b2) {
+ 	b2 += length;
+ 	b1 += length;
+ 	while (length--) {
+ 	    *--b2 = *--b1;
+ 	}
+     }
+     else {
+ 	while (length--) {
+ 	    *b2++ = *b1++;
+ 	}
+     }
+ }
+ 
+ bcmp (b1, b2, length)
+ register unsigned char *b1, *b2;
+ register length;
+ {
+     while (length--) {
+ 	if (*b1++ != *b2++) return 1;
+     }
+     return 0;
+ }
+ 
+ bzero (b, length)
+ register unsigned char *b;
+ register length;
+ {
+     while (length--) {
+ 	*b++ = '\0';
+     }
+ }
+ 
+ 
+ /* Find the first set bit
+  * i.e. least signifigant 1 bit:
+  * 0 => 0
+  * 1 => 1
+  * 2 => 2
+  * 3 => 1
+  * 4 => 3
+  */
+ 
+ int
+ ffs(mask)
+ unsigned int	mask;
+ {
+     register i;
+ 
+     if ( ! mask ) return 0;
+     i = 1;
+     while (! (mask & 1)) {
+ 	i++;
+ 	mask = mask >> 1;
+     }
+     return i;
+ }
+ 
+ /*
+  * insque, remque - insert/remove element from a queue
+  *
+  * DESCRIPTION
+  *      Insque and remque manipulate queues built from doubly linked
+  *      lists.  Each element in the queue must in the form of
+  *      ``struct qelem''.  Insque inserts elem in a queue immedi-
+  *      ately after pred; remque removes an entry elem from a queue.
+  *
+  * SEE ALSO
+  *      ``VAX Architecture Handbook'', pp. 228-235.
+  */
+ 
+ struct qelem {
+     struct    qelem *q_forw;
+     struct    qelem *q_back;
+     char *q_data;
+     };
+ 
+ insque(elem, pred)
+ register struct qelem *elem, *pred;
+ {
+     register struct qelem *q;
+     /* Insert locking code here */
+     if ( elem->q_forw = q = (pred ? pred->q_forw : pred) )
+ 	q->q_back = elem;
+     if ( elem->q_back = pred )
+ 	pred->q_forw = elem;
+     /* Insert unlocking code here */
+ }
+ 
+ remque(elem)
+ register struct qelem *elem;
+ {
+     register struct qelem *q;
+     if ( ! elem ) return;
+     /* Insert locking code here */
+ 
+     if ( q = elem->q_back ) q->q_forw = elem->q_forw;
+     if ( q = elem->q_forw ) q->q_back = elem->q_back;
+ 
+     /* insert unlocking code here */
+ }
+ 
+ 
+ /*
+  * Berkeley random()
+  *
+  * We simulate via System V's rand()
+  */
+ 
+ int
+ random()
+ {
+    return (rand());
+ }
+ 
+ /*
+  * Berkeley srandom()
+  *
+  * We simulate via System V's rand()
+  */
+ 
+ int
+ srandom(seed)
+ int seed;
+ {
+    return (srand(seed));
+ }
+ 
+ 
+ #if defined(hpux) || defined(xenix)
+ 
+ /** on hpux 5.n, readv/writev don't work on sockets;
+  ** Even on 6.0, we'll keep these routines around for doing
+  ** extra large writes; (> 4000); (this caused the Bezier
+  ** demo to blow up.)
+  **/
+ 
+ #if defined(xenix)
+ #define	swWritev	writev
+ #define	swReadv		readv
+ 
+ #ifndef __IOVEC__
+ struct iovec {
+ 	caddr_t iov_base;
+ 	int iov_len;
+ };
+ #endif
+ #endif
+ 
+ #if defined(hpux)
+ #include <sys/uio.h>
+ #endif
+ 
+ #define min(x,y) ((x)>(y)?(y):(x))
+ 
+ int swWritev(fildes, iov, iovcnt)
+ int fildes;
+ register struct iovec *iov;
+ register int iovcnt;
+ {
+     while (iovcnt && iov->iov_len == 0)
+ 	iovcnt--, iov++;
+ 
+     if (iovcnt)
+ 	return(write(fildes,iov->iov_base,min(iov->iov_len,4000)));
+     else
+ 	return(0);
+ }
+ 
+ int swReadv(fildes, iov, iovcnt)
+ int fildes;
+ register struct iovec *iov;
+ register int iovcnt;
+ {
+     while (iovcnt && iov->iov_len == 0)
+ 	iovcnt--, iov++;
+ 
+     if (iovcnt)
+ 	return(read(fildes,iov->iov_base,iov->iov_len));
+     else
+ 	return(0);
+ }
+ 
+ #endif /* hpux || xenix */
*** X11R4.ORIG/mit/lib/Xau/Imakefile	Tue Dec 12 17:20:47 1989
--- X11R4/mit/lib/Xau/Imakefile	Fri Oct  5 21:49:14 1990
***************
*** 1,7 ****
  #include <Library.tmpl>
  
  #ifdef BandAidCompiler
! #include BandAidCompiler
  #endif
  
         INCLUDES = -I. -I$(TOP)
--- 1,7 ----
  #include <Library.tmpl>
  
  #ifdef BandAidCompiler
! #include "BandAidCompiler"
  #endif
  
         INCLUDES = -I. -I$(TOP)
*** X11R4.ORIG/mit/lib/Xmu/CvtStdSel.c	Sat Dec  2 15:28:28 1989
--- X11R4/mit/lib/Xmu/CvtStdSel.c	Sat Oct  6 12:34:29 1990
***************
*** 23,29 ****
--- 23,31 ----
  #include <X11/ShellP.h>
  #include <stdio.h>
  #ifndef att
+ #ifndef xenix
  #include <netdb.h>
+ #endif
  #include <sys/socket.h>
  #endif
  #include "Xmu.h"
*** X11R4.ORIG/mit/lib/Xmu/Imakefile	Tue Dec 12 18:43:10 1989
--- X11R4/mit/lib/Xmu/Imakefile	Mon Oct 29 12:06:21 1990
***************
*** 7,12 ****
--- 7,13 ----
  
     INSTALLFLAGS = $(INSTINCFLAGS)
         LINTLIBS = $(LINTXLIB) 
+         DEFINES = -DBITMAPDIR=\"$(INCDIR)/bitmaps\"
  
  #ifdef OsNameDefines
  OS_NAME_DEFINES = OsNameDefines
*** X11R4.ORIG/mit/server/ddx/mi/mispritest.h	Tue Oct  3 19:46:28 1989
--- X11R4/mit/server/ddx/mi/mispritest.h	Tue Oct 16 20:40:41 1990
***************
*** 92,98 ****
   */
  #define SPN_OVERLAP(pCbox,y,x,w) BOX_OVERLAP((pCbox),(x),(y),(x)+(w),(y))
  
! #define LINE_SORT(x1,y2,x2,y2) \
  { int _t; \
    if (x1 > x2) { _t = x1; x1 = x2; x2 = _t; } \
    if (y1 > y2) { _t = y1; y1 = y2; y2 = _t; } }
--- 92,98 ----
   */
  #define SPN_OVERLAP(pCbox,y,x,w) BOX_OVERLAP((pCbox),(x),(y),(x)+(w),(y))
  
! #define LINE_SORT(x1,y1,x2,y2) \
  { int _t; \
    if (x1 > x2) { _t = x1; x1 = x2; x2 = _t; } \
    if (y1 > y2) { _t = y1; y1 = y2; y2 = _t; } }
*** X11R4.ORIG/mit/server/ddx/mi/miwideline.h	Tue Nov 21 19:04:49 1989
--- X11R4/mit/server/ddx/mi/miwideline.h	Sat Oct  6 17:47:55 1990
***************
*** 113,119 ****
  #ifdef NOINLINEICEIL
  #define ICEIL(x) ((int)ceil(x))
  #else
! #ifdef __GNUC__
  static inline int ICEIL(x)
      double x;
  {
--- 113,119 ----
  #ifdef NOINLINEICEIL
  #define ICEIL(x) ((int)ceil(x))
  #else
! #if defined(__GNUC__) && !defined(xenix)
  static inline int ICEIL(x)
      double x;
  {
*** X11R4.ORIG/mit/server/ddx/mi/mifpoly.h	Fri Jul 28 12:05:51 1989
--- X11R4/mit/server/ddx/mi/mifpoly.h	Sat Oct  6 17:48:47 1990
***************
*** 44,50 ****
  #ifdef NOINLINEICEIL
  #define ICEIL(x) ((int)ceil(x))
  #else
! #ifdef __GNUC__
  static inline int ICEIL(x)
      double x;
  {
--- 44,50 ----
  #ifdef NOINLINEICEIL
  #define ICEIL(x) ((int)ceil(x))
  #else
! #if defined(__GNUC__) && !defined(xenix)
  static inline int ICEIL(x)
      double x;
  {
*** X11R4.ORIG/mit/server/ddx/mfb/mfbtegblt.c	Tue Nov 21 15:19:54 1989
--- X11R4/mit/server/ddx/mfb/mfbtegblt.c	Sun Dec  9 19:26:09 1990
***************
*** 210,215 ****
--- 210,217 ----
      glyphBytes = GLYPHWIDTHBYTESPADDED(pci);
  #endif
  
+ /* quick and dirty fix. It will be slow, so should be cleaned */
+ #ifndef xenix
      if (nglyph >= 4 && widthGlyphs <= 32)
      {
  	while (nglyph >= 4)
***************
*** 265,270 ****
--- 267,273 ----
  	    xpos += widthGlyphs;
  	}
      }
+ #endif /*xenix */
  
      while(nglyph--)
      {
*** X11R4.ORIG/mit/server/ddx/mfb/mfbfillsp.c	Fri Nov 24 18:02:36 1989
--- X11R4/mit/server/ddx/mfb/mfbfillsp.c	Sun Nov  4 09:41:21 1990
***************
*** 35,40 ****
--- 35,45 ----
  
  #include "servermd.h"
  
+ #ifdef xenix
+ #undef BITMAP_SCANLINE_UNIT
+ #define BITMAP_SCANLINE_UNIT 32
+ #endif
+ 
  /* scanline filling for monochrome frame buffer
     written by drewry, oct 1986
  
*** X11R4.ORIG/mit/server/ddx/xenix/vga/Imakefile	Sun Jan  6 01:02:55 1991
--- X11R4/mit/server/ddx/xenix/vga/Imakefile	Sun Dec  9 12:25:57 1990
***************
*** 0 ****
--- 1,45 ----
+ #include <Server.tmpl>
+ 
+ SRCS1 =	\
+ 	xenixInit.c \
+ 	xenixVGA.c \
+ 	xenixKbd.c \
+ 	xenixMouse.c \
+ 	xenixIo.c \
+ 	xenixTty.c \
+ 	xenixKeyMap.c
+ 
+ SRCS =	$(SRCS1) 
+ 
+ OFILES = xenixInit.o
+ 
+ OBJS = \
+ 	xenixInit.o \
+ 	xenixVGA.o \
+ 	xenixKbd.o \
+ 	xenixMouse.o \
+ 	xenixIo.o \
+ 	xenixTty.o \
+ 	xenixKeyMap.o
+ 
+    INCLUDES = -I. -I../../mfb -I../../mi -I../../../include -I$(INCLUDESRC)
+    LINTLIBS = ../../../dix/llib-ldix.ln ../../../os/4.2bsd/llib-los.ln \
+ 	      ../../mfb/llib-lmfb.ln ../../mi/llib-lmi.ln ../../cfb/llib-lcfb.ln
+ 
+ NormalLibraryObjectRule()
+ 
+ all:: $(OFILES) kbd_mode
+ 
+ lintlib:
+ 
+ NormalLibraryTarget(xenix,$(OBJS))
+ NormalLintTarget($(SRCS1))
+ SingleProgramTarget(kbd_mode, kbd_mode.o,,)
+ InstallProgram(kbd_mode,$(BINDIR))
+ InstallManPage(kbd_mode,$(MANDIR))
+ InstallManPage(Xxenix,$(MANDIR))
+ 
+ saber_src:
+ 	#load $(CFLAGS) $(SRCS1)
+ 
+ DependTarget()
*** X11R4.ORIG/mit/server/ddx/xenix/vga/README	Sun Jan  6 01:02:58 1991
--- X11R4/mit/server/ddx/xenix/vga/README	Sun Jan  6 00:59:54 1991
***************
*** 0 ****
--- 1,26 ----
+ #
+ # README						C.LEE 1/5/91
+ #
+ 
+ This directory contains standard VGA specific routines.
+ 
+   * Keyboard LED control is built in for the server.
+   * Keyboard should be in XT mode (kernel default configuration).
+   * Screen can be changed into text mode for multi-screen switching by
+     pressing all three mouse buttons down, similar to what I did for MGR.
+   * kbd_mode program is provided in case the server crashes messing up
+     the keyboard. You can login from another serial terminal and run
+ 
+ 		kbd_mode -a < /dev/tty??
+ 
+     where /dev/tty?? is the multiscreen you started Xxenix.
+     Don't try 'kbd_mode -r' unless you have a serial terminal at hand,
+     otherwise you will have to power down the machine. There is a bug
+     in Xenix preventing you from getting current keyboard mode.
+   * The Xxenix server uses the Xenix Event Manager. Therefore you may have 
+     problem running Xenix version of MGR window (ported by myself) using
+     bus mouse once Xxenix has been run.
+   * Screen saver blank mode is not supported. Use noblank mode instead.
+ 
+ Chain Lee
+ chain at paul.rutgers.edu



More information about the Alt.sources mailing list